id
int32 0
12.9k
| code
sequencelengths 2
264k
|
---|---|
2,800 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"jdom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CategorizedProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"jdom",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"DocumentElementParser",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"IDocumentElementRequestor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"DefaultProblemFactory",
";",
"public",
"class",
"DOMBuilder",
"extends",
"AbstractDOMBuilder",
"implements",
"IDocumentElementRequestor",
"{",
"protected",
"boolean",
"fBuildingSingleMember",
"=",
"false",
";",
"protected",
"boolean",
"fFinishedSingleMember",
"=",
"false",
";",
"protected",
"ArrayList",
"fFields",
";",
"Map",
"options",
"=",
"JavaCore",
".",
"getOptions",
"(",
")",
";",
"public",
"DOMBuilder",
"(",
")",
"{",
"}",
"public",
"void",
"acceptImport",
"(",
"int",
"declarationStart",
",",
"int",
"declarationEnd",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"boolean",
"onDemand",
",",
"int",
"modifiers",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"declarationStart",
",",
"declarationEnd",
"}",
";",
"int",
"[",
"]",
"nameRange",
"=",
"{",
"nameStart",
",",
"declarationEnd",
"-",
"1",
"}",
";",
"String",
"importName",
"=",
"new",
"String",
"(",
"this",
".",
"fDocument",
",",
"nameRange",
"[",
"0",
"]",
",",
"nameRange",
"[",
"1",
"]",
"+",
"1",
"-",
"nameRange",
"[",
"0",
"]",
")",
";",
"this",
".",
"fNode",
"=",
"new",
"DOMImport",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"importName",
",",
"nameRange",
",",
"onDemand",
",",
"modifiers",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"if",
"(",
"this",
".",
"fBuildingSingleMember",
")",
"{",
"this",
".",
"fFinishedSingleMember",
"=",
"true",
";",
"}",
"}",
"public",
"void",
"acceptInitializer",
"(",
"int",
"declarationStart",
",",
"int",
"declarationEnd",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"int",
"bodyStart",
",",
"int",
"bodyEnd",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"declarationStart",
",",
"declarationEnd",
"}",
";",
"int",
"[",
"]",
"commentRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"javaDocPositions",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"javaDocPositions",
".",
"length",
";",
"commentRange",
"[",
"0",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"2",
"]",
";",
"commentRange",
"[",
"1",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"1",
"]",
";",
"}",
"int",
"[",
"]",
"modifiersRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"modifiersStart",
">=",
"declarationStart",
")",
"{",
"modifiersRange",
"[",
"0",
"]",
"=",
"modifiersStart",
";",
"modifiersRange",
"[",
"1",
"]",
"=",
"bodyStart",
"-",
"1",
";",
"}",
"this",
".",
"fNode",
"=",
"new",
"DOMInitializer",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"commentRange",
",",
"modifiers",
",",
"modifiersRange",
",",
"bodyStart",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"if",
"(",
"this",
".",
"fBuildingSingleMember",
")",
"{",
"this",
".",
"fFinishedSingleMember",
"=",
"true",
";",
"}",
"}",
"public",
"void",
"acceptPackage",
"(",
"int",
"declarationStart",
",",
"int",
"declarationEnd",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStartPosition",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"null",
";",
"if",
"(",
"javaDocPositions",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"javaDocPositions",
".",
"length",
";",
"sourceRange",
"=",
"new",
"int",
"[",
"]",
"{",
"javaDocPositions",
"[",
"length",
"-",
"2",
"]",
",",
"declarationEnd",
"}",
";",
"}",
"else",
"{",
"sourceRange",
"=",
"new",
"int",
"[",
"]",
"{",
"declarationStart",
",",
"declarationEnd",
"}",
";",
"}",
"int",
"[",
"]",
"nameRange",
"=",
"{",
"nameStartPosition",
",",
"declarationEnd",
"-",
"1",
"}",
";",
"this",
".",
"fNode",
"=",
"new",
"DOMPackage",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"CharOperation",
".",
"charToString",
"(",
"name",
")",
",",
"nameRange",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"if",
"(",
"this",
".",
"fBuildingSingleMember",
")",
"{",
"this",
".",
"fFinishedSingleMember",
"=",
"true",
";",
"}",
"}",
"public",
"void",
"acceptProblem",
"(",
"CategorizedProblem",
"problem",
")",
"{",
"if",
"(",
"this",
".",
"fBuildingSingleMember",
"&&",
"this",
".",
"fFinishedSingleMember",
")",
"{",
"return",
";",
"}",
"this",
".",
"fAbort",
"=",
"true",
";",
"}",
"protected",
"void",
"addChild",
"(",
"IDOMNode",
"child",
")",
"{",
"super",
".",
"addChild",
"(",
"child",
")",
";",
"if",
"(",
"this",
".",
"fStack",
".",
"isEmpty",
"(",
")",
"&&",
"this",
".",
"fFields",
"!=",
"null",
")",
"{",
"this",
".",
"fFields",
".",
"add",
"(",
"child",
")",
";",
"}",
"}",
"public",
"IDOMCompilationUnit",
"createCompilationUnit",
"(",
")",
"{",
"return",
"new",
"DOMCompilationUnit",
"(",
")",
";",
"}",
"public",
"IDOMCompilationUnit",
"createCompilationUnit",
"(",
"ICompilationUnit",
"compilationUnit",
")",
"{",
"initializeBuild",
"(",
"compilationUnit",
".",
"getContents",
"(",
")",
",",
"true",
",",
"true",
",",
"false",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parseCompilationUnit",
"(",
"compilationUnit",
")",
";",
"return",
"super",
".",
"createCompilationUnit",
"(",
"compilationUnit",
")",
";",
"}",
"public",
"IDOMField",
"createField",
"(",
"char",
"[",
"]",
"sourceCode",
")",
"{",
"initializeBuild",
"(",
"sourceCode",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parseField",
"(",
"sourceCode",
")",
";",
"if",
"(",
"this",
".",
"fAbort",
"||",
"this",
".",
"fNode",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"this",
".",
"fFieldCount",
">",
"1",
")",
"{",
"return",
"null",
";",
"}",
"this",
".",
"fNode",
".",
"normalize",
"(",
"this",
")",
";",
"return",
"(",
"IDOMField",
")",
"this",
".",
"fNode",
";",
"}",
"public",
"IDOMField",
"[",
"]",
"createFields",
"(",
"char",
"[",
"]",
"sourceCode",
")",
"{",
"initializeBuild",
"(",
"sourceCode",
",",
"false",
",",
"false",
",",
"false",
")",
";",
"this",
".",
"fFields",
"=",
"new",
"ArrayList",
"(",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parseField",
"(",
"sourceCode",
")",
";",
"if",
"(",
"this",
".",
"fAbort",
")",
"{",
"return",
"null",
";",
"}",
"IDOMField",
"[",
"]",
"fields",
"=",
"new",
"IDOMField",
"[",
"this",
".",
"fFields",
".",
"size",
"(",
")",
"]",
";",
"this",
".",
"fFields",
".",
"toArray",
"(",
"fields",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"fields",
".",
"length",
";",
"i",
"++",
")",
"{",
"DOMNode",
"node",
"=",
"(",
"DOMNode",
")",
"fields",
"[",
"i",
"]",
";",
"if",
"(",
"i",
"<",
"(",
"fields",
".",
"length",
"-",
"1",
")",
")",
"{",
"DOMNode",
"next",
"=",
"(",
"DOMNode",
")",
"fields",
"[",
"i",
"+",
"1",
"]",
";",
"node",
".",
"fNextNode",
"=",
"next",
";",
"next",
".",
"fPreviousNode",
"=",
"node",
";",
"}",
"(",
"(",
"DOMNode",
")",
"fields",
"[",
"i",
"]",
")",
".",
"normalize",
"(",
"this",
")",
";",
"}",
"return",
"fields",
";",
"}",
"public",
"IDOMImport",
"createImport",
"(",
")",
"{",
"return",
"new",
"DOMImport",
"(",
")",
";",
"}",
"public",
"IDOMImport",
"createImport",
"(",
"char",
"[",
"]",
"sourceCode",
")",
"{",
"initializeBuild",
"(",
"sourceCode",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parseImport",
"(",
"sourceCode",
")",
";",
"if",
"(",
"this",
".",
"fAbort",
"||",
"this",
".",
"fNode",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"this",
".",
"fNode",
".",
"normalize",
"(",
"this",
")",
";",
"return",
"(",
"IDOMImport",
")",
"this",
".",
"fNode",
";",
"}",
"public",
"IDOMInitializer",
"createInitializer",
"(",
"char",
"[",
"]",
"sourceCode",
")",
"{",
"initializeBuild",
"(",
"sourceCode",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parseInitializer",
"(",
"sourceCode",
")",
";",
"if",
"(",
"this",
".",
"fAbort",
"||",
"this",
".",
"fNode",
"==",
"null",
"||",
"!",
"(",
"this",
".",
"fNode",
"instanceof",
"IDOMInitializer",
")",
")",
"{",
"return",
"null",
";",
"}",
"this",
".",
"fNode",
".",
"normalize",
"(",
"this",
")",
";",
"return",
"(",
"IDOMInitializer",
")",
"this",
".",
"fNode",
";",
"}",
"public",
"IDOMMethod",
"createMethod",
"(",
"char",
"[",
"]",
"sourceCode",
")",
"{",
"initializeBuild",
"(",
"sourceCode",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parseMethod",
"(",
"sourceCode",
")",
";",
"if",
"(",
"this",
".",
"fAbort",
"||",
"this",
".",
"fNode",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"this",
".",
"fNode",
".",
"normalize",
"(",
"this",
")",
";",
"return",
"(",
"IDOMMethod",
")",
"this",
".",
"fNode",
";",
"}",
"public",
"IDOMPackage",
"createPackage",
"(",
")",
"{",
"return",
"new",
"DOMPackage",
"(",
")",
";",
"}",
"public",
"IDOMPackage",
"createPackage",
"(",
"char",
"[",
"]",
"sourceCode",
")",
"{",
"initializeBuild",
"(",
"sourceCode",
",",
"false",
",",
"false",
",",
"true",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parsePackage",
"(",
"sourceCode",
")",
";",
"if",
"(",
"this",
".",
"fAbort",
"||",
"this",
".",
"fNode",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"this",
".",
"fNode",
".",
"normalize",
"(",
"this",
")",
";",
"return",
"(",
"IDOMPackage",
")",
"this",
".",
"fNode",
";",
"}",
"public",
"IDOMType",
"createType",
"(",
"char",
"[",
"]",
"sourceCode",
")",
"{",
"initializeBuild",
"(",
"sourceCode",
",",
"false",
",",
"true",
",",
"false",
")",
";",
"getParser",
"(",
"this",
".",
"options",
")",
".",
"parseType",
"(",
"sourceCode",
")",
";",
"if",
"(",
"this",
".",
"fAbort",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"this",
".",
"fNode",
"!=",
"null",
")",
"this",
".",
"fNode",
".",
"normalize",
"(",
"this",
")",
";",
"if",
"(",
"this",
".",
"fNode",
"instanceof",
"IDOMType",
")",
"{",
"return",
"(",
"IDOMType",
")",
"this",
".",
"fNode",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"void",
"enterAbstractMethod",
"(",
"int",
"declarationStart",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"char",
"[",
"]",
"returnType",
",",
"int",
"returnTypeStart",
",",
"int",
"returnTypeEnd",
",",
"int",
"returnTypeDimensionCount",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"char",
"[",
"]",
"[",
"]",
"parameterTypes",
",",
"int",
"[",
"]",
"parameterTypeStarts",
",",
"int",
"[",
"]",
"parameterTypeEnds",
",",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
",",
"int",
"[",
"]",
"parameterNameStarts",
",",
"int",
"[",
"]",
"parameterNameEnds",
",",
"int",
"parametersEnd",
",",
"int",
"extendedReturnTypeDimensionCount",
",",
"int",
"extendedReturnTypeDimensionEnd",
",",
"char",
"[",
"]",
"[",
"]",
"exceptionTypes",
",",
"int",
"[",
"]",
"exceptionTypeStarts",
",",
"int",
"[",
"]",
"exceptionTypeEnds",
",",
"int",
"bodyStart",
",",
"boolean",
"isConstructor",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"declarationStart",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"nameRange",
"=",
"{",
"nameStart",
",",
"nameEnd",
"}",
";",
"int",
"[",
"]",
"commentRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"javaDocPositions",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"javaDocPositions",
".",
"length",
";",
"commentRange",
"[",
"0",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"2",
"]",
";",
"commentRange",
"[",
"1",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"1",
"]",
";",
"}",
"int",
"[",
"]",
"modifiersRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"modifiersStart",
">",
"-",
"1",
")",
"{",
"modifiersRange",
"[",
"0",
"]",
"=",
"modifiersStart",
";",
"if",
"(",
"isConstructor",
")",
"{",
"modifiersRange",
"[",
"1",
"]",
"=",
"nameStart",
"-",
"1",
";",
"}",
"else",
"{",
"modifiersRange",
"[",
"1",
"]",
"=",
"returnTypeStart",
"-",
"1",
";",
"}",
"}",
"int",
"[",
"]",
"returnTypeRange",
"=",
"null",
";",
"if",
"(",
"extendedReturnTypeDimensionCount",
">",
"0",
")",
"returnTypeRange",
"=",
"new",
"int",
"[",
"]",
"{",
"returnTypeStart",
",",
"returnTypeEnd",
",",
"parametersEnd",
"+",
"1",
",",
"extendedReturnTypeDimensionEnd",
"}",
";",
"else",
"returnTypeRange",
"=",
"new",
"int",
"[",
"]",
"{",
"returnTypeStart",
",",
"returnTypeEnd",
"}",
";",
"int",
"[",
"]",
"parameterRange",
"=",
"{",
"nameEnd",
"+",
"1",
",",
"parametersEnd",
"}",
";",
"int",
"[",
"]",
"exceptionRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"exceptionTypes",
"!=",
"null",
"&&",
"exceptionTypes",
".",
"length",
">",
"0",
")",
"{",
"int",
"exceptionCount",
"=",
"exceptionTypes",
".",
"length",
";",
"exceptionRange",
"[",
"0",
"]",
"=",
"exceptionTypeStarts",
"[",
"0",
"]",
";",
"exceptionRange",
"[",
"1",
"]",
"=",
"exceptionTypeEnds",
"[",
"exceptionCount",
"-",
"1",
"]",
";",
"}",
"int",
"[",
"]",
"bodyRange",
"=",
"null",
";",
"if",
"(",
"exceptionRange",
"[",
"1",
"]",
">",
"-",
"1",
")",
"{",
"bodyRange",
"=",
"new",
"int",
"[",
"]",
"{",
"exceptionRange",
"[",
"1",
"]",
"+",
"1",
",",
"-",
"1",
"}",
";",
"}",
"else",
"{",
"bodyRange",
"=",
"new",
"int",
"[",
"]",
"{",
"parametersEnd",
"+",
"1",
",",
"-",
"1",
"}",
";",
"}",
"this",
".",
"fNode",
"=",
"new",
"DOMMethod",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"CharOperation",
".",
"charToString",
"(",
"name",
")",
",",
"nameRange",
",",
"commentRange",
",",
"modifiers",
",",
"modifiersRange",
",",
"isConstructor",
",",
"CharOperation",
".",
"charToString",
"(",
"returnType",
")",
",",
"returnTypeRange",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"parameterTypes",
")",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"parameterNames",
")",
",",
"parameterRange",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"exceptionTypes",
")",
",",
"exceptionRange",
",",
"bodyRange",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"this",
".",
"fStack",
".",
"push",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"public",
"void",
"enterClass",
"(",
"int",
"declarationStart",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"int",
"keywordStart",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"char",
"[",
"]",
"superclass",
",",
"int",
"superclassStart",
",",
"int",
"superclassEnd",
",",
"char",
"[",
"]",
"[",
"]",
"superinterfaces",
",",
"int",
"[",
"]",
"superinterfaceStarts",
",",
"int",
"[",
"]",
"superinterfaceEnds",
",",
"int",
"bodyStart",
")",
"{",
"enterType",
"(",
"declarationStart",
",",
"javaDocPositions",
",",
"modifiers",
",",
"modifiersStart",
",",
"keywordStart",
",",
"name",
",",
"nameStart",
",",
"nameEnd",
",",
"superclass",
",",
"superclassStart",
",",
"superclassEnd",
",",
"superinterfaces",
",",
"superinterfaceStarts",
",",
"superinterfaceEnds",
",",
"bodyStart",
",",
"true",
")",
";",
"}",
"public",
"void",
"enterConstructor",
"(",
"int",
"declarationStart",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"char",
"[",
"]",
"[",
"]",
"parameterTypes",
",",
"int",
"[",
"]",
"parameterTypeStarts",
",",
"int",
"[",
"]",
"parameterTypeEnds",
",",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
",",
"int",
"[",
"]",
"parameterNameStarts",
",",
"int",
"[",
"]",
"parameterNameEnds",
",",
"int",
"parametersEnd",
",",
"char",
"[",
"]",
"[",
"]",
"exceptionTypes",
",",
"int",
"[",
"]",
"exceptionTypeStarts",
",",
"int",
"[",
"]",
"exceptionTypeEnds",
",",
"int",
"bodyStart",
")",
"{",
"String",
"nameString",
"=",
"new",
"String",
"(",
"this",
".",
"fDocument",
",",
"nameStart",
",",
"nameEnd",
"-",
"nameStart",
")",
";",
"int",
"openParenPosition",
"=",
"nameString",
".",
"indexOf",
"(",
"'('",
")",
";",
"if",
"(",
"openParenPosition",
">",
"-",
"1",
")",
"nameEnd",
"=",
"nameStart",
"+",
"openParenPosition",
"-",
"1",
";",
"enterAbstractMethod",
"(",
"declarationStart",
",",
"javaDocPositions",
",",
"modifiers",
",",
"modifiersStart",
",",
"null",
",",
"-",
"1",
",",
"-",
"1",
",",
"0",
",",
"name",
",",
"nameStart",
",",
"nameEnd",
",",
"parameterTypes",
",",
"parameterTypeStarts",
",",
"parameterTypeEnds",
",",
"parameterNames",
",",
"parameterNameStarts",
",",
"parameterNameEnds",
",",
"parametersEnd",
",",
"0",
",",
"-",
"1",
",",
"exceptionTypes",
",",
"exceptionTypeStarts",
",",
"exceptionTypeEnds",
",",
"bodyStart",
",",
"true",
")",
";",
"}",
"public",
"void",
"enterField",
"(",
"int",
"declarationStart",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"char",
"[",
"]",
"type",
",",
"int",
"typeStart",
",",
"int",
"typeEnd",
",",
"int",
"typeDimensionCount",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"int",
"extendedTypeDimensionCount",
",",
"int",
"extendedTypeDimensionEnd",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"declarationStart",
",",
"(",
"extendedTypeDimensionEnd",
">",
"nameEnd",
")",
"?",
"extendedTypeDimensionEnd",
":",
"nameEnd",
"}",
";",
"int",
"[",
"]",
"nameRange",
"=",
"{",
"nameStart",
",",
"nameEnd",
"}",
";",
"int",
"[",
"]",
"commentRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"javaDocPositions",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"javaDocPositions",
".",
"length",
";",
"commentRange",
"[",
"0",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"2",
"]",
";",
"commentRange",
"[",
"1",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"1",
"]",
";",
"}",
"int",
"[",
"]",
"modifiersRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"modifiersStart",
">",
"-",
"1",
")",
"{",
"modifiersRange",
"[",
"0",
"]",
"=",
"modifiersStart",
";",
"modifiersRange",
"[",
"1",
"]",
"=",
"typeStart",
"-",
"1",
";",
"}",
"int",
"[",
"]",
"typeRange",
"=",
"{",
"typeStart",
",",
"typeEnd",
"}",
";",
"boolean",
"hasInitializer",
"=",
"false",
";",
"int",
"[",
"]",
"initializerRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"boolean",
"isVariableDeclarator",
"=",
"false",
";",
"if",
"(",
"this",
".",
"fNode",
"instanceof",
"DOMField",
")",
"{",
"DOMField",
"field",
"=",
"(",
"DOMField",
")",
"this",
".",
"fNode",
";",
"if",
"(",
"field",
".",
"fTypeRange",
"[",
"0",
"]",
"==",
"typeStart",
")",
"isVariableDeclarator",
"=",
"true",
";",
"}",
"this",
".",
"fNode",
"=",
"new",
"DOMField",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"CharOperation",
".",
"charToString",
"(",
"name",
")",
",",
"nameRange",
",",
"commentRange",
",",
"modifiers",
",",
"modifiersRange",
",",
"typeRange",
",",
"CharOperation",
".",
"charToString",
"(",
"type",
")",
",",
"hasInitializer",
",",
"initializerRange",
",",
"isVariableDeclarator",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"this",
".",
"fStack",
".",
"push",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"public",
"void",
"enterInterface",
"(",
"int",
"declarationStart",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"int",
"keywordStart",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"char",
"[",
"]",
"[",
"]",
"superinterfaces",
",",
"int",
"[",
"]",
"superinterfaceStarts",
",",
"int",
"[",
"]",
"superinterfaceEnds",
",",
"int",
"bodyStart",
")",
"{",
"enterType",
"(",
"declarationStart",
",",
"javaDocPositions",
",",
"modifiers",
",",
"modifiersStart",
",",
"keywordStart",
",",
"name",
",",
"nameStart",
",",
"nameEnd",
",",
"null",
",",
"-",
"1",
",",
"-",
"1",
",",
"superinterfaces",
",",
"superinterfaceStarts",
",",
"superinterfaceEnds",
",",
"bodyStart",
",",
"false",
")",
";",
"}",
"public",
"void",
"enterMethod",
"(",
"int",
"declarationStart",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"char",
"[",
"]",
"returnType",
",",
"int",
"returnTypeStart",
",",
"int",
"returnTypeEnd",
",",
"int",
"returnTypeDimensionCount",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"char",
"[",
"]",
"[",
"]",
"parameterTypes",
",",
"int",
"[",
"]",
"parameterTypeStarts",
",",
"int",
"[",
"]",
"parameterTypeEnds",
",",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
",",
"int",
"[",
"]",
"parameterNameStarts",
",",
"int",
"[",
"]",
"parameterNameEnds",
",",
"int",
"parametersEnd",
",",
"int",
"extendedReturnTypeDimensionCount",
",",
"int",
"extendedReturnTypeDimensionEnd",
",",
"char",
"[",
"]",
"[",
"]",
"exceptionTypes",
",",
"int",
"[",
"]",
"exceptionTypeStarts",
",",
"int",
"[",
"]",
"exceptionTypeEnds",
",",
"int",
"bodyStart",
")",
"{",
"enterAbstractMethod",
"(",
"declarationStart",
",",
"javaDocPositions",
",",
"modifiers",
",",
"modifiersStart",
",",
"returnType",
",",
"returnTypeStart",
",",
"returnTypeEnd",
",",
"returnTypeDimensionCount",
",",
"name",
",",
"nameStart",
",",
"nameEnd",
",",
"parameterTypes",
",",
"parameterTypeStarts",
",",
"parameterTypeEnds",
",",
"parameterNames",
",",
"parameterNameStarts",
",",
"parameterNameEnds",
",",
"parametersEnd",
",",
"extendedReturnTypeDimensionCount",
",",
"extendedReturnTypeDimensionEnd",
",",
"exceptionTypes",
",",
"exceptionTypeStarts",
",",
"exceptionTypeEnds",
",",
"bodyStart",
",",
"false",
")",
";",
"}",
"protected",
"void",
"enterType",
"(",
"int",
"declarationStart",
",",
"int",
"[",
"]",
"javaDocPositions",
",",
"int",
"modifiers",
",",
"int",
"modifiersStart",
",",
"int",
"keywordStart",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"char",
"[",
"]",
"superclass",
",",
"int",
"superclassStart",
",",
"int",
"superclassEnd",
",",
"char",
"[",
"]",
"[",
"]",
"superinterfaces",
",",
"int",
"[",
"]",
"superinterfaceStarts",
",",
"int",
"[",
"]",
"superinterfaceEnds",
",",
"int",
"bodyStart",
",",
"boolean",
"isClass",
")",
"{",
"if",
"(",
"this",
".",
"fBuildingType",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"declarationStart",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"commentRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"javaDocPositions",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"javaDocPositions",
".",
"length",
";",
"commentRange",
"[",
"0",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"2",
"]",
";",
"commentRange",
"[",
"1",
"]",
"=",
"javaDocPositions",
"[",
"length",
"-",
"1",
"]",
";",
"}",
"int",
"[",
"]",
"modifiersRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"modifiersStart",
">",
"-",
"1",
")",
"{",
"modifiersRange",
"[",
"0",
"]",
"=",
"modifiersStart",
";",
"modifiersRange",
"[",
"1",
"]",
"=",
"(",
"modifiersStart",
">",
"-",
"1",
")",
"?",
"keywordStart",
"-",
"1",
":",
"-",
"1",
";",
"}",
"int",
"[",
"]",
"typeKeywordRange",
"=",
"{",
"keywordStart",
",",
"nameStart",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"nameRange",
"=",
"new",
"int",
"[",
"]",
"{",
"nameStart",
",",
"nameEnd",
"}",
";",
"int",
"[",
"]",
"extendsKeywordRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"superclassRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"implementsKeywordRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"interfacesRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"if",
"(",
"isClass",
")",
"{",
"if",
"(",
"superclass",
"!=",
"null",
")",
"{",
"extendsKeywordRange",
"[",
"0",
"]",
"=",
"nameEnd",
"+",
"1",
";",
"extendsKeywordRange",
"[",
"1",
"]",
"=",
"superclassStart",
"-",
"1",
";",
"superclassRange",
"[",
"0",
"]",
"=",
"superclassStart",
";",
"superclassRange",
"[",
"1",
"]",
"=",
"superclassEnd",
";",
"}",
"if",
"(",
"superinterfaces",
"!=",
"null",
"&&",
"superinterfaces",
".",
"length",
">",
"0",
")",
"{",
"superclassRange",
"[",
"1",
"]",
"=",
"superclassEnd",
";",
"if",
"(",
"superclassEnd",
">",
"-",
"1",
")",
"{",
"implementsKeywordRange",
"[",
"0",
"]",
"=",
"superclassEnd",
"+",
"1",
";",
"}",
"else",
"{",
"implementsKeywordRange",
"[",
"0",
"]",
"=",
"nameEnd",
"+",
"1",
";",
"}",
"implementsKeywordRange",
"[",
"1",
"]",
"=",
"superinterfaceStarts",
"[",
"0",
"]",
"-",
"1",
";",
"interfacesRange",
"[",
"0",
"]",
"=",
"superinterfaceStarts",
"[",
"0",
"]",
";",
"interfacesRange",
"[",
"1",
"]",
"=",
"superinterfaceEnds",
"[",
"superinterfaces",
".",
"length",
"-",
"1",
"]",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"superinterfaces",
"!=",
"null",
"&&",
"superinterfaces",
".",
"length",
">",
"0",
")",
"{",
"extendsKeywordRange",
"[",
"0",
"]",
"=",
"nameEnd",
"+",
"1",
";",
"extendsKeywordRange",
"[",
"1",
"]",
"=",
"superinterfaceStarts",
"[",
"0",
"]",
"-",
"1",
";",
"interfacesRange",
"[",
"0",
"]",
"=",
"superinterfaceStarts",
"[",
"0",
"]",
";",
"interfacesRange",
"[",
"1",
"]",
"=",
"superinterfaceEnds",
"[",
"superinterfaces",
".",
"length",
"-",
"1",
"]",
";",
"}",
"}",
"int",
"[",
"]",
"openBodyRange",
"=",
"{",
"bodyStart",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"closeBodyRange",
"=",
"{",
"-",
"1",
",",
"-",
"1",
"}",
";",
"this",
".",
"fNode",
"=",
"new",
"DOMType",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"new",
"String",
"(",
"name",
")",
",",
"nameRange",
",",
"commentRange",
",",
"modifiers",
",",
"modifiersRange",
",",
"typeKeywordRange",
",",
"superclassRange",
",",
"extendsKeywordRange",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"superinterfaces",
")",
",",
"interfacesRange",
",",
"implementsKeywordRange",
",",
"openBodyRange",
",",
"closeBodyRange",
",",
"isClass",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"this",
".",
"fStack",
".",
"push",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"}",
"protected",
"void",
"exitAbstractMethod",
"(",
"int",
"bodyEnd",
",",
"int",
"declarationEnd",
")",
"{",
"DOMMethod",
"method",
"=",
"(",
"DOMMethod",
")",
"this",
".",
"fStack",
".",
"pop",
"(",
")",
";",
"method",
".",
"setSourceRangeEnd",
"(",
"declarationEnd",
")",
";",
"method",
".",
"setBodyRangeEnd",
"(",
"bodyEnd",
"+",
"1",
")",
";",
"this",
".",
"fNode",
"=",
"method",
";",
"if",
"(",
"this",
".",
"fBuildingSingleMember",
")",
"{",
"this",
".",
"fFinishedSingleMember",
"=",
"true",
";",
"}",
"}",
"public",
"void",
"exitClass",
"(",
"int",
"bodyEnd",
",",
"int",
"declarationEnd",
")",
"{",
"exitType",
"(",
"bodyEnd",
",",
"declarationEnd",
")",
";",
"}",
"public",
"void",
"exitConstructor",
"(",
"int",
"bodyEnd",
",",
"int",
"declarationEnd",
")",
"{",
"exitAbstractMethod",
"(",
"bodyEnd",
",",
"declarationEnd",
")",
";",
"}",
"public",
"void",
"exitField",
"(",
"int",
"bodyEnd",
",",
"int",
"declarationEnd",
")",
"{",
"DOMField",
"field",
"=",
"(",
"DOMField",
")",
"this",
".",
"fStack",
".",
"pop",
"(",
")",
";",
"if",
"(",
"field",
".",
"getEndPosition",
"(",
")",
"<",
"declarationEnd",
")",
"{",
"field",
".",
"setSourceRangeEnd",
"(",
"declarationEnd",
")",
";",
"int",
"nameEnd",
"=",
"field",
".",
"fNameRange",
"[",
"1",
"]",
";",
"if",
"(",
"nameEnd",
"<",
"bodyEnd",
")",
"{",
"String",
"initializer",
"=",
"new",
"String",
"(",
"this",
".",
"fDocument",
",",
"nameEnd",
"+",
"1",
",",
"bodyEnd",
"-",
"nameEnd",
")",
";",
"int",
"index",
"=",
"initializer",
".",
"indexOf",
"(",
"'='",
")",
";",
"if",
"(",
"index",
">",
"-",
"1",
")",
"{",
"field",
".",
"setHasInitializer",
"(",
"true",
")",
";",
"field",
".",
"setInitializerRange",
"(",
"nameEnd",
"+",
"index",
"+",
"2",
",",
"bodyEnd",
")",
";",
"}",
"}",
"}",
"this",
".",
"fFieldCount",
"++",
";",
"this",
".",
"fNode",
"=",
"field",
";",
"if",
"(",
"this",
".",
"fBuildingSingleMember",
")",
"{",
"this",
".",
"fFinishedSingleMember",
"=",
"true",
";",
"}",
"}",
"public",
"void",
"exitInterface",
"(",
"int",
"bodyEnd",
",",
"int",
"declarationEnd",
")",
"{",
"exitType",
"(",
"bodyEnd",
",",
"declarationEnd",
")",
";",
"}",
"public",
"void",
"exitMethod",
"(",
"int",
"bodyEnd",
",",
"int",
"declarationEnd",
")",
"{",
"exitAbstractMethod",
"(",
"bodyEnd",
",",
"declarationEnd",
")",
";",
"}",
"protected",
"DocumentElementParser",
"getParser",
"(",
"Map",
"settings",
")",
"{",
"return",
"new",
"DocumentElementParser",
"(",
"this",
",",
"new",
"DefaultProblemFactory",
"(",
")",
",",
"new",
"CompilerOptions",
"(",
"settings",
")",
")",
";",
"}",
"protected",
"void",
"initializeBuild",
"(",
"char",
"[",
"]",
"sourceCode",
",",
"boolean",
"buildingCompilationUnit",
",",
"boolean",
"buildingType",
",",
"boolean",
"singleMember",
")",
"{",
"super",
".",
"initializeBuild",
"(",
"sourceCode",
",",
"buildingCompilationUnit",
",",
"buildingType",
")",
";",
"this",
".",
"fBuildingSingleMember",
"=",
"singleMember",
";",
"this",
".",
"fFinishedSingleMember",
"=",
"false",
";",
"}",
"}",
"</s>"
] |
2,801 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"jdom",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CategorizedProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"jdom",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ISourceElementRequestor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"SourceElementParser",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Expression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ImportReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"DefaultProblemFactory",
";",
"public",
"class",
"SimpleDOMBuilder",
"extends",
"AbstractDOMBuilder",
"implements",
"ISourceElementRequestor",
"{",
"public",
"void",
"acceptProblem",
"(",
"CategorizedProblem",
"problem",
")",
"{",
"}",
"public",
"void",
"acceptImport",
"(",
"int",
"declarationStart",
",",
"int",
"declarationEnd",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"char",
"[",
"]",
"[",
"]",
"tokens",
",",
"boolean",
"onDemand",
",",
"int",
"modifiers",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"declarationStart",
",",
"declarationEnd",
"}",
";",
"String",
"importName",
"=",
"new",
"String",
"(",
"CharOperation",
".",
"concatWith",
"(",
"tokens",
",",
"'.'",
")",
")",
";",
"if",
"(",
"onDemand",
")",
"{",
"importName",
"+=",
"\".*\"",
";",
"}",
"this",
".",
"fNode",
"=",
"new",
"DOMImport",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"importName",
",",
"onDemand",
",",
"modifiers",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"public",
"void",
"acceptPackage",
"(",
"ImportReference",
"importReference",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"new",
"int",
"[",
"]",
"{",
"importReference",
".",
"declarationSourceStart",
",",
"importReference",
".",
"declarationSourceEnd",
"}",
";",
"char",
"[",
"]",
"name",
"=",
"CharOperation",
".",
"concatWith",
"(",
"importReference",
".",
"getImportName",
"(",
")",
",",
"'.'",
")",
";",
"this",
".",
"fNode",
"=",
"new",
"DOMPackage",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"new",
"String",
"(",
"name",
")",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"public",
"IDOMCompilationUnit",
"createCompilationUnit",
"(",
"String",
"sourceCode",
",",
"String",
"name",
")",
"{",
"return",
"createCompilationUnit",
"(",
"sourceCode",
".",
"toCharArray",
"(",
")",
",",
"name",
".",
"toCharArray",
"(",
")",
")",
";",
"}",
"public",
"IDOMCompilationUnit",
"createCompilationUnit",
"(",
"ICompilationUnit",
"compilationUnit",
")",
"{",
"initializeBuild",
"(",
"compilationUnit",
".",
"getContents",
"(",
")",
",",
"true",
",",
"true",
")",
";",
"getParser",
"(",
"JavaCore",
".",
"getOptions",
"(",
")",
")",
".",
"parseCompilationUnit",
"(",
"compilationUnit",
",",
"false",
",",
"null",
")",
";",
"return",
"super",
".",
"createCompilationUnit",
"(",
"compilationUnit",
")",
";",
"}",
"protected",
"void",
"enterAbstractMethod",
"(",
"MethodInfo",
"methodInfo",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"methodInfo",
".",
"declarationStart",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"nameRange",
"=",
"{",
"methodInfo",
".",
"nameSourceStart",
",",
"methodInfo",
".",
"nameSourceEnd",
"}",
";",
"this",
".",
"fNode",
"=",
"new",
"DOMMethod",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"CharOperation",
".",
"charToString",
"(",
"methodInfo",
".",
"name",
")",
",",
"nameRange",
",",
"methodInfo",
".",
"modifiers",
",",
"methodInfo",
".",
"isConstructor",
",",
"CharOperation",
".",
"charToString",
"(",
"methodInfo",
".",
"returnType",
")",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"methodInfo",
".",
"parameterTypes",
")",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"methodInfo",
".",
"parameterNames",
")",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"methodInfo",
".",
"exceptionTypes",
")",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"this",
".",
"fStack",
".",
"push",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"public",
"void",
"enterConstructor",
"(",
"MethodInfo",
"methodInfo",
")",
"{",
"String",
"nameString",
"=",
"new",
"String",
"(",
"this",
".",
"fDocument",
",",
"methodInfo",
".",
"nameSourceStart",
",",
"methodInfo",
".",
"nameSourceEnd",
"-",
"methodInfo",
".",
"nameSourceStart",
")",
";",
"int",
"openParenPosition",
"=",
"nameString",
".",
"indexOf",
"(",
"'('",
")",
";",
"if",
"(",
"openParenPosition",
">",
"-",
"1",
")",
"methodInfo",
".",
"nameSourceEnd",
"=",
"methodInfo",
".",
"nameSourceStart",
"+",
"openParenPosition",
"-",
"1",
";",
"enterAbstractMethod",
"(",
"methodInfo",
")",
";",
"}",
"public",
"void",
"enterField",
"(",
"FieldInfo",
"fieldInfo",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"fieldInfo",
".",
"declarationStart",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"nameRange",
"=",
"{",
"fieldInfo",
".",
"nameSourceStart",
",",
"fieldInfo",
".",
"nameSourceEnd",
"}",
";",
"boolean",
"isSecondary",
"=",
"false",
";",
"if",
"(",
"this",
".",
"fNode",
"instanceof",
"DOMField",
")",
"{",
"isSecondary",
"=",
"fieldInfo",
".",
"declarationStart",
"==",
"this",
".",
"fNode",
".",
"fSourceRange",
"[",
"0",
"]",
";",
"}",
"this",
".",
"fNode",
"=",
"new",
"DOMField",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"CharOperation",
".",
"charToString",
"(",
"fieldInfo",
".",
"name",
")",
",",
"nameRange",
",",
"fieldInfo",
".",
"modifiers",
",",
"CharOperation",
".",
"charToString",
"(",
"fieldInfo",
".",
"type",
")",
",",
"isSecondary",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"this",
".",
"fStack",
".",
"push",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"public",
"void",
"enterInitializer",
"(",
"int",
"declarationSourceStart",
",",
"int",
"modifiers",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"declarationSourceStart",
",",
"-",
"1",
"}",
";",
"this",
".",
"fNode",
"=",
"new",
"DOMInitializer",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"modifiers",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"this",
".",
"fStack",
".",
"push",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"public",
"void",
"enterMethod",
"(",
"MethodInfo",
"methodInfo",
")",
"{",
"enterAbstractMethod",
"(",
"methodInfo",
")",
";",
"}",
"public",
"void",
"enterType",
"(",
"TypeInfo",
"typeInfo",
")",
"{",
"if",
"(",
"this",
".",
"fBuildingType",
")",
"{",
"int",
"[",
"]",
"sourceRange",
"=",
"{",
"typeInfo",
".",
"declarationStart",
",",
"-",
"1",
"}",
";",
"int",
"[",
"]",
"nameRange",
"=",
"new",
"int",
"[",
"]",
"{",
"typeInfo",
".",
"nameSourceStart",
",",
"typeInfo",
".",
"nameSourceEnd",
"}",
";",
"this",
".",
"fNode",
"=",
"new",
"DOMType",
"(",
"this",
".",
"fDocument",
",",
"sourceRange",
",",
"new",
"String",
"(",
"typeInfo",
".",
"name",
")",
",",
"nameRange",
",",
"typeInfo",
".",
"modifiers",
",",
"CharOperation",
".",
"charArrayToStringArray",
"(",
"typeInfo",
".",
"superinterfaces",
")",
",",
"TypeDeclaration",
".",
"kind",
"(",
"typeInfo",
".",
"modifiers",
")",
"==",
"TypeDeclaration",
".",
"CLASS_DECL",
")",
";",
"addChild",
"(",
"this",
".",
"fNode",
")",
";",
"this",
".",
"fStack",
".",
"push",
"(",
"this",
".",
"fNode",
")",
";",
"}",
"}",
"public",
"void",
"exitConstructor",
"(",
"int",
"declarationEnd",
")",
"{",
"exitMember",
"(",
"declarationEnd",
")",
";",
"}",
"public",
"void",
"exitField",
"(",
"int",
"initializationStart",
",",
"int",
"declarationEnd",
",",
"int",
"declarationSourceEnd",
")",
"{",
"exitMember",
"(",
"declarationEnd",
")",
";",
"}",
"public",
"void",
"exitInitializer",
"(",
"int",
"declarationEnd",
")",
"{",
"exitMember",
"(",
"declarationEnd",
")",
";",
"}",
"protected",
"void",
"exitMember",
"(",
"int",
"declarationEnd",
")",
"{",
"DOMMember",
"m",
"=",
"(",
"DOMMember",
")",
"this",
".",
"fStack",
".",
"pop",
"(",
")",
";",
"m",
".",
"setSourceRangeEnd",
"(",
"declarationEnd",
")",
";",
"this",
".",
"fNode",
"=",
"m",
";",
"}",
"public",
"void",
"exitMethod",
"(",
"int",
"declarationEnd",
",",
"Expression",
"defaultValue",
")",
"{",
"exitMember",
"(",
"declarationEnd",
")",
";",
"}",
"public",
"void",
"exitType",
"(",
"int",
"declarationEnd",
")",
"{",
"exitType",
"(",
"declarationEnd",
",",
"declarationEnd",
")",
";",
"}",
"protected",
"SourceElementParser",
"getParser",
"(",
"Map",
"settings",
")",
"{",
"return",
"new",
"SourceElementParser",
"(",
"this",
",",
"new",
"DefaultProblemFactory",
"(",
")",
",",
"new",
"CompilerOptions",
"(",
"settings",
")",
",",
"false",
",",
"true",
")",
";",
"}",
"}",
"</s>"
] |
2,802 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"jdom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Flags",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"jdom",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"CharArrayBuffer",
";",
"abstract",
"class",
"DOMMember",
"extends",
"DOMNode",
"implements",
"IDOMMember",
"{",
"protected",
"int",
"fFlags",
"=",
"0",
";",
"protected",
"String",
"fComment",
"=",
"null",
";",
"protected",
"int",
"[",
"]",
"fCommentRange",
";",
"protected",
"char",
"[",
"]",
"fModifiers",
"=",
"null",
";",
"protected",
"int",
"[",
"]",
"fModifierRange",
";",
"DOMMember",
"(",
")",
"{",
"}",
"DOMMember",
"(",
"char",
"[",
"]",
"document",
",",
"int",
"[",
"]",
"sourceRange",
",",
"String",
"name",
",",
"int",
"[",
"]",
"nameRange",
",",
"int",
"[",
"]",
"commentRange",
",",
"int",
"flags",
",",
"int",
"[",
"]",
"modifierRange",
")",
"{",
"super",
"(",
"document",
",",
"sourceRange",
",",
"name",
",",
"nameRange",
")",
";",
"this",
".",
"fFlags",
"=",
"flags",
";",
"this",
".",
"fComment",
"=",
"null",
";",
"this",
".",
"fCommentRange",
"=",
"commentRange",
";",
"this",
".",
"fModifierRange",
"=",
"modifierRange",
";",
"setHasComment",
"(",
"commentRange",
"[",
"0",
"]",
">=",
"0",
")",
";",
"}",
"protected",
"void",
"appendFragmentedContents",
"(",
"CharArrayBuffer",
"buffer",
")",
"{",
"if",
"(",
"isDetailed",
"(",
")",
")",
"{",
"appendMemberHeaderFragment",
"(",
"buffer",
")",
";",
"appendMemberDeclarationContents",
"(",
"buffer",
")",
";",
"appendMemberBodyContents",
"(",
"buffer",
")",
";",
"}",
"else",
"{",
"appendSimpleContents",
"(",
"buffer",
")",
";",
"}",
"}",
"protected",
"abstract",
"void",
"appendMemberBodyContents",
"(",
"CharArrayBuffer",
"buffer",
")",
";",
"protected",
"abstract",
"void",
"appendMemberDeclarationContents",
"(",
"CharArrayBuffer",
"buffer",
")",
";",
"protected",
"void",
"appendMemberHeaderFragment",
"(",
"CharArrayBuffer",
"buffer",
")",
"{",
"int",
"spaceStart",
",",
"spaceEnd",
";",
"if",
"(",
"hasComment",
"(",
")",
")",
"{",
"spaceStart",
"=",
"this",
".",
"fSourceRange",
"[",
"0",
"]",
";",
"spaceEnd",
"=",
"this",
".",
"fCommentRange",
"[",
"0",
"]",
";",
"if",
"(",
"spaceEnd",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"fDocument",
",",
"spaceStart",
",",
"spaceEnd",
"-",
"spaceStart",
")",
";",
"}",
"}",
"String",
"fragment",
"=",
"getComment",
"(",
")",
";",
"if",
"(",
"fragment",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"fragment",
")",
";",
"}",
"if",
"(",
"this",
".",
"fCommentRange",
"[",
"1",
"]",
">=",
"0",
")",
"{",
"spaceStart",
"=",
"this",
".",
"fCommentRange",
"[",
"1",
"]",
"+",
"1",
";",
"}",
"else",
"{",
"spaceStart",
"=",
"this",
".",
"fSourceRange",
"[",
"0",
"]",
";",
"}",
"if",
"(",
"this",
".",
"fModifierRange",
"[",
"0",
"]",
">=",
"0",
")",
"{",
"spaceEnd",
"=",
"this",
".",
"fModifierRange",
"[",
"0",
"]",
"-",
"1",
";",
"}",
"else",
"{",
"spaceEnd",
"=",
"getMemberDeclarationStartPosition",
"(",
")",
"-",
"1",
";",
"}",
"if",
"(",
"spaceEnd",
">=",
"spaceStart",
")",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"fDocument",
",",
"spaceStart",
",",
"spaceEnd",
"+",
"1",
"-",
"spaceStart",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"getModifiersText",
"(",
")",
")",
";",
"}",
"protected",
"abstract",
"void",
"appendSimpleContents",
"(",
"CharArrayBuffer",
"buffer",
")",
";",
"protected",
"String",
"[",
"]",
"appendString",
"(",
"String",
"[",
"]",
"list",
",",
"String",
"element",
")",
"{",
"String",
"[",
"]",
"copy",
"=",
"new",
"String",
"[",
"list",
".",
"length",
"+",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"list",
",",
"0",
",",
"copy",
",",
"0",
",",
"list",
".",
"length",
")",
";",
"copy",
"[",
"list",
".",
"length",
"]",
"=",
"element",
";",
"return",
"copy",
";",
"}",
"protected",
"char",
"[",
"]",
"generateFlags",
"(",
")",
"{",
"char",
"[",
"]",
"flags",
"=",
"Flags",
".",
"toString",
"(",
"getFlags",
"(",
")",
")",
".",
"toCharArray",
"(",
")",
";",
"if",
"(",
"flags",
".",
"length",
"==",
"0",
")",
"{",
"return",
"flags",
";",
"}",
"else",
"{",
"return",
"CharOperation",
".",
"concat",
"(",
"flags",
",",
"new",
"char",
"[",
"]",
"{",
"'",
"'",
"}",
")",
";",
"}",
"}",
"public",
"String",
"getComment",
"(",
")",
"{",
"becomeDetailed",
"(",
")",
";",
"if",
"(",
"hasComment",
"(",
")",
")",
"{",
"if",
"(",
"this",
".",
"fComment",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"fComment",
";",
"}",
"else",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"fDocument",
",",
"this",
".",
"fCommentRange",
"[",
"0",
"]",
",",
"this",
".",
"fCommentRange",
"[",
"1",
"]",
"+",
"1",
"-",
"this",
".",
"fCommentRange",
"[",
"0",
"]",
")",
";",
"}",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"int",
"getFlags",
"(",
")",
"{",
"return",
"this",
".",
"fFlags",
";",
"}",
"protected",
"abstract",
"int",
"getMemberDeclarationStartPosition",
"(",
")",
";",
"protected",
"char",
"[",
"]",
"getModifiersText",
"(",
")",
"{",
"if",
"(",
"this",
".",
"fModifiers",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"fModifierRange",
"[",
"0",
"]",
"<",
"0",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"CharOperation",
".",
"subarray",
"(",
"this",
".",
"fDocument",
",",
"this",
".",
"fModifierRange",
"[",
"0",
"]",
",",
"this",
".",
"fModifierRange",
"[",
"1",
"]",
"+",
"1",
")",
";",
"}",
"}",
"else",
"{",
"return",
"this",
".",
"fModifiers",
";",
"}",
"}",
"protected",
"boolean",
"hasBody",
"(",
")",
"{",
"return",
"getMask",
"(",
"MASK_HAS_BODY",
")",
";",
"}",
"protected",
"boolean",
"hasComment",
"(",
")",
"{",
"return",
"getMask",
"(",
"MASK_HAS_COMMENT",
")",
";",
"}",
"protected",
"void",
"offset",
"(",
"int",
"offset",
")",
"{",
"super",
".",
"offset",
"(",
"offset",
")",
";",
"offsetRange",
"(",
"this",
".",
"fCommentRange",
",",
"offset",
")",
";",
"offsetRange",
"(",
"this",
".",
"fModifierRange",
",",
"offset",
")",
";",
"}",
"public",
"void",
"setComment",
"(",
"String",
"comment",
")",
"{",
"becomeDetailed",
"(",
")",
";",
"this",
".",
"fComment",
"=",
"comment",
";",
"fragment",
"(",
")",
";",
"setHasComment",
"(",
"comment",
"!=",
"null",
")",
";",
"if",
"(",
"comment",
"!=",
"null",
"&&",
"comment",
".",
"indexOf",
"(",
"\"@deprecated\"",
")",
">=",
"0",
")",
"{",
"this",
".",
"fFlags",
"=",
"this",
".",
"fFlags",
"|",
"ClassFileConstants",
".",
"AccDeprecated",
";",
"return",
";",
"}",
"this",
".",
"fFlags",
"=",
"this",
".",
"fFlags",
"&",
"(",
"~",
"ClassFileConstants",
".",
"AccDeprecated",
")",
";",
"}",
"public",
"void",
"setFlags",
"(",
"int",
"flags",
")",
"{",
"becomeDetailed",
"(",
")",
";",
"if",
"(",
"Flags",
".",
"isDeprecated",
"(",
"this",
".",
"fFlags",
")",
")",
"{",
"this",
".",
"fFlags",
"=",
"flags",
"|",
"ClassFileConstants",
".",
"AccDeprecated",
";",
"}",
"else",
"{",
"this",
".",
"fFlags",
"=",
"flags",
"&",
"(",
"~",
"ClassFileConstants",
".",
"AccDeprecated",
")",
";",
"}",
"fragment",
"(",
")",
";",
"this",
".",
"fModifiers",
"=",
"generateFlags",
"(",
")",
";",
"}",
"protected",
"void",
"setHasBody",
"(",
"boolean",
"hasBody",
")",
"{",
"setMask",
"(",
"MASK_HAS_BODY",
",",
"hasBody",
")",
";",
"}",
"protected",
"void",
"setHasComment",
"(",
"boolean",
"hasComment",
")",
"{",
"setMask",
"(",
"MASK_HAS_COMMENT",
",",
"hasComment",
")",
";",
"}",
"protected",
"void",
"setStartPosition",
"(",
"int",
"start",
")",
"{",
"if",
"(",
"this",
".",
"fCommentRange",
"[",
"0",
"]",
">=",
"0",
")",
"{",
"this",
".",
"fCommentRange",
"[",
"0",
"]",
"=",
"start",
";",
"}",
"super",
".",
"setStartPosition",
"(",
"start",
")",
";",
"}",
"protected",
"void",
"shareContents",
"(",
"DOMNode",
"node",
")",
"{",
"super",
".",
"shareContents",
"(",
"node",
")",
";",
"DOMMember",
"member",
"=",
"(",
"DOMMember",
")",
"node",
";",
"this",
".",
"fComment",
"=",
"member",
".",
"fComment",
";",
"this",
".",
"fCommentRange",
"=",
"rangeCopy",
"(",
"member",
".",
"fCommentRange",
")",
";",
"this",
".",
"fFlags",
"=",
"member",
".",
"fFlags",
";",
"this",
".",
"fModifiers",
"=",
"member",
".",
"fModifiers",
";",
"this",
".",
"fModifierRange",
"=",
"rangeCopy",
"(",
"member",
".",
"fModifierRange",
")",
";",
"}",
"}",
"</s>"
] |
2,803 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"jdom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Flags",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IPackageFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"jdom",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"SuffixConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"CharArrayBuffer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"class",
"DOMCompilationUnit",
"extends",
"DOMNode",
"implements",
"IDOMCompilationUnit",
",",
"SuffixConstants",
"{",
"protected",
"String",
"fHeader",
";",
"DOMCompilationUnit",
"(",
")",
"{",
"this",
".",
"fHeader",
"=",
"\"\"",
";",
"}",
"DOMCompilationUnit",
"(",
"char",
"[",
"]",
"document",
",",
"int",
"[",
"]",
"sourceRange",
")",
"{",
"super",
"(",
"document",
",",
"sourceRange",
",",
"null",
",",
"new",
"int",
"[",
"]",
"{",
"-",
"1",
",",
"-",
"1",
"}",
")",
";",
"this",
".",
"fHeader",
"=",
"\"\"",
";",
"}",
"protected",
"void",
"appendFragmentedContents",
"(",
"CharArrayBuffer",
"buffer",
")",
"{",
"buffer",
".",
"append",
"(",
"getHeader",
"(",
")",
")",
";",
"appendContentsOfChildren",
"(",
"buffer",
")",
";",
"}",
"public",
"boolean",
"canHaveChildren",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"String",
"getHeader",
"(",
")",
"{",
"return",
"this",
".",
"fHeader",
";",
"}",
"public",
"IJavaElement",
"getJavaElement",
"(",
"IJavaElement",
"parent",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"parent",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
")",
"{",
"return",
"(",
"(",
"IPackageFragment",
")",
"parent",
")",
".",
"getCompilationUnit",
"(",
"getName",
"(",
")",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"Messages",
".",
"element_illegalParent",
")",
";",
"}",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"IDOMType",
"topLevelType",
"=",
"null",
";",
"IDOMType",
"firstType",
"=",
"null",
";",
"IDOMNode",
"child",
"=",
"this",
".",
"fFirstChild",
";",
"while",
"(",
"child",
"!=",
"null",
")",
"{",
"if",
"(",
"child",
".",
"getNodeType",
"(",
")",
"==",
"IDOMNode",
".",
"TYPE",
")",
"{",
"IDOMType",
"type",
"=",
"(",
"IDOMType",
")",
"child",
";",
"if",
"(",
"firstType",
"==",
"null",
")",
"{",
"firstType",
"=",
"type",
";",
"}",
"if",
"(",
"Flags",
".",
"isPublic",
"(",
"type",
".",
"getFlags",
"(",
")",
")",
")",
"{",
"topLevelType",
"=",
"type",
";",
"break",
";",
"}",
"}",
"child",
"=",
"child",
".",
"getNextNode",
"(",
")",
";",
"}",
"if",
"(",
"topLevelType",
"==",
"null",
")",
"{",
"topLevelType",
"=",
"firstType",
";",
"}",
"if",
"(",
"topLevelType",
"!=",
"null",
")",
"{",
"return",
"topLevelType",
".",
"getName",
"(",
")",
"+",
"Util",
".",
"defaultJavaExtension",
"(",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"int",
"getNodeType",
"(",
")",
"{",
"return",
"IDOMNode",
".",
"COMPILATION_UNIT",
";",
"}",
"protected",
"void",
"initalizeHeader",
"(",
")",
"{",
"DOMNode",
"child",
"=",
"(",
"DOMNode",
")",
"getFirstChild",
"(",
")",
";",
"if",
"(",
"child",
"!=",
"null",
")",
"{",
"int",
"childStart",
"=",
"child",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"childStart",
">",
"1",
")",
"{",
"setHeader",
"(",
"new",
"String",
"(",
"this",
".",
"fDocument",
",",
"0",
",",
"childStart",
")",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"isAllowableChild",
"(",
"IDOMNode",
"node",
")",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"int",
"type",
"=",
"node",
".",
"getNodeType",
"(",
")",
";",
"return",
"type",
"==",
"IDOMNode",
".",
"PACKAGE",
"||",
"type",
"==",
"IDOMNode",
".",
"IMPORT",
"||",
"type",
"==",
"IDOMNode",
".",
"TYPE",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"protected",
"DOMNode",
"newDOMNode",
"(",
")",
"{",
"return",
"new",
"DOMCompilationUnit",
"(",
")",
";",
"}",
"void",
"normalize",
"(",
"ILineStartFinder",
"finder",
")",
"{",
"super",
".",
"normalize",
"(",
"finder",
")",
";",
"initalizeHeader",
"(",
")",
";",
"}",
"public",
"void",
"setHeader",
"(",
"String",
"comment",
")",
"{",
"this",
".",
"fHeader",
"=",
"comment",
";",
"fragment",
"(",
")",
";",
"}",
"public",
"void",
"setName",
"(",
"String",
"name",
")",
"{",
"}",
"protected",
"void",
"shareContents",
"(",
"DOMNode",
"node",
")",
"{",
"super",
".",
"shareContents",
"(",
"node",
")",
";",
"this",
".",
"fHeader",
"=",
"(",
"(",
"DOMCompilationUnit",
")",
"node",
")",
".",
"fHeader",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
"+",
"getName",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,804 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"jdom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"ICompilationUnit",
";",
"public",
"class",
"CompilationUnit",
"implements",
"ICompilationUnit",
"{",
"protected",
"char",
"[",
"]",
"fContents",
";",
"protected",
"char",
"[",
"]",
"fFileName",
";",
"protected",
"char",
"[",
"]",
"fMainTypeName",
";",
"public",
"CompilationUnit",
"(",
"char",
"[",
"]",
"contents",
",",
"char",
"[",
"]",
"filename",
")",
"{",
"this",
".",
"fContents",
"=",
"contents",
";",
"this",
".",
"fFileName",
"=",
"filename",
";",
"String",
"file",
"=",
"new",
"String",
"(",
"filename",
")",
";",
"int",
"start",
"=",
"file",
".",
"lastIndexOf",
"(",
"\"/\"",
")",
"+",
"1",
";",
"if",
"(",
"start",
"==",
"0",
"||",
"start",
"<",
"file",
".",
"lastIndexOf",
"(",
"\"\\\\\"",
")",
")",
"start",
"=",
"file",
".",
"lastIndexOf",
"(",
"\"\\\\\"",
")",
"+",
"1",
";",
"int",
"end",
"=",
"file",
".",
"lastIndexOf",
"(",
"\".\"",
")",
";",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"end",
"=",
"file",
".",
"length",
"(",
")",
";",
"this",
".",
"fMainTypeName",
"=",
"file",
".",
"substring",
"(",
"start",
",",
"end",
")",
".",
"toCharArray",
"(",
")",
";",
"}",
"public",
"char",
"[",
"]",
"getContents",
"(",
")",
"{",
"return",
"this",
".",
"fContents",
";",
"}",
"public",
"char",
"[",
"]",
"getFileName",
"(",
")",
"{",
"return",
"this",
".",
"fFileName",
";",
"}",
"public",
"char",
"[",
"]",
"getMainTypeName",
"(",
")",
"{",
"return",
"this",
".",
"fMainTypeName",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"getPackageName",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"ignoreOptionalProblems",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
"+",
"new",
"String",
"(",
"this",
".",
"fFileName",
")",
"+",
"\"]\"",
";",
"}",
"}",
"</s>"
] |
2,805 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IBuffer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"WorkingCopyOwner",
";",
"public",
"class",
"DefaultWorkingCopyOwner",
"extends",
"WorkingCopyOwner",
"{",
"public",
"WorkingCopyOwner",
"primaryBufferProvider",
";",
"public",
"static",
"final",
"DefaultWorkingCopyOwner",
"PRIMARY",
"=",
"new",
"DefaultWorkingCopyOwner",
"(",
")",
";",
"private",
"DefaultWorkingCopyOwner",
"(",
")",
"{",
"}",
"public",
"IBuffer",
"createBuffer",
"(",
"ICompilationUnit",
"workingCopy",
")",
"{",
"if",
"(",
"this",
".",
"primaryBufferProvider",
"!=",
"null",
")",
"return",
"this",
".",
"primaryBufferProvider",
".",
"createBuffer",
"(",
"workingCopy",
")",
";",
"return",
"super",
".",
"createBuffer",
"(",
"workingCopy",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"}",
"</s>"
] |
2,806 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"public",
"class",
"TypeParameter",
"extends",
"SourceRefElement",
"implements",
"ITypeParameter",
"{",
"static",
"final",
"ITypeParameter",
"[",
"]",
"NO_TYPE_PARAMETERS",
"=",
"new",
"ITypeParameter",
"[",
"0",
"]",
";",
"protected",
"String",
"name",
";",
"public",
"TypeParameter",
"(",
"JavaElement",
"parent",
",",
"String",
"name",
")",
"{",
"super",
"(",
"parent",
")",
";",
"this",
".",
"name",
"=",
"name",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"TypeParameter",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"equals",
"(",
"o",
")",
";",
"}",
"public",
"String",
"[",
"]",
"getBounds",
"(",
")",
"throws",
"JavaModelException",
"{",
"TypeParameterElementInfo",
"info",
"=",
"(",
"TypeParameterElementInfo",
")",
"getElementInfo",
"(",
")",
";",
"return",
"CharOperation",
".",
"toStrings",
"(",
"info",
".",
"bounds",
")",
";",
"}",
"public",
"String",
"[",
"]",
"getBoundsSignatures",
"(",
")",
"throws",
"JavaModelException",
"{",
"String",
"[",
"]",
"boundSignatures",
"=",
"null",
";",
"TypeParameterElementInfo",
"info",
"=",
"(",
"TypeParameterElementInfo",
")",
"this",
".",
"getElementInfo",
"(",
")",
";",
"if",
"(",
"this",
".",
"parent",
"instanceof",
"BinaryMember",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"boundsSignatures",
"=",
"info",
".",
"boundsSignatures",
";",
"if",
"(",
"boundsSignatures",
"==",
"null",
"||",
"boundsSignatures",
".",
"length",
"==",
"0",
")",
"{",
"return",
"CharOperation",
".",
"NO_STRINGS",
";",
"}",
"return",
"CharOperation",
".",
"toStrings",
"(",
"info",
".",
"boundsSignatures",
")",
";",
"}",
"char",
"[",
"]",
"[",
"]",
"bounds",
"=",
"info",
".",
"bounds",
";",
"if",
"(",
"bounds",
"==",
"null",
"||",
"bounds",
".",
"length",
"==",
"0",
")",
"{",
"return",
"CharOperation",
".",
"NO_STRINGS",
";",
"}",
"int",
"boundsLength",
"=",
"bounds",
".",
"length",
";",
"boundSignatures",
"=",
"new",
"String",
"[",
"boundsLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"boundsLength",
";",
"i",
"++",
")",
"{",
"boundSignatures",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"Signature",
".",
"createCharArrayTypeSignature",
"(",
"bounds",
"[",
"i",
"]",
",",
"false",
")",
")",
";",
"}",
"return",
"boundSignatures",
";",
"}",
"public",
"IMember",
"getDeclaringMember",
"(",
")",
"{",
"return",
"(",
"IMember",
")",
"getParent",
"(",
")",
";",
"}",
"public",
"String",
"getElementName",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"TYPE_PARAMETER",
";",
"}",
"protected",
"char",
"getHandleMementoDelimiter",
"(",
")",
"{",
"return",
"JavaElement",
".",
"JEM_TYPE_PARAMETER",
";",
"}",
"public",
"ISourceRange",
"getNameRange",
"(",
")",
"throws",
"JavaModelException",
"{",
"SourceMapper",
"mapper",
"=",
"getSourceMapper",
"(",
")",
";",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"ClassFile",
"classFile",
"=",
"(",
"ClassFile",
")",
"getClassFile",
"(",
")",
";",
"if",
"(",
"classFile",
"!=",
"null",
")",
"{",
"classFile",
".",
"getBuffer",
"(",
")",
";",
"return",
"mapper",
".",
"getNameRange",
"(",
"this",
")",
";",
"}",
"}",
"TypeParameterElementInfo",
"info",
"=",
"(",
"TypeParameterElementInfo",
")",
"getElementInfo",
"(",
")",
";",
"return",
"new",
"SourceRange",
"(",
"info",
".",
"nameStart",
",",
"info",
".",
"nameEnd",
"-",
"info",
".",
"nameStart",
"+",
"1",
")",
";",
"}",
"public",
"ISourceRange",
"getSourceRange",
"(",
")",
"throws",
"JavaModelException",
"{",
"SourceMapper",
"mapper",
"=",
"getSourceMapper",
"(",
")",
";",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"ClassFile",
"classFile",
"=",
"(",
"ClassFile",
")",
"getClassFile",
"(",
")",
";",
"if",
"(",
"classFile",
"!=",
"null",
")",
"{",
"classFile",
".",
"getBuffer",
"(",
")",
";",
"return",
"mapper",
".",
"getSourceRange",
"(",
"this",
")",
";",
"}",
"}",
"return",
"super",
".",
"getSourceRange",
"(",
")",
";",
"}",
"public",
"IClassFile",
"getClassFile",
"(",
")",
"{",
"return",
"(",
"(",
"JavaElement",
")",
"getParent",
"(",
")",
")",
".",
"getClassFile",
"(",
")",
";",
"}",
"public",
"ITypeRoot",
"getTypeRoot",
"(",
")",
"{",
"return",
"this",
".",
"getDeclaringMember",
"(",
")",
".",
"getTypeRoot",
"(",
")",
";",
"}",
"protected",
"void",
"toStringName",
"(",
"StringBuffer",
"buffer",
")",
"{",
"buffer",
".",
"append",
"(",
"'<'",
")",
";",
"buffer",
".",
"append",
"(",
"getElementName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'>'",
")",
";",
"}",
"}",
"</s>"
] |
2,807 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IField",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IInitializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IPackageFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"public",
"interface",
"IJavaElementRequestor",
"{",
"public",
"void",
"acceptField",
"(",
"IField",
"field",
")",
";",
"public",
"void",
"acceptInitializer",
"(",
"IInitializer",
"initializer",
")",
";",
"public",
"void",
"acceptMemberType",
"(",
"IType",
"type",
")",
";",
"public",
"void",
"acceptMethod",
"(",
"IMethod",
"method",
")",
";",
"public",
"void",
"acceptPackageFragment",
"(",
"IPackageFragment",
"packageFragment",
")",
";",
"public",
"void",
"acceptType",
"(",
"IType",
"type",
")",
";",
"boolean",
"isCanceled",
"(",
")",
";",
"}",
"</s>"
] |
2,808 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"OperationCanceledException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CategorizedProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"AbortCompilation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"DefaultProblemFactory",
";",
"public",
"class",
"CancelableProblemFactory",
"extends",
"DefaultProblemFactory",
"{",
"public",
"IProgressMonitor",
"monitor",
";",
"public",
"CancelableProblemFactory",
"(",
"IProgressMonitor",
"monitor",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"monitor",
"=",
"monitor",
";",
"}",
"public",
"CategorizedProblem",
"createProblem",
"(",
"char",
"[",
"]",
"originatingFileName",
",",
"int",
"problemId",
",",
"String",
"[",
"]",
"problemArguments",
",",
"String",
"[",
"]",
"messageArguments",
",",
"int",
"severity",
",",
"int",
"startPosition",
",",
"int",
"endPosition",
",",
"int",
"lineNumber",
",",
"int",
"columnNumber",
")",
"{",
"if",
"(",
"this",
".",
"monitor",
"!=",
"null",
"&&",
"this",
".",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"throw",
"new",
"AbortCompilation",
"(",
"true",
",",
"new",
"OperationCanceledException",
"(",
")",
")",
";",
"return",
"super",
".",
"createProblem",
"(",
"originatingFileName",
",",
"problemId",
",",
"problemArguments",
",",
"messageArguments",
",",
"severity",
",",
"startPosition",
",",
"endPosition",
",",
"lineNumber",
",",
"columnNumber",
")",
";",
"}",
"public",
"CategorizedProblem",
"createProblem",
"(",
"char",
"[",
"]",
"originatingFileName",
",",
"int",
"problemId",
",",
"String",
"[",
"]",
"problemArguments",
",",
"int",
"elaborationId",
",",
"String",
"[",
"]",
"messageArguments",
",",
"int",
"severity",
",",
"int",
"startPosition",
",",
"int",
"endPosition",
",",
"int",
"lineNumber",
",",
"int",
"columnNumber",
")",
"{",
"if",
"(",
"this",
".",
"monitor",
"!=",
"null",
"&&",
"this",
".",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"throw",
"new",
"AbortCompilation",
"(",
"true",
",",
"new",
"OperationCanceledException",
"(",
")",
")",
";",
"return",
"super",
".",
"createProblem",
"(",
"originatingFileName",
",",
"problemId",
",",
"problemArguments",
",",
"elaborationId",
",",
"messageArguments",
",",
"severity",
",",
"startPosition",
",",
"endPosition",
",",
"lineNumber",
",",
"columnNumber",
")",
";",
"}",
"}",
"</s>"
] |
2,809 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"abstract",
"class",
"MemberElementInfo",
"extends",
"SourceRefElementInfo",
"{",
"protected",
"int",
"flags",
";",
"public",
"int",
"getNameSourceEnd",
"(",
")",
"{",
"return",
"-",
"1",
";",
"}",
"public",
"int",
"getNameSourceStart",
"(",
")",
"{",
"return",
"-",
"1",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"return",
"this",
".",
"flags",
";",
"}",
"protected",
"void",
"setFlags",
"(",
"int",
"flags",
")",
"{",
"this",
".",
"flags",
"=",
"flags",
";",
"}",
"}",
"</s>"
] |
2,810 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipEntry",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipException",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipFile",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResource",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"CoreException",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IPath",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"HashtableOfArrayToObject",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"JarPackageFragmentRoot",
"extends",
"PackageFragmentRoot",
"{",
"private",
"final",
"static",
"ArrayList",
"EMPTY_LIST",
"=",
"new",
"ArrayList",
"(",
")",
";",
"protected",
"final",
"IPath",
"jarPath",
";",
"protected",
"JarPackageFragmentRoot",
"(",
"IPath",
"externalJarPath",
",",
"JavaProject",
"project",
")",
"{",
"super",
"(",
"null",
",",
"project",
")",
";",
"this",
".",
"jarPath",
"=",
"externalJarPath",
";",
"}",
"protected",
"JarPackageFragmentRoot",
"(",
"IResource",
"resource",
",",
"JavaProject",
"project",
")",
"{",
"super",
"(",
"resource",
",",
"project",
")",
";",
"this",
".",
"jarPath",
"=",
"resource",
".",
"getFullPath",
"(",
")",
";",
"}",
"protected",
"boolean",
"computeChildren",
"(",
"OpenableElementInfo",
"info",
",",
"IResource",
"underlyingResource",
")",
"throws",
"JavaModelException",
"{",
"HashtableOfArrayToObject",
"rawPackageInfo",
"=",
"new",
"HashtableOfArrayToObject",
"(",
")",
";",
"IJavaElement",
"[",
"]",
"children",
";",
"ZipFile",
"jar",
"=",
"null",
";",
"try",
"{",
"IJavaProject",
"project",
"=",
"getJavaProject",
"(",
")",
";",
"String",
"sourceLevel",
"=",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_SOURCE",
",",
"true",
")",
";",
"String",
"compliance",
"=",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_COMPLIANCE",
",",
"true",
")",
";",
"jar",
"=",
"getJar",
"(",
")",
";",
"rawPackageInfo",
".",
"put",
"(",
"CharOperation",
".",
"NO_STRINGS",
",",
"new",
"ArrayList",
"[",
"]",
"{",
"EMPTY_LIST",
",",
"EMPTY_LIST",
"}",
")",
";",
"for",
"(",
"Enumeration",
"e",
"=",
"jar",
".",
"entries",
"(",
")",
";",
"e",
".",
"hasMoreElements",
"(",
")",
";",
")",
"{",
"ZipEntry",
"member",
"=",
"(",
"ZipEntry",
")",
"e",
".",
"nextElement",
"(",
")",
";",
"initRawPackageInfo",
"(",
"rawPackageInfo",
",",
"member",
".",
"getName",
"(",
")",
",",
"member",
".",
"isDirectory",
"(",
")",
",",
"sourceLevel",
",",
"compliance",
")",
";",
"}",
"children",
"=",
"new",
"IJavaElement",
"[",
"rawPackageInfo",
".",
"size",
"(",
")",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"rawPackageInfo",
".",
"keyTable",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"String",
"[",
"]",
"pkgName",
"=",
"(",
"String",
"[",
"]",
")",
"rawPackageInfo",
".",
"keyTable",
"[",
"i",
"]",
";",
"if",
"(",
"pkgName",
"==",
"null",
")",
"continue",
";",
"children",
"[",
"index",
"++",
"]",
"=",
"getPackageFragment",
"(",
"pkgName",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"if",
"(",
"e",
".",
"getCause",
"(",
")",
"instanceof",
"ZipException",
")",
"{",
"Util",
".",
"log",
"(",
"IStatus",
".",
"ERROR",
",",
"\"\"",
"+",
"toStringWithAncestors",
"(",
")",
")",
";",
"children",
"=",
"NO_ELEMENTS",
";",
"}",
"else",
"if",
"(",
"e",
"instanceof",
"JavaModelException",
")",
"{",
"throw",
"(",
"JavaModelException",
")",
"e",
";",
"}",
"else",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"}",
"finally",
"{",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"closeZipFile",
"(",
"jar",
")",
";",
"}",
"info",
".",
"setChildren",
"(",
"children",
")",
";",
"(",
"(",
"JarPackageFragmentRootInfo",
")",
"info",
")",
".",
"rawPackageInfo",
"=",
"rawPackageInfo",
";",
"return",
"true",
";",
"}",
"protected",
"Object",
"createElementInfo",
"(",
")",
"{",
"return",
"new",
"JarPackageFragmentRootInfo",
"(",
")",
";",
"}",
"protected",
"int",
"determineKind",
"(",
"IResource",
"underlyingResource",
")",
"{",
"return",
"IPackageFragmentRoot",
".",
"K_BINARY",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"this",
"==",
"o",
")",
"return",
"true",
";",
"if",
"(",
"o",
"instanceof",
"JarPackageFragmentRoot",
")",
"{",
"JarPackageFragmentRoot",
"other",
"=",
"(",
"JarPackageFragmentRoot",
")",
"o",
";",
"return",
"this",
".",
"jarPath",
".",
"equals",
"(",
"other",
".",
"jarPath",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"String",
"getElementName",
"(",
")",
"{",
"return",
"this",
".",
"jarPath",
".",
"lastSegment",
"(",
")",
";",
"}",
"public",
"ZipFile",
"getJar",
"(",
")",
"throws",
"CoreException",
"{",
"return",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getZipFile",
"(",
"getPath",
"(",
")",
")",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"IPackageFragmentRoot",
".",
"K_BINARY",
";",
"}",
"int",
"internalKind",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"IPackageFragmentRoot",
".",
"K_BINARY",
";",
"}",
"public",
"Object",
"[",
"]",
"getNonJavaResources",
"(",
")",
"throws",
"JavaModelException",
"{",
"Object",
"[",
"]",
"defaultPkgResources",
"=",
"(",
"(",
"JarPackageFragment",
")",
"getPackageFragment",
"(",
"CharOperation",
".",
"NO_STRINGS",
")",
")",
".",
"storedNonJavaResources",
"(",
")",
";",
"int",
"length",
"=",
"defaultPkgResources",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"defaultPkgResources",
";",
"Object",
"[",
"]",
"nonJavaResources",
"=",
"new",
"Object",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"JarEntryResource",
"nonJavaResource",
"=",
"(",
"JarEntryResource",
")",
"defaultPkgResources",
"[",
"i",
"]",
";",
"nonJavaResources",
"[",
"i",
"]",
"=",
"nonJavaResource",
".",
"clone",
"(",
"this",
")",
";",
"}",
"return",
"nonJavaResources",
";",
"}",
"public",
"PackageFragment",
"getPackageFragment",
"(",
"String",
"[",
"]",
"pkgName",
")",
"{",
"return",
"new",
"JarPackageFragment",
"(",
"this",
",",
"pkgName",
")",
";",
"}",
"public",
"IPath",
"internalPath",
"(",
")",
"{",
"if",
"(",
"isExternal",
"(",
")",
")",
"{",
"return",
"this",
".",
"jarPath",
";",
"}",
"else",
"{",
"return",
"super",
".",
"internalPath",
"(",
")",
";",
"}",
"}",
"public",
"IResource",
"resource",
"(",
"PackageFragmentRoot",
"root",
")",
"{",
"if",
"(",
"this",
".",
"resource",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"super",
".",
"resource",
"(",
"root",
")",
";",
"}",
"public",
"IResource",
"getUnderlyingResource",
"(",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"isExternal",
"(",
")",
")",
"{",
"if",
"(",
"!",
"exists",
"(",
")",
")",
"throw",
"newNotPresentException",
"(",
")",
";",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"super",
".",
"getUnderlyingResource",
"(",
")",
";",
"}",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"this",
".",
"jarPath",
".",
"hashCode",
"(",
")",
";",
"}",
"private",
"void",
"initRawPackageInfo",
"(",
"HashtableOfArrayToObject",
"rawPackageInfo",
",",
"String",
"entryName",
",",
"boolean",
"isDirectory",
",",
"String",
"sourceLevel",
",",
"String",
"compliance",
")",
"{",
"int",
"lastSeparator",
"=",
"isDirectory",
"?",
"entryName",
".",
"length",
"(",
")",
"-",
"1",
":",
"entryName",
".",
"lastIndexOf",
"(",
"'/'",
")",
";",
"String",
"[",
"]",
"pkgName",
"=",
"Util",
".",
"splitOn",
"(",
"'/'",
",",
"entryName",
",",
"0",
",",
"lastSeparator",
")",
";",
"String",
"[",
"]",
"existing",
"=",
"null",
";",
"int",
"length",
"=",
"pkgName",
".",
"length",
";",
"int",
"existingLength",
"=",
"length",
";",
"while",
"(",
"existingLength",
">=",
"0",
")",
"{",
"existing",
"=",
"(",
"String",
"[",
"]",
")",
"rawPackageInfo",
".",
"getKey",
"(",
"pkgName",
",",
"existingLength",
")",
";",
"if",
"(",
"existing",
"!=",
"null",
")",
"break",
";",
"existingLength",
"--",
";",
"}",
"JavaModelManager",
"manager",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"existingLength",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"Util",
".",
"isValidFolderNameForPackage",
"(",
"pkgName",
"[",
"i",
"]",
",",
"sourceLevel",
",",
"compliance",
")",
")",
"{",
"System",
".",
"arraycopy",
"(",
"existing",
",",
"0",
",",
"existing",
"=",
"new",
"String",
"[",
"i",
"+",
"1",
"]",
",",
"0",
",",
"i",
")",
";",
"existing",
"[",
"i",
"]",
"=",
"manager",
".",
"intern",
"(",
"pkgName",
"[",
"i",
"]",
")",
";",
"rawPackageInfo",
".",
"put",
"(",
"existing",
",",
"new",
"ArrayList",
"[",
"]",
"{",
"EMPTY_LIST",
",",
"EMPTY_LIST",
"}",
")",
";",
"}",
"else",
"{",
"if",
"(",
"!",
"isDirectory",
")",
"{",
"ArrayList",
"[",
"]",
"children",
"=",
"(",
"ArrayList",
"[",
"]",
")",
"rawPackageInfo",
".",
"get",
"(",
"existing",
")",
";",
"if",
"(",
"children",
"[",
"1",
"]",
"==",
"EMPTY_LIST",
")",
"children",
"[",
"1",
"]",
"=",
"new",
"ArrayList",
"(",
")",
";",
"children",
"[",
"1",
"]",
".",
"add",
"(",
"entryName",
")",
";",
"}",
"return",
";",
"}",
"}",
"if",
"(",
"isDirectory",
")",
"return",
";",
"ArrayList",
"[",
"]",
"children",
"=",
"(",
"ArrayList",
"[",
"]",
")",
"rawPackageInfo",
".",
"get",
"(",
"pkgName",
")",
";",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"isClassFileName",
"(",
"entryName",
")",
")",
"{",
"if",
"(",
"children",
"[",
"0",
"]",
"==",
"EMPTY_LIST",
")",
"children",
"[",
"0",
"]",
"=",
"new",
"ArrayList",
"(",
")",
";",
"String",
"nameWithoutExtension",
"=",
"entryName",
".",
"substring",
"(",
"lastSeparator",
"+",
"1",
",",
"entryName",
".",
"length",
"(",
")",
"-",
"6",
")",
";",
"children",
"[",
"0",
"]",
".",
"add",
"(",
"nameWithoutExtension",
")",
";",
"}",
"else",
"{",
"if",
"(",
"children",
"[",
"1",
"]",
"==",
"EMPTY_LIST",
")",
"children",
"[",
"1",
"]",
"=",
"new",
"ArrayList",
"(",
")",
";",
"children",
"[",
"1",
"]",
".",
"add",
"(",
"entryName",
")",
";",
"}",
"}",
"public",
"boolean",
"isArchive",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"isExternal",
"(",
")",
"{",
"return",
"resource",
"(",
")",
"==",
"null",
";",
"}",
"public",
"boolean",
"isReadOnly",
"(",
")",
"{",
"return",
"true",
";",
"}",
"protected",
"boolean",
"resourceExists",
"(",
"IResource",
"underlyingResource",
")",
"{",
"if",
"(",
"underlyingResource",
"==",
"null",
")",
"{",
"return",
"JavaModel",
".",
"getExternalTarget",
"(",
"getPath",
"(",
")",
",",
"true",
")",
"!=",
"null",
";",
"}",
"else",
"{",
"return",
"super",
".",
"resourceExists",
"(",
"underlyingResource",
")",
";",
"}",
"}",
"protected",
"void",
"toStringAncestors",
"(",
"StringBuffer",
"buffer",
")",
"{",
"if",
"(",
"isExternal",
"(",
")",
")",
"return",
";",
"super",
".",
"toStringAncestors",
"(",
"buffer",
")",
";",
"}",
"public",
"URL",
"getIndexPath",
"(",
")",
"{",
"try",
"{",
"IClasspathEntry",
"entry",
"=",
"(",
"(",
"JavaProject",
")",
"getParent",
"(",
")",
")",
".",
"getClasspathEntryFor",
"(",
"getPath",
"(",
")",
")",
";",
"if",
"(",
"entry",
"!=",
"null",
")",
"return",
"(",
"(",
"ClasspathEntry",
")",
"entry",
")",
".",
"getLibraryIndexLocation",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
2,811 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"public",
"interface",
"IPathRequestor",
"{",
"void",
"acceptPath",
"(",
"String",
"path",
",",
"boolean",
"containsLocalTypes",
")",
";",
"}",
"</s>"
] |
2,812 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IField",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IInitializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IPackageFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"public",
"class",
"JavaElementRequestor",
"implements",
"IJavaElementRequestor",
"{",
"protected",
"boolean",
"canceled",
"=",
"false",
";",
"protected",
"ArrayList",
"fields",
"=",
"null",
";",
"protected",
"ArrayList",
"initializers",
"=",
"null",
";",
"protected",
"ArrayList",
"memberTypes",
"=",
"null",
";",
"protected",
"ArrayList",
"methods",
"=",
"null",
";",
"protected",
"ArrayList",
"packageFragments",
"=",
"null",
";",
"protected",
"ArrayList",
"types",
"=",
"null",
";",
"protected",
"static",
"final",
"IField",
"[",
"]",
"EMPTY_FIELD_ARRAY",
"=",
"new",
"IField",
"[",
"0",
"]",
";",
"protected",
"static",
"final",
"IInitializer",
"[",
"]",
"EMPTY_INITIALIZER_ARRAY",
"=",
"new",
"IInitializer",
"[",
"0",
"]",
";",
"protected",
"static",
"final",
"IType",
"[",
"]",
"EMPTY_TYPE_ARRAY",
"=",
"new",
"IType",
"[",
"0",
"]",
";",
"protected",
"static",
"final",
"IPackageFragment",
"[",
"]",
"EMPTY_PACKAGE_FRAGMENT_ARRAY",
"=",
"new",
"IPackageFragment",
"[",
"0",
"]",
";",
"protected",
"static",
"final",
"IMethod",
"[",
"]",
"EMPTY_METHOD_ARRAY",
"=",
"new",
"IMethod",
"[",
"0",
"]",
";",
"public",
"void",
"acceptField",
"(",
"IField",
"field",
")",
"{",
"if",
"(",
"this",
".",
"fields",
"==",
"null",
")",
"{",
"this",
".",
"fields",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"this",
".",
"fields",
".",
"add",
"(",
"field",
")",
";",
"}",
"public",
"void",
"acceptInitializer",
"(",
"IInitializer",
"initializer",
")",
"{",
"if",
"(",
"this",
".",
"initializers",
"==",
"null",
")",
"{",
"this",
".",
"initializers",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"this",
".",
"initializers",
".",
"add",
"(",
"initializer",
")",
";",
"}",
"public",
"void",
"acceptMemberType",
"(",
"IType",
"type",
")",
"{",
"if",
"(",
"this",
".",
"memberTypes",
"==",
"null",
")",
"{",
"this",
".",
"memberTypes",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"this",
".",
"memberTypes",
".",
"add",
"(",
"type",
")",
";",
"}",
"public",
"void",
"acceptMethod",
"(",
"IMethod",
"method",
")",
"{",
"if",
"(",
"this",
".",
"methods",
"==",
"null",
")",
"{",
"this",
".",
"methods",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"this",
".",
"methods",
".",
"add",
"(",
"method",
")",
";",
"}",
"public",
"void",
"acceptPackageFragment",
"(",
"IPackageFragment",
"packageFragment",
")",
"{",
"if",
"(",
"this",
".",
"packageFragments",
"==",
"null",
")",
"{",
"this",
".",
"packageFragments",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"this",
".",
"packageFragments",
".",
"add",
"(",
"packageFragment",
")",
";",
"}",
"public",
"void",
"acceptType",
"(",
"IType",
"type",
")",
"{",
"if",
"(",
"this",
".",
"types",
"==",
"null",
")",
"{",
"this",
".",
"types",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"this",
".",
"types",
".",
"add",
"(",
"type",
")",
";",
"}",
"public",
"IField",
"[",
"]",
"getFields",
"(",
")",
"{",
"if",
"(",
"this",
".",
"fields",
"==",
"null",
")",
"{",
"return",
"EMPTY_FIELD_ARRAY",
";",
"}",
"int",
"size",
"=",
"this",
".",
"fields",
".",
"size",
"(",
")",
";",
"IField",
"[",
"]",
"results",
"=",
"new",
"IField",
"[",
"size",
"]",
";",
"this",
".",
"fields",
".",
"toArray",
"(",
"results",
")",
";",
"return",
"results",
";",
"}",
"public",
"IInitializer",
"[",
"]",
"getInitializers",
"(",
")",
"{",
"if",
"(",
"this",
".",
"initializers",
"==",
"null",
")",
"{",
"return",
"EMPTY_INITIALIZER_ARRAY",
";",
"}",
"int",
"size",
"=",
"this",
".",
"initializers",
".",
"size",
"(",
")",
";",
"IInitializer",
"[",
"]",
"results",
"=",
"new",
"IInitializer",
"[",
"size",
"]",
";",
"this",
".",
"initializers",
".",
"toArray",
"(",
"results",
")",
";",
"return",
"results",
";",
"}",
"public",
"IType",
"[",
"]",
"getMemberTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"memberTypes",
"==",
"null",
")",
"{",
"return",
"EMPTY_TYPE_ARRAY",
";",
"}",
"int",
"size",
"=",
"this",
".",
"memberTypes",
".",
"size",
"(",
")",
";",
"IType",
"[",
"]",
"results",
"=",
"new",
"IType",
"[",
"size",
"]",
";",
"this",
".",
"memberTypes",
".",
"toArray",
"(",
"results",
")",
";",
"return",
"results",
";",
"}",
"public",
"IMethod",
"[",
"]",
"getMethods",
"(",
")",
"{",
"if",
"(",
"this",
".",
"methods",
"==",
"null",
")",
"{",
"return",
"EMPTY_METHOD_ARRAY",
";",
"}",
"int",
"size",
"=",
"this",
".",
"methods",
".",
"size",
"(",
")",
";",
"IMethod",
"[",
"]",
"results",
"=",
"new",
"IMethod",
"[",
"size",
"]",
";",
"this",
".",
"methods",
".",
"toArray",
"(",
"results",
")",
";",
"return",
"results",
";",
"}",
"public",
"IPackageFragment",
"[",
"]",
"getPackageFragments",
"(",
")",
"{",
"if",
"(",
"this",
".",
"packageFragments",
"==",
"null",
")",
"{",
"return",
"EMPTY_PACKAGE_FRAGMENT_ARRAY",
";",
"}",
"int",
"size",
"=",
"this",
".",
"packageFragments",
".",
"size",
"(",
")",
";",
"IPackageFragment",
"[",
"]",
"results",
"=",
"new",
"IPackageFragment",
"[",
"size",
"]",
";",
"this",
".",
"packageFragments",
".",
"toArray",
"(",
"results",
")",
";",
"return",
"results",
";",
"}",
"public",
"IType",
"[",
"]",
"getTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"types",
"==",
"null",
")",
"{",
"return",
"EMPTY_TYPE_ARRAY",
";",
"}",
"int",
"size",
"=",
"this",
".",
"types",
".",
"size",
"(",
")",
";",
"IType",
"[",
"]",
"results",
"=",
"new",
"IType",
"[",
"size",
"]",
";",
"this",
".",
"types",
".",
"toArray",
"(",
"results",
")",
";",
"return",
"results",
";",
"}",
"public",
"boolean",
"isCanceled",
"(",
")",
"{",
"return",
"this",
".",
"canceled",
";",
"}",
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"canceled",
"=",
"false",
";",
"this",
".",
"fields",
"=",
"null",
";",
"this",
".",
"initializers",
"=",
"null",
";",
"this",
".",
"memberTypes",
"=",
"null",
";",
"this",
".",
"methods",
"=",
"null",
";",
"this",
".",
"packageFragments",
"=",
"null",
";",
"this",
".",
"types",
"=",
"null",
";",
"}",
"public",
"void",
"setCanceled",
"(",
"boolean",
"b",
")",
"{",
"this",
".",
"canceled",
"=",
"b",
";",
"}",
"}",
"</s>"
] |
2,813 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"public",
"interface",
"JavadocConstants",
"{",
"String",
"ANCHOR_PREFIX_END",
"=",
"\"\\\"\"",
";",
"char",
"[",
"]",
"ANCHOR_PREFIX_START",
"=",
"\"<A",
"NAME=\\\"\"",
".",
"toCharArray",
"(",
")",
";",
"int",
"ANCHOR_PREFIX_START_LENGHT",
"=",
"ANCHOR_PREFIX_START",
".",
"length",
";",
"char",
"[",
"]",
"ANCHOR_SUFFIX",
"=",
"\"</A>\"",
".",
"toCharArray",
"(",
")",
";",
"int",
"ANCHOR_SUFFIX_LENGTH",
"=",
"JavadocConstants",
".",
"ANCHOR_SUFFIX",
".",
"length",
";",
"char",
"[",
"]",
"CONSTRUCTOR_DETAIL",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"CONSTRUCTOR_SUMMARY",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"FIELD_DETAIL",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"FIELD_SUMMARY",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"ENUM_CONSTANT_SUMMARY",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"END_OF_CLASS_DATA",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"String",
"HTML_EXTENSION",
"=",
"\".html\"",
";",
"String",
"INDEX_FILE_NAME",
"=",
"\"index.html\"",
";",
"char",
"[",
"]",
"METHOD_DETAIL",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"METHOD_SUMMARY",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"NESTED_CLASS_SUMMARY",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"String",
"PACKAGE_FILE_NAME",
"=",
"\"\"",
";",
"char",
"[",
"]",
"SEPARATOR_START",
"=",
"\"<!--",
"=\"",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"START_OF_CLASS_DATA",
"=",
"\"\"",
".",
"toCharArray",
"(",
")",
";",
"int",
"START_OF_CLASS_DATA_LENGTH",
"=",
"JavadocConstants",
".",
"START_OF_CLASS_DATA",
".",
"length",
";",
"}",
"</s>"
] |
2,814 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IClasspathAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"ClasspathAttribute",
"implements",
"IClasspathAttribute",
"{",
"private",
"String",
"name",
";",
"private",
"String",
"value",
";",
"public",
"ClasspathAttribute",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"this",
".",
"name",
"=",
"name",
";",
"this",
".",
"value",
"=",
"value",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"!",
"(",
"obj",
"instanceof",
"ClasspathAttribute",
")",
")",
"return",
"false",
";",
"ClasspathAttribute",
"other",
"=",
"(",
"ClasspathAttribute",
")",
"obj",
";",
"return",
"this",
".",
"name",
".",
"equals",
"(",
"other",
".",
"name",
")",
"&&",
"this",
".",
"value",
".",
"equals",
"(",
"other",
".",
"value",
")",
";",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"String",
"getValue",
"(",
")",
"{",
"return",
"this",
".",
"value",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"Util",
".",
"combineHashCodes",
"(",
"this",
".",
"name",
".",
"hashCode",
"(",
")",
",",
"this",
".",
"value",
".",
"hashCode",
"(",
")",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"name",
"+",
"\"=\"",
"+",
"this",
".",
"value",
";",
"}",
"}",
"</s>"
] |
2,815 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"io",
".",
"*",
";",
"import",
"java",
".",
"net",
".",
"URI",
";",
"import",
"java",
".",
"text",
".",
"MessageFormat",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"import",
"java",
".",
"util",
".",
"Map",
".",
"Entry",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipException",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipFile",
";",
"import",
"javax",
".",
"xml",
".",
"parsers",
".",
"DocumentBuilder",
";",
"import",
"javax",
".",
"xml",
".",
"parsers",
".",
"DocumentBuilderFactory",
";",
"import",
"javax",
".",
"xml",
".",
"parsers",
".",
"ParserConfigurationException",
";",
"import",
"org",
".",
"codehaus",
".",
"jdt",
".",
"groovy",
".",
"integration",
".",
"LanguageSupportFactory",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"content",
".",
"IContentTypeManager",
".",
"ContentTypeChangeEvent",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"content",
".",
"IContentTypeManager",
".",
"IContentTypeChangeListener",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"jobs",
".",
"Job",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"preferences",
".",
"DefaultScope",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"preferences",
".",
"IEclipsePreferences",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"preferences",
".",
"IPreferencesService",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"preferences",
".",
"InstanceScope",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"preferences",
".",
"IEclipsePreferences",
".",
"PreferenceChangeEvent",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CompilationParticipant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"IProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"DefaultCodeFormatterConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"codeassist",
".",
"CompletionEngine",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"codeassist",
".",
"SelectionEngine",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"AbstractAnnotationProcessorManager",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"Compiler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"AccessRestriction",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"HashtableOfObjectToInt",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaProjectElementInfo",
".",
"ProjectCache",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"builder",
".",
"JavaBuilder",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"hierarchy",
".",
"TypeHierarchy",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"AbstractSearchScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"BasicSearchEngine",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"IRestrictedAccessTypeRequestor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"JavaWorkspaceScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"indexing",
".",
"IndexManager",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"processing",
".",
"JobManager",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"HashtableOfArrayToObject",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"LRUCache",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"WeakHashSet",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"WeakHashSetOfCharArray",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"LRUCache",
".",
"Stats",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"formatter",
".",
"DefaultCodeFormatter",
";",
"import",
"org",
".",
"osgi",
".",
"service",
".",
"prefs",
".",
"BackingStoreException",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Element",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"Node",
";",
"import",
"org",
".",
"w3c",
".",
"dom",
".",
"NodeList",
";",
"import",
"org",
".",
"xml",
".",
"sax",
".",
"InputSource",
";",
"import",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
";",
"public",
"class",
"JavaModelManager",
"implements",
"ISaveParticipant",
",",
"IContentTypeChangeListener",
"{",
"private",
"static",
"final",
"String",
"NON_CHAINING_JARS_CACHE",
"=",
"\"\"",
";",
"private",
"static",
"final",
"String",
"INVALID_ARCHIVES_CACHE",
"=",
"\"\"",
";",
"static",
"class",
"ZipCache",
"{",
"private",
"Map",
"map",
";",
"Object",
"owner",
";",
"ZipCache",
"(",
"Object",
"owner",
")",
"{",
"this",
".",
"map",
"=",
"new",
"HashMap",
"(",
")",
";",
"this",
".",
"owner",
"=",
"owner",
";",
"}",
"public",
"void",
"flush",
"(",
")",
"{",
"Thread",
"currentThread",
"=",
"Thread",
".",
"currentThread",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"this",
".",
"map",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"try",
"{",
"ZipFile",
"zipFile",
"=",
"(",
"ZipFile",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"JavaModelManager",
".",
"ZIP_ACCESS_VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"(\"",
"+",
"currentThread",
"+",
"\"\"",
"+",
"zipFile",
".",
"getName",
"(",
")",
")",
";",
"}",
"zipFile",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"}",
"public",
"ZipFile",
"getCache",
"(",
"IPath",
"path",
")",
"{",
"return",
"(",
"ZipFile",
")",
"this",
".",
"map",
".",
"get",
"(",
"path",
")",
";",
"}",
"public",
"void",
"setCache",
"(",
"IPath",
"path",
",",
"ZipFile",
"zipFile",
")",
"{",
"this",
".",
"map",
".",
"put",
"(",
"path",
",",
"zipFile",
")",
";",
"}",
"}",
"final",
"JavaModel",
"javaModel",
"=",
"new",
"JavaModel",
"(",
")",
";",
"public",
"HashMap",
"variables",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"public",
"HashSet",
"variablesWithInitializer",
"=",
"new",
"HashSet",
"(",
"5",
")",
";",
"public",
"HashMap",
"deprecatedVariables",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"public",
"HashSet",
"readOnlyVariables",
"=",
"new",
"HashSet",
"(",
"5",
")",
";",
"public",
"HashMap",
"previousSessionVariables",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"private",
"ThreadLocal",
"variableInitializationInProgress",
"=",
"new",
"ThreadLocal",
"(",
")",
";",
"public",
"HashMap",
"containers",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"public",
"HashMap",
"previousSessionContainers",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"private",
"ThreadLocal",
"containerInitializationInProgress",
"=",
"new",
"ThreadLocal",
"(",
")",
";",
"ThreadLocal",
"containersBeingInitialized",
"=",
"new",
"ThreadLocal",
"(",
")",
";",
"public",
"static",
"final",
"int",
"NO_BATCH_INITIALIZATION",
"=",
"0",
";",
"public",
"static",
"final",
"int",
"NEED_BATCH_INITIALIZATION",
"=",
"1",
";",
"public",
"static",
"final",
"int",
"BATCH_INITIALIZATION_IN_PROGRESS",
"=",
"2",
";",
"public",
"static",
"final",
"int",
"BATCH_INITIALIZATION_FINISHED",
"=",
"3",
";",
"public",
"int",
"batchContainerInitializations",
"=",
"NO_BATCH_INITIALIZATION",
";",
"public",
"BatchInitializationMonitor",
"batchContainerInitializationsProgress",
"=",
"new",
"BatchInitializationMonitor",
"(",
")",
";",
"public",
"Hashtable",
"containerInitializersCache",
"=",
"new",
"Hashtable",
"(",
"5",
")",
";",
"private",
"ThreadLocal",
"classpathsBeingResolved",
"=",
"new",
"ThreadLocal",
"(",
")",
";",
"public",
"JavaWorkspaceScope",
"workspaceScope",
";",
"private",
"WeakHashSet",
"stringSymbols",
"=",
"new",
"WeakHashSet",
"(",
"5",
")",
";",
"private",
"WeakHashSetOfCharArray",
"charArraySymbols",
"=",
"new",
"WeakHashSetOfCharArray",
"(",
"5",
")",
";",
"private",
"IConfigurationElement",
"annotationProcessorManagerFactory",
"=",
"null",
";",
"public",
"Map",
"rootPathToAttachments",
"=",
"new",
"Hashtable",
"(",
")",
";",
"public",
"final",
"static",
"String",
"CP_VARIABLE_PREFERENCES_PREFIX",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"final",
"static",
"String",
"CP_CONTAINER_PREFERENCES_PREFIX",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"final",
"static",
"String",
"CP_USERLIBRARY_PREFERENCES_PREFIX",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"final",
"static",
"String",
"CP_ENTRY_IGNORE",
"=",
"\"\"",
";",
"public",
"final",
"static",
"IPath",
"CP_ENTRY_IGNORE_PATH",
"=",
"new",
"Path",
"(",
"CP_ENTRY_IGNORE",
")",
";",
"public",
"final",
"static",
"String",
"TRUE",
"=",
"\"true\"",
";",
"private",
"final",
"static",
"int",
"VARIABLES_AND_CONTAINERS_FILE_VERSION",
"=",
"2",
";",
"public",
"static",
"final",
"String",
"CPVARIABLE_INITIALIZER_EXTPOINT_ID",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"CPCONTAINER_INITIALIZER_EXTPOINT_ID",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"FORMATTER_EXTPOINT_ID",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"COMPILATION_PARTICIPANT_EXTPOINT_ID",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID",
"=",
"\"\"",
";",
"private",
"static",
"final",
"String",
"RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS",
"=",
"\"\"",
";",
"public",
"final",
"static",
"IPath",
"VARIABLE_INITIALIZATION_IN_PROGRESS",
"=",
"new",
"Path",
"(",
"\"\"",
")",
";",
"public",
"final",
"static",
"IClasspathContainer",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
"=",
"new",
"IClasspathContainer",
"(",
")",
"{",
"public",
"IClasspathEntry",
"[",
"]",
"getClasspathEntries",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"String",
"getDescription",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"0",
";",
"}",
"public",
"IPath",
"getPath",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"getDescription",
"(",
")",
";",
"}",
"}",
";",
"private",
"static",
"final",
"String",
"BUFFER_MANAGER_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"INDEX_MANAGER_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"INDEX_MANAGER_ADVANCED_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"COMPILER_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"JAVAMODEL_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"JAVAMODELCACHE_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"CP_RESOLVE_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"CP_RESOLVE_ADVANCED_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"CP_RESOLVE_FAILURE_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"ZIP_ACCESS_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"DELTA_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"DELTA_DEBUG_VERBOSE",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"HIERARCHY_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"POST_ACTION_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"BUILDER_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"BUILDER_STATS_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"COMPLETION_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"RESOLUTION_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"SELECTION_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"SEARCH_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"SOURCE_MAPPER_DEBUG_VERBOSE",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"static",
"final",
"String",
"FORMATTER_DEBUG",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"static",
"final",
"String",
"COMPLETION_PERF",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"static",
"final",
"String",
"SELECTION_PERF",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"static",
"final",
"String",
"DELTA_LISTENER_PERF",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"static",
"final",
"String",
"VARIABLE_INITIALIZER_PERF",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"static",
"final",
"String",
"CONTAINER_INITIALIZER_PERF",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"public",
"static",
"final",
"String",
"RECONCILE_PERF",
"=",
"JavaCore",
".",
"PLUGIN_ID",
"+",
"\"\"",
";",
"private",
"final",
"static",
"String",
"INDEXED_SECONDARY_TYPES",
"=",
"\"\"",
";",
"public",
"static",
"boolean",
"PERF_VARIABLE_INITIALIZER",
"=",
"false",
";",
"public",
"static",
"boolean",
"PERF_CONTAINER_INITIALIZER",
"=",
"false",
";",
"boolean",
"resolveReferencedLibrariesForContainers",
"=",
"false",
";",
"public",
"final",
"static",
"ICompilationUnit",
"[",
"]",
"NO_WORKING_COPY",
"=",
"new",
"ICompilationUnit",
"[",
"0",
"]",
";",
"private",
"final",
"static",
"int",
"UNKNOWN_OPTION",
"=",
"0",
";",
"private",
"final",
"static",
"int",
"DEPRECATED_OPTION",
"=",
"1",
";",
"private",
"final",
"static",
"int",
"VALID_OPTION",
"=",
"2",
";",
"HashSet",
"optionNames",
"=",
"new",
"HashSet",
"(",
"20",
")",
";",
"Map",
"deprecatedOptions",
"=",
"new",
"HashMap",
"(",
")",
";",
"Hashtable",
"optionsCache",
";",
"public",
"final",
"IEclipsePreferences",
"[",
"]",
"preferencesLookup",
"=",
"new",
"IEclipsePreferences",
"[",
"2",
"]",
";",
"static",
"final",
"int",
"PREF_INSTANCE",
"=",
"0",
";",
"static",
"final",
"int",
"PREF_DEFAULT",
"=",
"1",
";",
"static",
"final",
"Object",
"[",
"]",
"[",
"]",
"NO_PARTICIPANTS",
"=",
"new",
"Object",
"[",
"0",
"]",
"[",
"]",
";",
"public",
"static",
"class",
"CompilationParticipants",
"{",
"private",
"final",
"static",
"int",
"MAX_SOURCE_LEVEL",
"=",
"7",
";",
"private",
"Object",
"[",
"]",
"[",
"]",
"registeredParticipants",
"=",
"null",
";",
"private",
"HashSet",
"managedMarkerTypes",
";",
"public",
"CompilationParticipant",
"[",
"]",
"getCompilationParticipants",
"(",
"IJavaProject",
"project",
")",
"{",
"final",
"Object",
"[",
"]",
"[",
"]",
"participantsPerSource",
"=",
"getRegisteredParticipants",
"(",
")",
";",
"if",
"(",
"participantsPerSource",
"==",
"NO_PARTICIPANTS",
")",
"return",
"null",
";",
"String",
"sourceLevel",
"=",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_SOURCE",
",",
"true",
")",
";",
"final",
"int",
"sourceLevelIndex",
"=",
"indexForSourceLevel",
"(",
"sourceLevel",
")",
";",
"final",
"Object",
"[",
"]",
"participants",
"=",
"participantsPerSource",
"[",
"sourceLevelIndex",
"]",
";",
"int",
"length",
"=",
"participants",
".",
"length",
";",
"CompilationParticipant",
"[",
"]",
"result",
"=",
"new",
"CompilationParticipant",
"[",
"length",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"participants",
"[",
"i",
"]",
"instanceof",
"IConfigurationElement",
")",
"{",
"final",
"IConfigurationElement",
"configElement",
"=",
"(",
"IConfigurationElement",
")",
"participants",
"[",
"i",
"]",
";",
"final",
"int",
"participantIndex",
"=",
"i",
";",
"SafeRunner",
".",
"run",
"(",
"new",
"ISafeRunnable",
"(",
")",
"{",
"public",
"void",
"handleException",
"(",
"Throwable",
"exception",
")",
"{",
"Util",
".",
"log",
"(",
"exception",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"throws",
"Exception",
"{",
"Object",
"executableExtension",
"=",
"configElement",
".",
"createExecutableExtension",
"(",
"\"class\"",
")",
";",
"for",
"(",
"int",
"j",
"=",
"sourceLevelIndex",
";",
"j",
"<",
"MAX_SOURCE_LEVEL",
";",
"j",
"++",
")",
"participantsPerSource",
"[",
"j",
"]",
"[",
"participantIndex",
"]",
"=",
"executableExtension",
";",
"}",
"}",
")",
";",
"}",
"CompilationParticipant",
"participant",
";",
"if",
"(",
"(",
"participants",
"[",
"i",
"]",
"instanceof",
"CompilationParticipant",
")",
"&&",
"(",
"participant",
"=",
"(",
"CompilationParticipant",
")",
"participants",
"[",
"i",
"]",
")",
".",
"isActive",
"(",
"project",
")",
")",
"result",
"[",
"index",
"++",
"]",
"=",
"participant",
";",
"}",
"if",
"(",
"index",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"index",
"<",
"length",
")",
"System",
".",
"arraycopy",
"(",
"result",
",",
"0",
",",
"result",
"=",
"new",
"CompilationParticipant",
"[",
"index",
"]",
",",
"0",
",",
"index",
")",
";",
"return",
"result",
";",
"}",
"public",
"HashSet",
"managedMarkerTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"managedMarkerTypes",
"==",
"null",
")",
"{",
"getRegisteredParticipants",
"(",
")",
";",
"}",
"return",
"this",
".",
"managedMarkerTypes",
";",
"}",
"private",
"synchronized",
"Object",
"[",
"]",
"[",
"]",
"getRegisteredParticipants",
"(",
")",
"{",
"if",
"(",
"this",
".",
"registeredParticipants",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"registeredParticipants",
";",
"}",
"this",
".",
"managedMarkerTypes",
"=",
"new",
"HashSet",
"(",
")",
";",
"IExtensionPoint",
"extension",
"=",
"Platform",
".",
"getExtensionRegistry",
"(",
")",
".",
"getExtensionPoint",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"COMPILATION_PARTICIPANT_EXTPOINT_ID",
")",
";",
"if",
"(",
"extension",
"==",
"null",
")",
"return",
"this",
".",
"registeredParticipants",
"=",
"NO_PARTICIPANTS",
";",
"final",
"ArrayList",
"modifyingEnv",
"=",
"new",
"ArrayList",
"(",
")",
";",
"final",
"ArrayList",
"creatingProblems",
"=",
"new",
"ArrayList",
"(",
")",
";",
"final",
"ArrayList",
"others",
"=",
"new",
"ArrayList",
"(",
")",
";",
"IExtension",
"[",
"]",
"extensions",
"=",
"extension",
".",
"getExtensions",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extensions",
".",
"length",
";",
"i",
"++",
")",
"{",
"IConfigurationElement",
"[",
"]",
"configElements",
"=",
"extensions",
"[",
"i",
"]",
".",
"getConfigurationElements",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"configElements",
".",
"length",
";",
"j",
"++",
")",
"{",
"final",
"IConfigurationElement",
"configElement",
"=",
"configElements",
"[",
"j",
"]",
";",
"String",
"elementName",
"=",
"configElement",
".",
"getName",
"(",
")",
";",
"if",
"(",
"!",
"(",
"\"\"",
".",
"equals",
"(",
"elementName",
")",
")",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"TRUE",
".",
"equals",
"(",
"configElement",
".",
"getAttribute",
"(",
"\"\"",
")",
")",
")",
"modifyingEnv",
".",
"add",
"(",
"configElement",
")",
";",
"else",
"if",
"(",
"TRUE",
".",
"equals",
"(",
"configElement",
".",
"getAttribute",
"(",
"\"\"",
")",
")",
")",
"creatingProblems",
".",
"add",
"(",
"configElement",
")",
";",
"else",
"others",
".",
"add",
"(",
"configElement",
")",
";",
"IConfigurationElement",
"[",
"]",
"managedMarkers",
"=",
"configElement",
".",
"getChildren",
"(",
"\"\"",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
",",
"length",
"=",
"managedMarkers",
".",
"length",
";",
"k",
"<",
"length",
";",
"k",
"++",
")",
"{",
"IConfigurationElement",
"element",
"=",
"managedMarkers",
"[",
"k",
"]",
";",
"String",
"markerType",
"=",
"element",
".",
"getAttribute",
"(",
"\"markerType\"",
")",
";",
"if",
"(",
"markerType",
"!=",
"null",
")",
"this",
".",
"managedMarkerTypes",
".",
"add",
"(",
"markerType",
")",
";",
"}",
"}",
"}",
"int",
"size",
"=",
"modifyingEnv",
".",
"size",
"(",
")",
"+",
"creatingProblems",
".",
"size",
"(",
")",
"+",
"others",
".",
"size",
"(",
")",
";",
"if",
"(",
"size",
"==",
"0",
")",
"return",
"this",
".",
"registeredParticipants",
"=",
"NO_PARTICIPANTS",
";",
"IConfigurationElement",
"[",
"]",
"configElements",
"=",
"new",
"IConfigurationElement",
"[",
"size",
"]",
";",
"int",
"index",
"=",
"0",
";",
"index",
"=",
"sortParticipants",
"(",
"modifyingEnv",
",",
"configElements",
",",
"index",
")",
";",
"index",
"=",
"sortParticipants",
"(",
"creatingProblems",
",",
"configElements",
",",
"index",
")",
";",
"index",
"=",
"sortParticipants",
"(",
"others",
",",
"configElements",
",",
"index",
")",
";",
"Object",
"[",
"]",
"[",
"]",
"result",
"=",
"new",
"Object",
"[",
"MAX_SOURCE_LEVEL",
"]",
"[",
"]",
";",
"int",
"length",
"=",
"configElements",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"MAX_SOURCE_LEVEL",
";",
"i",
"++",
")",
"{",
"result",
"[",
"i",
"]",
"=",
"new",
"Object",
"[",
"length",
"]",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"String",
"sourceLevel",
"=",
"configElements",
"[",
"i",
"]",
".",
"getAttribute",
"(",
"\"\"",
")",
";",
"int",
"sourceLevelIndex",
"=",
"indexForSourceLevel",
"(",
"sourceLevel",
")",
";",
"for",
"(",
"int",
"j",
"=",
"sourceLevelIndex",
";",
"j",
"<",
"MAX_SOURCE_LEVEL",
";",
"j",
"++",
")",
"{",
"result",
"[",
"j",
"]",
"[",
"i",
"]",
"=",
"configElements",
"[",
"i",
"]",
";",
"}",
"}",
"return",
"this",
".",
"registeredParticipants",
"=",
"result",
";",
"}",
"private",
"int",
"indexForSourceLevel",
"(",
"String",
"sourceLevel",
")",
"{",
"if",
"(",
"sourceLevel",
"==",
"null",
")",
"return",
"0",
";",
"int",
"majVersion",
"=",
"(",
"int",
")",
"(",
"CompilerOptions",
".",
"versionToJdkLevel",
"(",
"sourceLevel",
")",
">>>",
"16",
")",
";",
"switch",
"(",
"majVersion",
")",
"{",
"case",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_2",
":",
"return",
"1",
";",
"case",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_3",
":",
"return",
"2",
";",
"case",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_4",
":",
"return",
"3",
";",
"case",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_5",
":",
"return",
"4",
";",
"case",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_6",
":",
"return",
"5",
";",
"case",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_7",
":",
"return",
"6",
";",
"default",
":",
"return",
"0",
";",
"}",
"}",
"private",
"int",
"sortParticipants",
"(",
"ArrayList",
"group",
",",
"IConfigurationElement",
"[",
"]",
"configElements",
",",
"int",
"index",
")",
"{",
"int",
"size",
"=",
"group",
".",
"size",
"(",
")",
";",
"if",
"(",
"size",
"==",
"0",
")",
"return",
"index",
";",
"Object",
"[",
"]",
"elements",
"=",
"group",
".",
"toArray",
"(",
")",
";",
"Util",
".",
"sort",
"(",
"elements",
",",
"new",
"Util",
".",
"Comparer",
"(",
")",
"{",
"public",
"int",
"compare",
"(",
"Object",
"a",
",",
"Object",
"b",
")",
"{",
"if",
"(",
"a",
"==",
"b",
")",
"return",
"0",
";",
"String",
"id",
"=",
"(",
"(",
"IConfigurationElement",
")",
"a",
")",
".",
"getAttribute",
"(",
"\"id\"",
")",
";",
"if",
"(",
"id",
"==",
"null",
")",
"return",
"-",
"1",
";",
"IConfigurationElement",
"[",
"]",
"requiredElements",
"=",
"(",
"(",
"IConfigurationElement",
")",
"b",
")",
".",
"getChildren",
"(",
"\"requires\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"requiredElements",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IConfigurationElement",
"required",
"=",
"requiredElements",
"[",
"i",
"]",
";",
"if",
"(",
"id",
".",
"equals",
"(",
"required",
".",
"getAttribute",
"(",
"\"id\"",
")",
")",
")",
"return",
"1",
";",
"}",
"return",
"-",
"1",
";",
"}",
"}",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"configElements",
"[",
"index",
"+",
"i",
"]",
"=",
"(",
"IConfigurationElement",
")",
"elements",
"[",
"i",
"]",
";",
"return",
"index",
"+",
"size",
";",
"}",
"}",
"public",
"final",
"CompilationParticipants",
"compilationParticipants",
"=",
"new",
"CompilationParticipants",
"(",
")",
";",
"public",
"ThreadLocal",
"abortOnMissingSource",
"=",
"new",
"ThreadLocal",
"(",
")",
";",
"private",
"ExternalFoldersManager",
"externalFoldersManager",
"=",
"ExternalFoldersManager",
".",
"getExternalFoldersManager",
"(",
")",
";",
"public",
"static",
"boolean",
"conflictsWithOutputLocation",
"(",
"IPath",
"folderPath",
",",
"JavaProject",
"project",
")",
"{",
"try",
"{",
"IPath",
"outputLocation",
"=",
"project",
".",
"getOutputLocation",
"(",
")",
";",
"if",
"(",
"outputLocation",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"outputLocation",
".",
"isPrefixOf",
"(",
"folderPath",
")",
")",
"{",
"IClasspathEntry",
"[",
"]",
"classpath",
"=",
"project",
".",
"getResolvedClasspath",
"(",
")",
";",
"boolean",
"isOutputUsed",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"classpath",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"classpath",
"[",
"i",
"]",
";",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_SOURCE",
")",
"{",
"if",
"(",
"entry",
".",
"getPath",
"(",
")",
".",
"equals",
"(",
"outputLocation",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"entry",
".",
"getOutputLocation",
"(",
")",
"==",
"null",
")",
"{",
"isOutputUsed",
"=",
"true",
";",
"}",
"}",
"}",
"return",
"isOutputUsed",
";",
"}",
"return",
"false",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"true",
";",
"}",
"}",
"public",
"synchronized",
"IClasspathContainer",
"containerGet",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"if",
"(",
"containerIsInitializationInProgress",
"(",
"project",
",",
"containerPath",
")",
")",
"{",
"return",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
";",
"}",
"Map",
"projectContainers",
"=",
"(",
"Map",
")",
"this",
".",
"containers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"projectContainers",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"IClasspathContainer",
"container",
"=",
"(",
"IClasspathContainer",
")",
"projectContainers",
".",
"get",
"(",
"containerPath",
")",
";",
"return",
"container",
";",
"}",
"public",
"synchronized",
"IClasspathContainer",
"containerGetDefaultToPreviousSession",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Map",
"projectContainers",
"=",
"(",
"Map",
")",
"this",
".",
"containers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"projectContainers",
"==",
"null",
")",
"return",
"getPreviousSessionContainer",
"(",
"containerPath",
",",
"project",
")",
";",
"IClasspathContainer",
"container",
"=",
"(",
"IClasspathContainer",
")",
"projectContainers",
".",
"get",
"(",
"containerPath",
")",
";",
"if",
"(",
"container",
"==",
"null",
")",
"return",
"getPreviousSessionContainer",
"(",
"containerPath",
",",
"project",
")",
";",
"return",
"container",
";",
"}",
"private",
"boolean",
"containerIsInitializationInProgress",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Map",
"initializations",
"=",
"(",
"Map",
")",
"this",
".",
"containerInitializationInProgress",
".",
"get",
"(",
")",
";",
"if",
"(",
"initializations",
"==",
"null",
")",
"return",
"false",
";",
"HashSet",
"projectInitializations",
"=",
"(",
"HashSet",
")",
"initializations",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"projectInitializations",
"==",
"null",
")",
"return",
"false",
";",
"return",
"projectInitializations",
".",
"contains",
"(",
"containerPath",
")",
";",
"}",
"private",
"void",
"containerAddInitializationInProgress",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Map",
"initializations",
"=",
"(",
"Map",
")",
"this",
".",
"containerInitializationInProgress",
".",
"get",
"(",
")",
";",
"if",
"(",
"initializations",
"==",
"null",
")",
"this",
".",
"containerInitializationInProgress",
".",
"set",
"(",
"initializations",
"=",
"new",
"HashMap",
"(",
")",
")",
";",
"HashSet",
"projectInitializations",
"=",
"(",
"HashSet",
")",
"initializations",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"projectInitializations",
"==",
"null",
")",
"initializations",
".",
"put",
"(",
"project",
",",
"projectInitializations",
"=",
"new",
"HashSet",
"(",
")",
")",
";",
"projectInitializations",
".",
"add",
"(",
"containerPath",
")",
";",
"}",
"public",
"void",
"containerBeingInitializedPut",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"IClasspathContainer",
"container",
")",
"{",
"Map",
"perProjectContainers",
"=",
"(",
"Map",
")",
"this",
".",
"containersBeingInitialized",
".",
"get",
"(",
")",
";",
"if",
"(",
"perProjectContainers",
"==",
"null",
")",
"this",
".",
"containersBeingInitialized",
".",
"set",
"(",
"perProjectContainers",
"=",
"new",
"HashMap",
"(",
")",
")",
";",
"HashMap",
"perPathContainers",
"=",
"(",
"HashMap",
")",
"perProjectContainers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"perPathContainers",
"==",
"null",
")",
"perProjectContainers",
".",
"put",
"(",
"project",
",",
"perPathContainers",
"=",
"new",
"HashMap",
"(",
")",
")",
";",
"perPathContainers",
".",
"put",
"(",
"containerPath",
",",
"container",
")",
";",
"}",
"public",
"IClasspathContainer",
"containerBeingInitializedGet",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Map",
"perProjectContainers",
"=",
"(",
"Map",
")",
"this",
".",
"containersBeingInitialized",
".",
"get",
"(",
")",
";",
"if",
"(",
"perProjectContainers",
"==",
"null",
")",
"return",
"null",
";",
"HashMap",
"perPathContainers",
"=",
"(",
"HashMap",
")",
"perProjectContainers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"perPathContainers",
"==",
"null",
")",
"return",
"null",
";",
"return",
"(",
"IClasspathContainer",
")",
"perPathContainers",
".",
"get",
"(",
"containerPath",
")",
";",
"}",
"public",
"IClasspathContainer",
"containerBeingInitializedRemove",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Map",
"perProjectContainers",
"=",
"(",
"Map",
")",
"this",
".",
"containersBeingInitialized",
".",
"get",
"(",
")",
";",
"if",
"(",
"perProjectContainers",
"==",
"null",
")",
"return",
"null",
";",
"HashMap",
"perPathContainers",
"=",
"(",
"HashMap",
")",
"perProjectContainers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"perPathContainers",
"==",
"null",
")",
"return",
"null",
";",
"IClasspathContainer",
"container",
"=",
"(",
"IClasspathContainer",
")",
"perPathContainers",
".",
"remove",
"(",
"containerPath",
")",
";",
"if",
"(",
"perPathContainers",
".",
"size",
"(",
")",
"==",
"0",
")",
"perPathContainers",
".",
"remove",
"(",
"project",
")",
";",
"if",
"(",
"perProjectContainers",
".",
"size",
"(",
")",
"==",
"0",
")",
"this",
".",
"containersBeingInitialized",
".",
"set",
"(",
"null",
")",
";",
"return",
"container",
";",
"}",
"public",
"synchronized",
"void",
"containerPut",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"IClasspathContainer",
"container",
")",
"{",
"if",
"(",
"container",
"==",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
")",
"{",
"containerAddInitializationInProgress",
"(",
"project",
",",
"containerPath",
")",
";",
"return",
";",
"}",
"else",
"{",
"containerRemoveInitializationInProgress",
"(",
"project",
",",
"containerPath",
")",
";",
"Map",
"projectContainers",
"=",
"(",
"Map",
")",
"this",
".",
"containers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"projectContainers",
"==",
"null",
")",
"{",
"projectContainers",
"=",
"new",
"HashMap",
"(",
"1",
")",
";",
"this",
".",
"containers",
".",
"put",
"(",
"project",
",",
"projectContainers",
")",
";",
"}",
"if",
"(",
"container",
"==",
"null",
")",
"{",
"projectContainers",
".",
"remove",
"(",
"containerPath",
")",
";",
"}",
"else",
"{",
"projectContainers",
".",
"put",
"(",
"containerPath",
",",
"container",
")",
";",
"}",
"Map",
"previousContainers",
"=",
"(",
"Map",
")",
"this",
".",
"previousSessionContainers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"previousContainers",
"!=",
"null",
")",
"{",
"previousContainers",
".",
"remove",
"(",
"containerPath",
")",
";",
"}",
"}",
"}",
"public",
"synchronized",
"void",
"containerRemove",
"(",
"IJavaProject",
"project",
")",
"{",
"Map",
"initializations",
"=",
"(",
"Map",
")",
"this",
".",
"containerInitializationInProgress",
".",
"get",
"(",
")",
";",
"if",
"(",
"initializations",
"!=",
"null",
")",
"{",
"initializations",
".",
"remove",
"(",
"project",
")",
";",
"}",
"this",
".",
"containers",
".",
"remove",
"(",
"project",
")",
";",
"}",
"public",
"boolean",
"containerPutIfInitializingWithSameEntries",
"(",
"IPath",
"containerPath",
",",
"IJavaProject",
"[",
"]",
"projects",
",",
"IClasspathContainer",
"[",
"]",
"respectiveContainers",
")",
"{",
"int",
"projectLength",
"=",
"projects",
".",
"length",
";",
"if",
"(",
"projectLength",
"!=",
"1",
")",
"return",
"false",
";",
"final",
"IClasspathContainer",
"container",
"=",
"respectiveContainers",
"[",
"0",
"]",
";",
"IJavaProject",
"project",
"=",
"projects",
"[",
"0",
"]",
";",
"if",
"(",
"!",
"containerIsInitializationInProgress",
"(",
"project",
",",
"containerPath",
")",
")",
"return",
"false",
";",
"IClasspathContainer",
"previousContainer",
"=",
"containerGetDefaultToPreviousSession",
"(",
"project",
",",
"containerPath",
")",
";",
"if",
"(",
"container",
"==",
"null",
")",
"{",
"if",
"(",
"previousContainer",
"==",
"null",
")",
"{",
"containerPut",
"(",
"project",
",",
"containerPath",
",",
"null",
")",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"final",
"IClasspathEntry",
"[",
"]",
"newEntries",
"=",
"container",
".",
"getClasspathEntries",
"(",
")",
";",
"if",
"(",
"previousContainer",
"==",
"null",
")",
"if",
"(",
"newEntries",
".",
"length",
"==",
"0",
")",
"{",
"containerPut",
"(",
"project",
",",
"containerPath",
",",
"container",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_missbehaving_container",
"(",
"containerPath",
",",
"projects",
",",
"respectiveContainers",
",",
"container",
",",
"newEntries",
",",
"null",
")",
";",
"return",
"false",
";",
"}",
"final",
"IClasspathEntry",
"[",
"]",
"oldEntries",
"=",
"previousContainer",
".",
"getClasspathEntries",
"(",
")",
";",
"if",
"(",
"oldEntries",
".",
"length",
"!=",
"newEntries",
".",
"length",
")",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_missbehaving_container",
"(",
"containerPath",
",",
"projects",
",",
"respectiveContainers",
",",
"container",
",",
"newEntries",
",",
"oldEntries",
")",
";",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"newEntries",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"newEntries",
"[",
"i",
"]",
"==",
"null",
")",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_missbehaving_container",
"(",
"project",
",",
"containerPath",
",",
"newEntries",
")",
";",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"newEntries",
"[",
"i",
"]",
".",
"equals",
"(",
"oldEntries",
"[",
"i",
"]",
")",
")",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_missbehaving_container",
"(",
"containerPath",
",",
"projects",
",",
"respectiveContainers",
",",
"container",
",",
"newEntries",
",",
"oldEntries",
")",
";",
"return",
"false",
";",
"}",
"}",
"containerPut",
"(",
"project",
",",
"containerPath",
",",
"container",
")",
";",
"return",
"true",
";",
"}",
"private",
"void",
"verbose_missbehaving_container",
"(",
"IPath",
"containerPath",
",",
"IJavaProject",
"[",
"]",
"projects",
",",
"IClasspathContainer",
"[",
"]",
"respectiveContainers",
",",
"final",
"IClasspathContainer",
"container",
",",
"final",
"IClasspathEntry",
"[",
"]",
"newEntries",
",",
"final",
"IClasspathEntry",
"[",
"]",
"oldEntries",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"tprojects:",
"{\"",
"+",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"toString",
"(",
"projects",
",",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"Displayable",
"(",
")",
"{",
"public",
"String",
"displayString",
"(",
"Object",
"o",
")",
"{",
"return",
"(",
"(",
"IJavaProject",
")",
"o",
")",
".",
"getElementName",
"(",
")",
";",
"}",
"}",
")",
"+",
"\"\"",
"+",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"toString",
"(",
"respectiveContainers",
",",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"Displayable",
"(",
")",
"{",
"public",
"String",
"displayString",
"(",
"Object",
"o",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"tt\"",
")",
";",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"<null>\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"container",
".",
"getDescription",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"{n\"",
")",
";",
"if",
"(",
"oldEntries",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"ttt\"",
")",
";",
"buffer",
".",
"append",
"(",
"\"<null>n\"",
")",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"oldEntries",
".",
"length",
";",
"j",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"ttt\"",
")",
";",
"buffer",
".",
"append",
"(",
"oldEntries",
"[",
"j",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"",
"tt}\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
")",
"+",
"\"\"",
"+",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"toString",
"(",
"respectiveContainers",
",",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"Displayable",
"(",
")",
"{",
"public",
"String",
"displayString",
"(",
"Object",
"o",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"tt\"",
")",
";",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"<null>\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"container",
".",
"getDescription",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"{n\"",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"newEntries",
".",
"length",
";",
"j",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"ttt\"",
")",
";",
"buffer",
".",
"append",
"(",
"newEntries",
"[",
"j",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"",
"tt}\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
")",
"+",
"\"nt}\"",
")",
";",
"}",
"void",
"verbose_missbehaving_container",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"IClasspathEntry",
"[",
"]",
"classpathEntries",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"toString",
"(",
"classpathEntries",
",",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"Displayable",
"(",
")",
"{",
"public",
"String",
"displayString",
"(",
"Object",
"o",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"tt\"",
")",
";",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"<null>\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"o",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
")",
"+",
"\"nt}\"",
")",
";",
"}",
"void",
"verbose_missbehaving_container_null_entries",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"\"",
")",
";",
"}",
"private",
"void",
"containerRemoveInitializationInProgress",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Map",
"initializations",
"=",
"(",
"Map",
")",
"this",
".",
"containerInitializationInProgress",
".",
"get",
"(",
")",
";",
"if",
"(",
"initializations",
"==",
"null",
")",
"return",
";",
"HashSet",
"projectInitializations",
"=",
"(",
"HashSet",
")",
"initializations",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"projectInitializations",
"==",
"null",
")",
"return",
";",
"projectInitializations",
".",
"remove",
"(",
"containerPath",
")",
";",
"if",
"(",
"projectInitializations",
".",
"size",
"(",
")",
"==",
"0",
")",
"initializations",
".",
"remove",
"(",
"project",
")",
";",
"if",
"(",
"initializations",
".",
"size",
"(",
")",
"==",
"0",
")",
"this",
".",
"containerInitializationInProgress",
".",
"set",
"(",
"null",
")",
";",
"}",
"private",
"synchronized",
"void",
"containersReset",
"(",
"String",
"[",
"]",
"containerIDs",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"containerIDs",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"containerID",
"=",
"containerIDs",
"[",
"i",
"]",
";",
"Iterator",
"projectIterator",
"=",
"this",
".",
"containers",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"projectIterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
"projectContainers",
"=",
"(",
"Map",
")",
"projectIterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"projectContainers",
"!=",
"null",
")",
"{",
"Iterator",
"containerIterator",
"=",
"projectContainers",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"containerIterator",
".",
"hasNext",
"(",
")",
")",
"{",
"IPath",
"containerPath",
"=",
"(",
"IPath",
")",
"containerIterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"containerID",
".",
"equals",
"(",
"containerPath",
".",
"segment",
"(",
"0",
")",
")",
")",
"{",
"projectContainers",
".",
"put",
"(",
"containerPath",
",",
"null",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"public",
"static",
"IJavaElement",
"create",
"(",
"IResource",
"resource",
",",
"IJavaProject",
"project",
")",
"{",
"if",
"(",
"resource",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"type",
"=",
"resource",
".",
"getType",
"(",
")",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"IResource",
".",
"PROJECT",
":",
"return",
"JavaCore",
".",
"create",
"(",
"(",
"IProject",
")",
"resource",
")",
";",
"case",
"IResource",
".",
"FILE",
":",
"return",
"create",
"(",
"(",
"IFile",
")",
"resource",
",",
"project",
")",
";",
"case",
"IResource",
".",
"FOLDER",
":",
"return",
"create",
"(",
"(",
"IFolder",
")",
"resource",
",",
"project",
")",
";",
"case",
"IResource",
".",
"ROOT",
":",
"return",
"JavaCore",
".",
"create",
"(",
"(",
"IWorkspaceRoot",
")",
"resource",
")",
";",
"default",
":",
"return",
"null",
";",
"}",
"}",
"public",
"static",
"IJavaElement",
"create",
"(",
"IFile",
"file",
",",
"IJavaProject",
"project",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"project",
"==",
"null",
")",
"{",
"project",
"=",
"JavaCore",
".",
"create",
"(",
"file",
".",
"getProject",
"(",
")",
")",
";",
"}",
"if",
"(",
"file",
".",
"getFileExtension",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"name",
"=",
"file",
".",
"getName",
"(",
")",
";",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"isJavaLikeFileName",
"(",
"name",
")",
")",
"return",
"createCompilationUnitFrom",
"(",
"file",
",",
"project",
")",
";",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"isClassFileName",
"(",
"name",
")",
")",
"return",
"createClassFileFrom",
"(",
"file",
",",
"project",
")",
";",
"return",
"createJarPackageFragmentRootFrom",
"(",
"file",
",",
"project",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"static",
"IJavaElement",
"create",
"(",
"IFolder",
"folder",
",",
"IJavaProject",
"project",
")",
"{",
"if",
"(",
"folder",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"IJavaElement",
"element",
";",
"if",
"(",
"project",
"==",
"null",
")",
"{",
"project",
"=",
"JavaCore",
".",
"create",
"(",
"folder",
".",
"getProject",
"(",
")",
")",
";",
"element",
"=",
"determineIfOnClasspath",
"(",
"folder",
",",
"project",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"IJavaProject",
"[",
"]",
"projects",
";",
"try",
"{",
"projects",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getJavaModel",
"(",
")",
".",
"getJavaProjects",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"projects",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"project",
"=",
"projects",
"[",
"i",
"]",
";",
"element",
"=",
"determineIfOnClasspath",
"(",
"folder",
",",
"project",
")",
";",
"if",
"(",
"element",
"!=",
"null",
")",
"break",
";",
"}",
"}",
"}",
"else",
"{",
"element",
"=",
"determineIfOnClasspath",
"(",
"folder",
",",
"project",
")",
";",
"}",
"return",
"element",
";",
"}",
"public",
"static",
"IClassFile",
"createClassFileFrom",
"(",
"IFile",
"file",
",",
"IJavaProject",
"project",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"project",
"==",
"null",
")",
"{",
"project",
"=",
"JavaCore",
".",
"create",
"(",
"file",
".",
"getProject",
"(",
")",
")",
";",
"}",
"IPackageFragment",
"pkg",
"=",
"(",
"IPackageFragment",
")",
"determineIfOnClasspath",
"(",
"file",
",",
"project",
")",
";",
"if",
"(",
"pkg",
"==",
"null",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"project",
".",
"getPackageFragmentRoot",
"(",
"file",
".",
"getParent",
"(",
")",
")",
";",
"pkg",
"=",
"root",
".",
"getPackageFragment",
"(",
"CharOperation",
".",
"NO_STRINGS",
")",
";",
"}",
"return",
"pkg",
".",
"getClassFile",
"(",
"file",
".",
"getName",
"(",
")",
")",
";",
"}",
"public",
"static",
"ICompilationUnit",
"createCompilationUnitFrom",
"(",
"IFile",
"file",
",",
"IJavaProject",
"project",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"project",
"==",
"null",
")",
"{",
"project",
"=",
"JavaCore",
".",
"create",
"(",
"file",
".",
"getProject",
"(",
")",
")",
";",
"}",
"IPackageFragment",
"pkg",
"=",
"(",
"IPackageFragment",
")",
"determineIfOnClasspath",
"(",
"file",
",",
"project",
")",
";",
"if",
"(",
"pkg",
"==",
"null",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"project",
".",
"getPackageFragmentRoot",
"(",
"file",
".",
"getParent",
"(",
")",
")",
";",
"pkg",
"=",
"root",
".",
"getPackageFragment",
"(",
"CharOperation",
".",
"NO_STRINGS",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"):",
"\"",
"+",
"file",
".",
"getFullPath",
"(",
")",
")",
";",
"}",
"}",
"return",
"pkg",
".",
"getCompilationUnit",
"(",
"file",
".",
"getName",
"(",
")",
")",
";",
"}",
"public",
"static",
"IPackageFragmentRoot",
"createJarPackageFragmentRootFrom",
"(",
"IFile",
"file",
",",
"IJavaProject",
"project",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"project",
"==",
"null",
")",
"{",
"project",
"=",
"JavaCore",
".",
"create",
"(",
"file",
".",
"getProject",
"(",
")",
")",
";",
"}",
"IPath",
"resourcePath",
"=",
"file",
".",
"getFullPath",
"(",
")",
";",
"try",
"{",
"IClasspathEntry",
"entry",
"=",
"(",
"(",
"JavaProject",
")",
"project",
")",
".",
"getClasspathEntryFor",
"(",
"resourcePath",
")",
";",
"if",
"(",
"entry",
"!=",
"null",
")",
"{",
"return",
"project",
".",
"getPackageFragmentRoot",
"(",
"file",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"return",
"null",
";",
"}",
"public",
"static",
"IJavaElement",
"determineIfOnClasspath",
"(",
"IResource",
"resource",
",",
"IJavaProject",
"project",
")",
"{",
"IPath",
"resourcePath",
"=",
"resource",
".",
"getFullPath",
"(",
")",
";",
"boolean",
"isExternal",
"=",
"ExternalFoldersManager",
".",
"isInternalPathForExternalFolder",
"(",
"resourcePath",
")",
";",
"if",
"(",
"isExternal",
")",
"resourcePath",
"=",
"resource",
".",
"getLocation",
"(",
")",
";",
"try",
"{",
"JavaProjectElementInfo",
"projectInfo",
"=",
"(",
"JavaProjectElementInfo",
")",
"getJavaModelManager",
"(",
")",
".",
"getInfo",
"(",
"project",
")",
";",
"ProjectCache",
"projectCache",
"=",
"projectInfo",
"==",
"null",
"?",
"null",
":",
"projectInfo",
".",
"projectCache",
";",
"HashtableOfArrayToObject",
"allPkgFragmentsCache",
"=",
"projectCache",
"==",
"null",
"?",
"null",
":",
"projectCache",
".",
"allPkgFragmentsCache",
";",
"boolean",
"isJavaLike",
"=",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"isJavaLikeFileName",
"(",
"resourcePath",
".",
"lastSegment",
"(",
")",
")",
";",
"IClasspathEntry",
"[",
"]",
"entries",
"=",
"isJavaLike",
"?",
"project",
".",
"getRawClasspath",
"(",
")",
":",
"(",
"(",
"JavaProject",
")",
"project",
")",
".",
"getResolvedClasspath",
"(",
")",
";",
"int",
"length",
"=",
"entries",
".",
"length",
";",
"if",
"(",
"length",
">",
"0",
")",
"{",
"String",
"sourceLevel",
"=",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_SOURCE",
",",
"true",
")",
";",
"String",
"complianceLevel",
"=",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_COMPLIANCE",
",",
"true",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"entries",
"[",
"i",
"]",
";",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_PROJECT",
")",
"continue",
";",
"IPath",
"rootPath",
"=",
"entry",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"rootPath",
".",
"equals",
"(",
"resourcePath",
")",
")",
"{",
"if",
"(",
"isJavaLike",
")",
"return",
"null",
";",
"return",
"project",
".",
"getPackageFragmentRoot",
"(",
"resource",
")",
";",
"}",
"else",
"if",
"(",
"rootPath",
".",
"isPrefixOf",
"(",
"resourcePath",
")",
")",
"{",
"if",
"(",
"!",
"Util",
".",
"isExcluded",
"(",
"resource",
",",
"(",
"(",
"ClasspathEntry",
")",
"entry",
")",
".",
"fullInclusionPatternChars",
"(",
")",
",",
"(",
"(",
"ClasspathEntry",
")",
"entry",
")",
".",
"fullExclusionPatternChars",
"(",
")",
")",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"isExternal",
"?",
"new",
"ExternalPackageFragmentRoot",
"(",
"rootPath",
",",
"(",
"JavaProject",
")",
"project",
")",
":",
"(",
"PackageFragmentRoot",
")",
"(",
"(",
"JavaProject",
")",
"project",
")",
".",
"getFolderPackageFragmentRoot",
"(",
"rootPath",
")",
";",
"if",
"(",
"root",
"==",
"null",
")",
"return",
"null",
";",
"IPath",
"pkgPath",
"=",
"resourcePath",
".",
"removeFirstSegments",
"(",
"rootPath",
".",
"segmentCount",
"(",
")",
")",
";",
"if",
"(",
"resource",
".",
"getType",
"(",
")",
"==",
"IResource",
".",
"FILE",
")",
"{",
"pkgPath",
"=",
"pkgPath",
".",
"removeLastSegments",
"(",
"1",
")",
";",
"}",
"String",
"[",
"]",
"pkgName",
"=",
"pkgPath",
".",
"segments",
"(",
")",
";",
"if",
"(",
"allPkgFragmentsCache",
"!=",
"null",
"&&",
"allPkgFragmentsCache",
".",
"containsKey",
"(",
"pkgName",
")",
")",
"return",
"root",
".",
"getPackageFragment",
"(",
"pkgName",
")",
";",
"if",
"(",
"pkgName",
".",
"length",
"!=",
"0",
"&&",
"JavaConventions",
".",
"validatePackageName",
"(",
"Util",
".",
"packageName",
"(",
"pkgPath",
",",
"sourceLevel",
",",
"complianceLevel",
")",
",",
"sourceLevel",
",",
"complianceLevel",
")",
".",
"getSeverity",
"(",
")",
"==",
"IStatus",
".",
"ERROR",
")",
"{",
"return",
"null",
";",
"}",
"return",
"root",
".",
"getPackageFragment",
"(",
"pkgName",
")",
";",
"}",
"}",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"npe",
")",
"{",
"return",
"null",
";",
"}",
"return",
"null",
";",
"}",
"private",
"static",
"JavaModelManager",
"MANAGER",
"=",
"new",
"JavaModelManager",
"(",
")",
";",
"private",
"JavaModelCache",
"cache",
";",
"private",
"ThreadLocal",
"temporaryCache",
"=",
"new",
"ThreadLocal",
"(",
")",
";",
"protected",
"HashSet",
"elementsOutOfSynchWithBuffers",
"=",
"new",
"HashSet",
"(",
"11",
")",
";",
"public",
"DeltaProcessingState",
"deltaState",
"=",
"new",
"DeltaProcessingState",
"(",
")",
";",
"public",
"IndexManager",
"indexManager",
"=",
"null",
";",
"protected",
"Map",
"perProjectInfos",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"protected",
"Map",
"perWorkingCopyInfos",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"protected",
"WeakHashMap",
"searchScopes",
"=",
"new",
"WeakHashMap",
"(",
")",
";",
"public",
"static",
"class",
"PerProjectInfo",
"{",
"private",
"static",
"final",
"int",
"JAVADOC_CACHE_INITIAL_SIZE",
"=",
"10",
";",
"static",
"final",
"IJavaModelStatus",
"NEED_RESOLUTION",
"=",
"new",
"JavaModelStatus",
"(",
")",
";",
"public",
"IProject",
"project",
";",
"public",
"Object",
"savedState",
";",
"public",
"boolean",
"triedRead",
";",
"public",
"IClasspathEntry",
"[",
"]",
"rawClasspath",
";",
"public",
"IClasspathEntry",
"[",
"]",
"referencedEntries",
";",
"public",
"IJavaModelStatus",
"rawClasspathStatus",
";",
"public",
"int",
"rawTimeStamp",
"=",
"0",
";",
"public",
"boolean",
"writtingRawClasspath",
"=",
"false",
";",
"public",
"IClasspathEntry",
"[",
"]",
"resolvedClasspath",
";",
"public",
"IJavaModelStatus",
"unresolvedEntryStatus",
";",
"public",
"Map",
"rootPathToRawEntries",
";",
"public",
"Map",
"rootPathToResolvedEntries",
";",
"public",
"IPath",
"outputLocation",
";",
"public",
"IEclipsePreferences",
"preferences",
";",
"public",
"Hashtable",
"options",
";",
"public",
"Hashtable",
"secondaryTypes",
";",
"public",
"LRUCache",
"javadocCache",
";",
"public",
"PerProjectInfo",
"(",
"IProject",
"project",
")",
"{",
"this",
".",
"triedRead",
"=",
"false",
";",
"this",
".",
"savedState",
"=",
"null",
";",
"this",
".",
"project",
"=",
"project",
";",
"this",
".",
"javadocCache",
"=",
"new",
"LRUCache",
"(",
"JAVADOC_CACHE_INITIAL_SIZE",
")",
";",
"}",
"public",
"synchronized",
"IClasspathEntry",
"[",
"]",
"getResolvedClasspath",
"(",
")",
"{",
"if",
"(",
"this",
".",
"unresolvedEntryStatus",
"==",
"NEED_RESOLUTION",
")",
"return",
"null",
";",
"return",
"this",
".",
"resolvedClasspath",
";",
"}",
"public",
"void",
"forgetExternalTimestampsAndIndexes",
"(",
")",
"{",
"IClasspathEntry",
"[",
"]",
"classpath",
"=",
"this",
".",
"resolvedClasspath",
";",
"if",
"(",
"classpath",
"==",
"null",
")",
"return",
";",
"JavaModelManager",
"manager",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
";",
"IndexManager",
"indexManager",
"=",
"manager",
".",
"indexManager",
";",
"Map",
"externalTimeStamps",
"=",
"manager",
".",
"deltaState",
".",
"getExternalLibTimeStamps",
"(",
")",
";",
"HashMap",
"rootInfos",
"=",
"JavaModelManager",
".",
"getDeltaState",
"(",
")",
".",
"otherRoots",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"classpath",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"classpath",
"[",
"i",
"]",
";",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
")",
"{",
"IPath",
"path",
"=",
"entry",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"rootInfos",
".",
"get",
"(",
"path",
")",
"==",
"null",
")",
"{",
"externalTimeStamps",
".",
"remove",
"(",
"path",
")",
";",
"indexManager",
".",
"removeIndex",
"(",
"path",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"rememberExternalLibTimestamps",
"(",
")",
"{",
"IClasspathEntry",
"[",
"]",
"classpath",
"=",
"this",
".",
"resolvedClasspath",
";",
"if",
"(",
"classpath",
"==",
"null",
")",
"return",
";",
"Map",
"externalTimeStamps",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"deltaState",
".",
"getExternalLibTimeStamps",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"classpath",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"classpath",
"[",
"i",
"]",
";",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
")",
"{",
"IPath",
"path",
"=",
"entry",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"externalTimeStamps",
".",
"get",
"(",
"path",
")",
"==",
"null",
")",
"{",
"Object",
"target",
"=",
"JavaModel",
".",
"getExternalTarget",
"(",
"path",
",",
"true",
")",
";",
"if",
"(",
"target",
"instanceof",
"File",
")",
"{",
"long",
"timestamp",
"=",
"DeltaProcessor",
".",
"getTimeStamp",
"(",
"(",
"java",
".",
"io",
".",
"File",
")",
"target",
")",
";",
"externalTimeStamps",
".",
"put",
"(",
"path",
",",
"new",
"Long",
"(",
"timestamp",
")",
")",
";",
"}",
"}",
"}",
"}",
"}",
"public",
"synchronized",
"ClasspathChange",
"resetResolvedClasspath",
"(",
")",
"{",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"resetClasspathListCache",
"(",
")",
";",
"return",
"setResolvedClasspath",
"(",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"this",
".",
"rawTimeStamp",
",",
"true",
")",
";",
"}",
"private",
"ClasspathChange",
"setClasspath",
"(",
"IClasspathEntry",
"[",
"]",
"newRawClasspath",
",",
"IClasspathEntry",
"[",
"]",
"referencedEntries",
",",
"IPath",
"newOutputLocation",
",",
"IJavaModelStatus",
"newRawClasspathStatus",
",",
"IClasspathEntry",
"[",
"]",
"newResolvedClasspath",
",",
"Map",
"newRootPathToRawEntries",
",",
"Map",
"newRootPathToResolvedEntries",
",",
"IJavaModelStatus",
"newUnresolvedEntryStatus",
",",
"boolean",
"addClasspathChange",
")",
"{",
"ClasspathChange",
"classpathChange",
"=",
"addClasspathChange",
"?",
"addClasspathChange",
"(",
")",
":",
"null",
";",
"if",
"(",
"referencedEntries",
"!=",
"null",
")",
"this",
".",
"referencedEntries",
"=",
"referencedEntries",
";",
"if",
"(",
"this",
".",
"referencedEntries",
"==",
"null",
")",
"this",
".",
"referencedEntries",
"=",
"ClasspathEntry",
".",
"NO_ENTRIES",
";",
"this",
".",
"rawClasspath",
"=",
"newRawClasspath",
";",
"this",
".",
"outputLocation",
"=",
"newOutputLocation",
";",
"this",
".",
"rawClasspathStatus",
"=",
"newRawClasspathStatus",
";",
"this",
".",
"resolvedClasspath",
"=",
"newResolvedClasspath",
";",
"this",
".",
"rootPathToRawEntries",
"=",
"newRootPathToRawEntries",
";",
"this",
".",
"rootPathToResolvedEntries",
"=",
"newRootPathToResolvedEntries",
";",
"this",
".",
"unresolvedEntryStatus",
"=",
"newUnresolvedEntryStatus",
";",
"this",
".",
"javadocCache",
"=",
"new",
"LRUCache",
"(",
"JAVADOC_CACHE_INITIAL_SIZE",
")",
";",
"return",
"classpathChange",
";",
"}",
"protected",
"ClasspathChange",
"addClasspathChange",
"(",
")",
"{",
"JavaModelManager",
"manager",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
";",
"ClasspathChange",
"classpathChange",
"=",
"manager",
".",
"deltaState",
".",
"addClasspathChange",
"(",
"this",
".",
"project",
",",
"this",
".",
"rawClasspath",
",",
"this",
".",
"outputLocation",
",",
"this",
".",
"resolvedClasspath",
")",
";",
"return",
"classpathChange",
";",
"}",
"public",
"ClasspathChange",
"setRawClasspath",
"(",
"IClasspathEntry",
"[",
"]",
"newRawClasspath",
",",
"IPath",
"newOutputLocation",
",",
"IJavaModelStatus",
"newRawClasspathStatus",
")",
"{",
"return",
"setRawClasspath",
"(",
"newRawClasspath",
",",
"null",
",",
"newOutputLocation",
",",
"newRawClasspathStatus",
")",
";",
"}",
"public",
"synchronized",
"ClasspathChange",
"setRawClasspath",
"(",
"IClasspathEntry",
"[",
"]",
"newRawClasspath",
",",
"IClasspathEntry",
"[",
"]",
"referencedEntries",
",",
"IPath",
"newOutputLocation",
",",
"IJavaModelStatus",
"newRawClasspathStatus",
")",
"{",
"this",
".",
"rawTimeStamp",
"++",
";",
"return",
"setClasspath",
"(",
"newRawClasspath",
",",
"referencedEntries",
",",
"newOutputLocation",
",",
"newRawClasspathStatus",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"true",
")",
";",
"}",
"public",
"ClasspathChange",
"setResolvedClasspath",
"(",
"IClasspathEntry",
"[",
"]",
"newResolvedClasspath",
",",
"Map",
"newRootPathToRawEntries",
",",
"Map",
"newRootPathToResolvedEntries",
",",
"IJavaModelStatus",
"newUnresolvedEntryStatus",
",",
"int",
"timeStamp",
",",
"boolean",
"addClasspathChange",
")",
"{",
"return",
"setResolvedClasspath",
"(",
"newResolvedClasspath",
",",
"null",
",",
"newRootPathToRawEntries",
",",
"newRootPathToResolvedEntries",
",",
"newUnresolvedEntryStatus",
",",
"timeStamp",
",",
"addClasspathChange",
")",
";",
"}",
"public",
"synchronized",
"ClasspathChange",
"setResolvedClasspath",
"(",
"IClasspathEntry",
"[",
"]",
"newResolvedClasspath",
",",
"IClasspathEntry",
"[",
"]",
"referencedEntries",
",",
"Map",
"newRootPathToRawEntries",
",",
"Map",
"newRootPathToResolvedEntries",
",",
"IJavaModelStatus",
"newUnresolvedEntryStatus",
",",
"int",
"timeStamp",
",",
"boolean",
"addClasspathChange",
")",
"{",
"if",
"(",
"this",
".",
"rawTimeStamp",
"!=",
"timeStamp",
")",
"return",
"null",
";",
"return",
"setClasspath",
"(",
"this",
".",
"rawClasspath",
",",
"referencedEntries",
",",
"this",
".",
"outputLocation",
",",
"this",
".",
"rawClasspathStatus",
",",
"newResolvedClasspath",
",",
"newRootPathToRawEntries",
",",
"newRootPathToResolvedEntries",
",",
"newUnresolvedEntryStatus",
",",
"addClasspathChange",
")",
";",
"}",
"public",
"synchronized",
"IClasspathEntry",
"[",
"]",
"[",
"]",
"readAndCacheClasspath",
"(",
"JavaProject",
"javaProject",
")",
"{",
"IClasspathEntry",
"[",
"]",
"[",
"]",
"classpath",
";",
"IJavaModelStatus",
"status",
";",
"try",
"{",
"classpath",
"=",
"javaProject",
".",
"readFileEntriesWithException",
"(",
"null",
")",
";",
"status",
"=",
"JavaModelStatus",
".",
"VERIFIED_OK",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"classpath",
"=",
"new",
"IClasspathEntry",
"[",
"]",
"[",
"]",
"{",
"JavaProject",
".",
"INVALID_CLASSPATH",
",",
"ClasspathEntry",
".",
"NO_ENTRIES",
"}",
";",
"status",
"=",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_CLASSPATH_FILE_FORMAT",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classpath_cannotReadClasspathFile",
",",
"javaProject",
".",
"getElementName",
"(",
")",
")",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"classpath",
"=",
"new",
"IClasspathEntry",
"[",
"]",
"[",
"]",
"{",
"JavaProject",
".",
"INVALID_CLASSPATH",
",",
"ClasspathEntry",
".",
"NO_ENTRIES",
"}",
";",
"if",
"(",
"Messages",
".",
"file_badFormat",
".",
"equals",
"(",
"e",
".",
"getMessage",
"(",
")",
")",
")",
"status",
"=",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_CLASSPATH_FILE_FORMAT",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classpath_xmlFormatError",
",",
"javaProject",
".",
"getElementName",
"(",
")",
",",
"Messages",
".",
"file_badFormat",
")",
")",
";",
"else",
"status",
"=",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_CLASSPATH_FILE_FORMAT",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classpath_cannotReadClasspathFile",
",",
"javaProject",
".",
"getElementName",
"(",
")",
")",
")",
";",
"}",
"catch",
"(",
"ClasspathEntry",
".",
"AssertionFailedException",
"e",
")",
"{",
"classpath",
"=",
"new",
"IClasspathEntry",
"[",
"]",
"[",
"]",
"{",
"JavaProject",
".",
"INVALID_CLASSPATH",
",",
"ClasspathEntry",
".",
"NO_ENTRIES",
"}",
";",
"status",
"=",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_CLASSPATH_FILE_FORMAT",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classpath_illegalEntryInClasspathFile",
",",
"new",
"String",
"[",
"]",
"{",
"javaProject",
".",
"getElementName",
"(",
")",
",",
"e",
".",
"getMessage",
"(",
")",
"}",
")",
")",
";",
"}",
"int",
"rawClasspathLength",
"=",
"classpath",
"[",
"0",
"]",
".",
"length",
";",
"IPath",
"output",
"=",
"null",
";",
"if",
"(",
"rawClasspathLength",
">",
"0",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"classpath",
"[",
"0",
"]",
"[",
"rawClasspathLength",
"-",
"1",
"]",
";",
"if",
"(",
"entry",
".",
"getContentKind",
"(",
")",
"==",
"ClasspathEntry",
".",
"K_OUTPUT",
")",
"{",
"output",
"=",
"entry",
".",
"getPath",
"(",
")",
";",
"IClasspathEntry",
"[",
"]",
"copy",
"=",
"new",
"IClasspathEntry",
"[",
"rawClasspathLength",
"-",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"classpath",
"[",
"0",
"]",
",",
"0",
",",
"copy",
",",
"0",
",",
"copy",
".",
"length",
")",
";",
"classpath",
"[",
"0",
"]",
"=",
"copy",
";",
"}",
"}",
"setRawClasspath",
"(",
"classpath",
"[",
"0",
"]",
",",
"classpath",
"[",
"1",
"]",
",",
"output",
",",
"status",
")",
";",
"return",
"classpath",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"Info",
"for",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"project",
".",
"getFullPath",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"if",
"(",
"this",
".",
"rawClasspath",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"<null>n\"",
")",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"rawClasspath",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"rawClasspath",
"[",
"i",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"IClasspathEntry",
"[",
"]",
"resolvedCP",
"=",
"this",
".",
"resolvedClasspath",
";",
"if",
"(",
"resolvedCP",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"<null>n\"",
")",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"resolvedCP",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"resolvedCP",
"[",
"i",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"if",
"(",
"this",
".",
"unresolvedEntryStatus",
"==",
"NEED_RESOLUTION",
")",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"else",
"buffer",
".",
"append",
"(",
"this",
".",
"unresolvedEntryStatus",
"==",
"null",
"?",
"\"<null>n\"",
":",
"this",
".",
"unresolvedEntryStatus",
".",
"toString",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"if",
"(",
"this",
".",
"outputLocation",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"<null>\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"outputLocation",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"public",
"boolean",
"writeAndCacheClasspath",
"(",
"JavaProject",
"javaProject",
",",
"final",
"IClasspathEntry",
"[",
"]",
"newRawClasspath",
",",
"IClasspathEntry",
"[",
"]",
"newReferencedEntries",
",",
"final",
"IPath",
"newOutputLocation",
")",
"throws",
"JavaModelException",
"{",
"try",
"{",
"this",
".",
"writtingRawClasspath",
"=",
"true",
";",
"if",
"(",
"newReferencedEntries",
"==",
"null",
")",
"newReferencedEntries",
"=",
"this",
".",
"referencedEntries",
";",
"if",
"(",
"!",
"javaProject",
".",
"writeFileEntries",
"(",
"newRawClasspath",
",",
"newReferencedEntries",
",",
"newOutputLocation",
")",
")",
"{",
"return",
"false",
";",
"}",
"setRawClasspath",
"(",
"newRawClasspath",
",",
"newReferencedEntries",
",",
"newOutputLocation",
",",
"JavaModelStatus",
".",
"VERIFIED_OK",
")",
";",
"}",
"finally",
"{",
"this",
".",
"writtingRawClasspath",
"=",
"false",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"writeAndCacheClasspath",
"(",
"JavaProject",
"javaProject",
",",
"final",
"IClasspathEntry",
"[",
"]",
"newRawClasspath",
",",
"final",
"IPath",
"newOutputLocation",
")",
"throws",
"JavaModelException",
"{",
"return",
"writeAndCacheClasspath",
"(",
"javaProject",
",",
"newRawClasspath",
",",
"null",
",",
"newOutputLocation",
")",
";",
"}",
"}",
"public",
"static",
"class",
"PerWorkingCopyInfo",
"implements",
"IProblemRequestor",
"{",
"int",
"useCount",
"=",
"0",
";",
"IProblemRequestor",
"problemRequestor",
";",
"CompilationUnit",
"workingCopy",
";",
"public",
"PerWorkingCopyInfo",
"(",
"CompilationUnit",
"workingCopy",
",",
"IProblemRequestor",
"problemRequestor",
")",
"{",
"this",
".",
"workingCopy",
"=",
"workingCopy",
";",
"this",
".",
"problemRequestor",
"=",
"problemRequestor",
";",
"}",
"public",
"void",
"acceptProblem",
"(",
"IProblem",
"problem",
")",
"{",
"IProblemRequestor",
"requestor",
"=",
"getProblemRequestor",
"(",
")",
";",
"if",
"(",
"requestor",
"==",
"null",
")",
"return",
";",
"requestor",
".",
"acceptProblem",
"(",
"problem",
")",
";",
"}",
"public",
"void",
"beginReporting",
"(",
")",
"{",
"IProblemRequestor",
"requestor",
"=",
"getProblemRequestor",
"(",
")",
";",
"if",
"(",
"requestor",
"==",
"null",
")",
"return",
";",
"requestor",
".",
"beginReporting",
"(",
")",
";",
"}",
"public",
"void",
"endReporting",
"(",
")",
"{",
"IProblemRequestor",
"requestor",
"=",
"getProblemRequestor",
"(",
")",
";",
"if",
"(",
"requestor",
"==",
"null",
")",
"return",
";",
"requestor",
".",
"endReporting",
"(",
")",
";",
"}",
"public",
"IProblemRequestor",
"getProblemRequestor",
"(",
")",
"{",
"if",
"(",
"this",
".",
"problemRequestor",
"==",
"null",
"&&",
"this",
".",
"workingCopy",
".",
"owner",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"workingCopy",
".",
"owner",
".",
"getProblemRequestor",
"(",
"this",
".",
"workingCopy",
")",
";",
"}",
"return",
"this",
".",
"problemRequestor",
";",
"}",
"public",
"ICompilationUnit",
"getWorkingCopy",
"(",
")",
"{",
"return",
"this",
".",
"workingCopy",
";",
"}",
"public",
"boolean",
"isActive",
"(",
")",
"{",
"IProblemRequestor",
"requestor",
"=",
"getProblemRequestor",
"(",
")",
";",
"return",
"requestor",
"!=",
"null",
"&&",
"requestor",
".",
"isActive",
"(",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"Info",
"for",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"(",
"(",
"JavaElement",
")",
"this",
".",
"workingCopy",
")",
".",
"toStringWithAncestors",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"useCount",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"problemRequestor",
")",
";",
"if",
"(",
"this",
".",
"problemRequestor",
"==",
"null",
")",
"{",
"IProblemRequestor",
"requestor",
"=",
"getProblemRequestor",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"requestor",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"public",
"static",
"boolean",
"VERBOSE",
"=",
"false",
";",
"public",
"static",
"boolean",
"CP_RESOLVE_VERBOSE",
"=",
"false",
";",
"public",
"static",
"boolean",
"CP_RESOLVE_VERBOSE_ADVANCED",
"=",
"false",
";",
"public",
"static",
"boolean",
"CP_RESOLVE_VERBOSE_FAILURE",
"=",
"false",
";",
"public",
"static",
"boolean",
"ZIP_ACCESS_VERBOSE",
"=",
"false",
";",
"private",
"ThreadLocal",
"zipFiles",
"=",
"new",
"ThreadLocal",
"(",
")",
";",
"private",
"UserLibraryManager",
"userLibraryManager",
";",
"private",
"Set",
"nonChainingJars",
";",
"private",
"Set",
"invalidArchives",
";",
"public",
"static",
"class",
"EclipsePreferencesListener",
"implements",
"IEclipsePreferences",
".",
"IPreferenceChangeListener",
"{",
"public",
"void",
"preferenceChange",
"(",
"IEclipsePreferences",
".",
"PreferenceChangeEvent",
"event",
")",
"{",
"String",
"propertyName",
"=",
"event",
".",
"getKey",
"(",
")",
";",
"if",
"(",
"propertyName",
".",
"startsWith",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
")",
"{",
"if",
"(",
"propertyName",
".",
"startsWith",
"(",
"CP_VARIABLE_PREFERENCES_PREFIX",
")",
")",
"{",
"String",
"varName",
"=",
"propertyName",
".",
"substring",
"(",
"CP_VARIABLE_PREFERENCES_PREFIX",
".",
"length",
"(",
")",
")",
";",
"JavaModelManager",
"manager",
"=",
"getJavaModelManager",
"(",
")",
";",
"if",
"(",
"manager",
".",
"variablesWithInitializer",
".",
"contains",
"(",
"varName",
")",
")",
"{",
"String",
"oldValue",
"=",
"(",
"String",
")",
"event",
".",
"getOldValue",
"(",
")",
";",
"if",
"(",
"oldValue",
"==",
"null",
")",
"{",
"manager",
".",
"variablesWithInitializer",
".",
"remove",
"(",
"varName",
")",
";",
"}",
"else",
"{",
"manager",
".",
"getInstancePreferences",
"(",
")",
".",
"put",
"(",
"varName",
",",
"oldValue",
")",
";",
"}",
"}",
"else",
"{",
"String",
"newValue",
"=",
"(",
"String",
")",
"event",
".",
"getNewValue",
"(",
")",
";",
"IPath",
"newPath",
";",
"if",
"(",
"newValue",
"!=",
"null",
"&&",
"!",
"(",
"newValue",
"=",
"newValue",
".",
"trim",
"(",
")",
")",
".",
"equals",
"(",
"CP_ENTRY_IGNORE",
")",
")",
"{",
"newPath",
"=",
"new",
"Path",
"(",
"newValue",
")",
";",
"}",
"else",
"{",
"newPath",
"=",
"null",
";",
"}",
"try",
"{",
"SetVariablesOperation",
"operation",
"=",
"new",
"SetVariablesOperation",
"(",
"new",
"String",
"[",
"]",
"{",
"varName",
"}",
",",
"new",
"IPath",
"[",
"]",
"{",
"newPath",
"}",
",",
"false",
")",
";",
"operation",
".",
"runOperation",
"(",
"null",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
"+",
"varName",
"+",
"\"",
"to",
"\"",
"+",
"newPath",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"propertyName",
".",
"startsWith",
"(",
"CP_CONTAINER_PREFERENCES_PREFIX",
")",
")",
"{",
"recreatePersistedContainer",
"(",
"propertyName",
",",
"(",
"String",
")",
"event",
".",
"getNewValue",
"(",
")",
",",
"false",
")",
";",
"}",
"else",
"if",
"(",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_RESOURCE_COPY_FILTER",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_DUPLICATE_RESOURCE",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_RECREATE_MODIFIED_CLASS_FILES_IN_OUTPUT_FOLDER",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_INVALID_CLASSPATH",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_INCOMPLETE_CLASSPATH",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_CIRCULAR_CLASSPATH",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_INCOMPATIBLE_JDK_LEVEL",
")",
"||",
"propertyName",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE",
")",
")",
"{",
"JavaModelManager",
"manager",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
";",
"IJavaModel",
"model",
"=",
"manager",
".",
"getJavaModel",
"(",
")",
";",
"IJavaProject",
"[",
"]",
"projects",
";",
"try",
"{",
"projects",
"=",
"model",
".",
"getJavaProjects",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"pl",
"=",
"projects",
".",
"length",
";",
"i",
"<",
"pl",
";",
"i",
"++",
")",
"{",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"projects",
"[",
"i",
"]",
";",
"manager",
".",
"deltaState",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"try",
"{",
"javaProject",
".",
"getProject",
"(",
")",
".",
"touch",
"(",
"null",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"else",
"if",
"(",
"propertyName",
".",
"startsWith",
"(",
"CP_USERLIBRARY_PREFERENCES_PREFIX",
")",
")",
"{",
"String",
"libName",
"=",
"propertyName",
".",
"substring",
"(",
"CP_USERLIBRARY_PREFERENCES_PREFIX",
".",
"length",
"(",
")",
")",
";",
"UserLibraryManager",
"manager",
"=",
"JavaModelManager",
".",
"getUserLibraryManager",
"(",
")",
";",
"manager",
".",
"updateUserLibrary",
"(",
"libName",
",",
"(",
"String",
")",
"event",
".",
"getNewValue",
"(",
")",
")",
";",
"}",
"}",
"try",
"{",
"IJavaProject",
"[",
"]",
"projects",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getJavaModel",
"(",
")",
".",
"getJavaProjects",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"projects",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"(",
"(",
"JavaProject",
")",
"projects",
"[",
"i",
"]",
")",
".",
"resetCaches",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"}",
"EclipsePreferencesListener",
"instancePreferencesListener",
"=",
"new",
"EclipsePreferencesListener",
"(",
")",
";",
"IEclipsePreferences",
".",
"INodeChangeListener",
"instanceNodeListener",
"=",
"new",
"IEclipsePreferences",
".",
"INodeChangeListener",
"(",
")",
"{",
"public",
"void",
"added",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"}",
"public",
"void",
"removed",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"if",
"(",
"event",
".",
"getChild",
"(",
")",
"==",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
")",
"{",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
"=",
"InstanceScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
".",
"addPreferenceChangeListener",
"(",
"new",
"EclipsePreferencesListener",
"(",
")",
")",
";",
"}",
"}",
"}",
";",
"IEclipsePreferences",
".",
"INodeChangeListener",
"defaultNodeListener",
"=",
"new",
"IEclipsePreferences",
".",
"INodeChangeListener",
"(",
")",
"{",
"public",
"void",
"added",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"}",
"public",
"void",
"removed",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"if",
"(",
"event",
".",
"getChild",
"(",
")",
"==",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
")",
"{",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
"=",
"DefaultScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"}",
"}",
"}",
";",
"IEclipsePreferences",
".",
"IPreferenceChangeListener",
"propertyListener",
";",
"IEclipsePreferences",
".",
"IPreferenceChangeListener",
"resourcesPropertyListener",
";",
"private",
"JavaModelManager",
"(",
")",
"{",
"if",
"(",
"Platform",
".",
"isRunning",
"(",
")",
")",
"{",
"this",
".",
"indexManager",
"=",
"new",
"IndexManager",
"(",
")",
";",
"this",
".",
"nonChainingJars",
"=",
"loadClasspathListCache",
"(",
"NON_CHAINING_JARS_CACHE",
")",
";",
"this",
".",
"invalidArchives",
"=",
"loadClasspathListCache",
"(",
"INVALID_ARCHIVES_CACHE",
")",
";",
"String",
"includeContainerReferencedLib",
"=",
"System",
".",
"getProperty",
"(",
"RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS",
")",
";",
"this",
".",
"resolveReferencedLibrariesForContainers",
"=",
"TRUE",
".",
"equalsIgnoreCase",
"(",
"includeContainerReferencedLib",
")",
";",
"}",
"}",
"private",
"void",
"addDeprecatedOptions",
"(",
"Hashtable",
"options",
")",
"{",
"options",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_PB_INVALID_IMPORT",
",",
"JavaCore",
".",
"ERROR",
")",
";",
"options",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_PB_UNREACHABLE_CODE",
",",
"JavaCore",
".",
"ERROR",
")",
";",
"}",
"public",
"void",
"addNonChainingJar",
"(",
"IPath",
"path",
")",
"{",
"if",
"(",
"this",
".",
"nonChainingJars",
"!=",
"null",
")",
"this",
".",
"nonChainingJars",
".",
"add",
"(",
"path",
")",
";",
"}",
"public",
"void",
"addInvalidArchive",
"(",
"IPath",
"path",
")",
"{",
"if",
"(",
"this",
".",
"invalidArchives",
"==",
"null",
")",
"{",
"this",
".",
"invalidArchives",
"=",
"Collections",
".",
"synchronizedSet",
"(",
"new",
"HashSet",
"(",
")",
")",
";",
"}",
"if",
"(",
"this",
".",
"invalidArchives",
"!=",
"null",
")",
"{",
"this",
".",
"invalidArchives",
".",
"add",
"(",
"path",
")",
";",
"}",
"}",
"public",
"void",
"cacheZipFiles",
"(",
"Object",
"owner",
")",
"{",
"ZipCache",
"zipCache",
"=",
"(",
"ZipCache",
")",
"this",
".",
"zipFiles",
".",
"get",
"(",
")",
";",
"if",
"(",
"zipCache",
"!=",
"null",
")",
"{",
"return",
";",
"}",
"this",
".",
"zipFiles",
".",
"set",
"(",
"new",
"ZipCache",
"(",
"owner",
")",
")",
";",
"}",
"public",
"void",
"closeZipFile",
"(",
"ZipFile",
"zipFile",
")",
"{",
"if",
"(",
"zipFile",
"==",
"null",
")",
"return",
";",
"if",
"(",
"this",
".",
"zipFiles",
".",
"get",
"(",
")",
"!=",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"if",
"(",
"JavaModelManager",
".",
"ZIP_ACCESS_VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"(\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
"+",
"zipFile",
".",
"getName",
"(",
")",
")",
";",
"}",
"zipFile",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"public",
"void",
"configurePluginDebugOptions",
"(",
")",
"{",
"if",
"(",
"JavaCore",
".",
"getPlugin",
"(",
")",
".",
"isDebugging",
"(",
")",
")",
"{",
"String",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"BUFFER_MANAGER_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"BufferManager",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"BUILDER_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaBuilder",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"COMPILER_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"Compiler",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"BUILDER_STATS_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaBuilder",
".",
"SHOW_STATS",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"COMPLETION_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"CompletionEngine",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"CP_RESOLVE_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"CP_RESOLVE_ADVANCED_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE_ADVANCED",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"CP_RESOLVE_FAILURE_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE_FAILURE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"DELTA_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"DeltaProcessor",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"DELTA_DEBUG_VERBOSE",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"DeltaProcessor",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"HIERARCHY_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"TypeHierarchy",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"INDEX_MANAGER_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JobManager",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"INDEX_MANAGER_ADVANCED_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"IndexManager",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"JAVAMODEL_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaModelManager",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"JAVAMODELCACHE_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaModelCache",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"POST_ACTION_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaModelOperation",
".",
"POST_ACTION_VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"RESOLUTION_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"NameLookup",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"SEARCH_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"BasicSearchEngine",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"SELECTION_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"SelectionEngine",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"ZIP_ACCESS_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"JavaModelManager",
".",
"ZIP_ACCESS_VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"SOURCE_MAPPER_DEBUG_VERBOSE",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"SourceMapper",
".",
"VERBOSE",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"option",
"=",
"Platform",
".",
"getDebugOption",
"(",
"FORMATTER_DEBUG",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"DefaultCodeFormatter",
".",
"DEBUG",
"=",
"option",
".",
"equalsIgnoreCase",
"(",
"TRUE",
")",
";",
"}",
"if",
"(",
"PerformanceStats",
".",
"ENABLED",
")",
"{",
"CompletionEngine",
".",
"PERF",
"=",
"PerformanceStats",
".",
"isEnabled",
"(",
"COMPLETION_PERF",
")",
";",
"SelectionEngine",
".",
"PERF",
"=",
"PerformanceStats",
".",
"isEnabled",
"(",
"SELECTION_PERF",
")",
";",
"DeltaProcessor",
".",
"PERF",
"=",
"PerformanceStats",
".",
"isEnabled",
"(",
"DELTA_LISTENER_PERF",
")",
";",
"JavaModelManager",
".",
"PERF_VARIABLE_INITIALIZER",
"=",
"PerformanceStats",
".",
"isEnabled",
"(",
"VARIABLE_INITIALIZER_PERF",
")",
";",
"JavaModelManager",
".",
"PERF_CONTAINER_INITIALIZER",
"=",
"PerformanceStats",
".",
"isEnabled",
"(",
"CONTAINER_INITIALIZER_PERF",
")",
";",
"ReconcileWorkingCopyOperation",
".",
"PERF",
"=",
"PerformanceStats",
".",
"isEnabled",
"(",
"RECONCILE_PERF",
")",
";",
"}",
"}",
"public",
"AbstractAnnotationProcessorManager",
"createAnnotationProcessorManager",
"(",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"annotationProcessorManagerFactory",
"==",
"null",
")",
"{",
"IExtensionPoint",
"extension",
"=",
"Platform",
".",
"getExtensionRegistry",
"(",
")",
".",
"getExtensionPoint",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID",
")",
";",
"if",
"(",
"extension",
"==",
"null",
")",
"return",
"null",
";",
"IExtension",
"[",
"]",
"extensions",
"=",
"extension",
".",
"getExtensions",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extensions",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"{",
"Util",
".",
"log",
"(",
"null",
",",
"\"\"",
"+",
"extensions",
"[",
"i",
"]",
".",
"getUniqueIdentifier",
"(",
")",
")",
";",
"break",
";",
"}",
"IConfigurationElement",
"[",
"]",
"configElements",
"=",
"extensions",
"[",
"i",
"]",
".",
"getConfigurationElements",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"configElements",
".",
"length",
";",
"j",
"++",
")",
"{",
"final",
"IConfigurationElement",
"configElement",
"=",
"configElements",
"[",
"j",
"]",
";",
"if",
"(",
"\"\"",
".",
"equals",
"(",
"configElement",
".",
"getName",
"(",
")",
")",
")",
"{",
"this",
".",
"annotationProcessorManagerFactory",
"=",
"configElement",
";",
"break",
";",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"this",
".",
"annotationProcessorManagerFactory",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"AbstractAnnotationProcessorManager",
"[",
"]",
"apm",
"=",
"new",
"AbstractAnnotationProcessorManager",
"[",
"1",
"]",
";",
"apm",
"[",
"0",
"]",
"=",
"null",
";",
"final",
"IConfigurationElement",
"factory",
"=",
"this",
".",
"annotationProcessorManagerFactory",
";",
"SafeRunner",
".",
"run",
"(",
"new",
"ISafeRunnable",
"(",
")",
"{",
"public",
"void",
"handleException",
"(",
"Throwable",
"exception",
")",
"{",
"Util",
".",
"log",
"(",
"exception",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"throws",
"Exception",
"{",
"Object",
"executableExtension",
"=",
"factory",
".",
"createExecutableExtension",
"(",
"\"class\"",
")",
";",
"if",
"(",
"executableExtension",
"instanceof",
"AbstractAnnotationProcessorManager",
")",
"{",
"apm",
"[",
"0",
"]",
"=",
"(",
"AbstractAnnotationProcessorManager",
")",
"executableExtension",
";",
"}",
"}",
"}",
")",
";",
"return",
"apm",
"[",
"0",
"]",
";",
"}",
"public",
"int",
"discardPerWorkingCopyInfo",
"(",
"CompilationUnit",
"workingCopy",
")",
"throws",
"JavaModelException",
"{",
"JavaElementDeltaBuilder",
"deltaBuilder",
"=",
"null",
";",
"if",
"(",
"workingCopy",
".",
"isPrimary",
"(",
")",
"&&",
"workingCopy",
".",
"hasUnsavedChanges",
"(",
")",
")",
"{",
"deltaBuilder",
"=",
"new",
"JavaElementDeltaBuilder",
"(",
"workingCopy",
")",
";",
"}",
"PerWorkingCopyInfo",
"info",
"=",
"null",
";",
"synchronized",
"(",
"this",
".",
"perWorkingCopyInfos",
")",
"{",
"WorkingCopyOwner",
"owner",
"=",
"workingCopy",
".",
"owner",
";",
"Map",
"workingCopyToInfos",
"=",
"(",
"Map",
")",
"this",
".",
"perWorkingCopyInfos",
".",
"get",
"(",
"owner",
")",
";",
"if",
"(",
"workingCopyToInfos",
"==",
"null",
")",
"return",
"-",
"1",
";",
"info",
"=",
"(",
"PerWorkingCopyInfo",
")",
"workingCopyToInfos",
".",
"get",
"(",
"workingCopy",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"return",
"-",
"1",
";",
"if",
"(",
"--",
"info",
".",
"useCount",
"==",
"0",
")",
"{",
"workingCopyToInfos",
".",
"remove",
"(",
"workingCopy",
")",
";",
"if",
"(",
"workingCopyToInfos",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"perWorkingCopyInfos",
".",
"remove",
"(",
"owner",
")",
";",
"}",
"}",
"}",
"if",
"(",
"info",
".",
"useCount",
"==",
"0",
")",
"{",
"removeInfoAndChildren",
"(",
"workingCopy",
")",
";",
"workingCopy",
".",
"closeBuffer",
"(",
")",
";",
"if",
"(",
"deltaBuilder",
"!=",
"null",
")",
"{",
"deltaBuilder",
".",
"buildDeltas",
"(",
")",
";",
"if",
"(",
"deltaBuilder",
".",
"delta",
"!=",
"null",
")",
"{",
"getDeltaProcessor",
"(",
")",
".",
"registerJavaModelDelta",
"(",
"deltaBuilder",
".",
"delta",
")",
";",
"}",
"}",
"}",
"return",
"info",
".",
"useCount",
";",
"}",
"public",
"void",
"doneSaving",
"(",
"ISaveContext",
"context",
")",
"{",
"}",
"public",
"void",
"flushZipFiles",
"(",
"Object",
"owner",
")",
"{",
"ZipCache",
"zipCache",
"=",
"(",
"ZipCache",
")",
"this",
".",
"zipFiles",
".",
"get",
"(",
")",
";",
"if",
"(",
"zipCache",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"zipCache",
".",
"owner",
"==",
"owner",
")",
"{",
"this",
".",
"zipFiles",
".",
"set",
"(",
"null",
")",
";",
"zipCache",
".",
"flush",
"(",
")",
";",
"}",
"}",
"public",
"synchronized",
"boolean",
"forceBatchInitializations",
"(",
"boolean",
"initAfterLoad",
")",
"{",
"switch",
"(",
"this",
".",
"batchContainerInitializations",
")",
"{",
"case",
"NO_BATCH_INITIALIZATION",
":",
"this",
".",
"batchContainerInitializations",
"=",
"NEED_BATCH_INITIALIZATION",
";",
"return",
"true",
";",
"case",
"BATCH_INITIALIZATION_FINISHED",
":",
"if",
"(",
"initAfterLoad",
")",
"return",
"false",
";",
"this",
".",
"batchContainerInitializations",
"=",
"NEED_BATCH_INITIALIZATION",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"private",
"synchronized",
"boolean",
"batchContainerInitializations",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"batchContainerInitializations",
")",
"{",
"case",
"NEED_BATCH_INITIALIZATION",
":",
"this",
".",
"batchContainerInitializations",
"=",
"BATCH_INITIALIZATION_IN_PROGRESS",
";",
"return",
"true",
";",
"case",
"BATCH_INITIALIZATION_IN_PROGRESS",
":",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"private",
"synchronized",
"void",
"batchInitializationFinished",
"(",
")",
"{",
"this",
".",
"batchContainerInitializations",
"=",
"BATCH_INITIALIZATION_FINISHED",
";",
"}",
"public",
"IClasspathContainer",
"getClasspathContainer",
"(",
"final",
"IPath",
"containerPath",
",",
"final",
"IJavaProject",
"project",
")",
"throws",
"JavaModelException",
"{",
"IClasspathContainer",
"container",
"=",
"containerGet",
"(",
"project",
",",
"containerPath",
")",
";",
"if",
"(",
"container",
"==",
"null",
")",
"{",
"if",
"(",
"batchContainerInitializations",
"(",
")",
")",
"{",
"try",
"{",
"container",
"=",
"initializeAllContainers",
"(",
"project",
",",
"containerPath",
")",
";",
"}",
"finally",
"{",
"batchInitializationFinished",
"(",
")",
";",
"}",
"}",
"else",
"{",
"container",
"=",
"initializeContainer",
"(",
"project",
",",
"containerPath",
")",
";",
"containerBeingInitializedRemove",
"(",
"project",
",",
"containerPath",
")",
";",
"SetContainerOperation",
"operation",
"=",
"new",
"SetContainerOperation",
"(",
"containerPath",
",",
"new",
"IJavaProject",
"[",
"]",
"{",
"project",
"}",
",",
"new",
"IClasspathContainer",
"[",
"]",
"{",
"container",
"}",
")",
";",
"operation",
".",
"runOperation",
"(",
"null",
")",
";",
"}",
"}",
"return",
"container",
";",
"}",
"public",
"IClasspathEntry",
"[",
"]",
"getReferencedClasspathEntries",
"(",
"IClasspathEntry",
"libraryEntry",
",",
"IJavaProject",
"project",
")",
"{",
"IClasspathEntry",
"[",
"]",
"referencedEntries",
"=",
"(",
"(",
"ClasspathEntry",
")",
"libraryEntry",
")",
".",
"resolvedChainedLibraries",
"(",
")",
";",
"if",
"(",
"project",
"==",
"null",
")",
"return",
"referencedEntries",
";",
"PerProjectInfo",
"perProjectInfo",
"=",
"getPerProjectInfo",
"(",
"project",
".",
"getProject",
"(",
")",
",",
"false",
")",
";",
"if",
"(",
"perProjectInfo",
"==",
"null",
")",
"return",
"referencedEntries",
";",
"List",
"pathToReferencedEntries",
"=",
"new",
"ArrayList",
"(",
"referencedEntries",
".",
"length",
")",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"referencedEntries",
".",
"length",
";",
"index",
"++",
")",
"{",
"if",
"(",
"pathToReferencedEntries",
".",
"contains",
"(",
"referencedEntries",
"[",
"index",
"]",
".",
"getPath",
"(",
")",
")",
")",
"continue",
";",
"IClasspathEntry",
"persistedEntry",
"=",
"null",
";",
"if",
"(",
"(",
"persistedEntry",
"=",
"(",
"IClasspathEntry",
")",
"perProjectInfo",
".",
"rootPathToResolvedEntries",
".",
"get",
"(",
"referencedEntries",
"[",
"index",
"]",
".",
"getPath",
"(",
")",
")",
")",
"!=",
"null",
")",
"{",
"referencedEntries",
"[",
"index",
"]",
"=",
"persistedEntry",
";",
"}",
"pathToReferencedEntries",
".",
"add",
"(",
"referencedEntries",
"[",
"index",
"]",
".",
"getPath",
"(",
")",
")",
";",
"}",
"return",
"referencedEntries",
";",
"}",
"public",
"DeltaProcessor",
"getDeltaProcessor",
"(",
")",
"{",
"return",
"this",
".",
"deltaState",
".",
"getDeltaProcessor",
"(",
")",
";",
"}",
"public",
"static",
"DeltaProcessingState",
"getDeltaState",
"(",
")",
"{",
"return",
"MANAGER",
".",
"deltaState",
";",
"}",
"protected",
"HashSet",
"getElementsOutOfSynchWithBuffers",
"(",
")",
"{",
"return",
"this",
".",
"elementsOutOfSynchWithBuffers",
";",
"}",
"public",
"static",
"ExternalFoldersManager",
"getExternalManager",
"(",
")",
"{",
"return",
"MANAGER",
".",
"externalFoldersManager",
";",
"}",
"public",
"static",
"IndexManager",
"getIndexManager",
"(",
")",
"{",
"return",
"MANAGER",
".",
"indexManager",
";",
"}",
"public",
"synchronized",
"Object",
"getInfo",
"(",
"IJavaElement",
"element",
")",
"{",
"HashMap",
"tempCache",
"=",
"(",
"HashMap",
")",
"this",
".",
"temporaryCache",
".",
"get",
"(",
")",
";",
"if",
"(",
"tempCache",
"!=",
"null",
")",
"{",
"Object",
"result",
"=",
"tempCache",
".",
"get",
"(",
"element",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"{",
"return",
"result",
";",
"}",
"}",
"return",
"this",
".",
"cache",
".",
"getInfo",
"(",
"element",
")",
";",
"}",
"public",
"synchronized",
"IJavaElement",
"getExistingElement",
"(",
"IJavaElement",
"element",
")",
"{",
"return",
"this",
".",
"cache",
".",
"getExistingElement",
"(",
"element",
")",
";",
"}",
"public",
"HashSet",
"getExternalWorkingCopyProjects",
"(",
")",
"{",
"synchronized",
"(",
"this",
".",
"perWorkingCopyInfos",
")",
"{",
"HashSet",
"result",
"=",
"null",
";",
"Iterator",
"values",
"=",
"this",
".",
"perWorkingCopyInfos",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"values",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
"ownerCopies",
"=",
"(",
"Map",
")",
"values",
".",
"next",
"(",
")",
";",
"Iterator",
"workingCopies",
"=",
"ownerCopies",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"workingCopies",
".",
"hasNext",
"(",
")",
")",
"{",
"ICompilationUnit",
"workingCopy",
"=",
"(",
"ICompilationUnit",
")",
"workingCopies",
".",
"next",
"(",
")",
";",
"IJavaProject",
"project",
"=",
"workingCopy",
".",
"getJavaProject",
"(",
")",
";",
"if",
"(",
"project",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"ExternalJavaProject",
".",
"EXTERNAL_PROJECT_NAME",
")",
")",
"{",
"if",
"(",
"result",
"==",
"null",
")",
"result",
"=",
"new",
"HashSet",
"(",
")",
";",
"result",
".",
"add",
"(",
"project",
")",
";",
"}",
"}",
"}",
"return",
"result",
";",
"}",
"}",
"public",
"IEclipsePreferences",
"getInstancePreferences",
"(",
")",
"{",
"return",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
";",
"}",
"public",
"Hashtable",
"getDefaultOptions",
"(",
")",
"{",
"Hashtable",
"defaultOptions",
"=",
"new",
"Hashtable",
"(",
"10",
")",
";",
"IEclipsePreferences",
"defaultPreferences",
"=",
"getDefaultPreferences",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"this",
".",
"optionNames",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"String",
"propertyName",
"=",
"(",
"String",
")",
"iterator",
".",
"next",
"(",
")",
";",
"String",
"value",
"=",
"defaultPreferences",
".",
"get",
"(",
"propertyName",
",",
"null",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"defaultOptions",
".",
"put",
"(",
"propertyName",
",",
"value",
")",
";",
"}",
"defaultOptions",
".",
"put",
"(",
"JavaCore",
".",
"CORE_ENCODING",
",",
"JavaCore",
".",
"getEncoding",
"(",
")",
")",
";",
"addDeprecatedOptions",
"(",
"defaultOptions",
")",
";",
"return",
"defaultOptions",
";",
"}",
"public",
"IEclipsePreferences",
"getDefaultPreferences",
"(",
")",
"{",
"return",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
";",
"}",
"public",
"final",
"JavaModel",
"getJavaModel",
"(",
")",
"{",
"return",
"this",
".",
"javaModel",
";",
"}",
"public",
"final",
"static",
"JavaModelManager",
"getJavaModelManager",
"(",
")",
"{",
"return",
"MANAGER",
";",
"}",
"public",
"Object",
"getLastBuiltState",
"(",
"IProject",
"project",
",",
"IProgressMonitor",
"monitor",
")",
"{",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"System",
".",
"out",
".",
"println",
"(",
"project",
"+",
"\"\"",
")",
";",
"return",
"null",
";",
"}",
"PerProjectInfo",
"info",
"=",
"getPerProjectInfo",
"(",
"project",
",",
"true",
")",
";",
"if",
"(",
"!",
"info",
".",
"triedRead",
")",
"{",
"info",
".",
"triedRead",
"=",
"true",
";",
"try",
"{",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"subTask",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"build_readStateProgress",
",",
"project",
".",
"getName",
"(",
")",
")",
")",
";",
"info",
".",
"savedState",
"=",
"readState",
"(",
"project",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"return",
"info",
".",
"savedState",
";",
"}",
"public",
"String",
"getOption",
"(",
"String",
"optionName",
")",
"{",
"if",
"(",
"JavaCore",
".",
"CORE_ENCODING",
".",
"equals",
"(",
"optionName",
")",
")",
"{",
"return",
"JavaCore",
".",
"getEncoding",
"(",
")",
";",
"}",
"if",
"(",
"isDeprecatedOption",
"(",
"optionName",
")",
")",
"{",
"return",
"JavaCore",
".",
"ERROR",
";",
"}",
"int",
"optionLevel",
"=",
"getOptionLevel",
"(",
"optionName",
")",
";",
"if",
"(",
"optionLevel",
"!=",
"UNKNOWN_OPTION",
")",
"{",
"IPreferencesService",
"service",
"=",
"Platform",
".",
"getPreferencesService",
"(",
")",
";",
"String",
"value",
"=",
"service",
".",
"get",
"(",
"optionName",
",",
"null",
",",
"this",
".",
"preferencesLookup",
")",
";",
"if",
"(",
"value",
"==",
"null",
"&&",
"optionLevel",
"==",
"DEPRECATED_OPTION",
")",
"{",
"String",
"[",
"]",
"compatibleOptions",
"=",
"(",
"String",
"[",
"]",
")",
"this",
".",
"deprecatedOptions",
".",
"get",
"(",
"optionName",
")",
";",
"value",
"=",
"service",
".",
"get",
"(",
"compatibleOptions",
"[",
"0",
"]",
",",
"null",
",",
"this",
".",
"preferencesLookup",
")",
";",
"}",
"return",
"value",
"==",
"null",
"?",
"null",
":",
"value",
".",
"trim",
"(",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"String",
"getOption",
"(",
"String",
"optionName",
",",
"boolean",
"inheritJavaCoreOptions",
",",
"IEclipsePreferences",
"projectPreferences",
")",
"{",
"switch",
"(",
"getOptionLevel",
"(",
"optionName",
")",
")",
"{",
"case",
"VALID_OPTION",
":",
"String",
"javaCoreDefault",
"=",
"inheritJavaCoreOptions",
"?",
"JavaCore",
".",
"getOption",
"(",
"optionName",
")",
":",
"null",
";",
"if",
"(",
"projectPreferences",
"==",
"null",
")",
"return",
"javaCoreDefault",
";",
"String",
"value",
"=",
"projectPreferences",
".",
"get",
"(",
"optionName",
",",
"javaCoreDefault",
")",
";",
"return",
"value",
"==",
"null",
"?",
"null",
":",
"value",
".",
"trim",
"(",
")",
";",
"case",
"DEPRECATED_OPTION",
":",
"String",
"oldValue",
"=",
"projectPreferences",
".",
"get",
"(",
"optionName",
",",
"null",
")",
";",
"if",
"(",
"oldValue",
"!=",
"null",
")",
"{",
"return",
"oldValue",
".",
"trim",
"(",
")",
";",
"}",
"String",
"[",
"]",
"compatibleOptions",
"=",
"(",
"String",
"[",
"]",
")",
"this",
".",
"deprecatedOptions",
".",
"get",
"(",
"optionName",
")",
";",
"String",
"newDefault",
"=",
"inheritJavaCoreOptions",
"?",
"JavaCore",
".",
"getOption",
"(",
"compatibleOptions",
"[",
"0",
"]",
")",
":",
"null",
";",
"String",
"newValue",
"=",
"projectPreferences",
".",
"get",
"(",
"compatibleOptions",
"[",
"0",
"]",
",",
"newDefault",
")",
";",
"return",
"newValue",
"==",
"null",
"?",
"null",
":",
"newValue",
".",
"trim",
"(",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"boolean",
"knowsOption",
"(",
"String",
"optionName",
")",
"{",
"boolean",
"knownOption",
"=",
"this",
".",
"optionNames",
".",
"contains",
"(",
"optionName",
")",
";",
"if",
"(",
"!",
"knownOption",
")",
"{",
"knownOption",
"=",
"this",
".",
"deprecatedOptions",
".",
"get",
"(",
"optionName",
")",
"!=",
"null",
";",
"}",
"return",
"knownOption",
";",
"}",
"public",
"int",
"getOptionLevel",
"(",
"String",
"optionName",
")",
"{",
"if",
"(",
"this",
".",
"optionNames",
".",
"contains",
"(",
"optionName",
")",
")",
"{",
"return",
"VALID_OPTION",
";",
"}",
"if",
"(",
"this",
".",
"deprecatedOptions",
".",
"get",
"(",
"optionName",
")",
"!=",
"null",
")",
"{",
"return",
"DEPRECATED_OPTION",
";",
"}",
"return",
"UNKNOWN_OPTION",
";",
"}",
"public",
"Hashtable",
"getOptions",
"(",
")",
"{",
"Hashtable",
"cachedOptions",
";",
"if",
"(",
"(",
"cachedOptions",
"=",
"this",
".",
"optionsCache",
")",
"!=",
"null",
")",
"{",
"return",
"new",
"Hashtable",
"(",
"cachedOptions",
")",
";",
"}",
"if",
"(",
"!",
"Platform",
".",
"isRunning",
"(",
")",
")",
"{",
"this",
".",
"optionsCache",
"=",
"getDefaultOptionsNoInitialization",
"(",
")",
";",
"return",
"new",
"Hashtable",
"(",
"this",
".",
"optionsCache",
")",
";",
"}",
"Hashtable",
"options",
"=",
"new",
"Hashtable",
"(",
"10",
")",
";",
"IPreferencesService",
"service",
"=",
"Platform",
".",
"getPreferencesService",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"this",
".",
"optionNames",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"String",
"propertyName",
"=",
"(",
"String",
")",
"iterator",
".",
"next",
"(",
")",
";",
"String",
"propertyValue",
"=",
"service",
".",
"get",
"(",
"propertyName",
",",
"null",
",",
"this",
".",
"preferencesLookup",
")",
";",
"if",
"(",
"propertyValue",
"!=",
"null",
")",
"{",
"options",
".",
"put",
"(",
"propertyName",
",",
"propertyValue",
")",
";",
"}",
"}",
"Iterator",
"deprecatedEntries",
"=",
"this",
".",
"deprecatedOptions",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"deprecatedEntries",
".",
"hasNext",
"(",
")",
")",
"{",
"Entry",
"entry",
"=",
"(",
"Entry",
")",
"deprecatedEntries",
".",
"next",
"(",
")",
";",
"String",
"propertyName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"String",
"propertyValue",
"=",
"service",
".",
"get",
"(",
"propertyName",
",",
"null",
",",
"this",
".",
"preferencesLookup",
")",
";",
"if",
"(",
"propertyValue",
"!=",
"null",
")",
"{",
"options",
".",
"put",
"(",
"propertyName",
",",
"propertyValue",
")",
";",
"String",
"[",
"]",
"compatibleOptions",
"=",
"(",
"String",
"[",
"]",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"for",
"(",
"int",
"co",
"=",
"0",
",",
"length",
"=",
"compatibleOptions",
".",
"length",
";",
"co",
"<",
"length",
";",
"co",
"++",
")",
"{",
"String",
"compatibleOption",
"=",
"compatibleOptions",
"[",
"co",
"]",
";",
"if",
"(",
"!",
"options",
".",
"containsKey",
"(",
"compatibleOption",
")",
")",
"options",
".",
"put",
"(",
"compatibleOption",
",",
"propertyValue",
")",
";",
"}",
"}",
"}",
"options",
".",
"put",
"(",
"JavaCore",
".",
"CORE_ENCODING",
",",
"JavaCore",
".",
"getEncoding",
"(",
")",
")",
";",
"addDeprecatedOptions",
"(",
"options",
")",
";",
"Util",
".",
"fixTaskTags",
"(",
"options",
")",
";",
"this",
".",
"optionsCache",
"=",
"new",
"Hashtable",
"(",
"options",
")",
";",
"return",
"options",
";",
"}",
"private",
"Hashtable",
"getDefaultOptionsNoInitialization",
"(",
")",
"{",
"Map",
"defaultOptionsMap",
"=",
"new",
"CompilerOptions",
"(",
")",
".",
"getMap",
"(",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_LOCAL_VARIABLE_ATTR",
",",
"JavaCore",
".",
"GENERATE",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_CODEGEN_UNUSED_LOCAL",
",",
"JavaCore",
".",
"PRESERVE",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_TASK_TAGS",
",",
"JavaCore",
".",
"DEFAULT_TASK_TAGS",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_TASK_PRIORITIES",
",",
"JavaCore",
".",
"DEFAULT_TASK_PRIORITIES",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_TASK_CASE_SENSITIVE",
",",
"JavaCore",
".",
"ENABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_DOC_COMMENT_SUPPORT",
",",
"JavaCore",
".",
"ENABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"COMPILER_PB_FORBIDDEN_REFERENCE",
",",
"JavaCore",
".",
"ERROR",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_RESOURCE_COPY_FILTER",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_INVALID_CLASSPATH",
",",
"JavaCore",
".",
"ABORT",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_DUPLICATE_RESOURCE",
",",
"JavaCore",
".",
"WARNING",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER",
",",
"JavaCore",
".",
"CLEAN",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_ORDER",
",",
"JavaCore",
".",
"IGNORE",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_INCOMPLETE_CLASSPATH",
",",
"JavaCore",
".",
"ERROR",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_CIRCULAR_CLASSPATH",
",",
"JavaCore",
".",
"ERROR",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_INCOMPATIBLE_JDK_LEVEL",
",",
"JavaCore",
".",
"IGNORE",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE",
",",
"JavaCore",
".",
"ERROR",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS",
",",
"JavaCore",
".",
"ENABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS",
",",
"JavaCore",
".",
"ENABLED",
")",
";",
"defaultOptionsMap",
".",
"putAll",
"(",
"DefaultCodeFormatterConstants",
".",
"getEclipseDefaultSettings",
"(",
")",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_VISIBILITY_CHECK",
",",
"JavaCore",
".",
"DISABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_DEPRECATION_CHECK",
",",
"JavaCore",
".",
"DISABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_IMPLICIT_QUALIFICATION",
",",
"JavaCore",
".",
"DISABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_FIELD_PREFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_STATIC_FIELD_PREFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_STATIC_FINAL_FIELD_PREFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_LOCAL_PREFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_ARGUMENT_PREFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_FIELD_SUFFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_STATIC_FIELD_SUFFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_STATIC_FINAL_FIELD_SUFFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_LOCAL_SUFFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_ARGUMENT_SUFFIXES",
",",
"\"\"",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_FORBIDDEN_REFERENCE_CHECK",
",",
"JavaCore",
".",
"ENABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_DISCOURAGED_REFERENCE_CHECK",
",",
"JavaCore",
".",
"DISABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_CAMEL_CASE_MATCH",
",",
"JavaCore",
".",
"ENABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"CODEASSIST_SUGGEST_STATIC_IMPORTS",
",",
"JavaCore",
".",
"ENABLED",
")",
";",
"defaultOptionsMap",
".",
"put",
"(",
"JavaCore",
".",
"TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC",
",",
"\"50\"",
")",
";",
"return",
"new",
"Hashtable",
"(",
"defaultOptionsMap",
")",
";",
"}",
"public",
"PerProjectInfo",
"getPerProjectInfo",
"(",
"IProject",
"project",
",",
"boolean",
"create",
")",
"{",
"synchronized",
"(",
"this",
".",
"perProjectInfos",
")",
"{",
"PerProjectInfo",
"info",
"=",
"(",
"PerProjectInfo",
")",
"this",
".",
"perProjectInfos",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"info",
"==",
"null",
"&&",
"create",
")",
"{",
"info",
"=",
"new",
"PerProjectInfo",
"(",
"project",
")",
";",
"this",
".",
"perProjectInfos",
".",
"put",
"(",
"project",
",",
"info",
")",
";",
"}",
"return",
"info",
";",
"}",
"}",
"public",
"PerProjectInfo",
"getPerProjectInfoCheckExistence",
"(",
"IProject",
"project",
")",
"throws",
"JavaModelException",
"{",
"JavaModelManager",
".",
"PerProjectInfo",
"info",
"=",
"getPerProjectInfo",
"(",
"project",
",",
"false",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"throw",
"(",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
")",
".",
"newNotPresentException",
"(",
")",
";",
"}",
"info",
"=",
"getPerProjectInfo",
"(",
"project",
",",
"true",
")",
";",
"}",
"return",
"info",
";",
"}",
"public",
"PerWorkingCopyInfo",
"getPerWorkingCopyInfo",
"(",
"CompilationUnit",
"workingCopy",
",",
"boolean",
"create",
",",
"boolean",
"recordUsage",
",",
"IProblemRequestor",
"problemRequestor",
")",
"{",
"synchronized",
"(",
"this",
".",
"perWorkingCopyInfos",
")",
"{",
"WorkingCopyOwner",
"owner",
"=",
"workingCopy",
".",
"owner",
";",
"Map",
"workingCopyToInfos",
"=",
"(",
"Map",
")",
"this",
".",
"perWorkingCopyInfos",
".",
"get",
"(",
"owner",
")",
";",
"if",
"(",
"workingCopyToInfos",
"==",
"null",
"&&",
"create",
")",
"{",
"workingCopyToInfos",
"=",
"new",
"HashMap",
"(",
")",
";",
"this",
".",
"perWorkingCopyInfos",
".",
"put",
"(",
"owner",
",",
"workingCopyToInfos",
")",
";",
"}",
"PerWorkingCopyInfo",
"info",
"=",
"workingCopyToInfos",
"==",
"null",
"?",
"null",
":",
"(",
"PerWorkingCopyInfo",
")",
"workingCopyToInfos",
".",
"get",
"(",
"workingCopy",
")",
";",
"if",
"(",
"info",
"==",
"null",
"&&",
"create",
")",
"{",
"info",
"=",
"new",
"PerWorkingCopyInfo",
"(",
"workingCopy",
",",
"problemRequestor",
")",
";",
"workingCopyToInfos",
".",
"put",
"(",
"workingCopy",
",",
"info",
")",
";",
"}",
"if",
"(",
"info",
"!=",
"null",
"&&",
"recordUsage",
")",
"info",
".",
"useCount",
"++",
";",
"return",
"info",
";",
"}",
"}",
"public",
"IClasspathContainer",
"getPreviousSessionContainer",
"(",
"IPath",
"containerPath",
",",
"IJavaProject",
"project",
")",
"{",
"Map",
"previousContainerValues",
"=",
"(",
"Map",
")",
"this",
".",
"previousSessionContainers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"previousContainerValues",
"!=",
"null",
")",
"{",
"IClasspathContainer",
"previousContainer",
"=",
"(",
"IClasspathContainer",
")",
"previousContainerValues",
".",
"get",
"(",
"containerPath",
")",
";",
"if",
"(",
"previousContainer",
"!=",
"null",
")",
"{",
"if",
"(",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE_ADVANCED",
")",
"verbose_reentering_project_container_access",
"(",
"containerPath",
",",
"project",
",",
"previousContainer",
")",
";",
"return",
"previousContainer",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"verbose_reentering_project_container_access",
"(",
"IPath",
"containerPath",
",",
"IJavaProject",
"project",
",",
"IClasspathContainer",
"previousContainer",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"previousContainer",
".",
"getDescription",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"{n\"",
")",
";",
"IClasspathEntry",
"[",
"]",
"entries",
"=",
"previousContainer",
".",
"getClasspathEntries",
"(",
")",
";",
"if",
"(",
"entries",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"entries",
".",
"length",
";",
"j",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"tt\"",
")",
";",
"buffer",
".",
"append",
"(",
"entries",
"[",
"j",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"",
"t}\"",
")",
";",
"Util",
".",
"verbose",
"(",
"buffer",
".",
"toString",
"(",
")",
")",
";",
"new",
"Exception",
"(",
"\"\"",
")",
".",
"printStackTrace",
"(",
"System",
".",
"out",
")",
";",
"}",
"public",
"IPath",
"getPreviousSessionVariable",
"(",
"String",
"variableName",
")",
"{",
"IPath",
"previousPath",
"=",
"(",
"IPath",
")",
"this",
".",
"previousSessionVariables",
".",
"get",
"(",
"variableName",
")",
";",
"if",
"(",
"previousPath",
"!=",
"null",
")",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE_ADVANCED",
")",
"verbose_reentering_variable_access",
"(",
"variableName",
",",
"previousPath",
")",
";",
"return",
"previousPath",
";",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"verbose_reentering_variable_access",
"(",
"String",
"variableName",
",",
"IPath",
"previousPath",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tvariable:",
"\"",
"+",
"variableName",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"previousPath",
")",
";",
"new",
"Exception",
"(",
"\"\"",
")",
".",
"printStackTrace",
"(",
"System",
".",
"out",
")",
";",
"}",
"public",
"HashMap",
"getTemporaryCache",
"(",
")",
"{",
"HashMap",
"result",
"=",
"(",
"HashMap",
")",
"this",
".",
"temporaryCache",
".",
"get",
"(",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"new",
"HashMap",
"(",
")",
";",
"this",
".",
"temporaryCache",
".",
"set",
"(",
"result",
")",
";",
"}",
"return",
"result",
";",
"}",
"private",
"File",
"getVariableAndContainersFile",
"(",
")",
"{",
"return",
"JavaCore",
".",
"getPlugin",
"(",
")",
".",
"getStateLocation",
"(",
")",
".",
"append",
"(",
"\"\"",
")",
".",
"toFile",
"(",
")",
";",
"}",
"public",
"static",
"String",
"[",
"]",
"getRegisteredVariableNames",
"(",
")",
"{",
"Plugin",
"jdtCorePlugin",
"=",
"JavaCore",
".",
"getPlugin",
"(",
")",
";",
"if",
"(",
"jdtCorePlugin",
"==",
"null",
")",
"return",
"null",
";",
"ArrayList",
"variableList",
"=",
"new",
"ArrayList",
"(",
"5",
")",
";",
"IExtensionPoint",
"extension",
"=",
"Platform",
".",
"getExtensionRegistry",
"(",
")",
".",
"getExtensionPoint",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"JavaModelManager",
".",
"CPVARIABLE_INITIALIZER_EXTPOINT_ID",
")",
";",
"if",
"(",
"extension",
"!=",
"null",
")",
"{",
"IExtension",
"[",
"]",
"extensions",
"=",
"extension",
".",
"getExtensions",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extensions",
".",
"length",
";",
"i",
"++",
")",
"{",
"IConfigurationElement",
"[",
"]",
"configElements",
"=",
"extensions",
"[",
"i",
"]",
".",
"getConfigurationElements",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"configElements",
".",
"length",
";",
"j",
"++",
")",
"{",
"String",
"varAttribute",
"=",
"configElements",
"[",
"j",
"]",
".",
"getAttribute",
"(",
"\"variable\"",
")",
";",
"if",
"(",
"varAttribute",
"!=",
"null",
")",
"variableList",
".",
"add",
"(",
"varAttribute",
")",
";",
"}",
"}",
"}",
"String",
"[",
"]",
"variableNames",
"=",
"new",
"String",
"[",
"variableList",
".",
"size",
"(",
")",
"]",
";",
"variableList",
".",
"toArray",
"(",
"variableNames",
")",
";",
"return",
"variableNames",
";",
"}",
"public",
"static",
"String",
"[",
"]",
"getRegisteredContainerIDs",
"(",
")",
"{",
"Plugin",
"jdtCorePlugin",
"=",
"JavaCore",
".",
"getPlugin",
"(",
")",
";",
"if",
"(",
"jdtCorePlugin",
"==",
"null",
")",
"return",
"null",
";",
"ArrayList",
"containerIDList",
"=",
"new",
"ArrayList",
"(",
"5",
")",
";",
"IExtensionPoint",
"extension",
"=",
"Platform",
".",
"getExtensionRegistry",
"(",
")",
".",
"getExtensionPoint",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"JavaModelManager",
".",
"CPCONTAINER_INITIALIZER_EXTPOINT_ID",
")",
";",
"if",
"(",
"extension",
"!=",
"null",
")",
"{",
"IExtension",
"[",
"]",
"extensions",
"=",
"extension",
".",
"getExtensions",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extensions",
".",
"length",
";",
"i",
"++",
")",
"{",
"IConfigurationElement",
"[",
"]",
"configElements",
"=",
"extensions",
"[",
"i",
"]",
".",
"getConfigurationElements",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"configElements",
".",
"length",
";",
"j",
"++",
")",
"{",
"String",
"idAttribute",
"=",
"configElements",
"[",
"j",
"]",
".",
"getAttribute",
"(",
"\"id\"",
")",
";",
"if",
"(",
"idAttribute",
"!=",
"null",
")",
"containerIDList",
".",
"add",
"(",
"idAttribute",
")",
";",
"}",
"}",
"}",
"String",
"[",
"]",
"containerIDs",
"=",
"new",
"String",
"[",
"containerIDList",
".",
"size",
"(",
")",
"]",
";",
"containerIDList",
".",
"toArray",
"(",
"containerIDs",
")",
";",
"return",
"containerIDs",
";",
"}",
"public",
"IClasspathEntry",
"resolveVariableEntry",
"(",
"IClasspathEntry",
"entry",
",",
"boolean",
"usePreviousSession",
")",
"{",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"!=",
"IClasspathEntry",
".",
"CPE_VARIABLE",
")",
"return",
"entry",
";",
"IPath",
"resolvedPath",
"=",
"getResolvedVariablePath",
"(",
"entry",
".",
"getPath",
"(",
")",
",",
"usePreviousSession",
")",
";",
"if",
"(",
"resolvedPath",
"==",
"null",
")",
"return",
"null",
";",
"resolvedPath",
"=",
"ClasspathEntry",
".",
"resolveDotDot",
"(",
"null",
",",
"resolvedPath",
")",
";",
"Object",
"target",
"=",
"JavaModel",
".",
"getTarget",
"(",
"resolvedPath",
",",
"false",
")",
";",
"if",
"(",
"target",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"target",
"instanceof",
"IResource",
")",
"{",
"IResource",
"resolvedResource",
"=",
"(",
"IResource",
")",
"target",
";",
"switch",
"(",
"resolvedResource",
".",
"getType",
"(",
")",
")",
"{",
"case",
"IResource",
".",
"PROJECT",
":",
"return",
"JavaCore",
".",
"newProjectEntry",
"(",
"resolvedPath",
",",
"entry",
".",
"getAccessRules",
"(",
")",
",",
"entry",
".",
"combineAccessRules",
"(",
")",
",",
"entry",
".",
"getExtraAttributes",
"(",
")",
",",
"entry",
".",
"isExported",
"(",
")",
")",
";",
"case",
"IResource",
".",
"FILE",
":",
"return",
"JavaCore",
".",
"newLibraryEntry",
"(",
"resolvedPath",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentRootPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"entry",
".",
"getAccessRules",
"(",
")",
",",
"entry",
".",
"getExtraAttributes",
"(",
")",
",",
"entry",
".",
"isExported",
"(",
")",
")",
";",
"case",
"IResource",
".",
"FOLDER",
":",
"return",
"JavaCore",
".",
"newLibraryEntry",
"(",
"resolvedPath",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentRootPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"entry",
".",
"getAccessRules",
"(",
")",
",",
"entry",
".",
"getExtraAttributes",
"(",
")",
",",
"entry",
".",
"isExported",
"(",
")",
")",
";",
"}",
"}",
"if",
"(",
"target",
"instanceof",
"File",
")",
"{",
"File",
"externalFile",
"=",
"JavaModel",
".",
"getFile",
"(",
"target",
")",
";",
"if",
"(",
"externalFile",
"!=",
"null",
")",
"{",
"return",
"JavaCore",
".",
"newLibraryEntry",
"(",
"resolvedPath",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentRootPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"entry",
".",
"getAccessRules",
"(",
")",
",",
"entry",
".",
"getExtraAttributes",
"(",
")",
",",
"entry",
".",
"isExported",
"(",
")",
")",
";",
"}",
"else",
"{",
"if",
"(",
"resolvedPath",
".",
"isAbsolute",
"(",
")",
")",
"{",
"return",
"JavaCore",
".",
"newLibraryEntry",
"(",
"resolvedPath",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"getResolvedVariablePath",
"(",
"entry",
".",
"getSourceAttachmentRootPath",
"(",
")",
",",
"usePreviousSession",
")",
",",
"entry",
".",
"getAccessRules",
"(",
")",
",",
"entry",
".",
"getExtraAttributes",
"(",
")",
",",
"entry",
".",
"isExported",
"(",
")",
")",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"IPath",
"getResolvedVariablePath",
"(",
"IPath",
"variablePath",
",",
"boolean",
"usePreviousSession",
")",
"{",
"if",
"(",
"variablePath",
"==",
"null",
")",
"return",
"null",
";",
"int",
"count",
"=",
"variablePath",
".",
"segmentCount",
"(",
")",
";",
"if",
"(",
"count",
"==",
"0",
")",
"return",
"null",
";",
"String",
"variableName",
"=",
"variablePath",
".",
"segment",
"(",
"0",
")",
";",
"IPath",
"resolvedPath",
"=",
"usePreviousSession",
"?",
"getPreviousSessionVariable",
"(",
"variableName",
")",
":",
"JavaCore",
".",
"getClasspathVariable",
"(",
"variableName",
")",
";",
"if",
"(",
"resolvedPath",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"count",
">",
"1",
")",
"{",
"resolvedPath",
"=",
"resolvedPath",
".",
"append",
"(",
"variablePath",
".",
"removeFirstSegments",
"(",
"1",
")",
")",
";",
"}",
"return",
"resolvedPath",
";",
"}",
"private",
"File",
"getSerializationFile",
"(",
"IProject",
"project",
")",
"{",
"if",
"(",
"!",
"project",
".",
"exists",
"(",
")",
")",
"return",
"null",
";",
"IPath",
"workingLocation",
"=",
"project",
".",
"getWorkingLocation",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"return",
"workingLocation",
".",
"append",
"(",
"\"state.dat\"",
")",
".",
"toFile",
"(",
")",
";",
"}",
"public",
"static",
"UserLibraryManager",
"getUserLibraryManager",
"(",
")",
"{",
"if",
"(",
"MANAGER",
".",
"userLibraryManager",
"==",
"null",
")",
"{",
"UserLibraryManager",
"libraryManager",
"=",
"new",
"UserLibraryManager",
"(",
")",
";",
"synchronized",
"(",
"MANAGER",
")",
"{",
"if",
"(",
"MANAGER",
".",
"userLibraryManager",
"==",
"null",
")",
"{",
"MANAGER",
".",
"userLibraryManager",
"=",
"libraryManager",
";",
"}",
"}",
"}",
"return",
"MANAGER",
".",
"userLibraryManager",
";",
"}",
"public",
"ICompilationUnit",
"[",
"]",
"getWorkingCopies",
"(",
"WorkingCopyOwner",
"owner",
",",
"boolean",
"addPrimary",
")",
"{",
"synchronized",
"(",
"this",
".",
"perWorkingCopyInfos",
")",
"{",
"ICompilationUnit",
"[",
"]",
"primaryWCs",
"=",
"addPrimary",
"&&",
"owner",
"!=",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
"?",
"getWorkingCopies",
"(",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
",",
"false",
")",
":",
"null",
";",
"Map",
"workingCopyToInfos",
"=",
"(",
"Map",
")",
"this",
".",
"perWorkingCopyInfos",
".",
"get",
"(",
"owner",
")",
";",
"if",
"(",
"workingCopyToInfos",
"==",
"null",
")",
"return",
"primaryWCs",
";",
"int",
"primaryLength",
"=",
"primaryWCs",
"==",
"null",
"?",
"0",
":",
"primaryWCs",
".",
"length",
";",
"int",
"size",
"=",
"workingCopyToInfos",
".",
"size",
"(",
")",
";",
"ICompilationUnit",
"[",
"]",
"result",
"=",
"new",
"ICompilationUnit",
"[",
"primaryLength",
"+",
"size",
"]",
";",
"int",
"index",
"=",
"0",
";",
"if",
"(",
"primaryWCs",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"primaryLength",
";",
"i",
"++",
")",
"{",
"ICompilationUnit",
"primaryWorkingCopy",
"=",
"primaryWCs",
"[",
"i",
"]",
";",
"ICompilationUnit",
"workingCopy",
"=",
"LanguageSupportFactory",
".",
"newCompilationUnit",
"(",
"(",
"PackageFragment",
")",
"primaryWorkingCopy",
".",
"getParent",
"(",
")",
",",
"primaryWorkingCopy",
".",
"getElementName",
"(",
")",
",",
"owner",
")",
";",
"if",
"(",
"!",
"workingCopyToInfos",
".",
"containsKey",
"(",
"workingCopy",
")",
")",
"result",
"[",
"index",
"++",
"]",
"=",
"primaryWorkingCopy",
";",
"}",
"if",
"(",
"index",
"!=",
"primaryLength",
")",
"System",
".",
"arraycopy",
"(",
"result",
",",
"0",
",",
"result",
"=",
"new",
"ICompilationUnit",
"[",
"index",
"+",
"size",
"]",
",",
"0",
",",
"index",
")",
";",
"}",
"Iterator",
"iterator",
"=",
"workingCopyToInfos",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"result",
"[",
"index",
"++",
"]",
"=",
"(",
"(",
"JavaModelManager",
".",
"PerWorkingCopyInfo",
")",
"iterator",
".",
"next",
"(",
")",
")",
".",
"getWorkingCopy",
"(",
")",
";",
"}",
"return",
"result",
";",
"}",
"}",
"public",
"JavaWorkspaceScope",
"getWorkspaceScope",
"(",
")",
"{",
"if",
"(",
"this",
".",
"workspaceScope",
"==",
"null",
")",
"{",
"this",
".",
"workspaceScope",
"=",
"new",
"JavaWorkspaceScope",
"(",
")",
";",
"}",
"return",
"this",
".",
"workspaceScope",
";",
"}",
"public",
"void",
"verifyArchiveContent",
"(",
"IPath",
"path",
")",
"throws",
"CoreException",
"{",
"if",
"(",
"isInvalidArchive",
"(",
"path",
")",
")",
"{",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"-",
"1",
",",
"Messages",
".",
"status_IOException",
",",
"new",
"ZipException",
"(",
")",
")",
")",
";",
"}",
"ZipFile",
"file",
"=",
"getZipFile",
"(",
"path",
")",
";",
"closeZipFile",
"(",
"file",
")",
";",
"}",
"public",
"ZipFile",
"getZipFile",
"(",
"IPath",
"path",
")",
"throws",
"CoreException",
"{",
"if",
"(",
"isInvalidArchive",
"(",
"path",
")",
")",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"-",
"1",
",",
"Messages",
".",
"status_IOException",
",",
"new",
"ZipException",
"(",
")",
")",
")",
";",
"ZipCache",
"zipCache",
";",
"ZipFile",
"zipFile",
";",
"if",
"(",
"(",
"zipCache",
"=",
"(",
"ZipCache",
")",
"this",
".",
"zipFiles",
".",
"get",
"(",
")",
")",
"!=",
"null",
"&&",
"(",
"zipFile",
"=",
"zipCache",
".",
"getCache",
"(",
"path",
")",
")",
"!=",
"null",
")",
"{",
"return",
"zipFile",
";",
"}",
"File",
"localFile",
"=",
"null",
";",
"IWorkspaceRoot",
"root",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
";",
"IResource",
"file",
"=",
"root",
".",
"findMember",
"(",
"path",
")",
";",
"if",
"(",
"file",
"!=",
"null",
")",
"{",
"URI",
"location",
";",
"if",
"(",
"file",
".",
"getType",
"(",
")",
"!=",
"IResource",
".",
"FILE",
"||",
"(",
"location",
"=",
"file",
".",
"getLocationURI",
"(",
")",
")",
"==",
"null",
")",
"{",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"-",
"1",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"file_notFound",
",",
"path",
".",
"toString",
"(",
")",
")",
",",
"null",
")",
")",
";",
"}",
"localFile",
"=",
"Util",
".",
"toLocalFile",
"(",
"location",
",",
"null",
")",
";",
"if",
"(",
"localFile",
"==",
"null",
")",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"-",
"1",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"file_notFound",
",",
"path",
".",
"toString",
"(",
")",
")",
",",
"null",
")",
")",
";",
"}",
"else",
"{",
"localFile",
"=",
"path",
".",
"toFile",
"(",
")",
";",
"}",
"try",
"{",
"if",
"(",
"ZIP_ACCESS_VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"(\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
"+",
"localFile",
")",
";",
"}",
"zipFile",
"=",
"new",
"ZipFile",
"(",
"localFile",
")",
";",
"if",
"(",
"zipCache",
"!=",
"null",
")",
"{",
"zipCache",
".",
"setCache",
"(",
"path",
",",
"zipFile",
")",
";",
"}",
"return",
"zipFile",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"addInvalidArchive",
"(",
"path",
")",
";",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"-",
"1",
",",
"Messages",
".",
"status_IOException",
",",
"e",
")",
")",
";",
"}",
"}",
"public",
"boolean",
"hasTemporaryCache",
"(",
")",
"{",
"return",
"this",
".",
"temporaryCache",
".",
"get",
"(",
")",
"!=",
"null",
";",
"}",
"private",
"IClasspathContainer",
"initializeAllContainers",
"(",
"IJavaProject",
"javaProjectToInit",
",",
"IPath",
"containerToInit",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE_ADVANCED",
")",
"verbose_batching_containers_initialization",
"(",
"javaProjectToInit",
",",
"containerToInit",
")",
";",
"final",
"HashMap",
"allContainerPaths",
"=",
"new",
"HashMap",
"(",
")",
";",
"IProject",
"[",
"]",
"projects",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getProjects",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"projects",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IProject",
"project",
"=",
"projects",
"[",
"i",
"]",
";",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"continue",
";",
"IJavaProject",
"javaProject",
"=",
"new",
"JavaProject",
"(",
"project",
",",
"getJavaModel",
"(",
")",
")",
";",
"HashSet",
"paths",
"=",
"(",
"HashSet",
")",
"allContainerPaths",
".",
"get",
"(",
"javaProject",
")",
";",
"IClasspathEntry",
"[",
"]",
"rawClasspath",
"=",
"javaProject",
".",
"getRawClasspath",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"length2",
"=",
"rawClasspath",
".",
"length",
";",
"j",
"<",
"length2",
";",
"j",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"rawClasspath",
"[",
"j",
"]",
";",
"IPath",
"path",
"=",
"entry",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_CONTAINER",
"&&",
"containerGet",
"(",
"javaProject",
",",
"path",
")",
"==",
"null",
")",
"{",
"if",
"(",
"paths",
"==",
"null",
")",
"{",
"paths",
"=",
"new",
"HashSet",
"(",
")",
";",
"allContainerPaths",
".",
"put",
"(",
"javaProject",
",",
"paths",
")",
";",
"}",
"paths",
".",
"add",
"(",
"path",
")",
";",
"}",
"}",
"}",
"if",
"(",
"javaProjectToInit",
"!=",
"null",
")",
"{",
"HashSet",
"containerPaths",
"=",
"(",
"HashSet",
")",
"allContainerPaths",
".",
"get",
"(",
"javaProjectToInit",
")",
";",
"if",
"(",
"containerPaths",
"==",
"null",
")",
"{",
"containerPaths",
"=",
"new",
"HashSet",
"(",
")",
";",
"allContainerPaths",
".",
"put",
"(",
"javaProjectToInit",
",",
"containerPaths",
")",
";",
"}",
"containerPaths",
".",
"add",
"(",
"containerToInit",
")",
";",
"}",
"boolean",
"ok",
"=",
"false",
";",
"try",
"{",
"IWorkspaceRunnable",
"runnable",
"=",
"new",
"IWorkspaceRunnable",
"(",
")",
"{",
"public",
"void",
"run",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"CoreException",
"{",
"try",
"{",
"Set",
"entrySet",
"=",
"allContainerPaths",
".",
"entrySet",
"(",
")",
";",
"int",
"length",
"=",
"entrySet",
".",
"size",
"(",
")",
";",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"beginTask",
"(",
"\"\"",
",",
"length",
")",
";",
"Map",
".",
"Entry",
"[",
"]",
"entries",
"=",
"new",
"Map",
".",
"Entry",
"[",
"length",
"]",
";",
"entrySet",
".",
"toArray",
"(",
"entries",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"entries",
"[",
"i",
"]",
";",
"IJavaProject",
"javaProject",
"=",
"(",
"IJavaProject",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"HashSet",
"pathSet",
"=",
"(",
"HashSet",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"pathSet",
"==",
"null",
")",
"continue",
";",
"int",
"length2",
"=",
"pathSet",
".",
"size",
"(",
")",
";",
"IPath",
"[",
"]",
"paths",
"=",
"new",
"IPath",
"[",
"length2",
"]",
";",
"pathSet",
".",
"toArray",
"(",
"paths",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"length2",
";",
"j",
"++",
")",
"{",
"IPath",
"path",
"=",
"paths",
"[",
"j",
"]",
";",
"initializeContainer",
"(",
"javaProject",
",",
"path",
")",
";",
"IClasspathContainer",
"container",
"=",
"containerBeingInitializedGet",
"(",
"javaProject",
",",
"path",
")",
";",
"if",
"(",
"container",
"!=",
"null",
")",
"{",
"containerPut",
"(",
"javaProject",
",",
"path",
",",
"container",
")",
";",
"}",
"}",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"worked",
"(",
"1",
")",
";",
"}",
"Map",
"perProjectContainers",
"=",
"(",
"Map",
")",
"JavaModelManager",
".",
"this",
".",
"containersBeingInitialized",
".",
"get",
"(",
")",
";",
"if",
"(",
"perProjectContainers",
"!=",
"null",
")",
"{",
"Iterator",
"entriesIterator",
"=",
"perProjectContainers",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entriesIterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entriesIterator",
".",
"next",
"(",
")",
";",
"IJavaProject",
"project",
"=",
"(",
"IJavaProject",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"HashMap",
"perPathContainers",
"=",
"(",
"HashMap",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"Iterator",
"containersIterator",
"=",
"perPathContainers",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"containersIterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"containerEntry",
"=",
"(",
"Map",
".",
"Entry",
")",
"containersIterator",
".",
"next",
"(",
")",
";",
"IPath",
"containerPath",
"=",
"(",
"IPath",
")",
"containerEntry",
".",
"getKey",
"(",
")",
";",
"IClasspathContainer",
"container",
"=",
"(",
"IClasspathContainer",
")",
"containerEntry",
".",
"getValue",
"(",
")",
";",
"SetContainerOperation",
"operation",
"=",
"new",
"SetContainerOperation",
"(",
"containerPath",
",",
"new",
"IJavaProject",
"[",
"]",
"{",
"project",
"}",
",",
"new",
"IClasspathContainer",
"[",
"]",
"{",
"container",
"}",
")",
";",
"operation",
".",
"runOperation",
"(",
"monitor",
")",
";",
"}",
"}",
"JavaModelManager",
".",
"this",
".",
"containersBeingInitialized",
".",
"set",
"(",
"null",
")",
";",
"}",
"}",
"finally",
"{",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"done",
"(",
")",
";",
"}",
"}",
"}",
";",
"IProgressMonitor",
"monitor",
"=",
"this",
".",
"batchContainerInitializationsProgress",
";",
"IWorkspace",
"workspace",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
";",
"if",
"(",
"workspace",
".",
"isTreeLocked",
"(",
")",
")",
"runnable",
".",
"run",
"(",
"monitor",
")",
";",
"else",
"workspace",
".",
"run",
"(",
"runnable",
",",
"null",
",",
"IWorkspace",
".",
"AVOID_UPDATE",
",",
"monitor",
")",
";",
"ok",
"=",
"true",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"!",
"ok",
")",
"{",
"this",
".",
"containerInitializationInProgress",
".",
"set",
"(",
"null",
")",
";",
"}",
"}",
"return",
"containerGet",
"(",
"javaProjectToInit",
",",
"containerToInit",
")",
";",
"}",
"private",
"void",
"verbose_batching_containers_initialization",
"(",
"IJavaProject",
"javaProjectToInit",
",",
"IPath",
"containerToInit",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"\"",
"+",
"(",
"javaProjectToInit",
"==",
"null",
"?",
"\"null\"",
":",
"javaProjectToInit",
".",
"getElementName",
"(",
")",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerToInit",
")",
";",
"}",
"IClasspathContainer",
"initializeContainer",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"throws",
"JavaModelException",
"{",
"IProgressMonitor",
"monitor",
"=",
"this",
".",
"batchContainerInitializationsProgress",
";",
"if",
"(",
"monitor",
"!=",
"null",
"&&",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"throw",
"new",
"OperationCanceledException",
"(",
")",
";",
"IClasspathContainer",
"container",
"=",
"null",
";",
"final",
"ClasspathContainerInitializer",
"initializer",
"=",
"JavaCore",
".",
"getClasspathContainerInitializer",
"(",
"containerPath",
".",
"segment",
"(",
"0",
")",
")",
";",
"if",
"(",
"initializer",
"!=",
"null",
")",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE",
")",
"verbose_triggering_container_initialization",
"(",
"project",
",",
"containerPath",
",",
"initializer",
")",
";",
"if",
"(",
"CP_RESOLVE_VERBOSE_ADVANCED",
")",
"verbose_triggering_container_initialization_invocation_trace",
"(",
")",
";",
"PerformanceStats",
"stats",
"=",
"null",
";",
"if",
"(",
"JavaModelManager",
".",
"PERF_CONTAINER_INITIALIZER",
")",
"{",
"stats",
"=",
"PerformanceStats",
".",
"getStats",
"(",
"JavaModelManager",
".",
"CONTAINER_INITIALIZER_PERF",
",",
"this",
")",
";",
"stats",
".",
"startRun",
"(",
"containerPath",
"+",
"\"",
"of",
"\"",
"+",
"project",
".",
"getPath",
"(",
")",
")",
";",
"}",
"containerPut",
"(",
"project",
",",
"containerPath",
",",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
")",
";",
"boolean",
"ok",
"=",
"false",
";",
"try",
"{",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"subTask",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"javamodel_configuring",
",",
"initializer",
".",
"getDescription",
"(",
"containerPath",
",",
"project",
")",
")",
")",
";",
"initializer",
".",
"initialize",
"(",
"containerPath",
",",
"project",
")",
";",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"subTask",
"(",
"\"\"",
")",
";",
"container",
"=",
"containerBeingInitializedGet",
"(",
"project",
",",
"containerPath",
")",
";",
"if",
"(",
"container",
"==",
"null",
"&&",
"containerGet",
"(",
"project",
",",
"containerPath",
")",
"==",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
")",
"{",
"container",
"=",
"initializer",
".",
"getFailureContainer",
"(",
"containerPath",
",",
"project",
")",
";",
"if",
"(",
"container",
"==",
"null",
")",
"{",
"if",
"(",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_container_null_failure_container",
"(",
"project",
",",
"containerPath",
",",
"initializer",
")",
";",
"return",
"null",
";",
"}",
"if",
"(",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_container_using_failure_container",
"(",
"project",
",",
"containerPath",
",",
"initializer",
")",
";",
"containerPut",
"(",
"project",
",",
"containerPath",
",",
"container",
")",
";",
"}",
"ok",
"=",
"true",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"if",
"(",
"e",
"instanceof",
"JavaModelException",
")",
"{",
"throw",
"(",
"JavaModelException",
")",
"e",
";",
"}",
"else",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"if",
"(",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"e",
".",
"printStackTrace",
"(",
")",
";",
"throw",
"e",
";",
"}",
"catch",
"(",
"Error",
"e",
")",
"{",
"if",
"(",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"e",
".",
"printStackTrace",
"(",
")",
";",
"throw",
"e",
";",
"}",
"finally",
"{",
"if",
"(",
"JavaModelManager",
".",
"PERF_CONTAINER_INITIALIZER",
")",
"{",
"stats",
".",
"endRun",
"(",
")",
";",
"}",
"if",
"(",
"!",
"ok",
")",
"{",
"containerRemoveInitializationInProgress",
"(",
"project",
",",
"containerPath",
")",
";",
"if",
"(",
"CP_RESOLVE_VERBOSE",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_container_initialization_failed",
"(",
"project",
",",
"containerPath",
",",
"container",
",",
"initializer",
")",
";",
"}",
"}",
"if",
"(",
"CP_RESOLVE_VERBOSE_ADVANCED",
")",
"verbose_container_value_after_initialization",
"(",
"project",
",",
"containerPath",
",",
"container",
")",
";",
"}",
"else",
"{",
"container",
"=",
"(",
"new",
"ClasspathContainerInitializer",
"(",
")",
"{",
"public",
"void",
"initialize",
"(",
"IPath",
"path",
",",
"IJavaProject",
"javaProject",
")",
"throws",
"CoreException",
"{",
"}",
"}",
")",
".",
"getFailureContainer",
"(",
"containerPath",
",",
"project",
")",
";",
"if",
"(",
"CP_RESOLVE_VERBOSE_ADVANCED",
"||",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_no_container_initializer_found",
"(",
"project",
",",
"containerPath",
")",
";",
"}",
"return",
"container",
";",
"}",
"private",
"void",
"verbose_no_container_initializer_found",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
")",
";",
"}",
"private",
"void",
"verbose_container_value_after_initialization",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"IClasspathContainer",
"container",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
")",
";",
"if",
"(",
"container",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"tcontainer:",
"\"",
"+",
"container",
".",
"getDescription",
"(",
")",
"+",
"\"",
"{n\"",
")",
";",
"IClasspathEntry",
"[",
"]",
"entries",
"=",
"container",
".",
"getClasspathEntries",
"(",
")",
";",
"if",
"(",
"entries",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entries",
".",
"length",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"tt\"",
"+",
"entries",
"[",
"i",
"]",
"+",
"'\\n'",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"t}\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"Util",
".",
"verbose",
"(",
"buffer",
".",
"toString",
"(",
")",
")",
";",
"}",
"private",
"void",
"verbose_container_initialization_failed",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"IClasspathContainer",
"container",
",",
"ClasspathContainerInitializer",
"initializer",
")",
"{",
"if",
"(",
"container",
"==",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"initializer",
")",
";",
"}",
"else",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"initializer",
")",
";",
"}",
"}",
"private",
"void",
"verbose_container_null_failure_container",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"ClasspathContainerInitializer",
"initializer",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"initializer",
")",
";",
"}",
"private",
"void",
"verbose_container_using_failure_container",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"ClasspathContainerInitializer",
"initializer",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"initializer",
")",
";",
"}",
"private",
"void",
"verbose_triggering_container_initialization",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"ClasspathContainerInitializer",
"initializer",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"containerPath",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"initializer",
")",
";",
"}",
"private",
"void",
"verbose_triggering_container_initialization_invocation_trace",
"(",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"\"",
")",
";",
"new",
"Exception",
"(",
"\"\"",
")",
".",
"printStackTrace",
"(",
"System",
".",
"out",
")",
";",
"}",
"public",
"void",
"initializePreferences",
"(",
")",
"{",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
"=",
"InstanceScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
"=",
"DefaultScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"this",
".",
"instanceNodeListener",
"=",
"new",
"IEclipsePreferences",
".",
"INodeChangeListener",
"(",
")",
"{",
"public",
"void",
"added",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"}",
"public",
"void",
"removed",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"if",
"(",
"event",
".",
"getChild",
"(",
")",
"==",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
")",
"{",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
"=",
"InstanceScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
".",
"addPreferenceChangeListener",
"(",
"new",
"EclipsePreferencesListener",
"(",
")",
")",
";",
"}",
"}",
"}",
";",
"(",
"(",
"IEclipsePreferences",
")",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
".",
"parent",
"(",
")",
")",
".",
"addNodeChangeListener",
"(",
"this",
".",
"instanceNodeListener",
")",
";",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
".",
"addPreferenceChangeListener",
"(",
"this",
".",
"instancePreferencesListener",
"=",
"new",
"EclipsePreferencesListener",
"(",
")",
")",
";",
"this",
".",
"defaultNodeListener",
"=",
"new",
"IEclipsePreferences",
".",
"INodeChangeListener",
"(",
")",
"{",
"public",
"void",
"added",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"}",
"public",
"void",
"removed",
"(",
"IEclipsePreferences",
".",
"NodeChangeEvent",
"event",
")",
"{",
"if",
"(",
"event",
".",
"getChild",
"(",
")",
"==",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
")",
"{",
"JavaModelManager",
".",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
"=",
"DefaultScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"}",
"}",
"}",
";",
"(",
"(",
"IEclipsePreferences",
")",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
".",
"parent",
"(",
")",
")",
".",
"addNodeChangeListener",
"(",
"this",
".",
"defaultNodeListener",
")",
";",
"}",
"public",
"synchronized",
"char",
"[",
"]",
"intern",
"(",
"char",
"[",
"]",
"array",
")",
"{",
"return",
"this",
".",
"charArraySymbols",
".",
"add",
"(",
"array",
")",
";",
"}",
"public",
"synchronized",
"String",
"intern",
"(",
"String",
"s",
")",
"{",
"return",
"(",
"String",
")",
"this",
".",
"stringSymbols",
".",
"add",
"(",
"new",
"String",
"(",
"s",
")",
")",
";",
"}",
"private",
"HashSet",
"getClasspathBeingResolved",
"(",
")",
"{",
"HashSet",
"result",
"=",
"(",
"HashSet",
")",
"this",
".",
"classpathsBeingResolved",
".",
"get",
"(",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"new",
"HashSet",
"(",
")",
";",
"this",
".",
"classpathsBeingResolved",
".",
"set",
"(",
"result",
")",
";",
"}",
"return",
"result",
";",
"}",
"public",
"boolean",
"isClasspathBeingResolved",
"(",
"IJavaProject",
"project",
")",
"{",
"return",
"getClasspathBeingResolved",
"(",
")",
".",
"contains",
"(",
"project",
")",
";",
"}",
"private",
"boolean",
"isDeprecatedOption",
"(",
"String",
"optionName",
")",
"{",
"return",
"JavaCore",
".",
"COMPILER_PB_INVALID_IMPORT",
".",
"equals",
"(",
"optionName",
")",
"||",
"JavaCore",
".",
"COMPILER_PB_UNREACHABLE_CODE",
".",
"equals",
"(",
"optionName",
")",
";",
"}",
"public",
"boolean",
"isNonChainingJar",
"(",
"IPath",
"path",
")",
"{",
"return",
"this",
".",
"nonChainingJars",
"!=",
"null",
"&&",
"this",
".",
"nonChainingJars",
".",
"contains",
"(",
"path",
")",
";",
"}",
"public",
"boolean",
"isInvalidArchive",
"(",
"IPath",
"path",
")",
"{",
"return",
"this",
".",
"invalidArchives",
"!=",
"null",
"&&",
"this",
".",
"invalidArchives",
".",
"contains",
"(",
"path",
")",
";",
"}",
"public",
"void",
"removeFromInvalidArchiveCache",
"(",
"IPath",
"path",
")",
"{",
"if",
"(",
"this",
".",
"invalidArchives",
"!=",
"null",
")",
"{",
"this",
".",
"invalidArchives",
".",
"remove",
"(",
"path",
")",
";",
"}",
"}",
"public",
"void",
"setClasspathBeingResolved",
"(",
"IJavaProject",
"project",
",",
"boolean",
"classpathIsResolved",
")",
"{",
"if",
"(",
"classpathIsResolved",
")",
"{",
"getClasspathBeingResolved",
"(",
")",
".",
"add",
"(",
"project",
")",
";",
"}",
"else",
"{",
"getClasspathBeingResolved",
"(",
")",
".",
"remove",
"(",
"project",
")",
";",
"}",
"}",
"private",
"Set",
"loadClasspathListCache",
"(",
"String",
"cacheName",
")",
"{",
"Set",
"pathCache",
"=",
"new",
"HashSet",
"(",
")",
";",
"File",
"cacheFile",
"=",
"getClasspathListFile",
"(",
"cacheName",
")",
";",
"DataInputStream",
"in",
"=",
"null",
";",
"try",
"{",
"in",
"=",
"new",
"DataInputStream",
"(",
"new",
"BufferedInputStream",
"(",
"new",
"FileInputStream",
"(",
"cacheFile",
")",
")",
")",
";",
"int",
"size",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"while",
"(",
"size",
"--",
">",
"0",
")",
"{",
"String",
"path",
"=",
"in",
".",
"readUTF",
"(",
")",
";",
"pathCache",
".",
"add",
"(",
"Path",
".",
"fromPortableString",
"(",
"path",
")",
")",
";",
"}",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"if",
"(",
"cacheFile",
".",
"exists",
"(",
")",
")",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"in",
"!=",
"null",
")",
"{",
"try",
"{",
"in",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"}",
"return",
"Collections",
".",
"synchronizedSet",
"(",
"pathCache",
")",
";",
"}",
"private",
"File",
"getClasspathListFile",
"(",
"String",
"fileName",
")",
"{",
"return",
"JavaCore",
".",
"getPlugin",
"(",
")",
".",
"getStateLocation",
"(",
")",
".",
"append",
"(",
"fileName",
")",
".",
"toFile",
"(",
")",
";",
"}",
"private",
"Set",
"getNonChainingJarsCache",
"(",
")",
"throws",
"CoreException",
"{",
"if",
"(",
"this",
".",
"nonChainingJars",
"!=",
"null",
"&&",
"this",
".",
"nonChainingJars",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"return",
"this",
".",
"nonChainingJars",
";",
"}",
"Set",
"result",
"=",
"new",
"HashSet",
"(",
")",
";",
"IJavaProject",
"[",
"]",
"projects",
"=",
"getJavaModel",
"(",
")",
".",
"getJavaProjects",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"projects",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IJavaProject",
"javaProject",
"=",
"projects",
"[",
"i",
"]",
";",
"IClasspathEntry",
"[",
"]",
"classpath",
"=",
"(",
"(",
"JavaProject",
")",
"javaProject",
")",
".",
"getResolvedClasspath",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"length2",
"=",
"classpath",
".",
"length",
";",
"j",
"<",
"length2",
";",
"j",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"classpath",
"[",
"j",
"]",
";",
"IPath",
"path",
";",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
"&&",
"!",
"result",
".",
"contains",
"(",
"path",
"=",
"entry",
".",
"getPath",
"(",
")",
")",
"&&",
"ClasspathEntry",
".",
"resolvedChainedLibraries",
"(",
"path",
")",
".",
"length",
"==",
"0",
")",
"{",
"result",
".",
"add",
"(",
"path",
")",
";",
"}",
"}",
"}",
"this",
".",
"nonChainingJars",
"=",
"Collections",
".",
"synchronizedSet",
"(",
"result",
")",
";",
"return",
"this",
".",
"nonChainingJars",
";",
"}",
"private",
"Set",
"getClasspathListCache",
"(",
"String",
"cacheName",
")",
"throws",
"CoreException",
"{",
"if",
"(",
"cacheName",
"==",
"NON_CHAINING_JARS_CACHE",
")",
"return",
"getNonChainingJarsCache",
"(",
")",
";",
"else",
"if",
"(",
"cacheName",
"==",
"INVALID_ARCHIVES_CACHE",
")",
"return",
"this",
".",
"invalidArchives",
";",
"else",
"return",
"null",
";",
"}",
"public",
"void",
"loadVariablesAndContainers",
"(",
")",
"throws",
"CoreException",
"{",
"QualifiedName",
"qName",
"=",
"new",
"QualifiedName",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"\"variables\"",
")",
";",
"String",
"xmlString",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getPersistentProperty",
"(",
"qName",
")",
";",
"try",
"{",
"if",
"(",
"xmlString",
"!=",
"null",
")",
"{",
"StringReader",
"reader",
"=",
"new",
"StringReader",
"(",
"xmlString",
")",
";",
"Element",
"cpElement",
";",
"try",
"{",
"DocumentBuilder",
"parser",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
".",
"newDocumentBuilder",
"(",
")",
";",
"cpElement",
"=",
"parser",
".",
"parse",
"(",
"new",
"InputSource",
"(",
"reader",
")",
")",
".",
"getDocumentElement",
"(",
")",
";",
"}",
"catch",
"(",
"SAXException",
"e",
")",
"{",
"return",
";",
"}",
"catch",
"(",
"ParserConfigurationException",
"e",
")",
"{",
"return",
";",
"}",
"finally",
"{",
"reader",
".",
"close",
"(",
")",
";",
"}",
"if",
"(",
"cpElement",
"==",
"null",
")",
"return",
";",
"if",
"(",
"!",
"cpElement",
".",
"getNodeName",
"(",
")",
".",
"equalsIgnoreCase",
"(",
"\"variables\"",
")",
")",
"{",
"return",
";",
"}",
"NodeList",
"list",
"=",
"cpElement",
".",
"getChildNodes",
"(",
")",
";",
"int",
"length",
"=",
"list",
".",
"getLength",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"++",
"i",
")",
"{",
"Node",
"node",
"=",
"list",
".",
"item",
"(",
"i",
")",
";",
"short",
"type",
"=",
"node",
".",
"getNodeType",
"(",
")",
";",
"if",
"(",
"type",
"==",
"Node",
".",
"ELEMENT_NODE",
")",
"{",
"Element",
"element",
"=",
"(",
"Element",
")",
"node",
";",
"if",
"(",
"element",
".",
"getNodeName",
"(",
")",
".",
"equalsIgnoreCase",
"(",
"\"variable\"",
")",
")",
"{",
"variablePut",
"(",
"element",
".",
"getAttribute",
"(",
"\"name\"",
")",
",",
"new",
"Path",
"(",
"element",
".",
"getAttribute",
"(",
"\"path\"",
")",
")",
")",
";",
"}",
"}",
"}",
"}",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"finally",
"{",
"if",
"(",
"xmlString",
"!=",
"null",
")",
"{",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"setPersistentProperty",
"(",
"qName",
",",
"null",
")",
";",
"}",
"}",
"loadVariablesAndContainers",
"(",
"getDefaultPreferences",
"(",
")",
")",
";",
"loadVariablesAndContainers",
"(",
"getInstancePreferences",
"(",
")",
")",
";",
"File",
"file",
"=",
"getVariableAndContainersFile",
"(",
")",
";",
"DataInputStream",
"in",
"=",
"null",
";",
"try",
"{",
"in",
"=",
"new",
"DataInputStream",
"(",
"new",
"BufferedInputStream",
"(",
"new",
"FileInputStream",
"(",
"file",
")",
")",
")",
";",
"switch",
"(",
"in",
".",
"readInt",
"(",
")",
")",
"{",
"case",
"2",
":",
"new",
"VariablesAndContainersLoadHelper",
"(",
"in",
")",
".",
"load",
"(",
")",
";",
"break",
";",
"case",
"1",
":",
"int",
"size",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"while",
"(",
"size",
"--",
">",
"0",
")",
"{",
"String",
"varName",
"=",
"in",
".",
"readUTF",
"(",
")",
";",
"String",
"pathString",
"=",
"in",
".",
"readUTF",
"(",
")",
";",
"if",
"(",
"CP_ENTRY_IGNORE",
".",
"equals",
"(",
"pathString",
")",
")",
"continue",
";",
"IPath",
"varPath",
"=",
"Path",
".",
"fromPortableString",
"(",
"pathString",
")",
";",
"this",
".",
"variables",
".",
"put",
"(",
"varName",
",",
"varPath",
")",
";",
"this",
".",
"previousSessionVariables",
".",
"put",
"(",
"varName",
",",
"varPath",
")",
";",
"}",
"IJavaModel",
"model",
"=",
"getJavaModel",
"(",
")",
";",
"int",
"projectSize",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"while",
"(",
"projectSize",
"--",
">",
"0",
")",
"{",
"String",
"projectName",
"=",
"in",
".",
"readUTF",
"(",
")",
";",
"IJavaProject",
"project",
"=",
"model",
".",
"getJavaProject",
"(",
"projectName",
")",
";",
"int",
"containerSize",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"while",
"(",
"containerSize",
"--",
">",
"0",
")",
"{",
"IPath",
"containerPath",
"=",
"Path",
".",
"fromPortableString",
"(",
"in",
".",
"readUTF",
"(",
")",
")",
";",
"int",
"length",
"=",
"in",
".",
"readInt",
"(",
")",
";",
"byte",
"[",
"]",
"containerString",
"=",
"new",
"byte",
"[",
"length",
"]",
";",
"in",
".",
"readFully",
"(",
"containerString",
")",
";",
"recreatePersistedContainer",
"(",
"project",
",",
"containerPath",
",",
"new",
"String",
"(",
"containerString",
")",
",",
"true",
")",
";",
"}",
"}",
"break",
";",
"}",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"if",
"(",
"file",
".",
"exists",
"(",
")",
")",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"if",
"(",
"file",
".",
"exists",
"(",
")",
")",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"in",
"!=",
"null",
")",
"{",
"try",
"{",
"in",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"}",
"String",
"[",
"]",
"registeredVariables",
"=",
"getRegisteredVariableNames",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"registeredVariables",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"varName",
"=",
"registeredVariables",
"[",
"i",
"]",
";",
"this",
".",
"variables",
".",
"put",
"(",
"varName",
",",
"null",
")",
";",
"}",
"containersReset",
"(",
"getRegisteredContainerIDs",
"(",
")",
")",
";",
"}",
"private",
"void",
"loadVariablesAndContainers",
"(",
"IEclipsePreferences",
"preferences",
")",
"{",
"try",
"{",
"String",
"[",
"]",
"propertyNames",
"=",
"preferences",
".",
"keys",
"(",
")",
";",
"int",
"variablePrefixLength",
"=",
"CP_VARIABLE_PREFERENCES_PREFIX",
".",
"length",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"propertyNames",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"propertyName",
"=",
"propertyNames",
"[",
"i",
"]",
";",
"if",
"(",
"propertyName",
".",
"startsWith",
"(",
"CP_VARIABLE_PREFERENCES_PREFIX",
")",
")",
"{",
"String",
"varName",
"=",
"propertyName",
".",
"substring",
"(",
"variablePrefixLength",
")",
";",
"String",
"propertyValue",
"=",
"preferences",
".",
"get",
"(",
"propertyName",
",",
"null",
")",
";",
"if",
"(",
"propertyValue",
"!=",
"null",
")",
"{",
"String",
"pathString",
"=",
"propertyValue",
".",
"trim",
"(",
")",
";",
"if",
"(",
"CP_ENTRY_IGNORE",
".",
"equals",
"(",
"pathString",
")",
")",
"{",
"preferences",
".",
"remove",
"(",
"propertyName",
")",
";",
"continue",
";",
"}",
"IPath",
"varPath",
"=",
"new",
"Path",
"(",
"pathString",
")",
";",
"this",
".",
"variables",
".",
"put",
"(",
"varName",
",",
"varPath",
")",
";",
"this",
".",
"previousSessionVariables",
".",
"put",
"(",
"varName",
",",
"varPath",
")",
";",
"}",
"}",
"else",
"if",
"(",
"propertyName",
".",
"startsWith",
"(",
"CP_CONTAINER_PREFERENCES_PREFIX",
")",
")",
"{",
"String",
"propertyValue",
"=",
"preferences",
".",
"get",
"(",
"propertyName",
",",
"null",
")",
";",
"if",
"(",
"propertyValue",
"!=",
"null",
")",
"{",
"preferences",
".",
"remove",
"(",
"propertyName",
")",
";",
"recreatePersistedContainer",
"(",
"propertyName",
",",
"propertyValue",
",",
"true",
")",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"BackingStoreException",
"e1",
")",
"{",
"}",
"}",
"private",
"static",
"final",
"class",
"PersistedClasspathContainer",
"implements",
"IClasspathContainer",
"{",
"private",
"final",
"IPath",
"containerPath",
";",
"private",
"final",
"IClasspathEntry",
"[",
"]",
"entries",
";",
"private",
"final",
"IJavaProject",
"project",
";",
"PersistedClasspathContainer",
"(",
"IJavaProject",
"project",
",",
"IPath",
"containerPath",
",",
"IClasspathEntry",
"[",
"]",
"entries",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"containerPath",
"=",
"containerPath",
";",
"this",
".",
"entries",
"=",
"entries",
";",
"this",
".",
"project",
"=",
"project",
";",
"}",
"public",
"IClasspathEntry",
"[",
"]",
"getClasspathEntries",
"(",
")",
"{",
"return",
"this",
".",
"entries",
";",
"}",
"public",
"String",
"getDescription",
"(",
")",
"{",
"return",
"\"\"",
"+",
"this",
".",
"containerPath",
"+",
"\"\"",
"+",
"this",
".",
"project",
".",
"getElementName",
"(",
")",
"+",
"\"]]\"",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"0",
";",
"}",
"public",
"IPath",
"getPath",
"(",
")",
"{",
"return",
"this",
".",
"containerPath",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"getDescription",
"(",
")",
";",
"}",
"}",
"private",
"final",
"class",
"VariablesAndContainersLoadHelper",
"{",
"private",
"static",
"final",
"int",
"ARRAY_INCREMENT",
"=",
"200",
";",
"private",
"IClasspathEntry",
"[",
"]",
"allClasspathEntries",
";",
"private",
"int",
"allClasspathEntryCount",
";",
"private",
"final",
"Map",
"allPaths",
";",
"private",
"String",
"[",
"]",
"allStrings",
";",
"private",
"int",
"allStringsCount",
";",
"private",
"final",
"DataInputStream",
"in",
";",
"VariablesAndContainersLoadHelper",
"(",
"DataInputStream",
"in",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"allClasspathEntries",
"=",
"null",
";",
"this",
".",
"allClasspathEntryCount",
"=",
"0",
";",
"this",
".",
"allPaths",
"=",
"new",
"HashMap",
"(",
")",
";",
"this",
".",
"allStrings",
"=",
"null",
";",
"this",
".",
"allStringsCount",
"=",
"0",
";",
"this",
".",
"in",
"=",
"in",
";",
"}",
"void",
"load",
"(",
")",
"throws",
"IOException",
"{",
"loadProjects",
"(",
"getJavaModel",
"(",
")",
")",
";",
"loadVariables",
"(",
")",
";",
"}",
"private",
"IAccessRule",
"loadAccessRule",
"(",
")",
"throws",
"IOException",
"{",
"int",
"problemId",
"=",
"loadInt",
"(",
")",
";",
"IPath",
"pattern",
"=",
"loadPath",
"(",
")",
";",
"return",
"new",
"ClasspathAccessRule",
"(",
"pattern",
".",
"toString",
"(",
")",
".",
"toCharArray",
"(",
")",
",",
"problemId",
")",
";",
"}",
"private",
"IAccessRule",
"[",
"]",
"loadAccessRules",
"(",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"loadInt",
"(",
")",
";",
"if",
"(",
"count",
"==",
"0",
")",
"return",
"ClasspathEntry",
".",
"NO_ACCESS_RULES",
";",
"IAccessRule",
"[",
"]",
"rules",
"=",
"new",
"IAccessRule",
"[",
"count",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"rules",
"[",
"i",
"]",
"=",
"loadAccessRule",
"(",
")",
";",
"return",
"rules",
";",
"}",
"private",
"IClasspathAttribute",
"loadAttribute",
"(",
")",
"throws",
"IOException",
"{",
"String",
"name",
"=",
"loadString",
"(",
")",
";",
"String",
"value",
"=",
"loadString",
"(",
")",
";",
"return",
"new",
"ClasspathAttribute",
"(",
"name",
",",
"value",
")",
";",
"}",
"private",
"IClasspathAttribute",
"[",
"]",
"loadAttributes",
"(",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"loadInt",
"(",
")",
";",
"if",
"(",
"count",
"==",
"0",
")",
"return",
"ClasspathEntry",
".",
"NO_EXTRA_ATTRIBUTES",
";",
"IClasspathAttribute",
"[",
"]",
"attributes",
"=",
"new",
"IClasspathAttribute",
"[",
"count",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"attributes",
"[",
"i",
"]",
"=",
"loadAttribute",
"(",
")",
";",
"return",
"attributes",
";",
"}",
"private",
"boolean",
"loadBoolean",
"(",
")",
"throws",
"IOException",
"{",
"return",
"this",
".",
"in",
".",
"readBoolean",
"(",
")",
";",
"}",
"private",
"IClasspathEntry",
"[",
"]",
"loadClasspathEntries",
"(",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"loadInt",
"(",
")",
";",
"IClasspathEntry",
"[",
"]",
"entries",
"=",
"new",
"IClasspathEntry",
"[",
"count",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"entries",
"[",
"i",
"]",
"=",
"loadClasspathEntry",
"(",
")",
";",
"return",
"entries",
";",
"}",
"private",
"IClasspathEntry",
"loadClasspathEntry",
"(",
")",
"throws",
"IOException",
"{",
"int",
"id",
"=",
"loadInt",
"(",
")",
";",
"if",
"(",
"id",
"<",
"0",
"||",
"id",
">",
"this",
".",
"allClasspathEntryCount",
")",
"throw",
"new",
"IOException",
"(",
"\"\"",
")",
";",
"if",
"(",
"id",
"<",
"this",
".",
"allClasspathEntryCount",
")",
"return",
"this",
".",
"allClasspathEntries",
"[",
"id",
"]",
";",
"int",
"contentKind",
"=",
"loadInt",
"(",
")",
";",
"int",
"entryKind",
"=",
"loadInt",
"(",
")",
";",
"IPath",
"path",
"=",
"loadPath",
"(",
")",
";",
"IPath",
"[",
"]",
"inclusionPatterns",
"=",
"loadPaths",
"(",
")",
";",
"IPath",
"[",
"]",
"exclusionPatterns",
"=",
"loadPaths",
"(",
")",
";",
"IPath",
"sourceAttachmentPath",
"=",
"loadPath",
"(",
")",
";",
"IPath",
"sourceAttachmentRootPath",
"=",
"loadPath",
"(",
")",
";",
"IPath",
"specificOutputLocation",
"=",
"loadPath",
"(",
")",
";",
"boolean",
"isExported",
"=",
"loadBoolean",
"(",
")",
";",
"IAccessRule",
"[",
"]",
"accessRules",
"=",
"loadAccessRules",
"(",
")",
";",
"boolean",
"combineAccessRules",
"=",
"loadBoolean",
"(",
")",
";",
"IClasspathAttribute",
"[",
"]",
"extraAttributes",
"=",
"loadAttributes",
"(",
")",
";",
"IClasspathEntry",
"entry",
"=",
"new",
"ClasspathEntry",
"(",
"contentKind",
",",
"entryKind",
",",
"path",
",",
"inclusionPatterns",
",",
"exclusionPatterns",
",",
"sourceAttachmentPath",
",",
"sourceAttachmentRootPath",
",",
"specificOutputLocation",
",",
"isExported",
",",
"accessRules",
",",
"combineAccessRules",
",",
"extraAttributes",
")",
";",
"IClasspathEntry",
"[",
"]",
"array",
"=",
"this",
".",
"allClasspathEntries",
";",
"if",
"(",
"array",
"==",
"null",
"||",
"id",
"==",
"array",
".",
"length",
")",
"{",
"array",
"=",
"new",
"IClasspathEntry",
"[",
"id",
"+",
"ARRAY_INCREMENT",
"]",
";",
"if",
"(",
"id",
"!=",
"0",
")",
"System",
".",
"arraycopy",
"(",
"this",
".",
"allClasspathEntries",
",",
"0",
",",
"array",
",",
"0",
",",
"id",
")",
";",
"this",
".",
"allClasspathEntries",
"=",
"array",
";",
"}",
"array",
"[",
"id",
"]",
"=",
"entry",
";",
"this",
".",
"allClasspathEntryCount",
"=",
"id",
"+",
"1",
";",
"return",
"entry",
";",
"}",
"private",
"void",
"loadContainers",
"(",
"IJavaProject",
"project",
")",
"throws",
"IOException",
"{",
"boolean",
"projectIsAccessible",
"=",
"project",
".",
"getProject",
"(",
")",
".",
"isAccessible",
"(",
")",
";",
"int",
"count",
"=",
"loadInt",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"{",
"IPath",
"path",
"=",
"loadPath",
"(",
")",
";",
"IClasspathEntry",
"[",
"]",
"entries",
"=",
"loadClasspathEntries",
"(",
")",
";",
"if",
"(",
"!",
"projectIsAccessible",
")",
"continue",
";",
"IClasspathContainer",
"container",
"=",
"new",
"PersistedClasspathContainer",
"(",
"project",
",",
"path",
",",
"entries",
")",
";",
"containerPut",
"(",
"project",
",",
"path",
",",
"container",
")",
";",
"Map",
"oldContainers",
"=",
"(",
"Map",
")",
"JavaModelManager",
".",
"this",
".",
"previousSessionContainers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"oldContainers",
"==",
"null",
")",
"{",
"oldContainers",
"=",
"new",
"HashMap",
"(",
")",
";",
"JavaModelManager",
".",
"this",
".",
"previousSessionContainers",
".",
"put",
"(",
"project",
",",
"oldContainers",
")",
";",
"}",
"oldContainers",
".",
"put",
"(",
"path",
",",
"container",
")",
";",
"}",
"}",
"private",
"int",
"loadInt",
"(",
")",
"throws",
"IOException",
"{",
"return",
"this",
".",
"in",
".",
"readInt",
"(",
")",
";",
"}",
"private",
"IPath",
"loadPath",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"loadBoolean",
"(",
")",
")",
"return",
"null",
";",
"String",
"portableString",
"=",
"loadString",
"(",
")",
";",
"IPath",
"path",
"=",
"(",
"IPath",
")",
"this",
".",
"allPaths",
".",
"get",
"(",
"portableString",
")",
";",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"path",
"=",
"Path",
".",
"fromPortableString",
"(",
"portableString",
")",
";",
"this",
".",
"allPaths",
".",
"put",
"(",
"portableString",
",",
"path",
")",
";",
"}",
"return",
"path",
";",
"}",
"private",
"IPath",
"[",
"]",
"loadPaths",
"(",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"loadInt",
"(",
")",
";",
"IPath",
"[",
"]",
"pathArray",
"=",
"new",
"IPath",
"[",
"count",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"pathArray",
"[",
"i",
"]",
"=",
"loadPath",
"(",
")",
";",
"return",
"pathArray",
";",
"}",
"private",
"void",
"loadProjects",
"(",
"IJavaModel",
"model",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"loadInt",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"{",
"String",
"projectName",
"=",
"loadString",
"(",
")",
";",
"loadContainers",
"(",
"model",
".",
"getJavaProject",
"(",
"projectName",
")",
")",
";",
"}",
"}",
"private",
"String",
"loadString",
"(",
")",
"throws",
"IOException",
"{",
"int",
"id",
"=",
"loadInt",
"(",
")",
";",
"if",
"(",
"id",
"<",
"0",
"||",
"id",
">",
"this",
".",
"allStringsCount",
")",
"throw",
"new",
"IOException",
"(",
"\"\"",
")",
";",
"if",
"(",
"id",
"<",
"this",
".",
"allStringsCount",
")",
"return",
"this",
".",
"allStrings",
"[",
"id",
"]",
";",
"String",
"string",
"=",
"this",
".",
"in",
".",
"readUTF",
"(",
")",
";",
"String",
"[",
"]",
"array",
"=",
"this",
".",
"allStrings",
";",
"if",
"(",
"array",
"==",
"null",
"||",
"id",
"==",
"array",
".",
"length",
")",
"{",
"array",
"=",
"new",
"String",
"[",
"id",
"+",
"ARRAY_INCREMENT",
"]",
";",
"if",
"(",
"id",
"!=",
"0",
")",
"System",
".",
"arraycopy",
"(",
"this",
".",
"allStrings",
",",
"0",
",",
"array",
",",
"0",
",",
"id",
")",
";",
"this",
".",
"allStrings",
"=",
"array",
";",
"}",
"array",
"[",
"id",
"]",
"=",
"string",
";",
"this",
".",
"allStringsCount",
"=",
"id",
"+",
"1",
";",
"return",
"string",
";",
"}",
"private",
"void",
"loadVariables",
"(",
")",
"throws",
"IOException",
"{",
"int",
"size",
"=",
"loadInt",
"(",
")",
";",
"Map",
"loadedVars",
"=",
"new",
"HashMap",
"(",
"size",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"size",
";",
"++",
"i",
")",
"{",
"String",
"varName",
"=",
"loadString",
"(",
")",
";",
"IPath",
"varPath",
"=",
"loadPath",
"(",
")",
";",
"if",
"(",
"varPath",
"!=",
"null",
")",
"loadedVars",
".",
"put",
"(",
"varName",
",",
"varPath",
")",
";",
"}",
"JavaModelManager",
".",
"this",
".",
"previousSessionVariables",
".",
"putAll",
"(",
"loadedVars",
")",
";",
"JavaModelManager",
".",
"this",
".",
"variables",
".",
"putAll",
"(",
"loadedVars",
")",
";",
"}",
"}",
"protected",
"synchronized",
"Object",
"peekAtInfo",
"(",
"IJavaElement",
"element",
")",
"{",
"HashMap",
"tempCache",
"=",
"(",
"HashMap",
")",
"this",
".",
"temporaryCache",
".",
"get",
"(",
")",
";",
"if",
"(",
"tempCache",
"!=",
"null",
")",
"{",
"Object",
"result",
"=",
"tempCache",
".",
"get",
"(",
"element",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"{",
"return",
"result",
";",
"}",
"}",
"return",
"this",
".",
"cache",
".",
"peekAtInfo",
"(",
"element",
")",
";",
"}",
"public",
"void",
"prepareToSave",
"(",
"ISaveContext",
"context",
")",
"{",
"}",
"protected",
"synchronized",
"Object",
"putInfos",
"(",
"IJavaElement",
"openedElement",
",",
"Object",
"newInfo",
",",
"boolean",
"forceAdd",
",",
"Map",
"newElements",
")",
"{",
"Object",
"existingInfo",
"=",
"this",
".",
"cache",
".",
"peekAtInfo",
"(",
"openedElement",
")",
";",
"if",
"(",
"existingInfo",
"!=",
"null",
"&&",
"!",
"forceAdd",
")",
"{",
"return",
"existingInfo",
";",
"}",
"if",
"(",
"openedElement",
"instanceof",
"IParent",
")",
"{",
"closeChildren",
"(",
"existingInfo",
")",
";",
"}",
"for",
"(",
"Iterator",
"it",
"=",
"newElements",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"it",
".",
"next",
"(",
")",
";",
"IJavaElement",
"element",
"=",
"(",
"IJavaElement",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"if",
"(",
"element",
"instanceof",
"JarPackageFragmentRoot",
")",
"{",
"Object",
"info",
"=",
"entry",
".",
"getValue",
"(",
")",
";",
"it",
".",
"remove",
"(",
")",
";",
"this",
".",
"cache",
".",
"putInfo",
"(",
"element",
",",
"info",
")",
";",
"}",
"}",
"Iterator",
"iterator",
"=",
"newElements",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"iterator",
".",
"next",
"(",
")",
";",
"this",
".",
"cache",
".",
"putInfo",
"(",
"(",
"IJavaElement",
")",
"entry",
".",
"getKey",
"(",
")",
",",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"return",
"newInfo",
";",
"}",
"private",
"void",
"closeChildren",
"(",
"Object",
"info",
")",
"{",
"if",
"(",
"info",
"instanceof",
"JavaElementInfo",
")",
"{",
"IJavaElement",
"[",
"]",
"children",
"=",
"(",
"(",
"JavaElementInfo",
")",
"info",
")",
".",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"children",
".",
"length",
";",
"i",
"<",
"size",
";",
"++",
"i",
")",
"{",
"JavaElement",
"child",
"=",
"(",
"JavaElement",
")",
"children",
"[",
"i",
"]",
";",
"try",
"{",
"child",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"}",
"}",
"protected",
"synchronized",
"void",
"putJarTypeInfo",
"(",
"IJavaElement",
"type",
",",
"Object",
"info",
")",
"{",
"this",
".",
"cache",
".",
"jarTypeCache",
".",
"put",
"(",
"type",
",",
"info",
")",
";",
"}",
"protected",
"Object",
"readState",
"(",
"IProject",
"project",
")",
"throws",
"CoreException",
"{",
"File",
"file",
"=",
"getSerializationFile",
"(",
"project",
")",
";",
"if",
"(",
"file",
"!=",
"null",
"&&",
"file",
".",
"exists",
"(",
")",
")",
"{",
"try",
"{",
"DataInputStream",
"in",
"=",
"new",
"DataInputStream",
"(",
"new",
"BufferedInputStream",
"(",
"new",
"FileInputStream",
"(",
"file",
")",
")",
")",
";",
"try",
"{",
"String",
"pluginID",
"=",
"in",
".",
"readUTF",
"(",
")",
";",
"if",
"(",
"!",
"pluginID",
".",
"equals",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
")",
"throw",
"new",
"IOException",
"(",
"Messages",
".",
"build_wrongFileFormat",
")",
";",
"String",
"kind",
"=",
"in",
".",
"readUTF",
"(",
")",
";",
"if",
"(",
"!",
"kind",
".",
"equals",
"(",
"\"STATE\"",
")",
")",
"throw",
"new",
"IOException",
"(",
"Messages",
".",
"build_wrongFileFormat",
")",
";",
"if",
"(",
"in",
".",
"readBoolean",
"(",
")",
")",
"return",
"JavaBuilder",
".",
"readState",
"(",
"project",
",",
"in",
")",
";",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"project",
".",
"getName",
"(",
")",
")",
";",
"}",
"finally",
"{",
"in",
".",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"Platform",
".",
"PLUGIN_ERROR",
",",
"\"\"",
"+",
"project",
".",
"getName",
"(",
")",
",",
"e",
")",
")",
";",
"}",
"}",
"else",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"{",
"if",
"(",
"file",
"==",
"null",
")",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"project",
")",
";",
"else",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"file",
".",
"getPath",
"(",
")",
"+",
"\"\"",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"static",
"void",
"recreatePersistedContainer",
"(",
"String",
"propertyName",
",",
"String",
"containerString",
",",
"boolean",
"addToContainerValues",
")",
"{",
"int",
"containerPrefixLength",
"=",
"CP_CONTAINER_PREFERENCES_PREFIX",
".",
"length",
"(",
")",
";",
"int",
"index",
"=",
"propertyName",
".",
"indexOf",
"(",
"'|'",
",",
"containerPrefixLength",
")",
";",
"if",
"(",
"containerString",
"!=",
"null",
")",
"containerString",
"=",
"containerString",
".",
"trim",
"(",
")",
";",
"if",
"(",
"index",
">",
"0",
")",
"{",
"String",
"projectName",
"=",
"propertyName",
".",
"substring",
"(",
"containerPrefixLength",
",",
"index",
")",
".",
"trim",
"(",
")",
";",
"IJavaProject",
"project",
"=",
"getJavaModelManager",
"(",
")",
".",
"getJavaModel",
"(",
")",
".",
"getJavaProject",
"(",
"projectName",
")",
";",
"IPath",
"containerPath",
"=",
"new",
"Path",
"(",
"propertyName",
".",
"substring",
"(",
"index",
"+",
"1",
")",
".",
"trim",
"(",
")",
")",
";",
"recreatePersistedContainer",
"(",
"project",
",",
"containerPath",
",",
"containerString",
",",
"addToContainerValues",
")",
";",
"}",
"}",
"private",
"static",
"void",
"recreatePersistedContainer",
"(",
"final",
"IJavaProject",
"project",
",",
"final",
"IPath",
"containerPath",
",",
"String",
"containerString",
",",
"boolean",
"addToContainerValues",
")",
"{",
"if",
"(",
"!",
"project",
".",
"getProject",
"(",
")",
".",
"isAccessible",
"(",
")",
")",
"return",
";",
"if",
"(",
"containerString",
"==",
"null",
")",
"{",
"getJavaModelManager",
"(",
")",
".",
"containerPut",
"(",
"project",
",",
"containerPath",
",",
"null",
")",
";",
"}",
"else",
"{",
"IClasspathEntry",
"[",
"]",
"entries",
";",
"try",
"{",
"entries",
"=",
"(",
"(",
"JavaProject",
")",
"project",
")",
".",
"decodeClasspath",
"(",
"containerString",
",",
"null",
")",
"[",
"0",
"]",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
"+",
"containerString",
")",
";",
"entries",
"=",
"JavaProject",
".",
"INVALID_CLASSPATH",
";",
"}",
"if",
"(",
"entries",
"!=",
"JavaProject",
".",
"INVALID_CLASSPATH",
")",
"{",
"final",
"IClasspathEntry",
"[",
"]",
"containerEntries",
"=",
"entries",
";",
"IClasspathContainer",
"container",
"=",
"new",
"IClasspathContainer",
"(",
")",
"{",
"public",
"IClasspathEntry",
"[",
"]",
"getClasspathEntries",
"(",
")",
"{",
"return",
"containerEntries",
";",
"}",
"public",
"String",
"getDescription",
"(",
")",
"{",
"return",
"\"\"",
"+",
"containerPath",
"+",
"\"\"",
"+",
"project",
".",
"getElementName",
"(",
")",
"+",
"\"]\"",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"0",
";",
"}",
"public",
"IPath",
"getPath",
"(",
")",
"{",
"return",
"containerPath",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"getDescription",
"(",
")",
";",
"}",
"}",
";",
"if",
"(",
"addToContainerValues",
")",
"{",
"getJavaModelManager",
"(",
")",
".",
"containerPut",
"(",
"project",
",",
"containerPath",
",",
"container",
")",
";",
"}",
"Map",
"projectContainers",
"=",
"(",
"Map",
")",
"getJavaModelManager",
"(",
")",
".",
"previousSessionContainers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"projectContainers",
"==",
"null",
")",
"{",
"projectContainers",
"=",
"new",
"HashMap",
"(",
"1",
")",
";",
"getJavaModelManager",
"(",
")",
".",
"previousSessionContainers",
".",
"put",
"(",
"project",
",",
"projectContainers",
")",
";",
"}",
"projectContainers",
".",
"put",
"(",
"containerPath",
",",
"container",
")",
";",
"}",
"}",
"}",
"public",
"void",
"rememberScope",
"(",
"AbstractSearchScope",
"scope",
")",
"{",
"this",
".",
"searchScopes",
".",
"put",
"(",
"scope",
",",
"null",
")",
";",
"}",
"public",
"synchronized",
"Object",
"removeInfoAndChildren",
"(",
"JavaElement",
"element",
")",
"throws",
"JavaModelException",
"{",
"Object",
"info",
"=",
"this",
".",
"cache",
".",
"peekAtInfo",
"(",
"element",
")",
";",
"if",
"(",
"info",
"!=",
"null",
")",
"{",
"boolean",
"wasVerbose",
"=",
"false",
";",
"try",
"{",
"if",
"(",
"JavaModelCache",
".",
"VERBOSE",
")",
"{",
"String",
"elementType",
";",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"elementType",
"=",
"\"project\"",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"elementType",
"=",
"\"root\"",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"elementType",
"=",
"\"package\"",
";",
"break",
";",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"elementType",
"=",
"\"class",
"file\"",
";",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"elementType",
"=",
"\"\"",
";",
"break",
";",
"default",
":",
"elementType",
"=",
"\"element\"",
";",
"}",
"System",
".",
"out",
".",
"println",
"(",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"",
"CLOSING",
"\"",
"+",
"elementType",
"+",
"\"",
"\"",
"+",
"element",
".",
"toStringWithAncestors",
"(",
")",
")",
";",
"wasVerbose",
"=",
"true",
";",
"JavaModelCache",
".",
"VERBOSE",
"=",
"false",
";",
"}",
"element",
".",
"closing",
"(",
"info",
")",
";",
"if",
"(",
"element",
"instanceof",
"IParent",
")",
"{",
"closeChildren",
"(",
"info",
")",
";",
"}",
"this",
".",
"cache",
".",
"removeInfo",
"(",
"element",
")",
";",
"if",
"(",
"wasVerbose",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"this",
".",
"cache",
".",
"toStringFillingRation",
"(",
"\"->",
"\"",
")",
")",
";",
"}",
"}",
"finally",
"{",
"JavaModelCache",
".",
"VERBOSE",
"=",
"wasVerbose",
";",
"}",
"return",
"info",
";",
"}",
"return",
"null",
";",
"}",
"public",
"void",
"removePerProjectInfo",
"(",
"JavaProject",
"javaProject",
",",
"boolean",
"removeExtJarInfo",
")",
"{",
"synchronized",
"(",
"this",
".",
"perProjectInfos",
")",
"{",
"IProject",
"project",
"=",
"javaProject",
".",
"getProject",
"(",
")",
";",
"PerProjectInfo",
"info",
"=",
"(",
"PerProjectInfo",
")",
"this",
".",
"perProjectInfos",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"info",
"!=",
"null",
")",
"{",
"this",
".",
"perProjectInfos",
".",
"remove",
"(",
"project",
")",
";",
"if",
"(",
"removeExtJarInfo",
")",
"{",
"info",
".",
"forgetExternalTimestampsAndIndexes",
"(",
")",
";",
"}",
"}",
"}",
"resetClasspathListCache",
"(",
")",
";",
"}",
"public",
"void",
"resetProjectOptions",
"(",
"JavaProject",
"javaProject",
")",
"{",
"synchronized",
"(",
"this",
".",
"perProjectInfos",
")",
"{",
"IProject",
"project",
"=",
"javaProject",
".",
"getProject",
"(",
")",
";",
"PerProjectInfo",
"info",
"=",
"(",
"PerProjectInfo",
")",
"this",
".",
"perProjectInfos",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"info",
"!=",
"null",
")",
"{",
"info",
".",
"options",
"=",
"null",
";",
"}",
"}",
"}",
"public",
"void",
"resetProjectPreferences",
"(",
"JavaProject",
"javaProject",
")",
"{",
"synchronized",
"(",
"this",
".",
"perProjectInfos",
")",
"{",
"IProject",
"project",
"=",
"javaProject",
".",
"getProject",
"(",
")",
";",
"PerProjectInfo",
"info",
"=",
"(",
"PerProjectInfo",
")",
"this",
".",
"perProjectInfos",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"info",
"!=",
"null",
")",
"{",
"info",
".",
"preferences",
"=",
"null",
";",
"}",
"}",
"}",
"public",
"static",
"final",
"void",
"doNotUse",
"(",
")",
"{",
"MANAGER",
".",
"deltaState",
".",
"doNotUse",
"(",
")",
";",
"MANAGER",
"=",
"new",
"JavaModelManager",
"(",
")",
";",
"}",
"protected",
"synchronized",
"void",
"resetJarTypeCache",
"(",
")",
"{",
"this",
".",
"cache",
".",
"resetJarTypeCache",
"(",
")",
";",
"}",
"public",
"void",
"resetClasspathListCache",
"(",
")",
"{",
"if",
"(",
"this",
".",
"nonChainingJars",
"!=",
"null",
")",
"this",
".",
"nonChainingJars",
".",
"clear",
"(",
")",
";",
"if",
"(",
"this",
".",
"invalidArchives",
"!=",
"null",
")",
"this",
".",
"invalidArchives",
".",
"clear",
"(",
")",
";",
"}",
"public",
"void",
"resetTemporaryCache",
"(",
")",
"{",
"this",
".",
"temporaryCache",
".",
"set",
"(",
"null",
")",
";",
"}",
"public",
"void",
"rollback",
"(",
"ISaveContext",
"context",
")",
"{",
"}",
"private",
"void",
"saveState",
"(",
"PerProjectInfo",
"info",
",",
"ISaveContext",
"context",
")",
"throws",
"CoreException",
"{",
"if",
"(",
"context",
".",
"getKind",
"(",
")",
"==",
"ISaveContext",
".",
"SNAPSHOT",
")",
"return",
";",
"if",
"(",
"info",
".",
"triedRead",
")",
"saveBuiltState",
"(",
"info",
")",
";",
"}",
"private",
"void",
"saveBuiltState",
"(",
"PerProjectInfo",
"info",
")",
"throws",
"CoreException",
"{",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"System",
".",
"out",
".",
"println",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"build_saveStateProgress",
",",
"info",
".",
"project",
".",
"getName",
"(",
")",
")",
")",
";",
"File",
"file",
"=",
"getSerializationFile",
"(",
"info",
".",
"project",
")",
";",
"if",
"(",
"file",
"==",
"null",
")",
"return",
";",
"long",
"t",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"try",
"{",
"DataOutputStream",
"out",
"=",
"new",
"DataOutputStream",
"(",
"new",
"BufferedOutputStream",
"(",
"new",
"FileOutputStream",
"(",
"file",
")",
")",
")",
";",
"try",
"{",
"out",
".",
"writeUTF",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"out",
".",
"writeUTF",
"(",
"\"STATE\"",
")",
";",
"if",
"(",
"info",
".",
"savedState",
"==",
"null",
")",
"{",
"out",
".",
"writeBoolean",
"(",
"false",
")",
";",
"}",
"else",
"{",
"out",
".",
"writeBoolean",
"(",
"true",
")",
";",
"JavaBuilder",
".",
"writeState",
"(",
"info",
".",
"savedState",
",",
"out",
")",
";",
"}",
"}",
"finally",
"{",
"out",
".",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"try",
"{",
"file",
".",
"delete",
"(",
")",
";",
"}",
"catch",
"(",
"SecurityException",
"se",
")",
"{",
"}",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"Platform",
".",
"PLUGIN_ERROR",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"build_cannotSaveState",
",",
"info",
".",
"project",
".",
"getName",
"(",
")",
")",
",",
"e",
")",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"try",
"{",
"file",
".",
"delete",
"(",
")",
";",
"}",
"catch",
"(",
"SecurityException",
"se",
")",
"{",
"}",
"throw",
"new",
"CoreException",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"Platform",
".",
"PLUGIN_ERROR",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"build_cannotSaveState",
",",
"info",
".",
"project",
".",
"getName",
"(",
")",
")",
",",
"e",
")",
")",
";",
"}",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"{",
"t",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"t",
";",
"System",
".",
"out",
".",
"println",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"build_saveStateComplete",
",",
"String",
".",
"valueOf",
"(",
"t",
")",
")",
")",
";",
"}",
"}",
"private",
"void",
"saveClasspathListCache",
"(",
"String",
"cacheName",
")",
"throws",
"CoreException",
"{",
"File",
"file",
"=",
"getClasspathListFile",
"(",
"cacheName",
")",
";",
"DataOutputStream",
"out",
"=",
"null",
";",
"try",
"{",
"out",
"=",
"new",
"DataOutputStream",
"(",
"new",
"BufferedOutputStream",
"(",
"new",
"FileOutputStream",
"(",
"file",
")",
")",
")",
";",
"Set",
"pathCache",
"=",
"getClasspathListCache",
"(",
"cacheName",
")",
";",
"synchronized",
"(",
"pathCache",
")",
"{",
"out",
".",
"writeInt",
"(",
"pathCache",
".",
"size",
"(",
")",
")",
";",
"Iterator",
"entries",
"=",
"pathCache",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"IPath",
"path",
"=",
"(",
"IPath",
")",
"entries",
".",
"next",
"(",
")",
";",
"out",
".",
"writeUTF",
"(",
"path",
".",
"toPortableString",
"(",
")",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"IStatus",
"status",
"=",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"IStatus",
".",
"ERROR",
",",
"\"\"",
",",
"e",
")",
";",
"throw",
"new",
"CoreException",
"(",
"status",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"out",
"!=",
"null",
")",
"{",
"try",
"{",
"out",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"}",
"}",
"private",
"void",
"saveVariablesAndContainers",
"(",
"ISaveContext",
"context",
")",
"throws",
"CoreException",
"{",
"File",
"file",
"=",
"getVariableAndContainersFile",
"(",
")",
";",
"DataOutputStream",
"out",
"=",
"null",
";",
"try",
"{",
"out",
"=",
"new",
"DataOutputStream",
"(",
"new",
"BufferedOutputStream",
"(",
"new",
"FileOutputStream",
"(",
"file",
")",
")",
")",
";",
"out",
".",
"writeInt",
"(",
"VARIABLES_AND_CONTAINERS_FILE_VERSION",
")",
";",
"new",
"VariablesAndContainersSaveHelper",
"(",
"out",
")",
".",
"save",
"(",
"context",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"IStatus",
"status",
"=",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"IStatus",
".",
"ERROR",
",",
"\"\"",
",",
"e",
")",
";",
"throw",
"new",
"CoreException",
"(",
"status",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"out",
"!=",
"null",
")",
"{",
"try",
"{",
"out",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"}",
"}",
"private",
"final",
"class",
"VariablesAndContainersSaveHelper",
"{",
"private",
"final",
"HashtableOfObjectToInt",
"classpathEntryIds",
";",
"private",
"final",
"DataOutputStream",
"out",
";",
"private",
"final",
"HashtableOfObjectToInt",
"stringIds",
";",
"VariablesAndContainersSaveHelper",
"(",
"DataOutputStream",
"out",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"classpathEntryIds",
"=",
"new",
"HashtableOfObjectToInt",
"(",
")",
";",
"this",
".",
"out",
"=",
"out",
";",
"this",
".",
"stringIds",
"=",
"new",
"HashtableOfObjectToInt",
"(",
")",
";",
"}",
"void",
"save",
"(",
"ISaveContext",
"context",
")",
"throws",
"IOException",
",",
"JavaModelException",
"{",
"saveProjects",
"(",
"getJavaModel",
"(",
")",
".",
"getJavaProjects",
"(",
")",
")",
";",
"HashMap",
"varsToSave",
"=",
"null",
";",
"Iterator",
"iterator",
"=",
"JavaModelManager",
".",
"this",
".",
"variables",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"IEclipsePreferences",
"defaultPreferences",
"=",
"getDefaultPreferences",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"iterator",
".",
"next",
"(",
")",
";",
"String",
"varName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"if",
"(",
"defaultPreferences",
".",
"get",
"(",
"CP_VARIABLE_PREFERENCES_PREFIX",
"+",
"varName",
",",
"null",
")",
"!=",
"null",
"||",
"CP_ENTRY_IGNORE_PATH",
".",
"equals",
"(",
"entry",
".",
"getValue",
"(",
")",
")",
")",
"{",
"if",
"(",
"varsToSave",
"==",
"null",
")",
"varsToSave",
"=",
"new",
"HashMap",
"(",
"JavaModelManager",
".",
"this",
".",
"variables",
")",
";",
"varsToSave",
".",
"remove",
"(",
"varName",
")",
";",
"}",
"}",
"saveVariables",
"(",
"varsToSave",
"!=",
"null",
"?",
"varsToSave",
":",
"JavaModelManager",
".",
"this",
".",
"variables",
")",
";",
"}",
"private",
"void",
"saveAccessRule",
"(",
"ClasspathAccessRule",
"rule",
")",
"throws",
"IOException",
"{",
"saveInt",
"(",
"rule",
".",
"problemId",
")",
";",
"savePath",
"(",
"rule",
".",
"getPattern",
"(",
")",
")",
";",
"}",
"private",
"void",
"saveAccessRules",
"(",
"IAccessRule",
"[",
"]",
"rules",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"rules",
"==",
"null",
"?",
"0",
":",
"rules",
".",
"length",
";",
"saveInt",
"(",
"count",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"saveAccessRule",
"(",
"(",
"ClasspathAccessRule",
")",
"rules",
"[",
"i",
"]",
")",
";",
"}",
"private",
"void",
"saveAttribute",
"(",
"IClasspathAttribute",
"attribute",
")",
"throws",
"IOException",
"{",
"saveString",
"(",
"attribute",
".",
"getName",
"(",
")",
")",
";",
"saveString",
"(",
"attribute",
".",
"getValue",
"(",
")",
")",
";",
"}",
"private",
"void",
"saveAttributes",
"(",
"IClasspathAttribute",
"[",
"]",
"attributes",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"attributes",
"==",
"null",
"?",
"0",
":",
"attributes",
".",
"length",
";",
"saveInt",
"(",
"count",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"saveAttribute",
"(",
"attributes",
"[",
"i",
"]",
")",
";",
"}",
"private",
"void",
"saveClasspathEntries",
"(",
"IClasspathEntry",
"[",
"]",
"entries",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"entries",
"==",
"null",
"?",
"0",
":",
"entries",
".",
"length",
";",
"saveInt",
"(",
"count",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"saveClasspathEntry",
"(",
"entries",
"[",
"i",
"]",
")",
";",
"}",
"private",
"void",
"saveClasspathEntry",
"(",
"IClasspathEntry",
"entry",
")",
"throws",
"IOException",
"{",
"if",
"(",
"saveNewId",
"(",
"entry",
",",
"this",
".",
"classpathEntryIds",
")",
")",
"{",
"saveInt",
"(",
"entry",
".",
"getContentKind",
"(",
")",
")",
";",
"saveInt",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
")",
";",
"savePath",
"(",
"entry",
".",
"getPath",
"(",
")",
")",
";",
"savePaths",
"(",
"entry",
".",
"getInclusionPatterns",
"(",
")",
")",
";",
"savePaths",
"(",
"entry",
".",
"getExclusionPatterns",
"(",
")",
")",
";",
"savePath",
"(",
"entry",
".",
"getSourceAttachmentPath",
"(",
")",
")",
";",
"savePath",
"(",
"entry",
".",
"getSourceAttachmentRootPath",
"(",
")",
")",
";",
"savePath",
"(",
"entry",
".",
"getOutputLocation",
"(",
")",
")",
";",
"this",
".",
"out",
".",
"writeBoolean",
"(",
"entry",
".",
"isExported",
"(",
")",
")",
";",
"saveAccessRules",
"(",
"entry",
".",
"getAccessRules",
"(",
")",
")",
";",
"this",
".",
"out",
".",
"writeBoolean",
"(",
"entry",
".",
"combineAccessRules",
"(",
")",
")",
";",
"saveAttributes",
"(",
"entry",
".",
"getExtraAttributes",
"(",
")",
")",
";",
"}",
"}",
"private",
"void",
"saveContainers",
"(",
"IJavaProject",
"project",
",",
"Map",
"containerMap",
")",
"throws",
"IOException",
"{",
"saveInt",
"(",
"containerMap",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"Iterator",
"i",
"=",
"containerMap",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"i",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Entry",
"entry",
"=",
"(",
"Entry",
")",
"i",
".",
"next",
"(",
")",
";",
"IPath",
"path",
"=",
"(",
"IPath",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"IClasspathContainer",
"container",
"=",
"(",
"IClasspathContainer",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"IClasspathEntry",
"[",
"]",
"cpEntries",
"=",
"null",
";",
"if",
"(",
"container",
"==",
"null",
")",
"{",
"container",
"=",
"getPreviousSessionContainer",
"(",
"path",
",",
"project",
")",
";",
"}",
"if",
"(",
"container",
"!=",
"null",
")",
"cpEntries",
"=",
"container",
".",
"getClasspathEntries",
"(",
")",
";",
"savePath",
"(",
"path",
")",
";",
"saveClasspathEntries",
"(",
"cpEntries",
")",
";",
"}",
"}",
"private",
"void",
"saveInt",
"(",
"int",
"value",
")",
"throws",
"IOException",
"{",
"this",
".",
"out",
".",
"writeInt",
"(",
"value",
")",
";",
"}",
"private",
"boolean",
"saveNewId",
"(",
"Object",
"key",
",",
"HashtableOfObjectToInt",
"map",
")",
"throws",
"IOException",
"{",
"int",
"id",
"=",
"map",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"id",
"==",
"-",
"1",
")",
"{",
"int",
"newId",
"=",
"map",
".",
"size",
"(",
")",
";",
"map",
".",
"put",
"(",
"key",
",",
"newId",
")",
";",
"saveInt",
"(",
"newId",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"saveInt",
"(",
"id",
")",
";",
"return",
"false",
";",
"}",
"}",
"private",
"void",
"savePath",
"(",
"IPath",
"path",
")",
"throws",
"IOException",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"this",
".",
"out",
".",
"writeBoolean",
"(",
"true",
")",
";",
"}",
"else",
"{",
"this",
".",
"out",
".",
"writeBoolean",
"(",
"false",
")",
";",
"saveString",
"(",
"path",
".",
"toPortableString",
"(",
")",
")",
";",
"}",
"}",
"private",
"void",
"savePaths",
"(",
"IPath",
"[",
"]",
"paths",
")",
"throws",
"IOException",
"{",
"int",
"count",
"=",
"paths",
"==",
"null",
"?",
"0",
":",
"paths",
".",
"length",
";",
"saveInt",
"(",
"count",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"savePath",
"(",
"paths",
"[",
"i",
"]",
")",
";",
"}",
"private",
"void",
"saveProjects",
"(",
"IJavaProject",
"[",
"]",
"projects",
")",
"throws",
"IOException",
",",
"JavaModelException",
"{",
"int",
"count",
"=",
"projects",
".",
"length",
";",
"saveInt",
"(",
"count",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"++",
"i",
")",
"{",
"IJavaProject",
"project",
"=",
"projects",
"[",
"i",
"]",
";",
"saveString",
"(",
"project",
".",
"getElementName",
"(",
")",
")",
";",
"Map",
"containerMap",
"=",
"(",
"Map",
")",
"JavaModelManager",
".",
"this",
".",
"containers",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"containerMap",
"==",
"null",
")",
"{",
"containerMap",
"=",
"Collections",
".",
"EMPTY_MAP",
";",
"}",
"else",
"{",
"containerMap",
"=",
"new",
"HashMap",
"(",
"containerMap",
")",
";",
"}",
"saveContainers",
"(",
"project",
",",
"containerMap",
")",
";",
"}",
"}",
"private",
"void",
"saveString",
"(",
"String",
"string",
")",
"throws",
"IOException",
"{",
"if",
"(",
"saveNewId",
"(",
"string",
",",
"this",
".",
"stringIds",
")",
")",
"this",
".",
"out",
".",
"writeUTF",
"(",
"string",
")",
";",
"}",
"private",
"void",
"saveVariables",
"(",
"Map",
"map",
")",
"throws",
"IOException",
"{",
"saveInt",
"(",
"map",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"Iterator",
"i",
"=",
"map",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"i",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Entry",
"entry",
"=",
"(",
"Entry",
")",
"i",
".",
"next",
"(",
")",
";",
"String",
"varName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"IPath",
"varPath",
"=",
"(",
"IPath",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"saveString",
"(",
"varName",
")",
";",
"savePath",
"(",
"varPath",
")",
";",
"}",
"}",
"}",
"private",
"void",
"traceVariableAndContainers",
"(",
"String",
"action",
",",
"long",
"start",
")",
"{",
"Long",
"delta",
"=",
"new",
"Long",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"start",
")",
";",
"Long",
"length",
"=",
"new",
"Long",
"(",
"getVariableAndContainersFile",
"(",
")",
".",
"length",
"(",
")",
")",
";",
"String",
"pattern",
"=",
"\"\"",
";",
"String",
"message",
"=",
"MessageFormat",
".",
"format",
"(",
"pattern",
",",
"new",
"Object",
"[",
"]",
"{",
"action",
",",
"length",
",",
"delta",
"}",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"message",
")",
";",
"}",
"public",
"void",
"saving",
"(",
"ISaveContext",
"context",
")",
"throws",
"CoreException",
"{",
"long",
"start",
"=",
"-",
"1",
";",
"if",
"(",
"VERBOSE",
")",
"start",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"saveVariablesAndContainers",
"(",
"context",
")",
";",
"if",
"(",
"VERBOSE",
")",
"traceVariableAndContainers",
"(",
"\"Saved\"",
",",
"start",
")",
";",
"switch",
"(",
"context",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"ISaveContext",
".",
"FULL_SAVE",
":",
"{",
"saveClasspathListCache",
"(",
"NON_CHAINING_JARS_CACHE",
")",
";",
"saveClasspathListCache",
"(",
"INVALID_ARCHIVES_CACHE",
")",
";",
"context",
".",
"needDelta",
"(",
")",
";",
"IndexManager",
"manager",
"=",
"this",
".",
"indexManager",
";",
"if",
"(",
"manager",
"!=",
"null",
"&&",
"this",
".",
"workspaceScope",
"!=",
"null",
")",
"{",
"manager",
".",
"cleanUpIndexes",
"(",
")",
";",
"}",
"}",
"case",
"ISaveContext",
".",
"SNAPSHOT",
":",
"{",
"this",
".",
"externalFoldersManager",
".",
"cleanUp",
"(",
"null",
")",
";",
"}",
"}",
"IProject",
"savedProject",
"=",
"context",
".",
"getProject",
"(",
")",
";",
"if",
"(",
"savedProject",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"savedProject",
")",
")",
"return",
";",
"PerProjectInfo",
"info",
"=",
"getPerProjectInfo",
"(",
"savedProject",
",",
"true",
")",
";",
"saveState",
"(",
"info",
",",
"context",
")",
";",
"return",
";",
"}",
"ArrayList",
"vStats",
"=",
"null",
";",
"ArrayList",
"values",
"=",
"null",
";",
"synchronized",
"(",
"this",
".",
"perProjectInfos",
")",
"{",
"values",
"=",
"new",
"ArrayList",
"(",
"this",
".",
"perProjectInfos",
".",
"values",
"(",
")",
")",
";",
"}",
"Iterator",
"iterator",
"=",
"values",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"try",
"{",
"PerProjectInfo",
"info",
"=",
"(",
"PerProjectInfo",
")",
"iterator",
".",
"next",
"(",
")",
";",
"saveState",
"(",
"info",
",",
"context",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"if",
"(",
"vStats",
"==",
"null",
")",
"vStats",
"=",
"new",
"ArrayList",
"(",
")",
";",
"vStats",
".",
"add",
"(",
"e",
".",
"getStatus",
"(",
")",
")",
";",
"}",
"}",
"if",
"(",
"vStats",
"!=",
"null",
")",
"{",
"IStatus",
"[",
"]",
"stats",
"=",
"new",
"IStatus",
"[",
"vStats",
".",
"size",
"(",
")",
"]",
";",
"vStats",
".",
"toArray",
"(",
"stats",
")",
";",
"throw",
"new",
"CoreException",
"(",
"new",
"MultiStatus",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"IStatus",
".",
"ERROR",
",",
"stats",
",",
"Messages",
".",
"build_cannotSaveStates",
",",
"null",
")",
")",
";",
"}",
"this",
".",
"deltaState",
".",
"saveExternalLibTimeStamps",
"(",
")",
";",
"}",
"public",
"void",
"secondaryTypeAdding",
"(",
"String",
"path",
",",
"char",
"[",
"]",
"typeName",
",",
"char",
"[",
"]",
"packageName",
")",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"path",
")",
";",
"buffer",
".",
"append",
"(",
"','",
")",
";",
"buffer",
".",
"append",
"(",
"'['",
")",
";",
"buffer",
".",
"append",
"(",
"new",
"String",
"(",
"packageName",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"new",
"String",
"(",
"typeName",
")",
")",
";",
"buffer",
".",
"append",
"(",
"']'",
")",
";",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"Util",
".",
"verbose",
"(",
"buffer",
".",
"toString",
"(",
")",
")",
";",
"}",
"IWorkspaceRoot",
"wRoot",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
";",
"IResource",
"resource",
"=",
"wRoot",
".",
"findMember",
"(",
"path",
")",
";",
"if",
"(",
"resource",
"!=",
"null",
")",
"{",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"isJavaLikeFileName",
"(",
"path",
")",
"&&",
"resource",
".",
"getType",
"(",
")",
"==",
"IResource",
".",
"FILE",
")",
"{",
"IProject",
"project",
"=",
"resource",
".",
"getProject",
"(",
")",
";",
"try",
"{",
"PerProjectInfo",
"projectInfo",
"=",
"getPerProjectInfoCheckExistence",
"(",
"project",
")",
";",
"HashMap",
"indexedSecondaryTypes",
"=",
"null",
";",
"if",
"(",
"projectInfo",
".",
"secondaryTypes",
"==",
"null",
")",
"{",
"projectInfo",
".",
"secondaryTypes",
"=",
"new",
"Hashtable",
"(",
"3",
")",
";",
"indexedSecondaryTypes",
"=",
"new",
"HashMap",
"(",
"3",
")",
";",
"projectInfo",
".",
"secondaryTypes",
".",
"put",
"(",
"INDEXED_SECONDARY_TYPES",
",",
"indexedSecondaryTypes",
")",
";",
"}",
"else",
"{",
"indexedSecondaryTypes",
"=",
"(",
"HashMap",
")",
"projectInfo",
".",
"secondaryTypes",
".",
"get",
"(",
"INDEXED_SECONDARY_TYPES",
")",
";",
"if",
"(",
"indexedSecondaryTypes",
"==",
"null",
")",
"{",
"indexedSecondaryTypes",
"=",
"new",
"HashMap",
"(",
"3",
")",
";",
"projectInfo",
".",
"secondaryTypes",
".",
"put",
"(",
"INDEXED_SECONDARY_TYPES",
",",
"indexedSecondaryTypes",
")",
";",
"}",
"}",
"HashMap",
"allTypes",
"=",
"(",
"HashMap",
")",
"indexedSecondaryTypes",
".",
"get",
"(",
"resource",
")",
";",
"if",
"(",
"allTypes",
"==",
"null",
")",
"{",
"allTypes",
"=",
"new",
"HashMap",
"(",
"3",
")",
";",
"indexedSecondaryTypes",
".",
"put",
"(",
"resource",
",",
"allTypes",
")",
";",
"}",
"ICompilationUnit",
"unit",
"=",
"JavaModelManager",
".",
"createCompilationUnitFrom",
"(",
"(",
"IFile",
")",
"resource",
",",
"null",
")",
";",
"if",
"(",
"unit",
"!=",
"null",
")",
"{",
"String",
"typeString",
"=",
"new",
"String",
"(",
"typeName",
")",
";",
"IType",
"type",
"=",
"unit",
".",
"getType",
"(",
"typeString",
")",
";",
"String",
"packageString",
"=",
"type",
".",
"getPackageFragment",
"(",
")",
".",
"getElementName",
"(",
")",
";",
"HashMap",
"packageTypes",
"=",
"(",
"HashMap",
")",
"allTypes",
".",
"get",
"(",
"packageString",
")",
";",
"if",
"(",
"packageTypes",
"==",
"null",
")",
"{",
"packageTypes",
"=",
"new",
"HashMap",
"(",
"3",
")",
";",
"allTypes",
".",
"put",
"(",
"packageString",
",",
"packageTypes",
")",
";",
"}",
"packageTypes",
".",
"put",
"(",
"typeString",
",",
"type",
")",
";",
"}",
"if",
"(",
"VERBOSE",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
")",
";",
"Iterator",
"entries",
"=",
"indexedSecondaryTypes",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
".",
"next",
"(",
")",
";",
"IFile",
"file",
"=",
"(",
"IFile",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"Util",
".",
"verbose",
"(",
"\"tt+",
"\"",
"+",
"file",
".",
"getFullPath",
"(",
")",
"+",
"':'",
"+",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"jme",
")",
"{",
"}",
"}",
"}",
"}",
"public",
"Map",
"secondaryTypes",
"(",
"IJavaProject",
"project",
",",
"boolean",
"waitForIndexes",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"project",
".",
"getElementName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"','",
")",
";",
"buffer",
".",
"append",
"(",
"waitForIndexes",
")",
";",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"Util",
".",
"verbose",
"(",
"buffer",
".",
"toString",
"(",
")",
")",
";",
"}",
"final",
"PerProjectInfo",
"projectInfo",
"=",
"getPerProjectInfoCheckExistence",
"(",
"project",
".",
"getProject",
"(",
")",
")",
";",
"Map",
"indexingSecondaryCache",
"=",
"projectInfo",
".",
"secondaryTypes",
"==",
"null",
"?",
"null",
":",
"(",
"Map",
")",
"projectInfo",
".",
"secondaryTypes",
".",
"get",
"(",
"INDEXED_SECONDARY_TYPES",
")",
";",
"if",
"(",
"projectInfo",
".",
"secondaryTypes",
"!=",
"null",
"&&",
"indexingSecondaryCache",
"==",
"null",
")",
"{",
"return",
"projectInfo",
".",
"secondaryTypes",
";",
"}",
"if",
"(",
"projectInfo",
".",
"secondaryTypes",
"==",
"null",
")",
"{",
"return",
"secondaryTypesSearching",
"(",
"project",
",",
"waitForIndexes",
",",
"monitor",
",",
"projectInfo",
")",
";",
"}",
"boolean",
"indexing",
"=",
"this",
".",
"indexManager",
".",
"awaitingJobsCount",
"(",
")",
">",
"0",
";",
"if",
"(",
"indexing",
")",
"{",
"if",
"(",
"!",
"waitForIndexes",
")",
"{",
"return",
"projectInfo",
".",
"secondaryTypes",
";",
"}",
"while",
"(",
"this",
".",
"indexManager",
".",
"awaitingJobsCount",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"monitor",
"!=",
"null",
"&&",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"{",
"return",
"projectInfo",
".",
"secondaryTypes",
";",
"}",
"try",
"{",
"Thread",
".",
"sleep",
"(",
"10",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"return",
"projectInfo",
".",
"secondaryTypes",
";",
"}",
"}",
"}",
"return",
"secondaryTypesMerging",
"(",
"projectInfo",
".",
"secondaryTypes",
")",
";",
"}",
"private",
"Hashtable",
"secondaryTypesMerging",
"(",
"Hashtable",
"secondaryTypes",
")",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
")",
";",
"Util",
".",
"verbose",
"(",
"\"\"",
")",
";",
"Iterator",
"entries",
"=",
"secondaryTypes",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
".",
"next",
"(",
")",
";",
"String",
"packName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"Util",
".",
"verbose",
"(",
"\"tt+",
"\"",
"+",
"packName",
"+",
"':'",
"+",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
"HashMap",
"indexedSecondaryTypes",
"=",
"(",
"HashMap",
")",
"secondaryTypes",
".",
"remove",
"(",
"INDEXED_SECONDARY_TYPES",
")",
";",
"if",
"(",
"indexedSecondaryTypes",
"==",
"null",
")",
"{",
"return",
"secondaryTypes",
";",
"}",
"Iterator",
"entries",
"=",
"indexedSecondaryTypes",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
".",
"next",
"(",
")",
";",
"IFile",
"file",
"=",
"(",
"IFile",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"secondaryTypesRemoving",
"(",
"secondaryTypes",
",",
"file",
")",
";",
"HashMap",
"fileSecondaryTypes",
"=",
"(",
"HashMap",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"Iterator",
"entries2",
"=",
"fileSecondaryTypes",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries2",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry2",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries2",
".",
"next",
"(",
")",
";",
"String",
"packageName",
"=",
"(",
"String",
")",
"entry2",
".",
"getKey",
"(",
")",
";",
"HashMap",
"cachedTypes",
"=",
"(",
"HashMap",
")",
"secondaryTypes",
".",
"get",
"(",
"packageName",
")",
";",
"if",
"(",
"cachedTypes",
"==",
"null",
")",
"{",
"secondaryTypes",
".",
"put",
"(",
"packageName",
",",
"entry2",
".",
"getValue",
"(",
")",
")",
";",
"}",
"else",
"{",
"HashMap",
"types",
"=",
"(",
"HashMap",
")",
"entry2",
".",
"getValue",
"(",
")",
";",
"Iterator",
"entries3",
"=",
"types",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries3",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry3",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries3",
".",
"next",
"(",
")",
";",
"String",
"typeName",
"=",
"(",
"String",
")",
"entry3",
".",
"getKey",
"(",
")",
";",
"cachedTypes",
".",
"put",
"(",
"typeName",
",",
"entry3",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"VERBOSE",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
")",
";",
"entries",
"=",
"secondaryTypes",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
".",
"next",
"(",
")",
";",
"String",
"packName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"Util",
".",
"verbose",
"(",
"\"tt+",
"\"",
"+",
"packName",
"+",
"':'",
"+",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
"return",
"secondaryTypes",
";",
"}",
"private",
"Map",
"secondaryTypesSearching",
"(",
"IJavaProject",
"project",
",",
"boolean",
"waitForIndexes",
",",
"IProgressMonitor",
"monitor",
",",
"final",
"PerProjectInfo",
"projectInfo",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"VERBOSE",
"||",
"BasicSearchEngine",
".",
"VERBOSE",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"project",
".",
"getElementName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"','",
")",
";",
"buffer",
".",
"append",
"(",
"waitForIndexes",
")",
";",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"Util",
".",
"verbose",
"(",
"buffer",
".",
"toString",
"(",
")",
")",
";",
"}",
"final",
"Hashtable",
"secondaryTypes",
"=",
"new",
"Hashtable",
"(",
"3",
")",
";",
"IRestrictedAccessTypeRequestor",
"nameRequestor",
"=",
"new",
"IRestrictedAccessTypeRequestor",
"(",
")",
"{",
"public",
"void",
"acceptType",
"(",
"int",
"modifiers",
",",
"char",
"[",
"]",
"packageName",
",",
"char",
"[",
"]",
"simpleTypeName",
",",
"char",
"[",
"]",
"[",
"]",
"enclosingTypeNames",
",",
"String",
"path",
",",
"AccessRestriction",
"access",
")",
"{",
"String",
"key",
"=",
"packageName",
"==",
"null",
"?",
"\"\"",
":",
"new",
"String",
"(",
"packageName",
")",
";",
"HashMap",
"types",
"=",
"(",
"HashMap",
")",
"secondaryTypes",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"types",
"==",
"null",
")",
"types",
"=",
"new",
"HashMap",
"(",
"3",
")",
";",
"types",
".",
"put",
"(",
"new",
"String",
"(",
"simpleTypeName",
")",
",",
"path",
")",
";",
"secondaryTypes",
".",
"put",
"(",
"key",
",",
"types",
")",
";",
"}",
"}",
";",
"IPackageFragmentRoot",
"[",
"]",
"allRoots",
"=",
"project",
".",
"getAllPackageFragmentRoots",
"(",
")",
";",
"int",
"length",
"=",
"allRoots",
".",
"length",
",",
"size",
"=",
"0",
";",
"IPackageFragmentRoot",
"[",
"]",
"allSourceFolders",
"=",
"new",
"IPackageFragmentRoot",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"allRoots",
"[",
"i",
"]",
".",
"getKind",
"(",
")",
"==",
"IPackageFragmentRoot",
".",
"K_SOURCE",
")",
"{",
"allSourceFolders",
"[",
"size",
"++",
"]",
"=",
"allRoots",
"[",
"i",
"]",
";",
"}",
"}",
"if",
"(",
"size",
"<",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"allSourceFolders",
",",
"0",
",",
"allSourceFolders",
"=",
"new",
"IPackageFragmentRoot",
"[",
"size",
"]",
",",
"0",
",",
"size",
")",
";",
"}",
"new",
"BasicSearchEngine",
"(",
")",
".",
"searchAllSecondaryTypeNames",
"(",
"allSourceFolders",
",",
"nameRequestor",
",",
"waitForIndexes",
",",
"monitor",
")",
";",
"Iterator",
"packages",
"=",
"secondaryTypes",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"packages",
".",
"hasNext",
"(",
")",
")",
"{",
"HashMap",
"types",
"=",
"(",
"HashMap",
")",
"packages",
".",
"next",
"(",
")",
";",
"Iterator",
"names",
"=",
"types",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"names",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"names",
".",
"next",
"(",
")",
";",
"String",
"typeName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"String",
"path",
"=",
"(",
"String",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"isJavaLikeFileName",
"(",
"path",
")",
")",
"{",
"IFile",
"file",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getFile",
"(",
"new",
"Path",
"(",
"path",
")",
")",
";",
"ICompilationUnit",
"unit",
"=",
"JavaModelManager",
".",
"createCompilationUnitFrom",
"(",
"file",
",",
"null",
")",
";",
"IType",
"type",
"=",
"unit",
".",
"getType",
"(",
"typeName",
")",
";",
"types",
".",
"put",
"(",
"typeName",
",",
"type",
")",
";",
"}",
"else",
"{",
"names",
".",
"remove",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"projectInfo",
".",
"secondaryTypes",
"==",
"null",
"||",
"projectInfo",
".",
"secondaryTypes",
".",
"get",
"(",
"INDEXED_SECONDARY_TYPES",
")",
"!=",
"null",
")",
"{",
"projectInfo",
".",
"secondaryTypes",
"=",
"secondaryTypes",
";",
"if",
"(",
"VERBOSE",
"||",
"BasicSearchEngine",
".",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
")",
";",
"Iterator",
"entries",
"=",
"secondaryTypes",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
".",
"next",
"(",
")",
";",
"String",
"qualifiedName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"Util",
".",
"verbose",
"(",
"\"tt-",
"\"",
"+",
"qualifiedName",
"+",
"'-'",
"+",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
"}",
"return",
"projectInfo",
".",
"secondaryTypes",
";",
"}",
"public",
"void",
"secondaryTypesRemoving",
"(",
"IFile",
"file",
",",
"boolean",
"cleanIndexCache",
")",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"file",
".",
"getName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"Util",
".",
"verbose",
"(",
"buffer",
".",
"toString",
"(",
")",
")",
";",
"}",
"if",
"(",
"file",
"!=",
"null",
")",
"{",
"PerProjectInfo",
"projectInfo",
"=",
"getPerProjectInfo",
"(",
"file",
".",
"getProject",
"(",
")",
",",
"false",
")",
";",
"if",
"(",
"projectInfo",
"!=",
"null",
"&&",
"projectInfo",
".",
"secondaryTypes",
"!=",
"null",
")",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"file",
".",
"getProject",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}",
"secondaryTypesRemoving",
"(",
"projectInfo",
".",
"secondaryTypes",
",",
"file",
")",
";",
"HashMap",
"indexingCache",
"=",
"(",
"HashMap",
")",
"projectInfo",
".",
"secondaryTypes",
".",
"get",
"(",
"INDEXED_SECONDARY_TYPES",
")",
";",
"if",
"(",
"!",
"cleanIndexCache",
")",
"{",
"if",
"(",
"indexingCache",
"==",
"null",
")",
"{",
"projectInfo",
".",
"secondaryTypes",
".",
"put",
"(",
"INDEXED_SECONDARY_TYPES",
",",
"new",
"HashMap",
"(",
")",
")",
";",
"}",
"return",
";",
"}",
"if",
"(",
"indexingCache",
"!=",
"null",
")",
"{",
"Set",
"keys",
"=",
"indexingCache",
".",
"keySet",
"(",
")",
";",
"int",
"filesSize",
"=",
"keys",
".",
"size",
"(",
")",
",",
"filesCount",
"=",
"0",
";",
"IFile",
"[",
"]",
"removed",
"=",
"null",
";",
"Iterator",
"cachedFiles",
"=",
"keys",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"cachedFiles",
".",
"hasNext",
"(",
")",
")",
"{",
"IFile",
"cachedFile",
"=",
"(",
"IFile",
")",
"cachedFiles",
".",
"next",
"(",
")",
";",
"if",
"(",
"file",
".",
"equals",
"(",
"cachedFile",
")",
")",
"{",
"if",
"(",
"removed",
"==",
"null",
")",
"removed",
"=",
"new",
"IFile",
"[",
"filesSize",
"]",
";",
"filesSize",
"--",
";",
"removed",
"[",
"filesCount",
"++",
"]",
"=",
"cachedFile",
";",
"}",
"}",
"if",
"(",
"removed",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"filesCount",
";",
"i",
"++",
")",
"{",
"indexingCache",
".",
"remove",
"(",
"removed",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"private",
"void",
"secondaryTypesRemoving",
"(",
"Hashtable",
"secondaryTypesMap",
",",
"IFile",
"file",
")",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"Iterator",
"entries",
"=",
"secondaryTypesMap",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
".",
"next",
"(",
")",
";",
"String",
"qualifiedName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"qualifiedName",
"+",
"':'",
"+",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"','",
")",
";",
"buffer",
".",
"append",
"(",
"file",
".",
"getFullPath",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"Util",
".",
"verbose",
"(",
"buffer",
".",
"toString",
"(",
")",
")",
";",
"}",
"Set",
"packageEntries",
"=",
"secondaryTypesMap",
".",
"entrySet",
"(",
")",
";",
"int",
"packagesSize",
"=",
"packageEntries",
".",
"size",
"(",
")",
",",
"removedPackagesCount",
"=",
"0",
";",
"String",
"[",
"]",
"removedPackages",
"=",
"null",
";",
"Iterator",
"packages",
"=",
"packageEntries",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"packages",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"packages",
".",
"next",
"(",
")",
";",
"String",
"packName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"if",
"(",
"packName",
"!=",
"INDEXED_SECONDARY_TYPES",
")",
"{",
"HashMap",
"types",
"=",
"(",
"HashMap",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"Set",
"nameEntries",
"=",
"types",
".",
"entrySet",
"(",
")",
";",
"int",
"namesSize",
"=",
"nameEntries",
".",
"size",
"(",
")",
",",
"removedNamesCount",
"=",
"0",
";",
"String",
"[",
"]",
"removedNames",
"=",
"null",
";",
"Iterator",
"names",
"=",
"nameEntries",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"names",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry2",
"=",
"(",
"Map",
".",
"Entry",
")",
"names",
".",
"next",
"(",
")",
";",
"String",
"typeName",
"=",
"(",
"String",
")",
"entry2",
".",
"getKey",
"(",
")",
";",
"JavaElement",
"type",
"=",
"(",
"JavaElement",
")",
"entry2",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"file",
".",
"equals",
"(",
"type",
".",
"resource",
"(",
")",
")",
")",
"{",
"if",
"(",
"removedNames",
"==",
"null",
")",
"removedNames",
"=",
"new",
"String",
"[",
"namesSize",
"]",
";",
"namesSize",
"--",
";",
"removedNames",
"[",
"removedNamesCount",
"++",
"]",
"=",
"typeName",
";",
"}",
"}",
"if",
"(",
"removedNames",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"removedNamesCount",
";",
"i",
"++",
")",
"{",
"types",
".",
"remove",
"(",
"removedNames",
"[",
"i",
"]",
")",
";",
"}",
"}",
"if",
"(",
"types",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"if",
"(",
"removedPackages",
"==",
"null",
")",
"removedPackages",
"=",
"new",
"String",
"[",
"packagesSize",
"]",
";",
"packagesSize",
"--",
";",
"removedPackages",
"[",
"removedPackagesCount",
"++",
"]",
"=",
"packName",
";",
"}",
"}",
"}",
"if",
"(",
"removedPackages",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"removedPackagesCount",
";",
"i",
"++",
")",
"{",
"secondaryTypesMap",
".",
"remove",
"(",
"removedPackages",
"[",
"i",
"]",
")",
";",
"}",
"}",
"if",
"(",
"VERBOSE",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
")",
";",
"Iterator",
"entries",
"=",
"secondaryTypesMap",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"entries",
".",
"hasNext",
"(",
")",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
".",
"next",
"(",
")",
";",
"String",
"qualifiedName",
"=",
"(",
"String",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"Util",
".",
"verbose",
"(",
"\"tt+",
"\"",
"+",
"qualifiedName",
"+",
"':'",
"+",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"setBuildOrder",
"(",
"String",
"[",
"]",
"javaBuildOrder",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"!",
"JavaCore",
".",
"COMPUTE",
".",
"equals",
"(",
"JavaCore",
".",
"getOption",
"(",
"JavaCore",
".",
"CORE_JAVA_BUILD_ORDER",
")",
")",
")",
"return",
";",
"if",
"(",
"javaBuildOrder",
"==",
"null",
"||",
"javaBuildOrder",
".",
"length",
"<=",
"1",
")",
"return",
";",
"IWorkspace",
"workspace",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
";",
"IWorkspaceDescription",
"description",
"=",
"workspace",
".",
"getDescription",
"(",
")",
";",
"String",
"[",
"]",
"wksBuildOrder",
"=",
"description",
".",
"getBuildOrder",
"(",
")",
";",
"String",
"[",
"]",
"newOrder",
";",
"if",
"(",
"wksBuildOrder",
"==",
"null",
")",
"{",
"newOrder",
"=",
"javaBuildOrder",
";",
"}",
"else",
"{",
"int",
"javaCount",
"=",
"javaBuildOrder",
".",
"length",
";",
"HashMap",
"newSet",
"=",
"new",
"HashMap",
"(",
"javaCount",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"javaCount",
";",
"i",
"++",
")",
"{",
"newSet",
".",
"put",
"(",
"javaBuildOrder",
"[",
"i",
"]",
",",
"javaBuildOrder",
"[",
"i",
"]",
")",
";",
"}",
"int",
"removed",
"=",
"0",
";",
"int",
"oldCount",
"=",
"wksBuildOrder",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"oldCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"newSet",
".",
"containsKey",
"(",
"wksBuildOrder",
"[",
"i",
"]",
")",
")",
"{",
"wksBuildOrder",
"[",
"i",
"]",
"=",
"null",
";",
"removed",
"++",
";",
"}",
"}",
"newOrder",
"=",
"new",
"String",
"[",
"oldCount",
"-",
"removed",
"+",
"javaCount",
"]",
";",
"System",
".",
"arraycopy",
"(",
"javaBuildOrder",
",",
"0",
",",
"newOrder",
",",
"0",
",",
"javaCount",
")",
";",
"int",
"index",
"=",
"javaCount",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"oldCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"wksBuildOrder",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"newOrder",
"[",
"index",
"++",
"]",
"=",
"wksBuildOrder",
"[",
"i",
"]",
";",
"}",
"}",
"}",
"description",
".",
"setBuildOrder",
"(",
"newOrder",
")",
";",
"try",
"{",
"workspace",
".",
"setDescription",
"(",
"description",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"}",
"public",
"void",
"setLastBuiltState",
"(",
"IProject",
"project",
",",
"Object",
"state",
")",
"{",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"PerProjectInfo",
"info",
"=",
"getPerProjectInfo",
"(",
"project",
",",
"true",
")",
";",
"info",
".",
"triedRead",
"=",
"true",
";",
"info",
".",
"savedState",
"=",
"state",
";",
"}",
"if",
"(",
"state",
"==",
"null",
")",
"{",
"try",
"{",
"File",
"file",
"=",
"getSerializationFile",
"(",
"project",
")",
";",
"if",
"(",
"file",
"!=",
"null",
"&&",
"file",
".",
"exists",
"(",
")",
")",
"file",
".",
"delete",
"(",
")",
";",
"}",
"catch",
"(",
"SecurityException",
"se",
")",
"{",
"}",
"}",
"}",
"public",
"boolean",
"storePreference",
"(",
"String",
"optionName",
",",
"String",
"optionValue",
",",
"IEclipsePreferences",
"eclipsePreferences",
",",
"Map",
"otherOptions",
")",
"{",
"int",
"optionLevel",
"=",
"this",
".",
"getOptionLevel",
"(",
"optionName",
")",
";",
"if",
"(",
"optionLevel",
"==",
"UNKNOWN_OPTION",
")",
"return",
"false",
";",
"switch",
"(",
"optionLevel",
")",
"{",
"case",
"JavaModelManager",
".",
"VALID_OPTION",
":",
"if",
"(",
"optionValue",
"==",
"null",
")",
"{",
"eclipsePreferences",
".",
"remove",
"(",
"optionName",
")",
";",
"}",
"else",
"{",
"eclipsePreferences",
".",
"put",
"(",
"optionName",
",",
"optionValue",
")",
";",
"}",
"break",
";",
"case",
"JavaModelManager",
".",
"DEPRECATED_OPTION",
":",
"eclipsePreferences",
".",
"remove",
"(",
"optionName",
")",
";",
"String",
"[",
"]",
"compatibleOptions",
"=",
"(",
"String",
"[",
"]",
")",
"this",
".",
"deprecatedOptions",
".",
"get",
"(",
"optionName",
")",
";",
"for",
"(",
"int",
"co",
"=",
"0",
",",
"length",
"=",
"compatibleOptions",
".",
"length",
";",
"co",
"<",
"length",
";",
"co",
"++",
")",
"{",
"if",
"(",
"otherOptions",
"!=",
"null",
"&&",
"otherOptions",
".",
"containsKey",
"(",
"compatibleOptions",
"[",
"co",
"]",
")",
")",
"continue",
";",
"if",
"(",
"optionValue",
"==",
"null",
")",
"{",
"eclipsePreferences",
".",
"remove",
"(",
"compatibleOptions",
"[",
"co",
"]",
")",
";",
"}",
"else",
"{",
"eclipsePreferences",
".",
"put",
"(",
"compatibleOptions",
"[",
"co",
"]",
",",
"optionValue",
")",
";",
"}",
"}",
"break",
";",
"default",
":",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"public",
"void",
"setOptions",
"(",
"Hashtable",
"newOptions",
")",
"{",
"Hashtable",
"cachedValue",
"=",
"newOptions",
"==",
"null",
"?",
"null",
":",
"new",
"Hashtable",
"(",
"newOptions",
")",
";",
"IEclipsePreferences",
"defaultPreferences",
"=",
"getDefaultPreferences",
"(",
")",
";",
"IEclipsePreferences",
"instancePreferences",
"=",
"getInstancePreferences",
"(",
")",
";",
"if",
"(",
"newOptions",
"==",
"null",
")",
"{",
"try",
"{",
"instancePreferences",
".",
"clear",
"(",
")",
";",
"}",
"catch",
"(",
"BackingStoreException",
"e",
")",
"{",
"}",
"}",
"else",
"{",
"Enumeration",
"keys",
"=",
"newOptions",
".",
"keys",
"(",
")",
";",
"while",
"(",
"keys",
".",
"hasMoreElements",
"(",
")",
")",
"{",
"String",
"key",
"=",
"(",
"String",
")",
"keys",
".",
"nextElement",
"(",
")",
";",
"int",
"optionLevel",
"=",
"getOptionLevel",
"(",
"key",
")",
";",
"if",
"(",
"optionLevel",
"==",
"UNKNOWN_OPTION",
")",
"continue",
";",
"if",
"(",
"key",
".",
"equals",
"(",
"JavaCore",
".",
"CORE_ENCODING",
")",
")",
"{",
"if",
"(",
"cachedValue",
"!=",
"null",
")",
"{",
"cachedValue",
".",
"put",
"(",
"key",
",",
"JavaCore",
".",
"getEncoding",
"(",
")",
")",
";",
"}",
"continue",
";",
"}",
"String",
"value",
"=",
"(",
"String",
")",
"newOptions",
".",
"get",
"(",
"key",
")",
";",
"String",
"defaultValue",
"=",
"defaultPreferences",
".",
"get",
"(",
"key",
",",
"null",
")",
";",
"if",
"(",
"defaultValue",
"!=",
"null",
"&&",
"defaultValue",
".",
"equals",
"(",
"value",
")",
")",
"{",
"value",
"=",
"null",
";",
"}",
"storePreference",
"(",
"key",
",",
"value",
",",
"instancePreferences",
",",
"newOptions",
")",
";",
"}",
"try",
"{",
"instancePreferences",
".",
"flush",
"(",
")",
";",
"}",
"catch",
"(",
"BackingStoreException",
"e",
")",
"{",
"}",
"}",
"Util",
".",
"fixTaskTags",
"(",
"cachedValue",
")",
";",
"this",
".",
"optionsCache",
"=",
"cachedValue",
";",
"}",
"public",
"void",
"startup",
"(",
")",
"throws",
"CoreException",
"{",
"try",
"{",
"configurePluginDebugOptions",
"(",
")",
";",
"this",
".",
"cache",
"=",
"new",
"JavaModelCache",
"(",
")",
";",
"JavaCore",
".",
"getPlugin",
"(",
")",
".",
"getStateLocation",
"(",
")",
";",
"initializePreferences",
"(",
")",
";",
"this",
".",
"propertyListener",
"=",
"new",
"IEclipsePreferences",
".",
"IPreferenceChangeListener",
"(",
")",
"{",
"public",
"void",
"preferenceChange",
"(",
"PreferenceChangeEvent",
"event",
")",
"{",
"JavaModelManager",
".",
"this",
".",
"optionsCache",
"=",
"null",
";",
"}",
"}",
";",
"InstanceScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
".",
"addPreferenceChangeListener",
"(",
"this",
".",
"propertyListener",
")",
";",
"this",
".",
"resourcesPropertyListener",
"=",
"new",
"IEclipsePreferences",
".",
"IPreferenceChangeListener",
"(",
")",
"{",
"public",
"void",
"preferenceChange",
"(",
"PreferenceChangeEvent",
"event",
")",
"{",
"if",
"(",
"ResourcesPlugin",
".",
"PREF_ENCODING",
".",
"equals",
"(",
"event",
".",
"getKey",
"(",
")",
")",
")",
"{",
"JavaModelManager",
".",
"this",
".",
"optionsCache",
"=",
"null",
";",
"}",
"}",
"}",
";",
"String",
"resourcesPluginId",
"=",
"ResourcesPlugin",
".",
"getPlugin",
"(",
")",
".",
"getBundle",
"(",
")",
".",
"getSymbolicName",
"(",
")",
";",
"InstanceScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"resourcesPluginId",
")",
".",
"addPreferenceChangeListener",
"(",
"this",
".",
"resourcesPropertyListener",
")",
";",
"Platform",
".",
"getContentTypeManager",
"(",
")",
".",
"addContentTypeChangeListener",
"(",
"this",
")",
";",
"long",
"start",
"=",
"-",
"1",
";",
"if",
"(",
"VERBOSE",
")",
"start",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"loadVariablesAndContainers",
"(",
")",
";",
"if",
"(",
"VERBOSE",
")",
"traceVariableAndContainers",
"(",
"\"Loaded\"",
",",
"start",
")",
";",
"this",
".",
"deltaState",
".",
"initializeRootsWithPreviousSession",
"(",
")",
";",
"final",
"IWorkspace",
"workspace",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
";",
"workspace",
".",
"addResourceChangeListener",
"(",
"this",
".",
"deltaState",
",",
"IResourceChangeEvent",
".",
"PRE_BUILD",
"|",
"IResourceChangeEvent",
".",
"POST_BUILD",
"|",
"IResourceChangeEvent",
".",
"POST_CHANGE",
"|",
"IResourceChangeEvent",
".",
"PRE_DELETE",
"|",
"IResourceChangeEvent",
".",
"PRE_CLOSE",
"|",
"IResourceChangeEvent",
".",
"PRE_REFRESH",
")",
";",
"startIndexing",
"(",
")",
";",
"Job",
"processSavedState",
"=",
"new",
"Job",
"(",
"Messages",
".",
"savedState_jobName",
")",
"{",
"protected",
"IStatus",
"run",
"(",
"IProgressMonitor",
"monitor",
")",
"{",
"try",
"{",
"workspace",
".",
"run",
"(",
"new",
"IWorkspaceRunnable",
"(",
")",
"{",
"public",
"void",
"run",
"(",
"IProgressMonitor",
"progress",
")",
"throws",
"CoreException",
"{",
"ISavedState",
"savedState",
"=",
"workspace",
".",
"addSaveParticipant",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"JavaModelManager",
".",
"this",
")",
";",
"if",
"(",
"savedState",
"!=",
"null",
")",
"{",
"JavaModelManager",
".",
"this",
".",
"deltaState",
".",
"getDeltaProcessor",
"(",
")",
".",
"overridenEventType",
"=",
"IResourceChangeEvent",
".",
"POST_CHANGE",
";",
"savedState",
".",
"processResourceChangeEvents",
"(",
"JavaModelManager",
".",
"this",
".",
"deltaState",
")",
";",
"}",
"}",
"}",
",",
"monitor",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"return",
"e",
".",
"getStatus",
"(",
")",
";",
"}",
"return",
"Status",
".",
"OK_STATUS",
";",
"}",
"}",
";",
"processSavedState",
".",
"setSystem",
"(",
"true",
")",
";",
"processSavedState",
".",
"setPriority",
"(",
"Job",
".",
"SHORT",
")",
";",
"processSavedState",
".",
"schedule",
"(",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"shutdown",
"(",
")",
";",
"throw",
"e",
";",
"}",
"}",
"private",
"void",
"startIndexing",
"(",
")",
"{",
"if",
"(",
"this",
".",
"indexManager",
"!=",
"null",
")",
"this",
".",
"indexManager",
".",
"reset",
"(",
")",
";",
"}",
"public",
"void",
"shutdown",
"(",
")",
"{",
"IEclipsePreferences",
"preferences",
"=",
"InstanceScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"try",
"{",
"preferences",
".",
"flush",
"(",
")",
";",
"}",
"catch",
"(",
"BackingStoreException",
"e",
")",
"{",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"IWorkspace",
"workspace",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
";",
"workspace",
".",
"removeResourceChangeListener",
"(",
"this",
".",
"deltaState",
")",
";",
"workspace",
".",
"removeSaveParticipant",
"(",
"JavaCore",
".",
"PLUGIN_ID",
")",
";",
"Platform",
".",
"getContentTypeManager",
"(",
")",
".",
"removeContentTypeChangeListener",
"(",
"this",
")",
";",
"if",
"(",
"this",
".",
"indexManager",
"!=",
"null",
")",
"{",
"this",
".",
"indexManager",
".",
"shutdown",
"(",
")",
";",
"}",
"preferences",
".",
"removePreferenceChangeListener",
"(",
"this",
".",
"propertyListener",
")",
";",
"(",
"(",
"IEclipsePreferences",
")",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
".",
"parent",
"(",
")",
")",
".",
"removeNodeChangeListener",
"(",
"this",
".",
"defaultNodeListener",
")",
";",
"this",
".",
"preferencesLookup",
"[",
"PREF_DEFAULT",
"]",
"=",
"null",
";",
"(",
"(",
"IEclipsePreferences",
")",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
".",
"parent",
"(",
")",
")",
".",
"removeNodeChangeListener",
"(",
"this",
".",
"instanceNodeListener",
")",
";",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
".",
"removePreferenceChangeListener",
"(",
"this",
".",
"instancePreferencesListener",
")",
";",
"this",
".",
"preferencesLookup",
"[",
"PREF_INSTANCE",
"]",
"=",
"null",
";",
"String",
"resourcesPluginId",
"=",
"ResourcesPlugin",
".",
"getPlugin",
"(",
")",
".",
"getBundle",
"(",
")",
".",
"getSymbolicName",
"(",
")",
";",
"InstanceScope",
".",
"INSTANCE",
".",
"getNode",
"(",
"resourcesPluginId",
")",
".",
"removePreferenceChangeListener",
"(",
"this",
".",
"resourcesPropertyListener",
")",
";",
"try",
"{",
"Job",
".",
"getJobManager",
"(",
")",
".",
"join",
"(",
"JavaCore",
".",
"PLUGIN_ID",
",",
"null",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"}",
"}",
"public",
"synchronized",
"IPath",
"variableGet",
"(",
"String",
"variableName",
")",
"{",
"HashSet",
"initializations",
"=",
"variableInitializationInProgress",
"(",
")",
";",
"if",
"(",
"initializations",
".",
"contains",
"(",
"variableName",
")",
")",
"{",
"return",
"VARIABLE_INITIALIZATION_IN_PROGRESS",
";",
"}",
"return",
"(",
"IPath",
")",
"this",
".",
"variables",
".",
"get",
"(",
"variableName",
")",
";",
"}",
"private",
"synchronized",
"IPath",
"variableGetDefaultToPreviousSession",
"(",
"String",
"variableName",
")",
"{",
"IPath",
"variablePath",
"=",
"(",
"IPath",
")",
"this",
".",
"variables",
".",
"get",
"(",
"variableName",
")",
";",
"if",
"(",
"variablePath",
"==",
"null",
")",
"return",
"getPreviousSessionVariable",
"(",
"variableName",
")",
";",
"return",
"variablePath",
";",
"}",
"private",
"HashSet",
"variableInitializationInProgress",
"(",
")",
"{",
"HashSet",
"initializations",
"=",
"(",
"HashSet",
")",
"this",
".",
"variableInitializationInProgress",
".",
"get",
"(",
")",
";",
"if",
"(",
"initializations",
"==",
"null",
")",
"{",
"initializations",
"=",
"new",
"HashSet",
"(",
")",
";",
"this",
".",
"variableInitializationInProgress",
".",
"set",
"(",
"initializations",
")",
";",
"}",
"return",
"initializations",
";",
"}",
"public",
"synchronized",
"String",
"[",
"]",
"variableNames",
"(",
")",
"{",
"int",
"length",
"=",
"this",
".",
"variables",
".",
"size",
"(",
")",
";",
"String",
"[",
"]",
"result",
"=",
"new",
"String",
"[",
"length",
"]",
";",
"Iterator",
"vars",
"=",
"this",
".",
"variables",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"int",
"index",
"=",
"0",
";",
"while",
"(",
"vars",
".",
"hasNext",
"(",
")",
")",
"{",
"result",
"[",
"index",
"++",
"]",
"=",
"(",
"String",
")",
"vars",
".",
"next",
"(",
")",
";",
"}",
"return",
"result",
";",
"}",
"public",
"synchronized",
"void",
"variablePut",
"(",
"String",
"variableName",
",",
"IPath",
"variablePath",
")",
"{",
"HashSet",
"initializations",
"=",
"variableInitializationInProgress",
"(",
")",
";",
"if",
"(",
"variablePath",
"==",
"VARIABLE_INITIALIZATION_IN_PROGRESS",
")",
"{",
"initializations",
".",
"add",
"(",
"variableName",
")",
";",
"return",
";",
"}",
"else",
"{",
"initializations",
".",
"remove",
"(",
"variableName",
")",
";",
"if",
"(",
"variablePath",
"==",
"null",
")",
"{",
"this",
".",
"variables",
".",
"put",
"(",
"variableName",
",",
"CP_ENTRY_IGNORE_PATH",
")",
";",
"this",
".",
"variablesWithInitializer",
".",
"remove",
"(",
"variableName",
")",
";",
"this",
".",
"deprecatedVariables",
".",
"remove",
"(",
"variableName",
")",
";",
"}",
"else",
"{",
"this",
".",
"variables",
".",
"put",
"(",
"variableName",
",",
"variablePath",
")",
";",
"}",
"this",
".",
"previousSessionVariables",
".",
"remove",
"(",
"variableName",
")",
";",
"}",
"}",
"public",
"void",
"variablePreferencesPut",
"(",
"String",
"variableName",
",",
"IPath",
"variablePath",
")",
"{",
"String",
"variableKey",
"=",
"CP_VARIABLE_PREFERENCES_PREFIX",
"+",
"variableName",
";",
"if",
"(",
"variablePath",
"==",
"null",
")",
"{",
"getInstancePreferences",
"(",
")",
".",
"remove",
"(",
"variableKey",
")",
";",
"}",
"else",
"{",
"getInstancePreferences",
"(",
")",
".",
"put",
"(",
"variableKey",
",",
"variablePath",
".",
"toString",
"(",
")",
")",
";",
"}",
"try",
"{",
"getInstancePreferences",
"(",
")",
".",
"flush",
"(",
")",
";",
"}",
"catch",
"(",
"BackingStoreException",
"e",
")",
"{",
"}",
"}",
"public",
"boolean",
"variablePutIfInitializingWithSameValue",
"(",
"String",
"[",
"]",
"variableNames",
",",
"IPath",
"[",
"]",
"variablePaths",
")",
"{",
"if",
"(",
"variableNames",
".",
"length",
"!=",
"1",
")",
"return",
"false",
";",
"String",
"variableName",
"=",
"variableNames",
"[",
"0",
"]",
";",
"IPath",
"oldPath",
"=",
"variableGetDefaultToPreviousSession",
"(",
"variableName",
")",
";",
"if",
"(",
"oldPath",
"==",
"null",
")",
"return",
"false",
";",
"IPath",
"newPath",
"=",
"variablePaths",
"[",
"0",
"]",
";",
"if",
"(",
"!",
"oldPath",
".",
"equals",
"(",
"newPath",
")",
")",
"return",
"false",
";",
"variablePut",
"(",
"variableName",
",",
"newPath",
")",
";",
"return",
"true",
";",
"}",
"public",
"void",
"contentTypeChanged",
"(",
"ContentTypeChangeEvent",
"event",
")",
"{",
"Util",
".",
"resetJavaLikeExtensions",
"(",
")",
";",
"IJavaProject",
"[",
"]",
"projects",
";",
"try",
"{",
"projects",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getJavaModel",
"(",
")",
".",
"getJavaProjects",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"projects",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IJavaProject",
"project",
"=",
"projects",
"[",
"i",
"]",
";",
"final",
"PerProjectInfo",
"projectInfo",
"=",
"getPerProjectInfo",
"(",
"project",
".",
"getProject",
"(",
")",
",",
"false",
")",
";",
"if",
"(",
"projectInfo",
"!=",
"null",
")",
"{",
"projectInfo",
".",
"secondaryTypes",
"=",
"null",
";",
"}",
"}",
"}",
"public",
"synchronized",
"String",
"cacheToString",
"(",
"String",
"prefix",
")",
"{",
"return",
"this",
".",
"cache",
".",
"toStringFillingRation",
"(",
"prefix",
")",
";",
"}",
"public",
"Stats",
"debugNewOpenableCacheStats",
"(",
")",
"{",
"return",
"this",
".",
"cache",
".",
"openableCache",
".",
"new",
"Stats",
"(",
")",
";",
"}",
"public",
"int",
"getOpenableCacheSize",
"(",
")",
"{",
"return",
"this",
".",
"cache",
".",
"openableCache",
".",
"getSpaceLimit",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,816 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Signature",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"ISourceField",
";",
"public",
"class",
"SourceFieldElementInfo",
"extends",
"AnnotatableInfo",
"implements",
"ISourceField",
"{",
"protected",
"char",
"[",
"]",
"typeName",
";",
"protected",
"char",
"[",
"]",
"initializationSource",
";",
"public",
"char",
"[",
"]",
"getInitializationSource",
"(",
")",
"{",
"return",
"this",
".",
"initializationSource",
";",
"}",
"public",
"char",
"[",
"]",
"getTypeName",
"(",
")",
"{",
"return",
"this",
".",
"typeName",
";",
"}",
"protected",
"String",
"getTypeSignature",
"(",
")",
"{",
"return",
"Signature",
".",
"createTypeSignature",
"(",
"this",
".",
"typeName",
",",
"false",
")",
";",
"}",
"protected",
"void",
"setTypeName",
"(",
"char",
"[",
"]",
"typeName",
")",
"{",
"this",
".",
"typeName",
"=",
"typeName",
";",
"}",
"}",
"</s>"
] |
2,817 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"import",
"org",
".",
"codehaus",
".",
"jdt",
".",
"groovy",
".",
"integration",
".",
"LanguageSupportFactory",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"CoreException",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IPath",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Path",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"jobs",
".",
"ISchedulingRule",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"jobs",
".",
"MultiRule",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AST",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTParser",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AbstractTypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Javadoc",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Name",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PackageDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SimpleName",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ASTRewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"SuffixConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"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",
";",
"public",
"class",
"CopyResourceElementsOperation",
"extends",
"MultiOperation",
"implements",
"SuffixConstants",
"{",
"protected",
"ArrayList",
"createdElements",
";",
"protected",
"Map",
"deltasPerProject",
"=",
"new",
"HashMap",
"(",
"1",
")",
";",
"protected",
"ASTParser",
"parser",
";",
"public",
"CopyResourceElementsOperation",
"(",
"IJavaElement",
"[",
"]",
"resourcesToCopy",
",",
"IJavaElement",
"[",
"]",
"destContainers",
",",
"boolean",
"force",
")",
"{",
"super",
"(",
"resourcesToCopy",
",",
"destContainers",
",",
"force",
")",
";",
"initializeASTParser",
"(",
")",
";",
"}",
"private",
"void",
"initializeASTParser",
"(",
")",
"{",
"this",
".",
"parser",
"=",
"ASTParser",
".",
"newParser",
"(",
"AST",
".",
"JLS4",
")",
";",
"}",
"private",
"IResource",
"[",
"]",
"collectResourcesOfInterest",
"(",
"IPackageFragment",
"source",
")",
"throws",
"JavaModelException",
"{",
"IJavaElement",
"[",
"]",
"children",
"=",
"source",
".",
"getChildren",
"(",
")",
";",
"int",
"childOfInterest",
"=",
"IJavaElement",
".",
"COMPILATION_UNIT",
";",
"if",
"(",
"source",
".",
"getKind",
"(",
")",
"==",
"IPackageFragmentRoot",
".",
"K_BINARY",
")",
"{",
"childOfInterest",
"=",
"IJavaElement",
".",
"CLASS_FILE",
";",
"}",
"ArrayList",
"correctKindChildren",
"=",
"new",
"ArrayList",
"(",
"children",
".",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
")",
"{",
"IJavaElement",
"child",
"=",
"children",
"[",
"i",
"]",
";",
"if",
"(",
"child",
".",
"getElementType",
"(",
")",
"==",
"childOfInterest",
")",
"{",
"correctKindChildren",
".",
"add",
"(",
"(",
"(",
"JavaElement",
")",
"child",
")",
".",
"resource",
"(",
")",
")",
";",
"}",
"}",
"Object",
"[",
"]",
"nonJavaResources",
"=",
"source",
".",
"getNonJavaResources",
"(",
")",
";",
"int",
"actualNonJavaResourceCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"nonJavaResources",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"nonJavaResources",
"[",
"i",
"]",
"instanceof",
"IResource",
")",
"actualNonJavaResourceCount",
"++",
";",
"}",
"IResource",
"[",
"]",
"actualNonJavaResources",
"=",
"new",
"IResource",
"[",
"actualNonJavaResourceCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"nonJavaResources",
".",
"length",
",",
"index",
"=",
"0",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"nonJavaResources",
"[",
"i",
"]",
"instanceof",
"IResource",
")",
"actualNonJavaResources",
"[",
"index",
"++",
"]",
"=",
"(",
"IResource",
")",
"nonJavaResources",
"[",
"i",
"]",
";",
"}",
"if",
"(",
"actualNonJavaResourceCount",
"!=",
"0",
")",
"{",
"int",
"correctKindChildrenSize",
"=",
"correctKindChildren",
".",
"size",
"(",
")",
";",
"IResource",
"[",
"]",
"result",
"=",
"new",
"IResource",
"[",
"correctKindChildrenSize",
"+",
"actualNonJavaResourceCount",
"]",
";",
"correctKindChildren",
".",
"toArray",
"(",
"result",
")",
";",
"System",
".",
"arraycopy",
"(",
"actualNonJavaResources",
",",
"0",
",",
"result",
",",
"correctKindChildrenSize",
",",
"actualNonJavaResourceCount",
")",
";",
"return",
"result",
";",
"}",
"else",
"{",
"IResource",
"[",
"]",
"result",
"=",
"new",
"IResource",
"[",
"correctKindChildren",
".",
"size",
"(",
")",
"]",
";",
"correctKindChildren",
".",
"toArray",
"(",
"result",
")",
";",
"return",
"result",
";",
"}",
"}",
"private",
"boolean",
"createNeededPackageFragments",
"(",
"IContainer",
"sourceFolder",
",",
"PackageFragmentRoot",
"root",
",",
"String",
"[",
"]",
"newFragName",
",",
"boolean",
"moveFolder",
")",
"throws",
"JavaModelException",
"{",
"boolean",
"containsReadOnlyPackageFragment",
"=",
"false",
";",
"IContainer",
"parentFolder",
"=",
"(",
"IContainer",
")",
"root",
".",
"resource",
"(",
")",
";",
"JavaElementDelta",
"projectDelta",
"=",
"null",
";",
"String",
"[",
"]",
"sideEffectPackageName",
"=",
"null",
";",
"char",
"[",
"]",
"[",
"]",
"inclusionPatterns",
"=",
"root",
".",
"fullInclusionPatternChars",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"exclusionPatterns",
"=",
"root",
".",
"fullExclusionPatternChars",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"newFragName",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"subFolderName",
"=",
"newFragName",
"[",
"i",
"]",
";",
"sideEffectPackageName",
"=",
"Util",
".",
"arrayConcat",
"(",
"sideEffectPackageName",
",",
"subFolderName",
")",
";",
"IResource",
"subFolder",
"=",
"parentFolder",
".",
"findMember",
"(",
"subFolderName",
")",
";",
"if",
"(",
"subFolder",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"(",
"moveFolder",
"&&",
"i",
"==",
"newFragName",
".",
"length",
"-",
"1",
")",
")",
"{",
"createFolder",
"(",
"parentFolder",
",",
"subFolderName",
",",
"this",
".",
"force",
")",
";",
"}",
"parentFolder",
"=",
"parentFolder",
".",
"getFolder",
"(",
"new",
"Path",
"(",
"subFolderName",
")",
")",
";",
"sourceFolder",
"=",
"sourceFolder",
".",
"getFolder",
"(",
"new",
"Path",
"(",
"subFolderName",
")",
")",
";",
"if",
"(",
"Util",
".",
"isReadOnly",
"(",
"sourceFolder",
")",
")",
"{",
"containsReadOnlyPackageFragment",
"=",
"true",
";",
"}",
"IPackageFragment",
"sideEffectPackage",
"=",
"root",
".",
"getPackageFragment",
"(",
"sideEffectPackageName",
")",
";",
"if",
"(",
"i",
"<",
"newFragName",
".",
"length",
"-",
"1",
"&&",
"!",
"Util",
".",
"isExcluded",
"(",
"parentFolder",
",",
"inclusionPatterns",
",",
"exclusionPatterns",
")",
")",
"{",
"if",
"(",
"projectDelta",
"==",
"null",
")",
"{",
"projectDelta",
"=",
"getDeltaFor",
"(",
"root",
".",
"getJavaProject",
"(",
")",
")",
";",
"}",
"projectDelta",
".",
"added",
"(",
"sideEffectPackage",
")",
";",
"}",
"this",
".",
"createdElements",
".",
"add",
"(",
"sideEffectPackage",
")",
";",
"}",
"else",
"{",
"parentFolder",
"=",
"(",
"IContainer",
")",
"subFolder",
";",
"}",
"}",
"return",
"containsReadOnlyPackageFragment",
";",
"}",
"private",
"JavaElementDelta",
"getDeltaFor",
"(",
"IJavaProject",
"javaProject",
")",
"{",
"JavaElementDelta",
"delta",
"=",
"(",
"JavaElementDelta",
")",
"this",
".",
"deltasPerProject",
".",
"get",
"(",
"javaProject",
")",
";",
"if",
"(",
"delta",
"==",
"null",
")",
"{",
"delta",
"=",
"new",
"JavaElementDelta",
"(",
"javaProject",
")",
";",
"this",
".",
"deltasPerProject",
".",
"put",
"(",
"javaProject",
",",
"delta",
")",
";",
"}",
"return",
"delta",
";",
"}",
"protected",
"String",
"getMainTaskName",
"(",
")",
"{",
"return",
"Messages",
".",
"operation_copyResourceProgress",
";",
"}",
"protected",
"ISchedulingRule",
"getSchedulingRule",
"(",
")",
"{",
"if",
"(",
"this",
".",
"elementsToProcess",
"==",
"null",
")",
"return",
"null",
";",
"int",
"length",
"=",
"this",
".",
"elementsToProcess",
".",
"length",
";",
"if",
"(",
"length",
"==",
"1",
")",
"return",
"getSchedulingRule",
"(",
"this",
".",
"elementsToProcess",
"[",
"0",
"]",
")",
";",
"ISchedulingRule",
"[",
"]",
"rules",
"=",
"new",
"ISchedulingRule",
"[",
"length",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ISchedulingRule",
"rule",
"=",
"getSchedulingRule",
"(",
"this",
".",
"elementsToProcess",
"[",
"i",
"]",
")",
";",
"if",
"(",
"rule",
"!=",
"null",
")",
"{",
"rules",
"[",
"index",
"++",
"]",
"=",
"rule",
";",
"}",
"}",
"if",
"(",
"index",
"!=",
"length",
")",
"System",
".",
"arraycopy",
"(",
"rules",
",",
"0",
",",
"rules",
"=",
"new",
"ISchedulingRule",
"[",
"index",
"]",
",",
"0",
",",
"index",
")",
";",
"return",
"new",
"MultiRule",
"(",
"rules",
")",
";",
"}",
"private",
"ISchedulingRule",
"getSchedulingRule",
"(",
"IJavaElement",
"element",
")",
"{",
"if",
"(",
"element",
"==",
"null",
")",
"return",
"null",
";",
"IResource",
"sourceResource",
"=",
"getResource",
"(",
"element",
")",
";",
"IResource",
"destContainer",
"=",
"getResource",
"(",
"getDestinationParent",
"(",
"element",
")",
")",
";",
"if",
"(",
"!",
"(",
"destContainer",
"instanceof",
"IContainer",
")",
")",
"{",
"return",
"null",
";",
"}",
"String",
"newName",
";",
"try",
"{",
"newName",
"=",
"getNewNameFor",
"(",
"element",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"newName",
"==",
"null",
")",
"newName",
"=",
"element",
".",
"getElementName",
"(",
")",
";",
"IResource",
"destResource",
";",
"String",
"sourceEncoding",
"=",
"null",
";",
"if",
"(",
"sourceResource",
".",
"getType",
"(",
")",
"==",
"IResource",
".",
"FILE",
")",
"{",
"destResource",
"=",
"(",
"(",
"IContainer",
")",
"destContainer",
")",
".",
"getFile",
"(",
"new",
"Path",
"(",
"newName",
")",
")",
";",
"try",
"{",
"sourceEncoding",
"=",
"(",
"(",
"IFile",
")",
"sourceResource",
")",
".",
"getCharset",
"(",
"false",
")",
";",
"}",
"catch",
"(",
"CoreException",
"ce",
")",
"{",
"}",
"}",
"else",
"{",
"destResource",
"=",
"(",
"(",
"IContainer",
")",
"destContainer",
")",
".",
"getFolder",
"(",
"new",
"Path",
"(",
"newName",
")",
")",
";",
"}",
"IResourceRuleFactory",
"factory",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRuleFactory",
"(",
")",
";",
"ISchedulingRule",
"rule",
";",
"if",
"(",
"isMove",
"(",
")",
")",
"{",
"rule",
"=",
"factory",
".",
"moveRule",
"(",
"sourceResource",
",",
"destResource",
")",
";",
"}",
"else",
"{",
"rule",
"=",
"factory",
".",
"copyRule",
"(",
"sourceResource",
",",
"destResource",
")",
";",
"}",
"if",
"(",
"sourceEncoding",
"!=",
"null",
")",
"{",
"rule",
"=",
"new",
"MultiRule",
"(",
"new",
"ISchedulingRule",
"[",
"]",
"{",
"rule",
",",
"factory",
".",
"charsetRule",
"(",
"destResource",
")",
"}",
")",
";",
"}",
"return",
"rule",
";",
"}",
"private",
"IResource",
"getResource",
"(",
"IJavaElement",
"element",
")",
"{",
"if",
"(",
"element",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"element",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
")",
"{",
"String",
"pkgName",
"=",
"element",
".",
"getElementName",
"(",
")",
";",
"int",
"firstDot",
"=",
"pkgName",
".",
"indexOf",
"(",
"'.'",
")",
";",
"if",
"(",
"firstDot",
"!=",
"-",
"1",
")",
"{",
"element",
"=",
"(",
"(",
"IPackageFragmentRoot",
")",
"element",
".",
"getParent",
"(",
")",
")",
".",
"getPackageFragment",
"(",
"pkgName",
".",
"substring",
"(",
"0",
",",
"firstDot",
")",
")",
";",
"}",
"}",
"return",
"element",
".",
"getResource",
"(",
")",
";",
"}",
"protected",
"void",
"prepareDeltas",
"(",
"IJavaElement",
"sourceElement",
",",
"IJavaElement",
"destinationElement",
",",
"boolean",
"isMove",
",",
"boolean",
"overWriteCU",
")",
"{",
"if",
"(",
"Util",
".",
"isExcluded",
"(",
"sourceElement",
")",
"||",
"Util",
".",
"isExcluded",
"(",
"destinationElement",
")",
")",
"return",
";",
"IJavaProject",
"destProject",
"=",
"destinationElement",
".",
"getJavaProject",
"(",
")",
";",
"if",
"(",
"isMove",
")",
"{",
"IJavaProject",
"sourceProject",
"=",
"sourceElement",
".",
"getJavaProject",
"(",
")",
";",
"getDeltaFor",
"(",
"sourceProject",
")",
".",
"movedFrom",
"(",
"sourceElement",
",",
"destinationElement",
")",
";",
"if",
"(",
"!",
"overWriteCU",
")",
"{",
"getDeltaFor",
"(",
"destProject",
")",
".",
"movedTo",
"(",
"destinationElement",
",",
"sourceElement",
")",
";",
"return",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"!",
"overWriteCU",
")",
"{",
"getDeltaFor",
"(",
"destProject",
")",
".",
"added",
"(",
"destinationElement",
")",
";",
"return",
";",
"}",
"}",
"getDeltaFor",
"(",
"destinationElement",
".",
"getJavaProject",
"(",
")",
")",
".",
"changed",
"(",
"destinationElement",
",",
"IJavaElementDelta",
".",
"F_CONTENT",
")",
";",
"}",
"private",
"void",
"processCompilationUnitResource",
"(",
"ICompilationUnit",
"source",
",",
"PackageFragment",
"dest",
")",
"throws",
"JavaModelException",
"{",
"String",
"newCUName",
"=",
"getNewNameFor",
"(",
"source",
")",
";",
"String",
"destName",
"=",
"(",
"newCUName",
"!=",
"null",
")",
"?",
"newCUName",
":",
"source",
".",
"getElementName",
"(",
")",
";",
"TextEdit",
"edit",
"=",
"updateContent",
"(",
"source",
",",
"dest",
",",
"newCUName",
")",
";",
"IFile",
"sourceResource",
"=",
"(",
"IFile",
")",
"source",
".",
"getResource",
"(",
")",
";",
"String",
"sourceEncoding",
"=",
"null",
";",
"try",
"{",
"sourceEncoding",
"=",
"sourceResource",
".",
"getCharset",
"(",
"false",
")",
";",
"}",
"catch",
"(",
"CoreException",
"ce",
")",
"{",
"}",
"IContainer",
"destFolder",
"=",
"(",
"IContainer",
")",
"dest",
".",
"getResource",
"(",
")",
";",
"IFile",
"destFile",
"=",
"destFolder",
".",
"getFile",
"(",
"new",
"Path",
"(",
"destName",
")",
")",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"CompilationUnit",
"destCU",
"=",
"LanguageSupportFactory",
".",
"newCompilationUnit",
"(",
"dest",
",",
"destName",
",",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
")",
";",
"if",
"(",
"!",
"destFile",
".",
"equals",
"(",
"sourceResource",
")",
")",
"{",
"try",
"{",
"if",
"(",
"!",
"destCU",
".",
"isWorkingCopy",
"(",
")",
")",
"{",
"if",
"(",
"destFile",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"this",
".",
"force",
")",
"{",
"deleteResource",
"(",
"destFile",
",",
"IResource",
".",
"KEEP_HISTORY",
")",
";",
"destCU",
".",
"close",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"status_nameCollision",
",",
"destFile",
".",
"getFullPath",
"(",
")",
".",
"toString",
"(",
")",
")",
")",
")",
";",
"}",
"}",
"int",
"flags",
"=",
"this",
".",
"force",
"?",
"IResource",
".",
"FORCE",
":",
"IResource",
".",
"NONE",
";",
"if",
"(",
"isMove",
"(",
")",
")",
"{",
"flags",
"|=",
"IResource",
".",
"KEEP_HISTORY",
";",
"sourceResource",
".",
"move",
"(",
"destFile",
".",
"getFullPath",
"(",
")",
",",
"flags",
",",
"getSubProgressMonitor",
"(",
"1",
")",
")",
";",
"}",
"else",
"{",
"if",
"(",
"edit",
"!=",
"null",
")",
"flags",
"|=",
"IResource",
".",
"KEEP_HISTORY",
";",
"sourceResource",
".",
"copy",
"(",
"destFile",
".",
"getFullPath",
"(",
")",
",",
"flags",
",",
"getSubProgressMonitor",
"(",
"1",
")",
")",
";",
"}",
"setAttribute",
"(",
"HAS_MODIFIED_RESOURCE_ATTR",
",",
"TRUE",
")",
";",
"}",
"else",
"{",
"destCU",
".",
"getBuffer",
"(",
")",
".",
"setContents",
"(",
"source",
".",
"getBuffer",
"(",
")",
".",
"getContents",
"(",
")",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"throw",
"e",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"if",
"(",
"edit",
"!=",
"null",
")",
"{",
"boolean",
"wasReadOnly",
"=",
"destFile",
".",
"isReadOnly",
"(",
")",
";",
"try",
"{",
"saveContent",
"(",
"dest",
",",
"destName",
",",
"edit",
",",
"sourceEncoding",
",",
"destFile",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"if",
"(",
"e",
"instanceof",
"JavaModelException",
")",
"throw",
"(",
"JavaModelException",
")",
"e",
";",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"finally",
"{",
"Util",
".",
"setReadOnly",
"(",
"destFile",
",",
"wasReadOnly",
")",
";",
"}",
"}",
"boolean",
"contentChanged",
"=",
"this",
".",
"force",
"&&",
"destFile",
".",
"exists",
"(",
")",
";",
"prepareDeltas",
"(",
"source",
",",
"destCU",
",",
"isMove",
"(",
")",
",",
"contentChanged",
")",
";",
"if",
"(",
"newCUName",
"!=",
"null",
")",
"{",
"String",
"oldName",
"=",
"Util",
".",
"getNameWithoutJavaLikeExtension",
"(",
"source",
".",
"getElementName",
"(",
")",
")",
";",
"String",
"newName",
"=",
"Util",
".",
"getNameWithoutJavaLikeExtension",
"(",
"newCUName",
")",
";",
"prepareDeltas",
"(",
"source",
".",
"getType",
"(",
"oldName",
")",
",",
"destCU",
".",
"getType",
"(",
"newName",
")",
",",
"isMove",
"(",
")",
",",
"false",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"!",
"this",
".",
"force",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"status_nameCollision",
",",
"destFile",
".",
"getFullPath",
"(",
")",
".",
"toString",
"(",
")",
")",
")",
")",
";",
"}",
"if",
"(",
"edit",
"!=",
"null",
")",
"{",
"saveContent",
"(",
"dest",
",",
"destName",
",",
"edit",
",",
"sourceEncoding",
",",
"destFile",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"processDeltas",
"(",
")",
"{",
"for",
"(",
"Iterator",
"deltas",
"=",
"this",
".",
"deltasPerProject",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"deltas",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"addDelta",
"(",
"(",
"IJavaElementDelta",
")",
"deltas",
".",
"next",
"(",
")",
")",
";",
"}",
"}",
"protected",
"void",
"processElement",
"(",
"IJavaElement",
"element",
")",
"throws",
"JavaModelException",
"{",
"IJavaElement",
"dest",
"=",
"getDestinationParent",
"(",
"element",
")",
";",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"processCompilationUnitResource",
"(",
"(",
"ICompilationUnit",
")",
"element",
",",
"(",
"PackageFragment",
")",
"dest",
")",
";",
"this",
".",
"createdElements",
".",
"add",
"(",
"(",
"(",
"IPackageFragment",
")",
"dest",
")",
".",
"getCompilationUnit",
"(",
"element",
".",
"getElementName",
"(",
")",
")",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"processPackageFragmentResource",
"(",
"(",
"PackageFragment",
")",
"element",
",",
"(",
"PackageFragmentRoot",
")",
"dest",
",",
"getNewNameFor",
"(",
"element",
")",
")",
";",
"break",
";",
"default",
":",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_ELEMENT_TYPES",
",",
"element",
")",
")",
";",
"}",
"}",
"protected",
"void",
"processElements",
"(",
")",
"throws",
"JavaModelException",
"{",
"this",
".",
"createdElements",
"=",
"new",
"ArrayList",
"(",
"this",
".",
"elementsToProcess",
".",
"length",
")",
";",
"try",
"{",
"super",
".",
"processElements",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"jme",
")",
"{",
"throw",
"jme",
";",
"}",
"finally",
"{",
"this",
".",
"resultElements",
"=",
"new",
"IJavaElement",
"[",
"this",
".",
"createdElements",
".",
"size",
"(",
")",
"]",
";",
"this",
".",
"createdElements",
".",
"toArray",
"(",
"this",
".",
"resultElements",
")",
";",
"processDeltas",
"(",
")",
";",
"}",
"}",
"private",
"void",
"processPackageFragmentResource",
"(",
"PackageFragment",
"source",
",",
"PackageFragmentRoot",
"root",
",",
"String",
"newName",
")",
"throws",
"JavaModelException",
"{",
"try",
"{",
"String",
"[",
"]",
"newFragName",
"=",
"(",
"newName",
"==",
"null",
")",
"?",
"source",
".",
"names",
":",
"Util",
".",
"getTrimmedSimpleNames",
"(",
"newName",
")",
";",
"PackageFragment",
"newFrag",
"=",
"root",
".",
"getPackageFragment",
"(",
"newFragName",
")",
";",
"IResource",
"[",
"]",
"resources",
"=",
"collectResourcesOfInterest",
"(",
"source",
")",
";",
"boolean",
"shouldMoveFolder",
"=",
"isMove",
"(",
")",
"&&",
"!",
"newFrag",
".",
"resource",
"(",
")",
".",
"exists",
"(",
")",
";",
"IFolder",
"srcFolder",
"=",
"(",
"IFolder",
")",
"source",
".",
"resource",
"(",
")",
";",
"IPath",
"destPath",
"=",
"newFrag",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"shouldMoveFolder",
")",
"{",
"if",
"(",
"srcFolder",
".",
"getFullPath",
"(",
")",
".",
"isPrefixOf",
"(",
"destPath",
")",
")",
"{",
"shouldMoveFolder",
"=",
"false",
";",
"}",
"else",
"{",
"IResource",
"[",
"]",
"members",
"=",
"srcFolder",
".",
"members",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"members",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"members",
"[",
"i",
"]",
"instanceof",
"IFolder",
")",
"{",
"shouldMoveFolder",
"=",
"false",
";",
"break",
";",
"}",
"}",
"}",
"}",
"boolean",
"containsReadOnlySubPackageFragments",
"=",
"createNeededPackageFragments",
"(",
"(",
"IContainer",
")",
"source",
".",
"parent",
".",
"resource",
"(",
")",
",",
"root",
",",
"newFragName",
",",
"shouldMoveFolder",
")",
";",
"boolean",
"sourceIsReadOnly",
"=",
"Util",
".",
"isReadOnly",
"(",
"srcFolder",
")",
";",
"if",
"(",
"shouldMoveFolder",
")",
"{",
"if",
"(",
"sourceIsReadOnly",
")",
"{",
"Util",
".",
"setReadOnly",
"(",
"srcFolder",
",",
"false",
")",
";",
"}",
"srcFolder",
".",
"move",
"(",
"destPath",
",",
"this",
".",
"force",
",",
"true",
",",
"getSubProgressMonitor",
"(",
"1",
")",
")",
";",
"if",
"(",
"sourceIsReadOnly",
")",
"{",
"Util",
".",
"setReadOnly",
"(",
"srcFolder",
",",
"true",
")",
";",
"}",
"setAttribute",
"(",
"HAS_MODIFIED_RESOURCE_ATTR",
",",
"TRUE",
")",
";",
"}",
"else",
"{",
"if",
"(",
"resources",
".",
"length",
">",
"0",
")",
"{",
"if",
"(",
"isRename",
"(",
")",
")",
"{",
"if",
"(",
"!",
"destPath",
".",
"equals",
"(",
"source",
".",
"getPath",
"(",
")",
")",
")",
"{",
"moveResources",
"(",
"resources",
",",
"destPath",
")",
";",
"}",
"}",
"else",
"if",
"(",
"isMove",
"(",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"resources",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"IResource",
"destinationResource",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"findMember",
"(",
"destPath",
".",
"append",
"(",
"resources",
"[",
"i",
"]",
".",
"getName",
"(",
")",
")",
")",
";",
"if",
"(",
"destinationResource",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"force",
")",
"{",
"deleteResource",
"(",
"destinationResource",
",",
"IResource",
".",
"KEEP_HISTORY",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"status_nameCollision",
",",
"destinationResource",
".",
"getFullPath",
"(",
")",
".",
"toString",
"(",
")",
")",
")",
")",
";",
"}",
"}",
"}",
"moveResources",
"(",
"resources",
",",
"destPath",
")",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"resources",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"IResource",
"destinationResource",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"findMember",
"(",
"destPath",
".",
"append",
"(",
"resources",
"[",
"i",
"]",
".",
"getName",
"(",
")",
")",
")",
";",
"if",
"(",
"destinationResource",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"force",
")",
"{",
"deleteResource",
"(",
"destinationResource",
",",
"IResource",
".",
"KEEP_HISTORY",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"status_nameCollision",
",",
"destinationResource",
".",
"getFullPath",
"(",
")",
".",
"toString",
"(",
")",
")",
")",
")",
";",
"}",
"}",
"}",
"copyResources",
"(",
"resources",
",",
"destPath",
")",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"Util",
".",
"equalArraysOrNull",
"(",
"newFragName",
",",
"source",
".",
"names",
")",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"inclusionPatterns",
"=",
"root",
".",
"fullInclusionPatternChars",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"exclusionPatterns",
"=",
"root",
".",
"fullExclusionPatternChars",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"resources",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"resourceName",
"=",
"resources",
"[",
"i",
"]",
".",
"getName",
"(",
")",
";",
"if",
"(",
"Util",
".",
"isJavaLikeFileName",
"(",
"resourceName",
")",
")",
"{",
"ICompilationUnit",
"cu",
"=",
"newFrag",
".",
"getCompilationUnit",
"(",
"resourceName",
")",
";",
"if",
"(",
"Util",
".",
"isExcluded",
"(",
"cu",
".",
"getPath",
"(",
")",
",",
"inclusionPatterns",
",",
"exclusionPatterns",
",",
"false",
")",
")",
"continue",
";",
"this",
".",
"parser",
".",
"setSource",
"(",
"cu",
")",
";",
"CompilationUnit",
"astCU",
"=",
"(",
"CompilationUnit",
")",
"this",
".",
"parser",
".",
"createAST",
"(",
"this",
".",
"progressMonitor",
")",
";",
"AST",
"ast",
"=",
"astCU",
".",
"getAST",
"(",
")",
";",
"ASTRewrite",
"rewrite",
"=",
"ASTRewrite",
".",
"create",
"(",
"ast",
")",
";",
"updatePackageStatement",
"(",
"astCU",
",",
"newFragName",
",",
"rewrite",
",",
"cu",
")",
";",
"TextEdit",
"edits",
"=",
"rewrite",
".",
"rewriteAST",
"(",
")",
";",
"applyTextEdit",
"(",
"cu",
",",
"edits",
")",
";",
"cu",
".",
"save",
"(",
"null",
",",
"false",
")",
";",
"}",
"}",
"}",
"boolean",
"isEmpty",
"=",
"true",
";",
"if",
"(",
"isMove",
"(",
")",
")",
"{",
"updateReadOnlyPackageFragmentsForMove",
"(",
"(",
"IContainer",
")",
"source",
".",
"parent",
".",
"resource",
"(",
")",
",",
"root",
",",
"newFragName",
",",
"sourceIsReadOnly",
")",
";",
"if",
"(",
"srcFolder",
".",
"exists",
"(",
")",
")",
"{",
"IResource",
"[",
"]",
"remaining",
"=",
"srcFolder",
".",
"members",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"remaining",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IResource",
"file",
"=",
"remaining",
"[",
"i",
"]",
";",
"if",
"(",
"file",
"instanceof",
"IFile",
")",
"{",
"if",
"(",
"Util",
".",
"isReadOnly",
"(",
"file",
")",
")",
"{",
"Util",
".",
"setReadOnly",
"(",
"file",
",",
"false",
")",
";",
"}",
"deleteResource",
"(",
"file",
",",
"IResource",
".",
"FORCE",
"|",
"IResource",
".",
"KEEP_HISTORY",
")",
";",
"}",
"else",
"{",
"isEmpty",
"=",
"false",
";",
"}",
"}",
"}",
"if",
"(",
"isEmpty",
")",
"{",
"IResource",
"rootResource",
";",
"if",
"(",
"destPath",
".",
"isPrefixOf",
"(",
"srcFolder",
".",
"getFullPath",
"(",
")",
")",
")",
"{",
"rootResource",
"=",
"newFrag",
".",
"resource",
"(",
")",
";",
"}",
"else",
"{",
"rootResource",
"=",
"source",
".",
"parent",
".",
"resource",
"(",
")",
";",
"}",
"deleteEmptyPackageFragment",
"(",
"source",
",",
"false",
",",
"rootResource",
")",
";",
"}",
"}",
"else",
"if",
"(",
"containsReadOnlySubPackageFragments",
")",
"{",
"updateReadOnlyPackageFragmentsForCopy",
"(",
"(",
"IContainer",
")",
"source",
".",
"parent",
".",
"resource",
"(",
")",
",",
"root",
",",
"newFragName",
")",
";",
"}",
"if",
"(",
"isEmpty",
"&&",
"isMove",
"(",
")",
"&&",
"!",
"(",
"Util",
".",
"isExcluded",
"(",
"source",
")",
"||",
"Util",
".",
"isExcluded",
"(",
"newFrag",
")",
")",
")",
"{",
"IJavaProject",
"sourceProject",
"=",
"source",
".",
"getJavaProject",
"(",
")",
";",
"getDeltaFor",
"(",
"sourceProject",
")",
".",
"movedFrom",
"(",
"source",
",",
"newFrag",
")",
";",
"IJavaProject",
"destProject",
"=",
"newFrag",
".",
"getJavaProject",
"(",
")",
";",
"getDeltaFor",
"(",
"destProject",
")",
".",
"movedTo",
"(",
"newFrag",
",",
"source",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"throw",
"e",
";",
"}",
"catch",
"(",
"CoreException",
"ce",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"ce",
")",
";",
"}",
"}",
"private",
"void",
"saveContent",
"(",
"PackageFragment",
"dest",
",",
"String",
"destName",
",",
"TextEdit",
"edits",
",",
"String",
"sourceEncoding",
",",
"IFile",
"destFile",
")",
"throws",
"JavaModelException",
"{",
"try",
"{",
"if",
"(",
"sourceEncoding",
"!=",
"null",
")",
"destFile",
".",
"setCharset",
"(",
"sourceEncoding",
",",
"this",
".",
"progressMonitor",
")",
";",
"}",
"catch",
"(",
"CoreException",
"ce",
")",
"{",
"}",
"Util",
".",
"setReadOnly",
"(",
"destFile",
",",
"false",
")",
";",
"ICompilationUnit",
"destCU",
"=",
"dest",
".",
"getCompilationUnit",
"(",
"destName",
")",
";",
"applyTextEdit",
"(",
"destCU",
",",
"edits",
")",
";",
"destCU",
".",
"save",
"(",
"getSubProgressMonitor",
"(",
"1",
")",
",",
"this",
".",
"force",
")",
";",
"}",
"private",
"TextEdit",
"updateContent",
"(",
"ICompilationUnit",
"cu",
",",
"PackageFragment",
"dest",
",",
"String",
"newName",
")",
"throws",
"JavaModelException",
"{",
"String",
"[",
"]",
"currPackageName",
"=",
"(",
"(",
"PackageFragment",
")",
"cu",
".",
"getParent",
"(",
")",
")",
".",
"names",
";",
"String",
"[",
"]",
"destPackageName",
"=",
"dest",
".",
"names",
";",
"if",
"(",
"Util",
".",
"equalArraysOrNull",
"(",
"currPackageName",
",",
"destPackageName",
")",
"&&",
"newName",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"cu",
".",
"makeConsistent",
"(",
"this",
".",
"progressMonitor",
")",
";",
"if",
"(",
"LanguageSupportFactory",
".",
"isInterestingSourceFile",
"(",
"cu",
".",
"getElementName",
"(",
")",
")",
")",
"{",
"return",
"updateNonJavaContent",
"(",
"cu",
",",
"destPackageName",
",",
"currPackageName",
",",
"newName",
")",
";",
"}",
"this",
".",
"parser",
".",
"setSource",
"(",
"cu",
")",
";",
"CompilationUnit",
"astCU",
"=",
"(",
"CompilationUnit",
")",
"this",
".",
"parser",
".",
"createAST",
"(",
"this",
".",
"progressMonitor",
")",
";",
"AST",
"ast",
"=",
"astCU",
".",
"getAST",
"(",
")",
";",
"ASTRewrite",
"rewrite",
"=",
"ASTRewrite",
".",
"create",
"(",
"ast",
")",
";",
"updateTypeName",
"(",
"cu",
",",
"astCU",
",",
"cu",
".",
"getElementName",
"(",
")",
",",
"newName",
",",
"rewrite",
")",
";",
"updatePackageStatement",
"(",
"astCU",
",",
"destPackageName",
",",
"rewrite",
",",
"cu",
")",
";",
"return",
"rewrite",
".",
"rewriteAST",
"(",
")",
";",
"}",
"}",
"private",
"TextEdit",
"updateNonJavaContent",
"(",
"ICompilationUnit",
"cu",
",",
"String",
"[",
"]",
"destPackageName",
",",
"String",
"[",
"]",
"currPackageName",
",",
"String",
"newName",
")",
"throws",
"JavaModelException",
"{",
"IPackageDeclaration",
"[",
"]",
"packageDecls",
"=",
"cu",
".",
"getPackageDeclarations",
"(",
")",
";",
"boolean",
"doPackage",
"=",
"!",
"Util",
".",
"equalArraysOrNull",
"(",
"currPackageName",
",",
"destPackageName",
")",
";",
"boolean",
"doName",
"=",
"newName",
"!=",
"null",
";",
"MultiTextEdit",
"multiEdit",
"=",
"new",
"MultiTextEdit",
"(",
")",
";",
"if",
"(",
"doPackage",
")",
"{",
"if",
"(",
"packageDecls",
".",
"length",
"==",
"1",
")",
"{",
"ISourceRange",
"packageRange",
"=",
"packageDecls",
"[",
"0",
"]",
".",
"getSourceRange",
"(",
")",
";",
"if",
"(",
"destPackageName",
"==",
"null",
"||",
"destPackageName",
".",
"length",
"==",
"0",
")",
"{",
"multiEdit",
".",
"addChild",
"(",
"new",
"DeleteEdit",
"(",
"packageRange",
".",
"getOffset",
"(",
")",
",",
"packageRange",
".",
"getLength",
"(",
")",
")",
")",
";",
"}",
"else",
"{",
"multiEdit",
".",
"addChild",
"(",
"new",
"ReplaceEdit",
"(",
"packageRange",
".",
"getOffset",
"(",
")",
",",
"packageRange",
".",
"getLength",
"(",
")",
",",
"\"package",
"\"",
"+",
"Util",
".",
"concatWith",
"(",
"destPackageName",
",",
"'.'",
")",
")",
")",
";",
"}",
"}",
"else",
"{",
"multiEdit",
".",
"addChild",
"(",
"new",
"InsertEdit",
"(",
"0",
",",
"\"package",
"\"",
"+",
"Util",
".",
"concatWith",
"(",
"destPackageName",
",",
"'.'",
")",
"+",
"\"n\"",
")",
")",
";",
"}",
"}",
"if",
"(",
"doName",
")",
"{",
"int",
"dotIndex",
"=",
"cu",
".",
"getElementName",
"(",
")",
".",
"indexOf",
"(",
"'.'",
")",
";",
"dotIndex",
"=",
"dotIndex",
"==",
"-",
"1",
"?",
"cu",
".",
"getElementName",
"(",
")",
".",
"length",
"(",
")",
":",
"dotIndex",
";",
"String",
"oldTypeName",
"=",
"cu",
".",
"getElementName",
"(",
")",
".",
"substring",
"(",
"0",
",",
"dotIndex",
")",
";",
"dotIndex",
"=",
"newName",
".",
"indexOf",
"(",
"'.'",
")",
";",
"dotIndex",
"=",
"dotIndex",
"==",
"-",
"1",
"?",
"newName",
".",
"length",
"(",
")",
":",
"dotIndex",
";",
"String",
"newTypeName",
"=",
"newName",
".",
"substring",
"(",
"0",
",",
"dotIndex",
")",
";",
"IType",
"type",
"=",
"cu",
".",
"getType",
"(",
"oldTypeName",
")",
";",
"if",
"(",
"type",
".",
"exists",
"(",
")",
")",
"{",
"ISourceRange",
"nameRange",
"=",
"type",
".",
"getNameRange",
"(",
")",
";",
"if",
"(",
"nameRange",
".",
"getOffset",
"(",
")",
">",
"0",
"&&",
"nameRange",
".",
"getLength",
"(",
")",
">",
"0",
"&&",
"oldTypeName",
".",
"length",
"(",
")",
"==",
"nameRange",
".",
"getLength",
"(",
")",
")",
"{",
"multiEdit",
".",
"addChild",
"(",
"new",
"ReplaceEdit",
"(",
"nameRange",
".",
"getOffset",
"(",
")",
",",
"nameRange",
".",
"getLength",
"(",
")",
",",
"newTypeName",
")",
")",
";",
"}",
"IJavaElement",
"[",
"]",
"children",
"=",
"type",
".",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"children",
"[",
"i",
"]",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"METHOD",
")",
"{",
"IMethod",
"method",
"=",
"(",
"IMethod",
")",
"children",
"[",
"i",
"]",
";",
"if",
"(",
"method",
".",
"isConstructor",
"(",
")",
")",
"{",
"nameRange",
"=",
"method",
".",
"getNameRange",
"(",
")",
";",
"if",
"(",
"nameRange",
".",
"getOffset",
"(",
")",
">",
"0",
"&&",
"nameRange",
".",
"getLength",
"(",
")",
">",
"0",
")",
"{",
"multiEdit",
".",
"addChild",
"(",
"new",
"ReplaceEdit",
"(",
"nameRange",
".",
"getOffset",
"(",
")",
",",
"nameRange",
".",
"getLength",
"(",
")",
",",
"newTypeName",
")",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"return",
"multiEdit",
";",
"}",
"private",
"void",
"updatePackageStatement",
"(",
"CompilationUnit",
"astCU",
",",
"String",
"[",
"]",
"pkgName",
",",
"ASTRewrite",
"rewriter",
",",
"ICompilationUnit",
"cu",
")",
"throws",
"JavaModelException",
"{",
"boolean",
"defaultPackage",
"=",
"pkgName",
".",
"length",
"==",
"0",
";",
"AST",
"ast",
"=",
"astCU",
".",
"getAST",
"(",
")",
";",
"if",
"(",
"defaultPackage",
")",
"{",
"PackageDeclaration",
"pkg",
"=",
"astCU",
".",
"getPackage",
"(",
")",
";",
"if",
"(",
"pkg",
"!=",
"null",
")",
"{",
"int",
"pkgStart",
";",
"Javadoc",
"javadoc",
"=",
"pkg",
".",
"getJavadoc",
"(",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"pkgStart",
"=",
"javadoc",
".",
"getStartPosition",
"(",
")",
"+",
"javadoc",
".",
"getLength",
"(",
")",
"+",
"1",
";",
"}",
"else",
"{",
"pkgStart",
"=",
"pkg",
".",
"getStartPosition",
"(",
")",
";",
"}",
"int",
"extendedStart",
"=",
"astCU",
".",
"getExtendedStartPosition",
"(",
"pkg",
")",
";",
"if",
"(",
"pkgStart",
"!=",
"extendedStart",
")",
"{",
"String",
"commentSource",
"=",
"cu",
".",
"getSource",
"(",
")",
".",
"substring",
"(",
"extendedStart",
",",
"pkgStart",
")",
";",
"ASTNode",
"comment",
"=",
"rewriter",
".",
"createStringPlaceholder",
"(",
"commentSource",
",",
"ASTNode",
".",
"PACKAGE_DECLARATION",
")",
";",
"rewriter",
".",
"set",
"(",
"astCU",
",",
"CompilationUnit",
".",
"PACKAGE_PROPERTY",
",",
"comment",
",",
"null",
")",
";",
"}",
"else",
"{",
"rewriter",
".",
"set",
"(",
"astCU",
",",
"CompilationUnit",
".",
"PACKAGE_PROPERTY",
",",
"null",
",",
"null",
")",
";",
"}",
"}",
"}",
"else",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PackageDeclaration",
"pkg",
"=",
"astCU",
".",
"getPackage",
"(",
")",
";",
"if",
"(",
"pkg",
"!=",
"null",
")",
"{",
"Name",
"name",
"=",
"ast",
".",
"newName",
"(",
"pkgName",
")",
";",
"rewriter",
".",
"set",
"(",
"pkg",
",",
"PackageDeclaration",
".",
"NAME_PROPERTY",
",",
"name",
",",
"null",
")",
";",
"}",
"else",
"{",
"pkg",
"=",
"ast",
".",
"newPackageDeclaration",
"(",
")",
";",
"pkg",
".",
"setName",
"(",
"ast",
".",
"newName",
"(",
"pkgName",
")",
")",
";",
"rewriter",
".",
"set",
"(",
"astCU",
",",
"CompilationUnit",
".",
"PACKAGE_PROPERTY",
",",
"pkg",
",",
"null",
")",
";",
"}",
"}",
"}",
"private",
"void",
"updateReadOnlyPackageFragmentsForCopy",
"(",
"IContainer",
"sourceFolder",
",",
"PackageFragmentRoot",
"root",
",",
"String",
"[",
"]",
"newFragName",
")",
"{",
"IContainer",
"parentFolder",
"=",
"(",
"IContainer",
")",
"root",
".",
"resource",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"newFragName",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"String",
"subFolderName",
"=",
"newFragName",
"[",
"i",
"]",
";",
"parentFolder",
"=",
"parentFolder",
".",
"getFolder",
"(",
"new",
"Path",
"(",
"subFolderName",
")",
")",
";",
"sourceFolder",
"=",
"sourceFolder",
".",
"getFolder",
"(",
"new",
"Path",
"(",
"subFolderName",
")",
")",
";",
"if",
"(",
"sourceFolder",
".",
"exists",
"(",
")",
"&&",
"Util",
".",
"isReadOnly",
"(",
"sourceFolder",
")",
")",
"{",
"Util",
".",
"setReadOnly",
"(",
"parentFolder",
",",
"true",
")",
";",
"}",
"}",
"}",
"private",
"void",
"updateReadOnlyPackageFragmentsForMove",
"(",
"IContainer",
"sourceFolder",
",",
"PackageFragmentRoot",
"root",
",",
"String",
"[",
"]",
"newFragName",
",",
"boolean",
"sourceFolderIsReadOnly",
")",
"{",
"IContainer",
"parentFolder",
"=",
"(",
"IContainer",
")",
"root",
".",
"resource",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"newFragName",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"String",
"subFolderName",
"=",
"newFragName",
"[",
"i",
"]",
";",
"parentFolder",
"=",
"parentFolder",
".",
"getFolder",
"(",
"new",
"Path",
"(",
"subFolderName",
")",
")",
";",
"sourceFolder",
"=",
"sourceFolder",
".",
"getFolder",
"(",
"new",
"Path",
"(",
"subFolderName",
")",
")",
";",
"if",
"(",
"(",
"sourceFolder",
".",
"exists",
"(",
")",
"&&",
"Util",
".",
"isReadOnly",
"(",
"sourceFolder",
")",
")",
"||",
"(",
"i",
"==",
"length",
"-",
"1",
"&&",
"sourceFolderIsReadOnly",
")",
")",
"{",
"Util",
".",
"setReadOnly",
"(",
"parentFolder",
",",
"true",
")",
";",
"Util",
".",
"setReadOnly",
"(",
"sourceFolder",
",",
"false",
")",
";",
"}",
"}",
"}",
"private",
"void",
"updateTypeName",
"(",
"ICompilationUnit",
"cu",
",",
"CompilationUnit",
"astCU",
",",
"String",
"oldName",
",",
"String",
"newName",
",",
"ASTRewrite",
"rewriter",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"newName",
"!=",
"null",
")",
"{",
"String",
"oldTypeName",
"=",
"Util",
".",
"getNameWithoutJavaLikeExtension",
"(",
"oldName",
")",
";",
"String",
"newTypeName",
"=",
"Util",
".",
"getNameWithoutJavaLikeExtension",
"(",
"newName",
")",
";",
"AST",
"ast",
"=",
"astCU",
".",
"getAST",
"(",
")",
";",
"IType",
"[",
"]",
"types",
"=",
"cu",
".",
"getTypes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"types",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"IType",
"currentType",
"=",
"types",
"[",
"i",
"]",
";",
"if",
"(",
"currentType",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"oldTypeName",
")",
")",
"{",
"AbstractTypeDeclaration",
"typeNode",
"=",
"(",
"AbstractTypeDeclaration",
")",
"(",
"(",
"JavaElement",
")",
"currentType",
")",
".",
"findNode",
"(",
"astCU",
")",
";",
"if",
"(",
"typeNode",
"!=",
"null",
")",
"{",
"rewriter",
".",
"replace",
"(",
"typeNode",
".",
"getName",
"(",
")",
",",
"ast",
".",
"newSimpleName",
"(",
"newTypeName",
")",
",",
"null",
")",
";",
"Iterator",
"bodyDeclarations",
"=",
"typeNode",
".",
"bodyDeclarations",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"bodyDeclarations",
".",
"hasNext",
"(",
")",
")",
"{",
"Object",
"bodyDeclaration",
"=",
"bodyDeclarations",
".",
"next",
"(",
")",
";",
"if",
"(",
"bodyDeclaration",
"instanceof",
"MethodDeclaration",
")",
"{",
"MethodDeclaration",
"methodDeclaration",
"=",
"(",
"MethodDeclaration",
")",
"bodyDeclaration",
";",
"if",
"(",
"methodDeclaration",
".",
"isConstructor",
"(",
")",
")",
"{",
"SimpleName",
"methodName",
"=",
"methodDeclaration",
".",
"getName",
"(",
")",
";",
"if",
"(",
"methodName",
".",
"getIdentifier",
"(",
")",
".",
"equals",
"(",
"oldTypeName",
")",
")",
"{",
"rewriter",
".",
"replace",
"(",
"methodName",
",",
"ast",
".",
"newSimpleName",
"(",
"newTypeName",
")",
",",
"null",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"}",
"}",
"}",
"protected",
"IJavaModelStatus",
"verify",
"(",
")",
"{",
"IJavaModelStatus",
"status",
"=",
"super",
".",
"verify",
"(",
")",
";",
"if",
"(",
"!",
"status",
".",
"isOK",
"(",
")",
")",
"{",
"return",
"status",
";",
"}",
"if",
"(",
"this",
".",
"renamingsList",
"!=",
"null",
"&&",
"this",
".",
"renamingsList",
".",
"length",
"!=",
"this",
".",
"elementsToProcess",
".",
"length",
")",
"{",
"return",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INDEX_OUT_OF_BOUNDS",
")",
";",
"}",
"return",
"JavaModelStatus",
".",
"VERIFIED_OK",
";",
"}",
"protected",
"void",
"verify",
"(",
"IJavaElement",
"element",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"element",
"==",
"null",
"||",
"!",
"element",
".",
"exists",
"(",
")",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"ELEMENT_DOES_NOT_EXIST",
",",
"element",
")",
";",
"if",
"(",
"element",
".",
"isReadOnly",
"(",
")",
"&&",
"(",
"isRename",
"(",
")",
"||",
"isMove",
"(",
")",
")",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"READ_ONLY",
",",
"element",
")",
";",
"IResource",
"resource",
"=",
"(",
"(",
"JavaElement",
")",
"element",
")",
".",
"resource",
"(",
")",
";",
"if",
"(",
"resource",
"instanceof",
"IFolder",
")",
"{",
"if",
"(",
"resource",
".",
"isLinked",
"(",
")",
")",
"{",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_RESOURCE",
",",
"element",
")",
";",
"}",
"}",
"int",
"elementType",
"=",
"element",
".",
"getElementType",
"(",
")",
";",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"COMPILATION_UNIT",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"CompilationUnit",
"compilationUnit",
"=",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"CompilationUnit",
")",
"element",
";",
"if",
"(",
"isMove",
"(",
")",
"&&",
"compilationUnit",
".",
"isWorkingCopy",
"(",
")",
"&&",
"!",
"compilationUnit",
".",
"isPrimary",
"(",
")",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_ELEMENT_TYPES",
",",
"element",
")",
";",
"}",
"else",
"if",
"(",
"elementType",
"!=",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
")",
"{",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_ELEMENT_TYPES",
",",
"element",
")",
";",
"}",
"JavaElement",
"dest",
"=",
"(",
"JavaElement",
")",
"getDestinationParent",
"(",
"element",
")",
";",
"verifyDestination",
"(",
"element",
",",
"dest",
")",
";",
"if",
"(",
"this",
".",
"renamings",
"!=",
"null",
")",
"{",
"verifyRenaming",
"(",
"element",
")",
";",
"}",
"}",
"}",
"</s>"
] |
2,818 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Assert",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"public",
"class",
"ImportDeclaration",
"extends",
"SourceRefElement",
"implements",
"IImportDeclaration",
"{",
"protected",
"String",
"name",
";",
"protected",
"boolean",
"isOnDemand",
";",
"protected",
"ImportDeclaration",
"(",
"ImportContainer",
"parent",
",",
"String",
"name",
",",
"boolean",
"isOnDemand",
")",
"{",
"super",
"(",
"parent",
")",
";",
"this",
".",
"name",
"=",
"name",
";",
"this",
".",
"isOnDemand",
"=",
"isOnDemand",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"ImportDeclaration",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"equals",
"(",
"o",
")",
";",
"}",
"public",
"String",
"getElementName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"isOnDemand",
")",
"return",
"this",
".",
"name",
"+",
"\".*\"",
";",
"return",
"this",
".",
"name",
";",
"}",
"public",
"String",
"getNameWithoutStar",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"IMPORT_DECLARATION",
";",
"}",
"public",
"int",
"getFlags",
"(",
")",
"throws",
"JavaModelException",
"{",
"ImportDeclarationElementInfo",
"info",
"=",
"(",
"ImportDeclarationElementInfo",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"getModifiers",
"(",
")",
";",
"}",
"protected",
"void",
"getHandleMemento",
"(",
"StringBuffer",
"buff",
")",
"{",
"(",
"(",
"JavaElement",
")",
"getParent",
"(",
")",
")",
".",
"getHandleMemento",
"(",
"buff",
")",
";",
"escapeMementoName",
"(",
"buff",
",",
"getElementName",
"(",
")",
")",
";",
"if",
"(",
"this",
".",
"occurrenceCount",
">",
"1",
")",
"{",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"occurrenceCount",
")",
";",
"}",
"}",
"protected",
"char",
"getHandleMementoDelimiter",
"(",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"false",
",",
"\"\"",
")",
";",
"return",
"0",
";",
"}",
"public",
"ISourceRange",
"getNameRange",
"(",
")",
"throws",
"JavaModelException",
"{",
"ImportDeclarationElementInfo",
"info",
"=",
"(",
"ImportDeclarationElementInfo",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"getNameRange",
"(",
")",
";",
"}",
"public",
"IJavaElement",
"getPrimaryElement",
"(",
"boolean",
"checkOwner",
")",
"{",
"CompilationUnit",
"cu",
"=",
"(",
"CompilationUnit",
")",
"this",
".",
"parent",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"checkOwner",
"&&",
"cu",
".",
"isPrimary",
"(",
")",
")",
"return",
"this",
";",
"return",
"cu",
".",
"getImport",
"(",
"getElementName",
"(",
")",
")",
";",
"}",
"public",
"boolean",
"isOnDemand",
"(",
")",
"{",
"return",
"this",
".",
"isOnDemand",
";",
"}",
"public",
"String",
"readableName",
"(",
")",
"{",
"return",
"null",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"tabString",
"(",
"tab",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"import",
"\"",
")",
";",
"toStringName",
"(",
"buffer",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"(not",
"open)\"",
")",
";",
"}",
"}",
"}",
"</s>"
] |
2,819 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaModelStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaModelStatusConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AbstractTypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SimpleName",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ASTRewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"public",
"class",
"CreateTypeOperation",
"extends",
"CreateTypeMemberOperation",
"{",
"public",
"CreateTypeOperation",
"(",
"IJavaElement",
"parentElement",
",",
"String",
"source",
",",
"boolean",
"force",
")",
"{",
"super",
"(",
"parentElement",
",",
"source",
",",
"force",
")",
";",
"}",
"protected",
"ASTNode",
"generateElementAST",
"(",
"ASTRewrite",
"rewriter",
",",
"ICompilationUnit",
"cu",
")",
"throws",
"JavaModelException",
"{",
"ASTNode",
"node",
"=",
"super",
".",
"generateElementAST",
"(",
"rewriter",
",",
"cu",
")",
";",
"if",
"(",
"!",
"(",
"node",
"instanceof",
"AbstractTypeDeclaration",
")",
")",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_CONTENTS",
")",
")",
";",
"return",
"node",
";",
"}",
"protected",
"IJavaElement",
"generateResultHandle",
"(",
")",
"{",
"IJavaElement",
"parent",
"=",
"getParentElement",
"(",
")",
";",
"switch",
"(",
"parent",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"return",
"(",
"(",
"ICompilationUnit",
")",
"parent",
")",
".",
"getType",
"(",
"getASTNodeName",
"(",
")",
")",
";",
"case",
"IJavaElement",
".",
"TYPE",
":",
"return",
"(",
"(",
"IType",
")",
"parent",
")",
".",
"getType",
"(",
"getASTNodeName",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"String",
"getMainTaskName",
"(",
")",
"{",
"return",
"Messages",
".",
"operation_createTypeProgress",
";",
"}",
"protected",
"IType",
"getType",
"(",
")",
"{",
"IJavaElement",
"parent",
"=",
"getParentElement",
"(",
")",
";",
"if",
"(",
"parent",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"TYPE",
")",
"{",
"return",
"(",
"IType",
")",
"parent",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"IJavaModelStatus",
"verifyNameCollision",
"(",
")",
"{",
"IJavaElement",
"parent",
"=",
"getParentElement",
"(",
")",
";",
"switch",
"(",
"parent",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"String",
"typeName",
"=",
"getASTNodeName",
"(",
")",
";",
"if",
"(",
"(",
"(",
"ICompilationUnit",
")",
"parent",
")",
".",
"getType",
"(",
"typeName",
")",
".",
"exists",
"(",
")",
")",
"{",
"return",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"status_nameCollision",
",",
"typeName",
")",
")",
";",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"TYPE",
":",
"typeName",
"=",
"getASTNodeName",
"(",
")",
";",
"if",
"(",
"(",
"(",
"IType",
")",
"parent",
")",
".",
"getType",
"(",
"typeName",
")",
".",
"exists",
"(",
")",
")",
"{",
"return",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"status_nameCollision",
",",
"typeName",
")",
")",
";",
"}",
"break",
";",
"}",
"return",
"JavaModelStatus",
".",
"VERIFIED_OK",
";",
"}",
"public",
"IJavaModelStatus",
"verify",
"(",
")",
"{",
"IJavaModelStatus",
"status",
"=",
"super",
".",
"verify",
"(",
")",
";",
"if",
"(",
"!",
"status",
".",
"isOK",
"(",
")",
")",
"return",
"status",
";",
"try",
"{",
"IJavaElement",
"parent",
"=",
"getParentElement",
"(",
")",
";",
"if",
"(",
"this",
".",
"anchorElement",
"!=",
"null",
"&&",
"this",
".",
"anchorElement",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"FIELD",
"&&",
"parent",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"TYPE",
"&&",
"(",
"(",
"IType",
")",
"parent",
")",
".",
"isEnum",
"(",
")",
")",
"return",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_SIBLING",
",",
"this",
".",
"anchorElement",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"e",
".",
"getJavaModelStatus",
"(",
")",
";",
"}",
"return",
"JavaModelStatus",
".",
"VERIFIED_OK",
";",
"}",
"private",
"String",
"getASTNodeName",
"(",
")",
"{",
"return",
"(",
"(",
"AbstractTypeDeclaration",
")",
"this",
".",
"createdNode",
")",
".",
"getName",
"(",
")",
".",
"getIdentifier",
"(",
")",
";",
"}",
"protected",
"SimpleName",
"rename",
"(",
"ASTNode",
"node",
",",
"SimpleName",
"newName",
")",
"{",
"AbstractTypeDeclaration",
"type",
"=",
"(",
"AbstractTypeDeclaration",
")",
"node",
";",
"SimpleName",
"oldName",
"=",
"type",
".",
"getName",
"(",
")",
";",
"type",
".",
"setName",
"(",
"newName",
")",
";",
"return",
"oldName",
";",
"}",
"}",
"</s>"
] |
2,820 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Flags",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ILocalVariable",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMemberValuePair",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ITypeParameter",
";",
"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",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaModelManager",
".",
"PerProjectInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"class",
"BinaryMethod",
"extends",
"BinaryMember",
"implements",
"IMethod",
"{",
"protected",
"String",
"[",
"]",
"parameterTypes",
";",
"protected",
"String",
"[",
"]",
"erasedParamaterTypes",
";",
"protected",
"String",
"[",
"]",
"parameterNames",
";",
"protected",
"String",
"[",
"]",
"exceptionTypes",
";",
"protected",
"String",
"returnType",
";",
"protected",
"BinaryMethod",
"(",
"JavaElement",
"parent",
",",
"String",
"name",
",",
"String",
"[",
"]",
"paramTypes",
")",
"{",
"super",
"(",
"parent",
",",
"name",
")",
";",
"if",
"(",
"paramTypes",
"==",
"null",
")",
"{",
"this",
".",
"parameterTypes",
"=",
"CharOperation",
".",
"NO_STRINGS",
";",
"}",
"else",
"{",
"this",
".",
"parameterTypes",
"=",
"paramTypes",
";",
"}",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"BinaryMethod",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"equals",
"(",
"o",
")",
"&&",
"Util",
".",
"equalArraysOrNull",
"(",
"getErasedParameterTypes",
"(",
")",
",",
"(",
"(",
"BinaryMethod",
")",
"o",
")",
".",
"getErasedParameterTypes",
"(",
")",
")",
";",
"}",
"public",
"IAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"IBinaryAnnotation",
"[",
"]",
"binaryAnnotations",
"=",
"info",
".",
"getAnnotations",
"(",
")",
";",
"return",
"getAnnotations",
"(",
"binaryAnnotations",
",",
"info",
".",
"getTagBits",
"(",
")",
")",
";",
"}",
"public",
"ILocalVariable",
"[",
"]",
"getParameters",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"int",
"length",
"=",
"this",
".",
"parameterTypes",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"{",
"return",
"LocalVariable",
".",
"NO_LOCAL_VARIABLES",
";",
"}",
"ILocalVariable",
"[",
"]",
"localVariables",
"=",
"new",
"ILocalVariable",
"[",
"length",
"]",
";",
"char",
"[",
"]",
"[",
"]",
"argumentNames",
"=",
"info",
".",
"getArgumentNames",
"(",
")",
";",
"if",
"(",
"argumentNames",
"==",
"null",
"||",
"argumentNames",
".",
"length",
"<",
"length",
")",
"{",
"argumentNames",
"=",
"new",
"char",
"[",
"length",
"]",
"[",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"length",
";",
"j",
"++",
")",
"{",
"argumentNames",
"[",
"j",
"]",
"=",
"(",
"\"arg\"",
"+",
"j",
")",
".",
"toCharArray",
"(",
")",
";",
"}",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"LocalVariable",
"localVariable",
"=",
"new",
"LocalVariable",
"(",
"this",
",",
"new",
"String",
"(",
"argumentNames",
"[",
"i",
"]",
")",
",",
"0",
",",
"-",
"1",
",",
"0",
",",
"-",
"1",
",",
"this",
".",
"parameterTypes",
"[",
"i",
"]",
",",
"null",
",",
"-",
"1",
",",
"true",
")",
";",
"localVariables",
"[",
"i",
"]",
"=",
"localVariable",
";",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"getAnnotations",
"(",
"localVariable",
",",
"info",
".",
"getParameterAnnotations",
"(",
"i",
")",
")",
";",
"localVariable",
".",
"annotations",
"=",
"annotations",
";",
"}",
"return",
"localVariables",
";",
"}",
"private",
"IAnnotation",
"[",
"]",
"getAnnotations",
"(",
"JavaElement",
"annotationParent",
",",
"IBinaryAnnotation",
"[",
"]",
"binaryAnnotations",
")",
"{",
"if",
"(",
"binaryAnnotations",
"==",
"null",
")",
"return",
"Annotation",
".",
"NO_ANNOTATIONS",
";",
"int",
"length",
"=",
"binaryAnnotations",
".",
"length",
";",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"new",
"IAnnotation",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"annotations",
"[",
"i",
"]",
"=",
"Util",
".",
"getAnnotation",
"(",
"annotationParent",
",",
"binaryAnnotations",
"[",
"i",
"]",
",",
"null",
")",
";",
"}",
"return",
"annotations",
";",
"}",
"public",
"IMemberValuePair",
"getDefaultValue",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"Object",
"defaultValue",
"=",
"info",
".",
"getDefaultValue",
"(",
")",
";",
"if",
"(",
"defaultValue",
"==",
"null",
")",
"return",
"null",
";",
"MemberValuePair",
"memberValuePair",
"=",
"new",
"MemberValuePair",
"(",
"getElementName",
"(",
")",
")",
";",
"memberValuePair",
".",
"value",
"=",
"Util",
".",
"getAnnotationMemberValue",
"(",
"this",
",",
"memberValuePair",
",",
"defaultValue",
")",
";",
"return",
"memberValuePair",
";",
"}",
"public",
"String",
"[",
"]",
"getExceptionTypes",
"(",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"this",
".",
"exceptionTypes",
"==",
"null",
")",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"genericSignature",
"=",
"info",
".",
"getGenericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"dotBasedSignature",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"genericSignature",
",",
"'/'",
",",
"'.'",
")",
";",
"this",
".",
"exceptionTypes",
"=",
"Signature",
".",
"getThrownExceptionTypes",
"(",
"new",
"String",
"(",
"dotBasedSignature",
")",
")",
";",
"}",
"if",
"(",
"this",
".",
"exceptionTypes",
"==",
"null",
"||",
"this",
".",
"exceptionTypes",
".",
"length",
"==",
"0",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"eTypeNames",
"=",
"info",
".",
"getExceptionTypeNames",
"(",
")",
";",
"if",
"(",
"eTypeNames",
"==",
"null",
"||",
"eTypeNames",
".",
"length",
"==",
"0",
")",
"{",
"this",
".",
"exceptionTypes",
"=",
"CharOperation",
".",
"NO_STRINGS",
";",
"}",
"else",
"{",
"eTypeNames",
"=",
"ClassFile",
".",
"translatedNames",
"(",
"eTypeNames",
")",
";",
"this",
".",
"exceptionTypes",
"=",
"new",
"String",
"[",
"eTypeNames",
".",
"length",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"length",
"=",
"eTypeNames",
".",
"length",
";",
"j",
"<",
"length",
";",
"j",
"++",
")",
"{",
"int",
"nameLength",
"=",
"eTypeNames",
"[",
"j",
"]",
".",
"length",
";",
"char",
"[",
"]",
"convertedName",
"=",
"new",
"char",
"[",
"nameLength",
"+",
"2",
"]",
";",
"System",
".",
"arraycopy",
"(",
"eTypeNames",
"[",
"j",
"]",
",",
"0",
",",
"convertedName",
",",
"1",
",",
"nameLength",
")",
";",
"convertedName",
"[",
"0",
"]",
"=",
"'L'",
";",
"convertedName",
"[",
"nameLength",
"+",
"1",
"]",
"=",
"';'",
";",
"this",
".",
"exceptionTypes",
"[",
"j",
"]",
"=",
"new",
"String",
"(",
"convertedName",
")",
";",
"}",
"}",
"}",
"}",
"return",
"this",
".",
"exceptionTypes",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"METHOD",
";",
"}",
"public",
"int",
"getFlags",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"getModifiers",
"(",
")",
";",
"}",
"protected",
"void",
"getHandleMemento",
"(",
"StringBuffer",
"buff",
")",
"{",
"(",
"(",
"JavaElement",
")",
"getParent",
"(",
")",
")",
".",
"getHandleMemento",
"(",
"buff",
")",
";",
"char",
"delimiter",
"=",
"getHandleMementoDelimiter",
"(",
")",
";",
"buff",
".",
"append",
"(",
"delimiter",
")",
";",
"escapeMementoName",
"(",
"buff",
",",
"getElementName",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"parameterTypes",
".",
"length",
";",
"i",
"++",
")",
"{",
"buff",
".",
"append",
"(",
"delimiter",
")",
";",
"escapeMementoName",
"(",
"buff",
",",
"this",
".",
"parameterTypes",
"[",
"i",
"]",
")",
";",
"}",
"if",
"(",
"this",
".",
"occurrenceCount",
">",
"1",
")",
"{",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"occurrenceCount",
")",
";",
"}",
"}",
"protected",
"char",
"getHandleMementoDelimiter",
"(",
")",
"{",
"return",
"JavaElement",
".",
"JEM_METHOD",
";",
"}",
"public",
"String",
"getKey",
"(",
"boolean",
"forceOpen",
")",
"throws",
"JavaModelException",
"{",
"return",
"getKey",
"(",
"this",
",",
"forceOpen",
")",
";",
"}",
"public",
"int",
"getNumberOfParameters",
"(",
")",
"{",
"return",
"this",
".",
"parameterTypes",
"==",
"null",
"?",
"0",
":",
"this",
".",
"parameterTypes",
".",
"length",
";",
"}",
"public",
"String",
"[",
"]",
"getParameterNames",
"(",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"this",
".",
"parameterNames",
"!=",
"null",
")",
"return",
"this",
".",
"parameterNames",
";",
"IType",
"type",
"=",
"(",
"IType",
")",
"getParent",
"(",
")",
";",
"SourceMapper",
"mapper",
"=",
"getSourceMapper",
"(",
")",
";",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"paramNames",
"=",
"mapper",
".",
"getMethodParameterNames",
"(",
"this",
")",
";",
"if",
"(",
"paramNames",
"==",
"null",
")",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"(",
"(",
"BinaryType",
")",
"getDeclaringType",
"(",
")",
")",
".",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"source",
"=",
"mapper",
".",
"findSource",
"(",
"type",
",",
"info",
")",
";",
"if",
"(",
"source",
"!=",
"null",
")",
"{",
"mapper",
".",
"mapSource",
"(",
"type",
",",
"source",
",",
"info",
")",
";",
"}",
"paramNames",
"=",
"mapper",
".",
"getMethodParameterNames",
"(",
"this",
")",
";",
"}",
"if",
"(",
"paramNames",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"names",
"=",
"new",
"String",
"[",
"paramNames",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramNames",
".",
"length",
";",
"i",
"++",
")",
"{",
"names",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"paramNames",
"[",
"i",
"]",
")",
";",
"}",
"return",
"this",
".",
"parameterNames",
"=",
"names",
";",
"}",
"}",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"int",
"paramCount",
"=",
"Signature",
".",
"getParameterCount",
"(",
"new",
"String",
"(",
"info",
".",
"getMethodDescriptor",
"(",
")",
")",
")",
";",
"if",
"(",
"this",
".",
"isConstructor",
"(",
")",
")",
"{",
"final",
"IType",
"declaringType",
"=",
"this",
".",
"getDeclaringType",
"(",
")",
";",
"if",
"(",
"declaringType",
".",
"isMember",
"(",
")",
"&&",
"!",
"Flags",
".",
"isStatic",
"(",
"declaringType",
".",
"getFlags",
"(",
")",
")",
")",
"{",
"paramCount",
"--",
";",
"}",
"}",
"if",
"(",
"paramCount",
"!=",
"0",
")",
"{",
"int",
"modifiers",
"=",
"getFlags",
"(",
")",
";",
"if",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccSynthetic",
")",
"!=",
"0",
")",
"{",
"return",
"this",
".",
"parameterNames",
"=",
"getRawParameterNames",
"(",
"paramCount",
")",
";",
"}",
"JavadocContents",
"javadocContents",
"=",
"null",
";",
"IType",
"declaringType",
"=",
"getDeclaringType",
"(",
")",
";",
"PerProjectInfo",
"projectInfo",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getPerProjectInfoCheckExistence",
"(",
"getJavaProject",
"(",
")",
".",
"getProject",
"(",
")",
")",
";",
"synchronized",
"(",
"projectInfo",
".",
"javadocCache",
")",
"{",
"javadocContents",
"=",
"(",
"JavadocContents",
")",
"projectInfo",
".",
"javadocCache",
".",
"get",
"(",
"declaringType",
")",
";",
"if",
"(",
"javadocContents",
"==",
"null",
")",
"{",
"projectInfo",
".",
"javadocCache",
".",
"put",
"(",
"declaringType",
",",
"BinaryType",
".",
"EMPTY_JAVADOC",
")",
";",
"}",
"}",
"String",
"methodDoc",
"=",
"null",
";",
"if",
"(",
"javadocContents",
"==",
"null",
")",
"{",
"long",
"timeOut",
"=",
"50",
";",
"try",
"{",
"String",
"option",
"=",
"getJavaProject",
"(",
")",
".",
"getOption",
"(",
"JavaCore",
".",
"TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC",
",",
"true",
")",
";",
"if",
"(",
"option",
"!=",
"null",
")",
"{",
"timeOut",
"=",
"Long",
".",
"parseLong",
"(",
"option",
")",
";",
"}",
"}",
"catch",
"(",
"NumberFormatException",
"e",
")",
"{",
"}",
"if",
"(",
"timeOut",
"==",
"0",
")",
"{",
"return",
"getRawParameterNames",
"(",
"paramCount",
")",
";",
"}",
"final",
"class",
"ParametersNameCollector",
"{",
"String",
"javadoc",
";",
"public",
"void",
"setJavadoc",
"(",
"String",
"s",
")",
"{",
"this",
".",
"javadoc",
"=",
"s",
";",
"}",
"public",
"String",
"getJavadoc",
"(",
")",
"{",
"return",
"this",
".",
"javadoc",
";",
"}",
"}",
"final",
"ParametersNameCollector",
"nameCollector",
"=",
"new",
"ParametersNameCollector",
"(",
")",
";",
"Thread",
"collect",
"=",
"new",
"Thread",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"nameCollector",
".",
"setJavadoc",
"(",
"BinaryMethod",
".",
"this",
".",
"getAttachedJavadoc",
"(",
"null",
")",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"synchronized",
"(",
"nameCollector",
")",
"{",
"nameCollector",
".",
"notify",
"(",
")",
";",
"}",
"}",
"}",
";",
"collect",
".",
"start",
"(",
")",
";",
"synchronized",
"(",
"nameCollector",
")",
"{",
"try",
"{",
"nameCollector",
".",
"wait",
"(",
"timeOut",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"}",
"}",
"methodDoc",
"=",
"nameCollector",
".",
"getJavadoc",
"(",
")",
";",
"}",
"else",
"if",
"(",
"javadocContents",
"!=",
"BinaryType",
".",
"EMPTY_JAVADOC",
")",
"{",
"try",
"{",
"methodDoc",
"=",
"javadocContents",
".",
"getMethodDoc",
"(",
"this",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"javadocContents",
"=",
"null",
";",
"}",
"}",
"if",
"(",
"methodDoc",
"!=",
"null",
")",
"{",
"final",
"int",
"indexOfOpenParen",
"=",
"methodDoc",
".",
"indexOf",
"(",
"'('",
")",
";",
"if",
"(",
"indexOfOpenParen",
"!=",
"-",
"1",
")",
"{",
"final",
"int",
"indexOfClosingParen",
"=",
"methodDoc",
".",
"indexOf",
"(",
"')'",
",",
"indexOfOpenParen",
")",
";",
"if",
"(",
"indexOfClosingParen",
"!=",
"-",
"1",
")",
"{",
"final",
"char",
"[",
"]",
"paramsSource",
"=",
"CharOperation",
".",
"replace",
"(",
"methodDoc",
".",
"substring",
"(",
"indexOfOpenParen",
"+",
"1",
",",
"indexOfClosingParen",
")",
".",
"toCharArray",
"(",
")",
",",
"\" \"",
".",
"toCharArray",
"(",
")",
",",
"new",
"char",
"[",
"]",
"{",
"'",
"'",
"}",
")",
";",
"final",
"char",
"[",
"]",
"[",
"]",
"params",
"=",
"splitParameters",
"(",
"paramsSource",
",",
"paramCount",
")",
";",
"final",
"int",
"paramsLength",
"=",
"params",
".",
"length",
";",
"String",
"[",
"]",
"names",
"=",
"new",
"String",
"[",
"paramsLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramsLength",
";",
"i",
"++",
")",
"{",
"final",
"char",
"[",
"]",
"param",
"=",
"params",
"[",
"i",
"]",
";",
"int",
"indexOfSpace",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"'",
"'",
",",
"param",
")",
";",
"if",
"(",
"indexOfSpace",
"!=",
"-",
"1",
")",
"{",
"names",
"[",
"i",
"]",
"=",
"String",
".",
"valueOf",
"(",
"param",
",",
"indexOfSpace",
"+",
"1",
",",
"param",
".",
"length",
"-",
"indexOfSpace",
"-",
"1",
")",
";",
"}",
"else",
"{",
"names",
"[",
"i",
"]",
"=",
"\"arg\"",
"+",
"i",
";",
"}",
"}",
"return",
"this",
".",
"parameterNames",
"=",
"names",
";",
"}",
"}",
"}",
"char",
"[",
"]",
"[",
"]",
"argumentNames",
"=",
"info",
".",
"getArgumentNames",
"(",
")",
";",
"if",
"(",
"argumentNames",
"!=",
"null",
"&&",
"argumentNames",
".",
"length",
"==",
"paramCount",
")",
"{",
"String",
"[",
"]",
"names",
"=",
"new",
"String",
"[",
"paramCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramCount",
";",
"i",
"++",
")",
"{",
"names",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"argumentNames",
"[",
"i",
"]",
")",
";",
"}",
"return",
"this",
".",
"parameterNames",
"=",
"names",
";",
"}",
"}",
"return",
"getRawParameterNames",
"(",
"paramCount",
")",
";",
"}",
"private",
"char",
"[",
"]",
"[",
"]",
"splitParameters",
"(",
"char",
"[",
"]",
"parametersSource",
",",
"int",
"paramCount",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"params",
"=",
"new",
"char",
"[",
"paramCount",
"]",
"[",
"]",
";",
"int",
"paramIndex",
"=",
"0",
";",
"int",
"index",
"=",
"0",
";",
"int",
"balance",
"=",
"0",
";",
"int",
"length",
"=",
"parametersSource",
".",
"length",
";",
"int",
"start",
"=",
"0",
";",
"while",
"(",
"index",
"<",
"length",
")",
"{",
"switch",
"(",
"parametersSource",
"[",
"index",
"]",
")",
"{",
"case",
"'<'",
":",
"balance",
"++",
";",
"index",
"++",
";",
"while",
"(",
"index",
"<",
"length",
"&&",
"parametersSource",
"[",
"index",
"]",
"!=",
"'>'",
")",
"{",
"index",
"++",
";",
"}",
"break",
";",
"case",
"'>'",
":",
"balance",
"--",
";",
"index",
"++",
";",
"break",
";",
"case",
"','",
":",
"if",
"(",
"balance",
"==",
"0",
"&&",
"paramIndex",
"<",
"paramCount",
")",
"{",
"params",
"[",
"paramIndex",
"++",
"]",
"=",
"CharOperation",
".",
"subarray",
"(",
"parametersSource",
",",
"start",
",",
"index",
")",
";",
"start",
"=",
"index",
"+",
"1",
";",
"}",
"index",
"++",
";",
"break",
";",
"case",
"'&'",
":",
"if",
"(",
"(",
"index",
"+",
"4",
")",
"<",
"length",
")",
"{",
"if",
"(",
"parametersSource",
"[",
"index",
"+",
"1",
"]",
"==",
"'l'",
"&&",
"parametersSource",
"[",
"index",
"+",
"2",
"]",
"==",
"'t'",
"&&",
"parametersSource",
"[",
"index",
"+",
"3",
"]",
"==",
"';'",
")",
"{",
"balance",
"++",
";",
"index",
"+=",
"4",
";",
"}",
"else",
"if",
"(",
"parametersSource",
"[",
"index",
"+",
"1",
"]",
"==",
"'g'",
"&&",
"parametersSource",
"[",
"index",
"+",
"2",
"]",
"==",
"'t'",
"&&",
"parametersSource",
"[",
"index",
"+",
"3",
"]",
"==",
"';'",
")",
"{",
"balance",
"--",
";",
"index",
"+=",
"4",
";",
"}",
"else",
"{",
"index",
"++",
";",
"}",
"}",
"else",
"{",
"index",
"++",
";",
"}",
"break",
";",
"default",
":",
"index",
"++",
";",
"}",
"}",
"if",
"(",
"paramIndex",
"<",
"paramCount",
")",
"{",
"params",
"[",
"paramIndex",
"++",
"]",
"=",
"CharOperation",
".",
"subarray",
"(",
"parametersSource",
",",
"start",
",",
"index",
")",
";",
"}",
"if",
"(",
"paramIndex",
"!=",
"paramCount",
")",
"{",
"System",
".",
"arraycopy",
"(",
"params",
",",
"0",
",",
"(",
"params",
"=",
"new",
"char",
"[",
"paramIndex",
"]",
"[",
"]",
")",
",",
"0",
",",
"paramIndex",
")",
";",
"}",
"return",
"params",
";",
"}",
"public",
"String",
"[",
"]",
"getParameterTypes",
"(",
")",
"{",
"return",
"this",
".",
"parameterTypes",
";",
"}",
"private",
"String",
"[",
"]",
"getErasedParameterTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"erasedParamaterTypes",
"==",
"null",
")",
"{",
"int",
"paramCount",
"=",
"this",
".",
"parameterTypes",
".",
"length",
";",
"String",
"[",
"]",
"erasedTypes",
"=",
"new",
"String",
"[",
"paramCount",
"]",
";",
"boolean",
"erasureNeeded",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramCount",
";",
"i",
"++",
")",
"{",
"String",
"parameterType",
"=",
"this",
".",
"parameterTypes",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"erasedTypes",
"[",
"i",
"]",
"=",
"Signature",
".",
"getTypeErasure",
"(",
"parameterType",
")",
")",
"!=",
"parameterType",
")",
"erasureNeeded",
"=",
"true",
";",
"}",
"this",
".",
"erasedParamaterTypes",
"=",
"erasureNeeded",
"?",
"erasedTypes",
":",
"this",
".",
"parameterTypes",
";",
"}",
"return",
"this",
".",
"erasedParamaterTypes",
";",
"}",
"private",
"String",
"getErasedParameterType",
"(",
"int",
"index",
")",
"{",
"return",
"getErasedParameterTypes",
"(",
")",
"[",
"index",
"]",
";",
"}",
"public",
"ITypeParameter",
"getTypeParameter",
"(",
"String",
"typeParameterName",
")",
"{",
"return",
"new",
"TypeParameter",
"(",
"this",
",",
"typeParameterName",
")",
";",
"}",
"public",
"ITypeParameter",
"[",
"]",
"getTypeParameters",
"(",
")",
"throws",
"JavaModelException",
"{",
"String",
"[",
"]",
"typeParameterSignatures",
"=",
"getTypeParameterSignatures",
"(",
")",
";",
"int",
"length",
"=",
"typeParameterSignatures",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"TypeParameter",
".",
"NO_TYPE_PARAMETERS",
";",
"ITypeParameter",
"[",
"]",
"typeParameters",
"=",
"new",
"ITypeParameter",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"typeParameterSignatures",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"typeParameterName",
"=",
"Signature",
".",
"getTypeVariable",
"(",
"typeParameterSignatures",
"[",
"i",
"]",
")",
";",
"typeParameters",
"[",
"i",
"]",
"=",
"new",
"TypeParameter",
"(",
"this",
",",
"typeParameterName",
")",
";",
"}",
"return",
"typeParameters",
";",
"}",
"public",
"String",
"[",
"]",
"getTypeParameterSignatures",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"genericSignature",
"=",
"info",
".",
"getGenericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"==",
"null",
")",
"return",
"CharOperation",
".",
"NO_STRINGS",
";",
"char",
"[",
"]",
"dotBasedSignature",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"genericSignature",
",",
"'/'",
",",
"'.'",
")",
";",
"char",
"[",
"]",
"[",
"]",
"typeParams",
"=",
"Signature",
".",
"getTypeParameters",
"(",
"dotBasedSignature",
")",
";",
"return",
"CharOperation",
".",
"toStrings",
"(",
"typeParams",
")",
";",
"}",
"public",
"String",
"[",
"]",
"getRawParameterNames",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"int",
"paramCount",
"=",
"Signature",
".",
"getParameterCount",
"(",
"new",
"String",
"(",
"info",
".",
"getMethodDescriptor",
"(",
")",
")",
")",
";",
"return",
"getRawParameterNames",
"(",
"paramCount",
")",
";",
"}",
"private",
"String",
"[",
"]",
"getRawParameterNames",
"(",
"int",
"paramCount",
")",
"{",
"String",
"[",
"]",
"result",
"=",
"new",
"String",
"[",
"paramCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramCount",
";",
"i",
"++",
")",
"{",
"result",
"[",
"i",
"]",
"=",
"\"arg\"",
"+",
"i",
";",
"}",
"return",
"result",
";",
"}",
"public",
"String",
"getReturnType",
"(",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"this",
".",
"returnType",
"==",
"null",
")",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"this",
".",
"returnType",
"=",
"getReturnType",
"(",
"info",
")",
";",
"}",
"return",
"this",
".",
"returnType",
";",
"}",
"private",
"String",
"getReturnType",
"(",
"IBinaryMethod",
"info",
")",
"{",
"char",
"[",
"]",
"genericSignature",
"=",
"info",
".",
"getGenericSignature",
"(",
")",
";",
"char",
"[",
"]",
"signature",
"=",
"genericSignature",
"==",
"null",
"?",
"info",
".",
"getMethodDescriptor",
"(",
")",
":",
"genericSignature",
";",
"char",
"[",
"]",
"dotBasedSignature",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"signature",
",",
"'/'",
",",
"'.'",
")",
";",
"String",
"returnTypeName",
"=",
"Signature",
".",
"getReturnType",
"(",
"new",
"String",
"(",
"dotBasedSignature",
")",
")",
";",
"return",
"new",
"String",
"(",
"ClassFile",
".",
"translatedName",
"(",
"returnTypeName",
".",
"toCharArray",
"(",
")",
")",
")",
";",
"}",
"public",
"String",
"getSignature",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"return",
"new",
"String",
"(",
"info",
".",
"getMethodDescriptor",
"(",
")",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"int",
"hash",
"=",
"super",
".",
"hashCode",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"parameterTypes",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"hash",
"=",
"Util",
".",
"combineHashCodes",
"(",
"hash",
",",
"getErasedParameterType",
"(",
"i",
")",
".",
"hashCode",
"(",
")",
")",
";",
"}",
"return",
"hash",
";",
"}",
"public",
"boolean",
"isConstructor",
"(",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"!",
"getElementName",
"(",
")",
".",
"equals",
"(",
"this",
".",
"parent",
".",
"getElementName",
"(",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"IBinaryMethod",
"info",
"=",
"(",
"IBinaryMethod",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"isConstructor",
"(",
")",
";",
"}",
"public",
"boolean",
"isMainMethod",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"this",
".",
"isMainMethod",
"(",
"this",
")",
";",
"}",
"public",
"boolean",
"isResolved",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isSimilar",
"(",
"IMethod",
"method",
")",
"{",
"return",
"areSimilarMethods",
"(",
"getElementName",
"(",
")",
",",
"getParameterTypes",
"(",
")",
",",
"method",
".",
"getElementName",
"(",
")",
",",
"method",
".",
"getParameterTypes",
"(",
")",
",",
"null",
")",
";",
"}",
"public",
"String",
"readableName",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"super",
".",
"readableName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"String",
"[",
"]",
"paramTypes",
"=",
"this",
".",
"parameterTypes",
";",
"int",
"length",
";",
"if",
"(",
"paramTypes",
"!=",
"null",
"&&",
"(",
"length",
"=",
"paramTypes",
".",
"length",
")",
">",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"Signature",
".",
"toString",
"(",
"paramTypes",
"[",
"i",
"]",
")",
")",
";",
"if",
"(",
"i",
"<",
"length",
"-",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"public",
"JavaElement",
"resolved",
"(",
"Binding",
"binding",
")",
"{",
"SourceRefElement",
"resolvedHandle",
"=",
"new",
"ResolvedBinaryMethod",
"(",
"this",
".",
"parent",
",",
"this",
".",
"name",
",",
"this",
".",
"parameterTypes",
",",
"new",
"String",
"(",
"binding",
".",
"computeUniqueKey",
"(",
")",
")",
")",
";",
"resolvedHandle",
".",
"occurrenceCount",
"=",
"this",
".",
"occurrenceCount",
";",
"return",
"resolvedHandle",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"tabString",
"(",
"tab",
")",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"toStringName",
"(",
"buffer",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"(not",
"open)\"",
")",
";",
"}",
"else",
"if",
"(",
"info",
"==",
"NO_INFO",
")",
"{",
"toStringName",
"(",
"buffer",
")",
";",
"}",
"else",
"{",
"IBinaryMethod",
"methodInfo",
"=",
"(",
"IBinaryMethod",
")",
"info",
";",
"int",
"flags",
"=",
"methodInfo",
".",
"getModifiers",
"(",
")",
";",
"if",
"(",
"Flags",
".",
"isStatic",
"(",
"flags",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"if",
"(",
"!",
"methodInfo",
".",
"isConstructor",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"Signature",
".",
"toString",
"(",
"getReturnType",
"(",
"methodInfo",
")",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"toStringName",
"(",
"buffer",
",",
"flags",
")",
";",
"}",
"}",
"protected",
"void",
"toStringName",
"(",
"StringBuffer",
"buffer",
")",
"{",
"toStringName",
"(",
"buffer",
",",
"0",
")",
";",
"}",
"protected",
"void",
"toStringName",
"(",
"StringBuffer",
"buffer",
",",
"int",
"flags",
")",
"{",
"buffer",
".",
"append",
"(",
"getElementName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'('",
")",
";",
"String",
"[",
"]",
"parameters",
"=",
"getParameterTypes",
"(",
")",
";",
"int",
"length",
";",
"if",
"(",
"parameters",
"!=",
"null",
"&&",
"(",
"length",
"=",
"parameters",
".",
"length",
")",
">",
"0",
")",
"{",
"boolean",
"isVarargs",
"=",
"Flags",
".",
"isVarargs",
"(",
"flags",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"try",
"{",
"if",
"(",
"i",
"<",
"length",
"-",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"Signature",
".",
"toString",
"(",
"parameters",
"[",
"i",
"]",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"isVarargs",
")",
"{",
"String",
"parameter",
"=",
"parameters",
"[",
"i",
"]",
".",
"substring",
"(",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Signature",
".",
"toString",
"(",
"parameter",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"...\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"Signature",
".",
"toString",
"(",
"parameters",
"[",
"i",
"]",
")",
")",
";",
"}",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"parameters",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"if",
"(",
"this",
".",
"occurrenceCount",
">",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"\"#\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"occurrenceCount",
")",
";",
"}",
"}",
"public",
"String",
"getAttachedJavadoc",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"JavadocContents",
"javadocContents",
"=",
"(",
"(",
"BinaryType",
")",
"this",
".",
"getDeclaringType",
"(",
")",
")",
".",
"getJavadocContents",
"(",
"monitor",
")",
";",
"if",
"(",
"javadocContents",
"==",
"null",
")",
"return",
"null",
";",
"return",
"javadocContents",
".",
"getMethodDoc",
"(",
"this",
")",
";",
"}",
"}",
"</s>"
] |
2,821 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"public",
"interface",
"INamingRequestor",
"{",
"void",
"acceptNameWithPrefixAndSuffix",
"(",
"char",
"[",
"]",
"name",
",",
"boolean",
"isFirstPrefix",
",",
"boolean",
"isFirstSuffix",
",",
"int",
"reusedCharacters",
")",
";",
"void",
"acceptNameWithPrefix",
"(",
"char",
"[",
"]",
"name",
",",
"boolean",
"isFirstPrefix",
",",
"int",
"reusedCharacters",
")",
";",
"void",
"acceptNameWithSuffix",
"(",
"char",
"[",
"]",
"name",
",",
"boolean",
"isFirstSuffix",
",",
"int",
"reusedCharacters",
")",
";",
"void",
"acceptNameWithoutPrefixAndSuffix",
"(",
"char",
"[",
"]",
"name",
",",
"int",
"reusedCharacters",
")",
";",
"}",
"</s>"
] |
2,822 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IContainer",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IFile",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IFolder",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProject",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResource",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResourceChangeEvent",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResourceDelta",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResourceDeltaVisitor",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IWorkspace",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IWorkspaceRoot",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IWorkspaceRunnable",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"ResourcesPlugin",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"WorkspaceJob",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"SourceElementParser",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaModelManager",
".",
"PerProjectInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"builder",
".",
"JavaBuilder",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"hierarchy",
".",
"TypeHierarchy",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"AbstractSearchScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"JavaWorkspaceScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"search",
".",
"indexing",
".",
"IndexManager",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"DeltaProcessor",
"{",
"static",
"class",
"OutputsInfo",
"{",
"int",
"outputCount",
";",
"IPath",
"[",
"]",
"paths",
";",
"int",
"[",
"]",
"traverseModes",
";",
"OutputsInfo",
"(",
"IPath",
"[",
"]",
"paths",
",",
"int",
"[",
"]",
"traverseModes",
",",
"int",
"outputCount",
")",
"{",
"this",
".",
"paths",
"=",
"paths",
";",
"this",
".",
"traverseModes",
"=",
"traverseModes",
";",
"this",
".",
"outputCount",
"=",
"outputCount",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"if",
"(",
"this",
".",
"paths",
"==",
"null",
")",
"return",
"\"<none>\"",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"outputCount",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"path=\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"paths",
"[",
"i",
"]",
".",
"toString",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"n->traverse=\"",
")",
";",
"switch",
"(",
"this",
".",
"traverseModes",
"[",
"i",
"]",
")",
"{",
"case",
"BINARY",
":",
"buffer",
".",
"append",
"(",
"\"BINARY\"",
")",
";",
"break",
";",
"case",
"IGNORE",
":",
"buffer",
".",
"append",
"(",
"\"IGNORE\"",
")",
";",
"break",
";",
"case",
"SOURCE",
":",
"buffer",
".",
"append",
"(",
"\"SOURCE\"",
")",
";",
"break",
";",
"default",
":",
"buffer",
".",
"append",
"(",
"\"<unknown>\"",
")",
";",
"}",
"if",
"(",
"i",
"+",
"1",
"<",
"this",
".",
"outputCount",
")",
"{",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"public",
"static",
"class",
"RootInfo",
"{",
"char",
"[",
"]",
"[",
"]",
"inclusionPatterns",
";",
"char",
"[",
"]",
"[",
"]",
"exclusionPatterns",
";",
"public",
"JavaProject",
"project",
";",
"IPath",
"rootPath",
";",
"int",
"entryKind",
";",
"IPackageFragmentRoot",
"root",
";",
"IPackageFragmentRoot",
"cache",
";",
"RootInfo",
"(",
"JavaProject",
"project",
",",
"IPath",
"rootPath",
",",
"char",
"[",
"]",
"[",
"]",
"inclusionPatterns",
",",
"char",
"[",
"]",
"[",
"]",
"exclusionPatterns",
",",
"int",
"entryKind",
")",
"{",
"this",
".",
"project",
"=",
"project",
";",
"this",
".",
"rootPath",
"=",
"rootPath",
";",
"this",
".",
"inclusionPatterns",
"=",
"inclusionPatterns",
";",
"this",
".",
"exclusionPatterns",
"=",
"exclusionPatterns",
";",
"this",
".",
"entryKind",
"=",
"entryKind",
";",
"this",
".",
"cache",
"=",
"getPackageFragmentRoot",
"(",
")",
";",
"}",
"public",
"IPackageFragmentRoot",
"getPackageFragmentRoot",
"(",
")",
"{",
"IPackageFragmentRoot",
"tRoot",
"=",
"null",
";",
"Object",
"target",
"=",
"JavaModel",
".",
"getTarget",
"(",
"this",
".",
"rootPath",
",",
"false",
")",
";",
"if",
"(",
"target",
"instanceof",
"IResource",
")",
"{",
"tRoot",
"=",
"this",
".",
"project",
".",
"getPackageFragmentRoot",
"(",
"(",
"IResource",
")",
"target",
")",
";",
"}",
"else",
"{",
"tRoot",
"=",
"this",
".",
"project",
".",
"getPackageFragmentRoot",
"(",
"this",
".",
"rootPath",
".",
"toOSString",
"(",
")",
")",
";",
"}",
"return",
"tRoot",
";",
"}",
"public",
"IPackageFragmentRoot",
"getPackageFragmentRoot",
"(",
"IResource",
"resource",
")",
"{",
"if",
"(",
"this",
".",
"root",
"==",
"null",
")",
"{",
"if",
"(",
"resource",
"!=",
"null",
")",
"{",
"this",
".",
"root",
"=",
"this",
".",
"project",
".",
"getPackageFragmentRoot",
"(",
"resource",
")",
";",
"}",
"else",
"{",
"this",
".",
"root",
"=",
"getPackageFragmentRoot",
"(",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"root",
"!=",
"null",
")",
"this",
".",
"cache",
"=",
"this",
".",
"root",
";",
"return",
"this",
".",
"root",
";",
"}",
"boolean",
"isRootOfProject",
"(",
"IPath",
"path",
")",
"{",
"return",
"this",
".",
"rootPath",
".",
"equals",
"(",
"path",
")",
"&&",
"this",
".",
"project",
".",
"getProject",
"(",
")",
".",
"getFullPath",
"(",
")",
".",
"isPrefixOf",
"(",
"path",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"project=\"",
")",
";",
"if",
"(",
"this",
".",
"project",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"null\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"project",
".",
"getElementName",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"npath=\"",
")",
";",
"if",
"(",
"this",
".",
"rootPath",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"null\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"rootPath",
".",
"toString",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"nincluding=\"",
")",
";",
"if",
"(",
"this",
".",
"inclusionPatterns",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"null\"",
")",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"inclusionPatterns",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"new",
"String",
"(",
"this",
".",
"inclusionPatterns",
"[",
"i",
"]",
")",
")",
";",
"if",
"(",
"i",
"<",
"length",
"-",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"\"|\"",
")",
";",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"nexcluding=\"",
")",
";",
"if",
"(",
"this",
".",
"exclusionPatterns",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"null\"",
")",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"exclusionPatterns",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"new",
"String",
"(",
"this",
".",
"exclusionPatterns",
"[",
"i",
"]",
")",
")",
";",
"if",
"(",
"i",
"<",
"length",
"-",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"\"|\"",
")",
";",
"}",
"}",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"private",
"final",
"static",
"int",
"IGNORE",
"=",
"0",
";",
"private",
"final",
"static",
"int",
"SOURCE",
"=",
"1",
";",
"private",
"final",
"static",
"int",
"BINARY",
"=",
"2",
";",
"private",
"final",
"static",
"String",
"EXTERNAL_JAR_ADDED",
"=",
"\"\"",
";",
"private",
"final",
"static",
"String",
"EXTERNAL_JAR_CHANGED",
"=",
"\"\"",
";",
"private",
"final",
"static",
"String",
"EXTERNAL_JAR_REMOVED",
"=",
"\"\"",
";",
"private",
"final",
"static",
"String",
"EXTERNAL_JAR_UNCHANGED",
"=",
"\"\"",
";",
"private",
"final",
"static",
"String",
"INTERNAL_JAR_IGNORE",
"=",
"\"\"",
";",
"private",
"final",
"static",
"int",
"NON_JAVA_RESOURCE",
"=",
"-",
"1",
";",
"public",
"static",
"boolean",
"DEBUG",
"=",
"false",
";",
"public",
"static",
"boolean",
"VERBOSE",
"=",
"false",
";",
"public",
"static",
"boolean",
"PERF",
"=",
"false",
";",
"public",
"static",
"final",
"int",
"DEFAULT_CHANGE_EVENT",
"=",
"0",
";",
"public",
"static",
"long",
"getTimeStamp",
"(",
"File",
"file",
")",
"{",
"return",
"file",
".",
"lastModified",
"(",
")",
"+",
"file",
".",
"length",
"(",
")",
";",
"}",
"private",
"DeltaProcessingState",
"state",
";",
"JavaModelManager",
"manager",
";",
"private",
"JavaElementDelta",
"currentDelta",
";",
"private",
"Openable",
"currentElement",
";",
"public",
"ArrayList",
"javaModelDeltas",
"=",
"new",
"ArrayList",
"(",
")",
";",
"public",
"HashMap",
"reconcileDeltas",
"=",
"new",
"HashMap",
"(",
")",
";",
"private",
"boolean",
"isFiring",
"=",
"true",
";",
"private",
"final",
"ModelUpdater",
"modelUpdater",
"=",
"new",
"ModelUpdater",
"(",
")",
";",
"public",
"HashSet",
"projectCachesToReset",
"=",
"new",
"HashSet",
"(",
")",
";",
"public",
"Map",
"oldRoots",
";",
"public",
"int",
"overridenEventType",
"=",
"-",
"1",
";",
"private",
"SourceElementParser",
"sourceElementParserCache",
";",
"public",
"DeltaProcessor",
"(",
"DeltaProcessingState",
"state",
",",
"JavaModelManager",
"manager",
")",
"{",
"this",
".",
"state",
"=",
"state",
";",
"this",
".",
"manager",
"=",
"manager",
";",
"}",
"private",
"void",
"addDependentProjects",
"(",
"IJavaProject",
"project",
",",
"HashMap",
"projectDependencies",
",",
"HashSet",
"result",
")",
"{",
"IJavaProject",
"[",
"]",
"dependents",
"=",
"(",
"IJavaProject",
"[",
"]",
")",
"projectDependencies",
".",
"get",
"(",
"project",
")",
";",
"if",
"(",
"dependents",
"==",
"null",
")",
"return",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"dependents",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IJavaProject",
"dependent",
"=",
"dependents",
"[",
"i",
"]",
";",
"if",
"(",
"result",
".",
"contains",
"(",
"dependent",
")",
")",
"continue",
";",
"result",
".",
"add",
"(",
"dependent",
")",
";",
"addDependentProjects",
"(",
"dependent",
",",
"projectDependencies",
",",
"result",
")",
";",
"}",
"}",
"private",
"void",
"addToParentInfo",
"(",
"Openable",
"child",
")",
"{",
"Openable",
"parent",
"=",
"(",
"Openable",
")",
"child",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"parent",
"!=",
"null",
"&&",
"parent",
".",
"isOpen",
"(",
")",
")",
"{",
"try",
"{",
"OpenableElementInfo",
"info",
"=",
"(",
"OpenableElementInfo",
")",
"parent",
".",
"getElementInfo",
"(",
")",
";",
"if",
"(",
"child",
"instanceof",
"IPackageFragmentRoot",
")",
"addPackageFragmentRoot",
"(",
"info",
",",
"(",
"IPackageFragmentRoot",
")",
"child",
")",
";",
"else",
"info",
".",
"addChild",
"(",
"child",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"}",
"private",
"void",
"addPackageFragmentRoot",
"(",
"OpenableElementInfo",
"parent",
",",
"IPackageFragmentRoot",
"child",
")",
"throws",
"JavaModelException",
"{",
"IJavaElement",
"[",
"]",
"roots",
"=",
"parent",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"roots",
".",
"length",
">",
"0",
")",
"{",
"IClasspathEntry",
"[",
"]",
"resolvedClasspath",
"=",
"(",
"(",
"JavaProject",
")",
"child",
".",
"getJavaProject",
"(",
")",
")",
".",
"getResolvedClasspath",
"(",
")",
";",
"IPath",
"currentEntryPath",
"=",
"child",
".",
"getResolvedClasspathEntry",
"(",
")",
".",
"getPath",
"(",
")",
";",
"int",
"indexToInsert",
"=",
"-",
"1",
";",
"int",
"lastComparedIndex",
"=",
"-",
"1",
";",
"int",
"i",
"=",
"0",
",",
"j",
"=",
"0",
";",
"for",
"(",
";",
"i",
"<",
"roots",
".",
"length",
"&&",
"j",
"<",
"resolvedClasspath",
".",
"length",
";",
")",
"{",
"IClasspathEntry",
"classpathEntry",
"=",
"resolvedClasspath",
"[",
"j",
"]",
";",
"if",
"(",
"lastComparedIndex",
"!=",
"j",
"&&",
"currentEntryPath",
".",
"equals",
"(",
"classpathEntry",
".",
"getPath",
"(",
")",
")",
")",
"{",
"indexToInsert",
"=",
"i",
";",
"break",
";",
"}",
"lastComparedIndex",
"=",
"j",
";",
"IClasspathEntry",
"rootEntry",
"=",
"(",
"(",
"IPackageFragmentRoot",
")",
"roots",
"[",
"i",
"]",
")",
".",
"getResolvedClasspathEntry",
"(",
")",
";",
"if",
"(",
"rootEntry",
".",
"getPath",
"(",
")",
".",
"equals",
"(",
"classpathEntry",
".",
"getPath",
"(",
")",
")",
")",
"i",
"++",
";",
"else",
"j",
"++",
";",
"}",
"for",
"(",
";",
"i",
"<",
"roots",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"roots",
"[",
"i",
"]",
".",
"equals",
"(",
"child",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"(",
"(",
"IPackageFragmentRoot",
")",
"roots",
"[",
"i",
"]",
")",
".",
"getResolvedClasspathEntry",
"(",
")",
".",
"getPath",
"(",
")",
".",
"equals",
"(",
"currentEntryPath",
")",
")",
"break",
";",
"}",
"if",
"(",
"indexToInsert",
">=",
"0",
")",
"{",
"int",
"newSize",
"=",
"roots",
".",
"length",
"+",
"1",
";",
"IPackageFragmentRoot",
"[",
"]",
"newChildren",
"=",
"new",
"IPackageFragmentRoot",
"[",
"newSize",
"]",
";",
"if",
"(",
"indexToInsert",
">",
"0",
")",
"System",
".",
"arraycopy",
"(",
"roots",
",",
"0",
",",
"newChildren",
",",
"0",
",",
"indexToInsert",
")",
";",
"newChildren",
"[",
"indexToInsert",
"]",
"=",
"child",
";",
"System",
".",
"arraycopy",
"(",
"roots",
",",
"indexToInsert",
",",
"newChildren",
",",
"indexToInsert",
"+",
"1",
",",
"(",
"newSize",
"-",
"indexToInsert",
"-",
"1",
")",
")",
";",
"parent",
".",
"setChildren",
"(",
"newChildren",
")",
";",
"return",
";",
"}",
"}",
"parent",
".",
"addChild",
"(",
"child",
")",
";",
"}",
"private",
"void",
"checkProjectsAndClasspathChanges",
"(",
"IResourceDelta",
"delta",
")",
"{",
"IResource",
"resource",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"IResourceDelta",
"[",
"]",
"children",
"=",
"null",
";",
"switch",
"(",
"resource",
".",
"getType",
"(",
")",
")",
"{",
"case",
"IResource",
".",
"ROOT",
":",
"this",
".",
"state",
".",
"getOldJavaProjecNames",
"(",
")",
";",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"break",
";",
"case",
"IResource",
".",
"PROJECT",
":",
"IProject",
"project",
"=",
"(",
"IProject",
")",
"resource",
";",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
";",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"this",
".",
"manager",
".",
"forceBatchInitializations",
"(",
"false",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"javaProject",
")",
";",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"addToParentInfo",
"(",
"javaProject",
")",
";",
"readRawClasspath",
"(",
"javaProject",
")",
";",
"checkProjectReferenceChange",
"(",
"project",
",",
"javaProject",
")",
";",
"checkExternalFolderChange",
"(",
"project",
",",
"javaProject",
")",
";",
"}",
"this",
".",
"state",
".",
"rootsAreStale",
"=",
"true",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"if",
"(",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"OPEN",
")",
"!=",
"0",
")",
"{",
"this",
".",
"manager",
".",
"forceBatchInitializations",
"(",
"false",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"javaProject",
")",
";",
"if",
"(",
"project",
".",
"isOpen",
"(",
")",
")",
"{",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"addToParentInfo",
"(",
"javaProject",
")",
";",
"readRawClasspath",
"(",
"javaProject",
")",
";",
"checkProjectReferenceChange",
"(",
"project",
",",
"javaProject",
")",
";",
"checkExternalFolderChange",
"(",
"project",
",",
"javaProject",
")",
";",
"}",
"}",
"else",
"{",
"try",
"{",
"javaProject",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"removeFromParentInfo",
"(",
"javaProject",
")",
";",
"this",
".",
"manager",
".",
"removePerProjectInfo",
"(",
"javaProject",
",",
"false",
")",
";",
"this",
".",
"manager",
".",
"containerRemove",
"(",
"javaProject",
")",
";",
"}",
"this",
".",
"state",
".",
"rootsAreStale",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"DESCRIPTION",
")",
"!=",
"0",
")",
"{",
"boolean",
"wasJavaProject",
"=",
"this",
".",
"state",
".",
"findJavaProject",
"(",
"project",
".",
"getName",
"(",
")",
")",
"!=",
"null",
";",
"boolean",
"isJavaProject",
"=",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
";",
"if",
"(",
"wasJavaProject",
"!=",
"isJavaProject",
")",
"{",
"this",
".",
"manager",
".",
"forceBatchInitializations",
"(",
"false",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"javaProject",
")",
";",
"if",
"(",
"isJavaProject",
")",
"{",
"addToParentInfo",
"(",
"javaProject",
")",
";",
"readRawClasspath",
"(",
"javaProject",
")",
";",
"checkProjectReferenceChange",
"(",
"project",
",",
"javaProject",
")",
";",
"checkExternalFolderChange",
"(",
"project",
",",
"javaProject",
")",
";",
"}",
"else",
"{",
"this",
".",
"manager",
".",
"removePerProjectInfo",
"(",
"javaProject",
",",
"true",
")",
";",
"this",
".",
"manager",
".",
"containerRemove",
"(",
"javaProject",
")",
";",
"try",
"{",
"javaProject",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"removeFromParentInfo",
"(",
"javaProject",
")",
";",
"}",
"this",
".",
"state",
".",
"rootsAreStale",
"=",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"isJavaProject",
")",
"{",
"addToParentInfo",
"(",
"javaProject",
")",
";",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"}",
"}",
"}",
"else",
"{",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"addToParentInfo",
"(",
"javaProject",
")",
";",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"}",
"}",
"break",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"this",
".",
"manager",
".",
"forceBatchInitializations",
"(",
"false",
")",
";",
"this",
".",
"manager",
".",
"removePerProjectInfo",
"(",
"javaProject",
",",
"true",
")",
";",
"this",
".",
"manager",
".",
"containerRemove",
"(",
"javaProject",
")",
";",
"this",
".",
"state",
".",
"rootsAreStale",
"=",
"true",
";",
"break",
";",
"}",
"break",
";",
"case",
"IResource",
".",
"FOLDER",
":",
"if",
"(",
"delta",
".",
"getKind",
"(",
")",
"==",
"IResourceDelta",
".",
"CHANGED",
")",
"{",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"}",
"break",
";",
"case",
"IResource",
".",
"FILE",
":",
"IFile",
"file",
"=",
"(",
"IFile",
")",
"resource",
";",
"int",
"kind",
"=",
"delta",
".",
"getKind",
"(",
")",
";",
"RootInfo",
"rootInfo",
";",
"if",
"(",
"file",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"JavaProject",
".",
"CLASSPATH_FILENAME",
")",
")",
"{",
"this",
".",
"manager",
".",
"forceBatchInitializations",
"(",
"false",
")",
";",
"switch",
"(",
"kind",
")",
"{",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"int",
"flags",
"=",
"delta",
".",
"getFlags",
"(",
")",
";",
"if",
"(",
"(",
"flags",
"&",
"IResourceDelta",
".",
"CONTENT",
")",
"==",
"0",
"&&",
"(",
"flags",
"&",
"IResourceDelta",
".",
"ENCODING",
")",
"==",
"0",
"&&",
"(",
"flags",
"&",
"IResourceDelta",
".",
"MOVED_FROM",
")",
"==",
"0",
")",
"{",
"break",
";",
"}",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"file",
".",
"getProject",
"(",
")",
")",
";",
"readRawClasspath",
"(",
"javaProject",
")",
";",
"break",
";",
"}",
"this",
".",
"state",
".",
"rootsAreStale",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"(",
"rootInfo",
"=",
"rootInfo",
"(",
"file",
".",
"getFullPath",
"(",
")",
",",
"kind",
")",
")",
"!=",
"null",
"&&",
"rootInfo",
".",
"entryKind",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
")",
"{",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"file",
".",
"getProject",
"(",
")",
")",
";",
"javaProject",
".",
"resetResolvedClasspath",
"(",
")",
";",
"this",
".",
"state",
".",
"rootsAreStale",
"=",
"true",
";",
"}",
"break",
";",
"}",
"if",
"(",
"children",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
")",
"{",
"checkProjectsAndClasspathChanges",
"(",
"children",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"private",
"void",
"checkExternalFolderChange",
"(",
"IProject",
"project",
",",
"JavaProject",
"javaProject",
")",
"{",
"ClasspathChange",
"change",
"=",
"this",
".",
"state",
".",
"getClasspathChange",
"(",
"project",
")",
";",
"this",
".",
"state",
".",
"addExternalFolderChange",
"(",
"javaProject",
",",
"change",
"==",
"null",
"?",
"null",
":",
"change",
".",
"oldResolvedClasspath",
")",
";",
"}",
"private",
"void",
"checkProjectReferenceChange",
"(",
"IProject",
"project",
",",
"JavaProject",
"javaProject",
")",
"{",
"ClasspathChange",
"change",
"=",
"this",
".",
"state",
".",
"getClasspathChange",
"(",
"project",
")",
";",
"this",
".",
"state",
".",
"addProjectReferenceChange",
"(",
"javaProject",
",",
"change",
"==",
"null",
"?",
"null",
":",
"change",
".",
"oldResolvedClasspath",
")",
";",
"}",
"private",
"void",
"readRawClasspath",
"(",
"JavaProject",
"javaProject",
")",
"{",
"try",
"{",
"PerProjectInfo",
"perProjectInfo",
"=",
"javaProject",
".",
"getPerProjectInfo",
"(",
")",
";",
"if",
"(",
"!",
"perProjectInfo",
".",
"writtingRawClasspath",
")",
"perProjectInfo",
".",
"readAndCacheClasspath",
"(",
"javaProject",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"}",
"private",
"void",
"checkSourceAttachmentChange",
"(",
"IResourceDelta",
"delta",
",",
"IResource",
"res",
")",
"{",
"IPath",
"rootPath",
"=",
"(",
"IPath",
")",
"this",
".",
"state",
".",
"sourceAttachments",
".",
"get",
"(",
"externalPath",
"(",
"res",
")",
")",
";",
"if",
"(",
"rootPath",
"!=",
"null",
")",
"{",
"RootInfo",
"rootInfo",
"=",
"rootInfo",
"(",
"rootPath",
",",
"delta",
".",
"getKind",
"(",
")",
")",
";",
"if",
"(",
"rootInfo",
"!=",
"null",
")",
"{",
"IJavaProject",
"projectOfRoot",
"=",
"rootInfo",
".",
"project",
";",
"IPackageFragmentRoot",
"root",
"=",
"null",
";",
"try",
"{",
"root",
"=",
"projectOfRoot",
".",
"findPackageFragmentRoot",
"(",
"rootPath",
")",
";",
"if",
"(",
"root",
"!=",
"null",
")",
"{",
"root",
".",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"if",
"(",
"root",
"==",
"null",
")",
"return",
";",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"currentDelta",
"(",
")",
".",
"sourceAttached",
"(",
"root",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"currentDelta",
"(",
")",
".",
"sourceDetached",
"(",
"root",
")",
";",
"currentDelta",
"(",
")",
".",
"sourceAttached",
"(",
"root",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"currentDelta",
"(",
")",
".",
"sourceDetached",
"(",
"root",
")",
";",
"break",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"close",
"(",
"Openable",
"element",
")",
"{",
"try",
"{",
"element",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"private",
"void",
"contentChanged",
"(",
"Openable",
"element",
")",
"{",
"boolean",
"isPrimary",
"=",
"false",
";",
"boolean",
"isPrimaryWorkingCopy",
"=",
"false",
";",
"if",
"(",
"element",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"COMPILATION_UNIT",
")",
"{",
"CompilationUnit",
"cu",
"=",
"(",
"CompilationUnit",
")",
"element",
";",
"isPrimary",
"=",
"cu",
".",
"isPrimary",
"(",
")",
";",
"isPrimaryWorkingCopy",
"=",
"isPrimary",
"&&",
"cu",
".",
"isWorkingCopy",
"(",
")",
";",
"}",
"if",
"(",
"isPrimaryWorkingCopy",
")",
"{",
"currentDelta",
"(",
")",
".",
"changed",
"(",
"element",
",",
"IJavaElementDelta",
".",
"F_PRIMARY_RESOURCE",
")",
";",
"}",
"else",
"{",
"close",
"(",
"element",
")",
";",
"int",
"flags",
"=",
"IJavaElementDelta",
".",
"F_CONTENT",
";",
"if",
"(",
"element",
"instanceof",
"JarPackageFragmentRoot",
")",
"{",
"flags",
"|=",
"IJavaElementDelta",
".",
"F_ARCHIVE_CONTENT_CHANGED",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"element",
".",
"getJavaProject",
"(",
")",
")",
";",
"}",
"if",
"(",
"isPrimary",
")",
"{",
"flags",
"|=",
"IJavaElementDelta",
".",
"F_PRIMARY_RESOURCE",
";",
"}",
"currentDelta",
"(",
")",
".",
"changed",
"(",
"element",
",",
"flags",
")",
";",
"}",
"}",
"private",
"Openable",
"createElement",
"(",
"IResource",
"resource",
",",
"int",
"elementType",
",",
"RootInfo",
"rootInfo",
")",
"{",
"if",
"(",
"resource",
"==",
"null",
")",
"return",
"null",
";",
"IPath",
"path",
"=",
"resource",
".",
"getFullPath",
"(",
")",
";",
"IJavaElement",
"element",
"=",
"null",
";",
"switch",
"(",
"elementType",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"if",
"(",
"resource",
"instanceof",
"IProject",
")",
"{",
"popUntilPrefixOf",
"(",
"path",
")",
";",
"if",
"(",
"this",
".",
"currentElement",
"!=",
"null",
"&&",
"this",
".",
"currentElement",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"JAVA_PROJECT",
"&&",
"(",
"(",
"IJavaProject",
")",
"this",
".",
"currentElement",
")",
".",
"getProject",
"(",
")",
".",
"equals",
"(",
"resource",
")",
")",
"{",
"return",
"this",
".",
"currentElement",
";",
"}",
"if",
"(",
"rootInfo",
"!=",
"null",
"&&",
"rootInfo",
".",
"project",
".",
"getProject",
"(",
")",
".",
"equals",
"(",
"resource",
")",
")",
"{",
"element",
"=",
"rootInfo",
".",
"project",
";",
"break",
";",
"}",
"IProject",
"proj",
"=",
"(",
"IProject",
")",
"resource",
";",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"proj",
")",
")",
"{",
"element",
"=",
"JavaCore",
".",
"create",
"(",
"proj",
")",
";",
"}",
"else",
"{",
"element",
"=",
"this",
".",
"state",
".",
"findJavaProject",
"(",
"proj",
".",
"getName",
"(",
")",
")",
";",
"}",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"element",
"=",
"rootInfo",
"==",
"null",
"?",
"JavaCore",
".",
"create",
"(",
"resource",
")",
":",
"rootInfo",
".",
"getPackageFragmentRoot",
"(",
"resource",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"if",
"(",
"rootInfo",
"!=",
"null",
")",
"{",
"if",
"(",
"rootInfo",
".",
"project",
".",
"contains",
"(",
"resource",
")",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"rootInfo",
".",
"getPackageFragmentRoot",
"(",
"null",
")",
";",
"IPath",
"pkgPath",
"=",
"path",
".",
"removeFirstSegments",
"(",
"root",
".",
"resource",
"(",
")",
".",
"getFullPath",
"(",
")",
".",
"segmentCount",
"(",
")",
")",
";",
"String",
"[",
"]",
"pkgName",
"=",
"pkgPath",
".",
"segments",
"(",
")",
";",
"element",
"=",
"root",
".",
"getPackageFragment",
"(",
"pkgName",
")",
";",
"}",
"}",
"else",
"{",
"popUntilPrefixOf",
"(",
"path",
")",
";",
"if",
"(",
"this",
".",
"currentElement",
"==",
"null",
")",
"{",
"element",
"=",
"JavaCore",
".",
"create",
"(",
"resource",
")",
";",
"}",
"else",
"{",
"PackageFragmentRoot",
"root",
"=",
"this",
".",
"currentElement",
".",
"getPackageFragmentRoot",
"(",
")",
";",
"if",
"(",
"root",
"==",
"null",
")",
"{",
"element",
"=",
"JavaCore",
".",
"create",
"(",
"resource",
")",
";",
"}",
"else",
"if",
"(",
"(",
"(",
"JavaProject",
")",
"root",
".",
"getJavaProject",
"(",
")",
")",
".",
"contains",
"(",
"resource",
")",
")",
"{",
"IPath",
"pkgPath",
"=",
"path",
".",
"removeFirstSegments",
"(",
"root",
".",
"getPath",
"(",
")",
".",
"segmentCount",
"(",
")",
")",
";",
"String",
"[",
"]",
"pkgName",
"=",
"pkgPath",
".",
"segments",
"(",
")",
";",
"element",
"=",
"root",
".",
"getPackageFragment",
"(",
"pkgName",
")",
";",
"}",
"}",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"popUntilPrefixOf",
"(",
"path",
")",
";",
"if",
"(",
"this",
".",
"currentElement",
"==",
"null",
")",
"{",
"element",
"=",
"rootInfo",
"==",
"null",
"?",
"JavaCore",
".",
"create",
"(",
"resource",
")",
":",
"JavaModelManager",
".",
"create",
"(",
"resource",
",",
"rootInfo",
".",
"project",
")",
";",
"}",
"else",
"{",
"IPackageFragment",
"pkgFragment",
"=",
"null",
";",
"switch",
"(",
"this",
".",
"currentElement",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"this",
".",
"currentElement",
";",
"IPath",
"rootPath",
"=",
"root",
".",
"getPath",
"(",
")",
";",
"IPath",
"pkgPath",
"=",
"path",
".",
"removeLastSegments",
"(",
"1",
")",
";",
"String",
"[",
"]",
"pkgName",
"=",
"pkgPath",
".",
"removeFirstSegments",
"(",
"rootPath",
".",
"segmentCount",
"(",
")",
")",
".",
"segments",
"(",
")",
";",
"pkgFragment",
"=",
"root",
".",
"getPackageFragment",
"(",
"pkgName",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"Openable",
"pkg",
"=",
"this",
".",
"currentElement",
";",
"if",
"(",
"pkg",
".",
"getPath",
"(",
")",
".",
"equals",
"(",
"path",
".",
"removeLastSegments",
"(",
"1",
")",
")",
")",
"{",
"pkgFragment",
"=",
"(",
"IPackageFragment",
")",
"pkg",
";",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"pkgFragment",
"=",
"(",
"IPackageFragment",
")",
"this",
".",
"currentElement",
".",
"getParent",
"(",
")",
";",
"break",
";",
"}",
"if",
"(",
"pkgFragment",
"==",
"null",
")",
"{",
"element",
"=",
"rootInfo",
"==",
"null",
"?",
"JavaCore",
".",
"create",
"(",
"resource",
")",
":",
"JavaModelManager",
".",
"create",
"(",
"resource",
",",
"rootInfo",
".",
"project",
")",
";",
"}",
"else",
"{",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"COMPILATION_UNIT",
")",
"{",
"String",
"fileName",
"=",
"path",
".",
"lastSegment",
"(",
")",
";",
"element",
"=",
"pkgFragment",
".",
"getCompilationUnit",
"(",
"fileName",
")",
";",
"}",
"else",
"{",
"String",
"fileName",
"=",
"path",
".",
"lastSegment",
"(",
")",
";",
"element",
"=",
"pkgFragment",
".",
"getClassFile",
"(",
"fileName",
")",
";",
"}",
"}",
"}",
"break",
";",
"}",
"if",
"(",
"element",
"==",
"null",
")",
"return",
"null",
";",
"this",
".",
"currentElement",
"=",
"(",
"Openable",
")",
"element",
";",
"return",
"this",
".",
"currentElement",
";",
"}",
"public",
"void",
"checkExternalArchiveChanges",
"(",
"IJavaElement",
"[",
"]",
"elementsScope",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"checkExternalArchiveChanges",
"(",
"elementsScope",
",",
"false",
",",
"monitor",
")",
";",
"}",
"private",
"void",
"checkExternalArchiveChanges",
"(",
"IJavaElement",
"[",
"]",
"elementsScope",
",",
"boolean",
"asynchronous",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"monitor",
"!=",
"null",
"&&",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"throw",
"new",
"OperationCanceledException",
"(",
")",
";",
"try",
"{",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"beginTask",
"(",
"\"\"",
",",
"1",
")",
";",
"boolean",
"hasExternalWorkingCopyProject",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"elementsScope",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IJavaElement",
"element",
"=",
"elementsScope",
"[",
"i",
"]",
";",
"this",
".",
"state",
".",
"addForRefresh",
"(",
"elementsScope",
"[",
"i",
"]",
")",
";",
"if",
"(",
"element",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"JAVA_MODEL",
")",
"{",
"HashSet",
"projects",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getExternalWorkingCopyProjects",
"(",
")",
";",
"if",
"(",
"projects",
"!=",
"null",
")",
"{",
"hasExternalWorkingCopyProject",
"=",
"true",
";",
"Iterator",
"iterator",
"=",
"projects",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"iterator",
".",
"next",
"(",
")",
";",
"project",
".",
"resetCaches",
"(",
")",
";",
"}",
"}",
"}",
"}",
"HashSet",
"elementsToRefresh",
"=",
"this",
".",
"state",
".",
"removeExternalElementsToRefresh",
"(",
")",
";",
"boolean",
"hasDelta",
"=",
"elementsToRefresh",
"!=",
"null",
"&&",
"createExternalArchiveDelta",
"(",
"elementsToRefresh",
",",
"monitor",
")",
";",
"if",
"(",
"hasDelta",
")",
"{",
"IJavaElementDelta",
"[",
"]",
"projectDeltas",
"=",
"this",
".",
"currentDelta",
".",
"getAffectedChildren",
"(",
")",
";",
"final",
"int",
"length",
"=",
"projectDeltas",
".",
"length",
";",
"final",
"IProject",
"[",
"]",
"projectsToTouch",
"=",
"new",
"IProject",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IJavaElementDelta",
"delta",
"=",
"projectDeltas",
"[",
"i",
"]",
";",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"delta",
".",
"getElement",
"(",
")",
";",
"projectsToTouch",
"[",
"i",
"]",
"=",
"javaProject",
".",
"getProject",
"(",
")",
";",
"}",
"if",
"(",
"projectsToTouch",
".",
"length",
">",
"0",
")",
"{",
"if",
"(",
"asynchronous",
")",
"{",
"WorkspaceJob",
"touchJob",
"=",
"new",
"WorkspaceJob",
"(",
"Messages",
".",
"updating_external_archives_jobName",
")",
"{",
"public",
"IStatus",
"runInWorkspace",
"(",
"IProgressMonitor",
"progressMonitor",
")",
"throws",
"CoreException",
"{",
"try",
"{",
"if",
"(",
"progressMonitor",
"!=",
"null",
")",
"progressMonitor",
".",
"beginTask",
"(",
"\"\"",
",",
"projectsToTouch",
".",
"length",
")",
";",
"touchProjects",
"(",
"projectsToTouch",
",",
"progressMonitor",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"progressMonitor",
"!=",
"null",
")",
"progressMonitor",
".",
"done",
"(",
")",
";",
"}",
"return",
"Status",
".",
"OK_STATUS",
";",
"}",
"public",
"boolean",
"belongsTo",
"(",
"Object",
"family",
")",
"{",
"return",
"ResourcesPlugin",
".",
"FAMILY_MANUAL_REFRESH",
"==",
"family",
";",
"}",
"}",
";",
"touchJob",
".",
"schedule",
"(",
")",
";",
"}",
"else",
"{",
"IWorkspaceRunnable",
"runnable",
"=",
"new",
"IWorkspaceRunnable",
"(",
")",
"{",
"public",
"void",
"run",
"(",
"IProgressMonitor",
"progressMonitor",
")",
"throws",
"CoreException",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"projectsToTouch",
".",
"length",
";",
"i",
"++",
")",
"{",
"IProject",
"project",
"=",
"projectsToTouch",
"[",
"i",
"]",
";",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"project",
".",
"getName",
"(",
")",
"+",
"\"\"",
")",
";",
"project",
".",
"touch",
"(",
"progressMonitor",
")",
";",
"}",
"}",
"}",
";",
"try",
"{",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"run",
"(",
"runnable",
",",
"monitor",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"if",
"(",
"this",
".",
"currentDelta",
"!=",
"null",
")",
"{",
"fire",
"(",
"this",
".",
"currentDelta",
",",
"DEFAULT_CHANGE_EVENT",
")",
";",
"}",
"}",
"else",
"if",
"(",
"hasExternalWorkingCopyProject",
")",
"{",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"resetJarTypeCache",
"(",
")",
";",
"}",
"}",
"finally",
"{",
"this",
".",
"currentDelta",
"=",
"null",
";",
"if",
"(",
"monitor",
"!=",
"null",
")",
"monitor",
".",
"done",
"(",
")",
";",
"}",
"}",
"protected",
"void",
"touchProjects",
"(",
"final",
"IProject",
"[",
"]",
"projectsToTouch",
",",
"IProgressMonitor",
"progressMonitor",
")",
"throws",
"CoreException",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"projectsToTouch",
".",
"length",
";",
"i",
"++",
")",
"{",
"IProgressMonitor",
"monitor",
"=",
"progressMonitor",
"==",
"null",
"?",
"null",
":",
"new",
"SubProgressMonitor",
"(",
"progressMonitor",
",",
"1",
")",
";",
"IProject",
"project",
"=",
"projectsToTouch",
"[",
"i",
"]",
";",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"project",
".",
"getName",
"(",
")",
"+",
"\"\"",
")",
";",
"project",
".",
"touch",
"(",
"monitor",
")",
";",
"}",
"}",
"private",
"boolean",
"createExternalArchiveDelta",
"(",
"HashSet",
"refreshedElements",
",",
"IProgressMonitor",
"monitor",
")",
"{",
"HashMap",
"externalArchivesStatus",
"=",
"new",
"HashMap",
"(",
")",
";",
"boolean",
"hasDelta",
"=",
"false",
";",
"HashSet",
"archivePathsToRefresh",
"=",
"new",
"HashSet",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"refreshedElements",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"IJavaElement",
"element",
"=",
"(",
"IJavaElement",
")",
"iterator",
".",
"next",
"(",
")",
";",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"archivePathsToRefresh",
".",
"add",
"(",
"element",
".",
"getPath",
"(",
")",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"element",
";",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"javaProject",
".",
"getProject",
"(",
")",
")",
")",
"{",
"break",
";",
"}",
"IClasspathEntry",
"[",
"]",
"classpath",
";",
"try",
"{",
"classpath",
"=",
"javaProject",
".",
"getResolvedClasspath",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"cpLength",
"=",
"classpath",
".",
"length",
";",
"j",
"<",
"cpLength",
";",
"j",
"++",
")",
"{",
"if",
"(",
"classpath",
"[",
"j",
"]",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
")",
"{",
"archivePathsToRefresh",
".",
"add",
"(",
"classpath",
"[",
"j",
"]",
".",
"getPath",
"(",
")",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"Iterator",
"projectNames",
"=",
"this",
".",
"state",
".",
"getOldJavaProjecNames",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"projectNames",
".",
"hasNext",
"(",
")",
")",
"{",
"String",
"projectName",
"=",
"(",
"String",
")",
"projectNames",
".",
"next",
"(",
")",
";",
"IProject",
"project",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getProject",
"(",
"projectName",
")",
";",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"continue",
";",
"}",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
";",
"try",
"{",
"classpath",
"=",
"javaProject",
".",
"getResolvedClasspath",
"(",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
",",
"cpLength",
"=",
"classpath",
".",
"length",
";",
"k",
"<",
"cpLength",
";",
"k",
"++",
")",
"{",
"if",
"(",
"classpath",
"[",
"k",
"]",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
")",
"{",
"archivePathsToRefresh",
".",
"add",
"(",
"classpath",
"[",
"k",
"]",
".",
"getPath",
"(",
")",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e2",
")",
"{",
"continue",
";",
"}",
"}",
"break",
";",
"}",
"}",
"Iterator",
"projectNames",
"=",
"this",
".",
"state",
".",
"getOldJavaProjecNames",
"(",
")",
".",
"iterator",
"(",
")",
";",
"IWorkspaceRoot",
"wksRoot",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
";",
"while",
"(",
"projectNames",
".",
"hasNext",
"(",
")",
")",
"{",
"if",
"(",
"monitor",
"!=",
"null",
"&&",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"break",
";",
"String",
"projectName",
"=",
"(",
"String",
")",
"projectNames",
".",
"next",
"(",
")",
";",
"IProject",
"project",
"=",
"wksRoot",
".",
"getProject",
"(",
"projectName",
")",
";",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"continue",
";",
"}",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
";",
"IClasspathEntry",
"[",
"]",
"entries",
";",
"try",
"{",
"entries",
"=",
"javaProject",
".",
"getResolvedClasspath",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e1",
")",
"{",
"continue",
";",
"}",
"boolean",
"deltaContainsModifiedJar",
"=",
"false",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"entries",
".",
"length",
";",
"j",
"++",
")",
"{",
"if",
"(",
"entries",
"[",
"j",
"]",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
")",
"{",
"IPath",
"entryPath",
"=",
"entries",
"[",
"j",
"]",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"!",
"archivePathsToRefresh",
".",
"contains",
"(",
"entryPath",
")",
")",
"continue",
";",
"String",
"status",
"=",
"(",
"String",
")",
"externalArchivesStatus",
".",
"get",
"(",
"entryPath",
")",
";",
"if",
"(",
"status",
"==",
"null",
")",
"{",
"Object",
"targetLibrary",
"=",
"JavaModel",
".",
"getTarget",
"(",
"entryPath",
",",
"true",
")",
";",
"if",
"(",
"targetLibrary",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"state",
".",
"getExternalLibTimeStamps",
"(",
")",
".",
"remove",
"(",
"entryPath",
")",
"!=",
"null",
"&&",
"this",
".",
"state",
".",
"roots",
".",
"get",
"(",
"entryPath",
")",
"!=",
"null",
")",
"{",
"externalArchivesStatus",
".",
"put",
"(",
"entryPath",
",",
"EXTERNAL_JAR_REMOVED",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"removeIndex",
"(",
"entryPath",
")",
";",
"}",
"}",
"else",
"if",
"(",
"targetLibrary",
"instanceof",
"File",
")",
"{",
"File",
"externalFile",
"=",
"(",
"File",
")",
"targetLibrary",
";",
"Long",
"oldTimestamp",
"=",
"(",
"Long",
")",
"this",
".",
"state",
".",
"getExternalLibTimeStamps",
"(",
")",
".",
"get",
"(",
"entryPath",
")",
";",
"long",
"newTimeStamp",
"=",
"getTimeStamp",
"(",
"externalFile",
")",
";",
"if",
"(",
"oldTimestamp",
"!=",
"null",
")",
"{",
"if",
"(",
"newTimeStamp",
"==",
"0",
")",
"{",
"externalArchivesStatus",
".",
"put",
"(",
"entryPath",
",",
"EXTERNAL_JAR_REMOVED",
")",
";",
"this",
".",
"state",
".",
"getExternalLibTimeStamps",
"(",
")",
".",
"remove",
"(",
"entryPath",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"removeIndex",
"(",
"entryPath",
")",
";",
"}",
"else",
"if",
"(",
"oldTimestamp",
".",
"longValue",
"(",
")",
"!=",
"newTimeStamp",
")",
"{",
"externalArchivesStatus",
".",
"put",
"(",
"entryPath",
",",
"EXTERNAL_JAR_CHANGED",
")",
";",
"this",
".",
"state",
".",
"getExternalLibTimeStamps",
"(",
")",
".",
"put",
"(",
"entryPath",
",",
"new",
"Long",
"(",
"newTimeStamp",
")",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"removeIndex",
"(",
"entryPath",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"indexLibrary",
"(",
"entryPath",
",",
"project",
".",
"getProject",
"(",
")",
",",
"(",
"(",
"ClasspathEntry",
")",
"entries",
"[",
"j",
"]",
")",
".",
"getLibraryIndexLocation",
"(",
")",
")",
";",
"}",
"else",
"{",
"URL",
"indexLocation",
"=",
"(",
"(",
"ClasspathEntry",
")",
"entries",
"[",
"j",
"]",
")",
".",
"getLibraryIndexLocation",
"(",
")",
";",
"if",
"(",
"indexLocation",
"!=",
"null",
")",
"{",
"this",
".",
"manager",
".",
"indexManager",
".",
"indexLibrary",
"(",
"entryPath",
",",
"project",
".",
"getProject",
"(",
")",
",",
"indexLocation",
")",
";",
"}",
"externalArchivesStatus",
".",
"put",
"(",
"entryPath",
",",
"EXTERNAL_JAR_UNCHANGED",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"newTimeStamp",
"==",
"0",
")",
"{",
"externalArchivesStatus",
".",
"put",
"(",
"entryPath",
",",
"EXTERNAL_JAR_UNCHANGED",
")",
";",
"}",
"else",
"{",
"externalArchivesStatus",
".",
"put",
"(",
"entryPath",
",",
"EXTERNAL_JAR_ADDED",
")",
";",
"this",
".",
"state",
".",
"getExternalLibTimeStamps",
"(",
")",
".",
"put",
"(",
"entryPath",
",",
"new",
"Long",
"(",
"newTimeStamp",
")",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"removeIndex",
"(",
"entryPath",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"indexLibrary",
"(",
"entryPath",
",",
"project",
".",
"getProject",
"(",
")",
",",
"(",
"(",
"ClasspathEntry",
")",
"entries",
"[",
"j",
"]",
")",
".",
"getLibraryIndexLocation",
"(",
")",
")",
";",
"}",
"}",
"}",
"else",
"{",
"externalArchivesStatus",
".",
"put",
"(",
"entryPath",
",",
"INTERNAL_JAR_IGNORE",
")",
";",
"}",
"}",
"status",
"=",
"(",
"String",
")",
"externalArchivesStatus",
".",
"get",
"(",
"entryPath",
")",
";",
"if",
"(",
"status",
"!=",
"null",
")",
"{",
"if",
"(",
"status",
"==",
"EXTERNAL_JAR_ADDED",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"javaProject",
".",
"getPackageFragmentRoot",
"(",
"entryPath",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"root",
".",
"getElementName",
"(",
")",
")",
";",
"}",
"elementAdded",
"(",
"root",
",",
"null",
",",
"null",
")",
";",
"deltaContainsModifiedJar",
"=",
"true",
";",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"hasDelta",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"status",
"==",
"EXTERNAL_JAR_CHANGED",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"javaProject",
".",
"getPackageFragmentRoot",
"(",
"entryPath",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"root",
".",
"getElementName",
"(",
")",
")",
";",
"}",
"contentChanged",
"(",
"root",
")",
";",
"deltaContainsModifiedJar",
"=",
"true",
";",
"hasDelta",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"status",
"==",
"EXTERNAL_JAR_REMOVED",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"javaProject",
".",
"getPackageFragmentRoot",
"(",
"entryPath",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"root",
".",
"getElementName",
"(",
")",
")",
";",
"}",
"elementRemoved",
"(",
"root",
",",
"null",
",",
"null",
")",
";",
"deltaContainsModifiedJar",
"=",
"true",
";",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"hasDelta",
"=",
"true",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"deltaContainsModifiedJar",
")",
"{",
"javaProject",
".",
"resetResolvedClasspath",
"(",
")",
";",
"}",
"}",
"JavaModel",
".",
"flushExternalFileCache",
"(",
")",
";",
"if",
"(",
"hasDelta",
")",
"{",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"resetJarTypeCache",
"(",
")",
";",
"}",
"return",
"hasDelta",
";",
"}",
"private",
"JavaElementDelta",
"currentDelta",
"(",
")",
"{",
"if",
"(",
"this",
".",
"currentDelta",
"==",
"null",
")",
"{",
"this",
".",
"currentDelta",
"=",
"new",
"JavaElementDelta",
"(",
"this",
".",
"manager",
".",
"getJavaModel",
"(",
")",
")",
";",
"}",
"return",
"this",
".",
"currentDelta",
";",
"}",
"private",
"void",
"deleting",
"(",
"IProject",
"project",
")",
"{",
"try",
"{",
"this",
".",
"manager",
".",
"indexManager",
".",
"discardJobs",
"(",
"project",
".",
"getName",
"(",
")",
")",
";",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
";",
"if",
"(",
"this",
".",
"oldRoots",
"==",
"null",
")",
"{",
"this",
".",
"oldRoots",
"=",
"new",
"HashMap",
"(",
")",
";",
"}",
"if",
"(",
"javaProject",
".",
"isOpen",
"(",
")",
")",
"{",
"this",
".",
"oldRoots",
".",
"put",
"(",
"javaProject",
",",
"javaProject",
".",
"getPackageFragmentRoots",
"(",
")",
")",
";",
"}",
"else",
"{",
"this",
".",
"oldRoots",
".",
"put",
"(",
"javaProject",
",",
"javaProject",
".",
"computePackageFragmentRoots",
"(",
"javaProject",
".",
"getResolvedClasspath",
"(",
")",
",",
"false",
",",
"null",
")",
")",
";",
"}",
"javaProject",
".",
"close",
"(",
")",
";",
"this",
".",
"state",
".",
"getOldJavaProjecNames",
"(",
")",
";",
"removeFromParentInfo",
"(",
"javaProject",
")",
";",
"this",
".",
"manager",
".",
"resetProjectPreferences",
"(",
"javaProject",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"private",
"void",
"elementAdded",
"(",
"Openable",
"element",
",",
"IResourceDelta",
"delta",
",",
"RootInfo",
"rootInfo",
")",
"{",
"int",
"elementType",
"=",
"element",
".",
"getElementType",
"(",
")",
";",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"JAVA_PROJECT",
")",
"{",
"IProject",
"project",
";",
"if",
"(",
"delta",
"!=",
"null",
"&&",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
"=",
"(",
"IProject",
")",
"delta",
".",
"getResource",
"(",
")",
")",
")",
"{",
"addToParentInfo",
"(",
"element",
")",
";",
"this",
".",
"manager",
".",
"getPerProjectInfo",
"(",
"project",
",",
"true",
")",
".",
"rememberExternalLibTimestamps",
"(",
")",
";",
"if",
"(",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"MOVED_FROM",
")",
"!=",
"0",
")",
"{",
"Openable",
"movedFromElement",
"=",
"(",
"Openable",
")",
"element",
".",
"getJavaModel",
"(",
")",
".",
"getJavaProject",
"(",
"delta",
".",
"getMovedFromPath",
"(",
")",
".",
"lastSegment",
"(",
")",
")",
";",
"currentDelta",
"(",
")",
".",
"movedTo",
"(",
"element",
",",
"movedFromElement",
")",
";",
"}",
"else",
"{",
"close",
"(",
"element",
")",
";",
"currentDelta",
"(",
")",
".",
"added",
"(",
"element",
")",
";",
"}",
"this",
".",
"state",
".",
"updateRoots",
"(",
"element",
".",
"getPath",
"(",
")",
",",
"delta",
",",
"this",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"element",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"delta",
"==",
"null",
"||",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"MOVED_FROM",
")",
"==",
"0",
")",
"{",
"if",
"(",
"isPrimaryWorkingCopy",
"(",
"element",
",",
"elementType",
")",
")",
"{",
"currentDelta",
"(",
")",
".",
"changed",
"(",
"element",
",",
"IJavaElementDelta",
".",
"F_PRIMARY_RESOURCE",
")",
";",
"}",
"else",
"{",
"addToParentInfo",
"(",
"element",
")",
";",
"close",
"(",
"element",
")",
";",
"currentDelta",
"(",
")",
".",
"added",
"(",
"element",
")",
";",
"}",
"}",
"else",
"{",
"addToParentInfo",
"(",
"element",
")",
";",
"close",
"(",
"element",
")",
";",
"IPath",
"movedFromPath",
"=",
"delta",
".",
"getMovedFromPath",
"(",
")",
";",
"IResource",
"res",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"IResource",
"movedFromRes",
";",
"if",
"(",
"res",
"instanceof",
"IFile",
")",
"{",
"movedFromRes",
"=",
"res",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getFile",
"(",
"movedFromPath",
")",
";",
"}",
"else",
"{",
"movedFromRes",
"=",
"res",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getFolder",
"(",
"movedFromPath",
")",
";",
"}",
"IPath",
"rootPath",
"=",
"externalPath",
"(",
"movedFromRes",
")",
";",
"RootInfo",
"movedFromInfo",
"=",
"enclosingRootInfo",
"(",
"rootPath",
",",
"IResourceDelta",
".",
"REMOVED",
")",
";",
"int",
"movedFromType",
"=",
"elementType",
"(",
"movedFromRes",
",",
"IResourceDelta",
".",
"REMOVED",
",",
"element",
".",
"getParent",
"(",
")",
".",
"getElementType",
"(",
")",
",",
"movedFromInfo",
")",
";",
"this",
".",
"currentElement",
"=",
"null",
";",
"Openable",
"movedFromElement",
"=",
"elementType",
"!=",
"IJavaElement",
".",
"JAVA_PROJECT",
"&&",
"movedFromType",
"==",
"IJavaElement",
".",
"JAVA_PROJECT",
"?",
"null",
":",
"createElement",
"(",
"movedFromRes",
",",
"movedFromType",
",",
"movedFromInfo",
")",
";",
"if",
"(",
"movedFromElement",
"==",
"null",
")",
"{",
"currentDelta",
"(",
")",
".",
"added",
"(",
"element",
")",
";",
"}",
"else",
"{",
"currentDelta",
"(",
")",
".",
"movedTo",
"(",
"element",
",",
"movedFromElement",
")",
";",
"}",
"}",
"switch",
"(",
"elementType",
")",
"{",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"element",
".",
"getJavaProject",
"(",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"project",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"project",
"=",
"(",
"JavaProject",
")",
"element",
".",
"getJavaProject",
"(",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"project",
")",
";",
"break",
";",
"}",
"}",
"}",
"private",
"void",
"elementRemoved",
"(",
"Openable",
"element",
",",
"IResourceDelta",
"delta",
",",
"RootInfo",
"rootInfo",
")",
"{",
"int",
"elementType",
"=",
"element",
".",
"getElementType",
"(",
")",
";",
"if",
"(",
"delta",
"==",
"null",
"||",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"MOVED_TO",
")",
"==",
"0",
")",
"{",
"if",
"(",
"isPrimaryWorkingCopy",
"(",
"element",
",",
"elementType",
")",
")",
"{",
"currentDelta",
"(",
")",
".",
"changed",
"(",
"element",
",",
"IJavaElementDelta",
".",
"F_PRIMARY_RESOURCE",
")",
";",
"}",
"else",
"{",
"close",
"(",
"element",
")",
";",
"removeFromParentInfo",
"(",
"element",
")",
";",
"currentDelta",
"(",
")",
".",
"removed",
"(",
"element",
")",
";",
"}",
"}",
"else",
"{",
"close",
"(",
"element",
")",
";",
"removeFromParentInfo",
"(",
"element",
")",
";",
"IPath",
"movedToPath",
"=",
"delta",
".",
"getMovedToPath",
"(",
")",
";",
"IResource",
"res",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"IResource",
"movedToRes",
";",
"switch",
"(",
"res",
".",
"getType",
"(",
")",
")",
"{",
"case",
"IResource",
".",
"PROJECT",
":",
"movedToRes",
"=",
"res",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getProject",
"(",
"movedToPath",
".",
"lastSegment",
"(",
")",
")",
";",
"break",
";",
"case",
"IResource",
".",
"FOLDER",
":",
"movedToRes",
"=",
"res",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getFolder",
"(",
"movedToPath",
")",
";",
"break",
";",
"case",
"IResource",
".",
"FILE",
":",
"movedToRes",
"=",
"res",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getFile",
"(",
"movedToPath",
")",
";",
"break",
";",
"default",
":",
"return",
";",
"}",
"IPath",
"rootPath",
"=",
"externalPath",
"(",
"movedToRes",
")",
";",
"RootInfo",
"movedToInfo",
"=",
"enclosingRootInfo",
"(",
"rootPath",
",",
"IResourceDelta",
".",
"ADDED",
")",
";",
"int",
"movedToType",
"=",
"elementType",
"(",
"movedToRes",
",",
"IResourceDelta",
".",
"ADDED",
",",
"element",
".",
"getParent",
"(",
")",
".",
"getElementType",
"(",
")",
",",
"movedToInfo",
")",
";",
"this",
".",
"currentElement",
"=",
"null",
";",
"Openable",
"movedToElement",
"=",
"elementType",
"!=",
"IJavaElement",
".",
"JAVA_PROJECT",
"&&",
"movedToType",
"==",
"IJavaElement",
".",
"JAVA_PROJECT",
"?",
"null",
":",
"createElement",
"(",
"movedToRes",
",",
"movedToType",
",",
"movedToInfo",
")",
";",
"if",
"(",
"movedToElement",
"==",
"null",
")",
"{",
"currentDelta",
"(",
")",
".",
"removed",
"(",
"element",
")",
";",
"}",
"else",
"{",
"currentDelta",
"(",
")",
".",
"movedFrom",
"(",
"element",
",",
"movedToElement",
")",
";",
"}",
"}",
"switch",
"(",
"elementType",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"this",
".",
"manager",
".",
"indexManager",
".",
"reset",
"(",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"this",
".",
"state",
".",
"updateRoots",
"(",
"element",
".",
"getPath",
"(",
")",
",",
"delta",
",",
"this",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"element",
".",
"getJavaProject",
"(",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"project",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"project",
"=",
"(",
"JavaProject",
")",
"element",
".",
"getJavaProject",
"(",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"project",
")",
";",
"break",
";",
"}",
"}",
"private",
"int",
"elementType",
"(",
"IResource",
"res",
",",
"int",
"kind",
",",
"int",
"parentType",
",",
"RootInfo",
"rootInfo",
")",
"{",
"switch",
"(",
"parentType",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"return",
"IJavaElement",
".",
"JAVA_PROJECT",
";",
"case",
"NON_JAVA_RESOURCE",
":",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"if",
"(",
"rootInfo",
"==",
"null",
")",
"{",
"rootInfo",
"=",
"enclosingRootInfo",
"(",
"res",
".",
"getFullPath",
"(",
")",
",",
"kind",
")",
";",
"}",
"if",
"(",
"rootInfo",
"!=",
"null",
"&&",
"rootInfo",
".",
"isRootOfProject",
"(",
"res",
".",
"getFullPath",
"(",
")",
")",
")",
"{",
"return",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
";",
"}",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"if",
"(",
"rootInfo",
"==",
"null",
")",
"{",
"IPath",
"rootPath",
"=",
"externalPath",
"(",
"res",
")",
";",
"rootInfo",
"=",
"enclosingRootInfo",
"(",
"rootPath",
",",
"kind",
")",
";",
"}",
"if",
"(",
"rootInfo",
"==",
"null",
")",
"{",
"return",
"NON_JAVA_RESOURCE",
";",
"}",
"if",
"(",
"Util",
".",
"isExcluded",
"(",
"res",
",",
"rootInfo",
".",
"inclusionPatterns",
",",
"rootInfo",
".",
"exclusionPatterns",
")",
")",
"{",
"return",
"NON_JAVA_RESOURCE",
";",
"}",
"if",
"(",
"res",
".",
"getType",
"(",
")",
"==",
"IResource",
".",
"FOLDER",
")",
"{",
"if",
"(",
"parentType",
"==",
"NON_JAVA_RESOURCE",
"&&",
"!",
"Util",
".",
"isExcluded",
"(",
"res",
".",
"getParent",
"(",
")",
",",
"rootInfo",
".",
"inclusionPatterns",
",",
"rootInfo",
".",
"exclusionPatterns",
")",
")",
"{",
"return",
"NON_JAVA_RESOURCE",
";",
"}",
"String",
"sourceLevel",
"=",
"rootInfo",
".",
"project",
"==",
"null",
"?",
"null",
":",
"rootInfo",
".",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_SOURCE",
",",
"true",
")",
";",
"String",
"complianceLevel",
"=",
"rootInfo",
".",
"project",
"==",
"null",
"?",
"null",
":",
"rootInfo",
".",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_COMPLIANCE",
",",
"true",
")",
";",
"if",
"(",
"Util",
".",
"isValidFolderNameForPackage",
"(",
"res",
".",
"getName",
"(",
")",
",",
"sourceLevel",
",",
"complianceLevel",
")",
")",
"{",
"return",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
";",
"}",
"return",
"NON_JAVA_RESOURCE",
";",
"}",
"String",
"fileName",
"=",
"res",
".",
"getName",
"(",
")",
";",
"String",
"sourceLevel",
"=",
"rootInfo",
".",
"project",
"==",
"null",
"?",
"null",
":",
"rootInfo",
".",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_SOURCE",
",",
"true",
")",
";",
"String",
"complianceLevel",
"=",
"rootInfo",
".",
"project",
"==",
"null",
"?",
"null",
":",
"rootInfo",
".",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_COMPLIANCE",
",",
"true",
")",
";",
"if",
"(",
"Util",
".",
"isValidCompilationUnitName",
"(",
"fileName",
",",
"sourceLevel",
",",
"complianceLevel",
")",
")",
"{",
"return",
"IJavaElement",
".",
"COMPILATION_UNIT",
";",
"}",
"else",
"if",
"(",
"Util",
".",
"isValidClassFileName",
"(",
"fileName",
",",
"sourceLevel",
",",
"complianceLevel",
")",
")",
"{",
"return",
"IJavaElement",
".",
"CLASS_FILE",
";",
"}",
"else",
"{",
"IPath",
"rootPath",
"=",
"externalPath",
"(",
"res",
")",
";",
"if",
"(",
"(",
"rootInfo",
"=",
"rootInfo",
"(",
"rootPath",
",",
"kind",
")",
")",
"!=",
"null",
"&&",
"rootInfo",
".",
"project",
".",
"getProject",
"(",
")",
".",
"getFullPath",
"(",
")",
".",
"isPrefixOf",
"(",
"rootPath",
")",
")",
"{",
"return",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
";",
"}",
"else",
"{",
"return",
"NON_JAVA_RESOURCE",
";",
"}",
"}",
"default",
":",
"return",
"NON_JAVA_RESOURCE",
";",
"}",
"}",
"public",
"void",
"flush",
"(",
")",
"{",
"this",
".",
"javaModelDeltas",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"private",
"SourceElementParser",
"getSourceElementParser",
"(",
"Openable",
"element",
")",
"{",
"if",
"(",
"this",
".",
"sourceElementParserCache",
"==",
"null",
")",
"this",
".",
"sourceElementParserCache",
"=",
"this",
".",
"manager",
".",
"indexManager",
".",
"getSourceElementParser",
"(",
"element",
".",
"getJavaProject",
"(",
")",
",",
"null",
")",
";",
"return",
"this",
".",
"sourceElementParserCache",
";",
"}",
"private",
"RootInfo",
"enclosingRootInfo",
"(",
"IPath",
"path",
",",
"int",
"kind",
")",
"{",
"while",
"(",
"path",
"!=",
"null",
"&&",
"path",
".",
"segmentCount",
"(",
")",
">",
"0",
")",
"{",
"RootInfo",
"rootInfo",
"=",
"rootInfo",
"(",
"path",
",",
"kind",
")",
";",
"if",
"(",
"rootInfo",
"!=",
"null",
")",
"return",
"rootInfo",
";",
"path",
"=",
"path",
".",
"removeLastSegments",
"(",
"1",
")",
";",
"}",
"return",
"null",
";",
"}",
"private",
"IPath",
"externalPath",
"(",
"IResource",
"res",
")",
"{",
"IPath",
"resourcePath",
"=",
"res",
".",
"getFullPath",
"(",
")",
";",
"if",
"(",
"ExternalFoldersManager",
".",
"isInternalPathForExternalFolder",
"(",
"resourcePath",
")",
")",
"return",
"res",
".",
"getLocation",
"(",
")",
";",
"return",
"resourcePath",
";",
"}",
"public",
"void",
"fire",
"(",
"IJavaElementDelta",
"customDelta",
",",
"int",
"eventType",
")",
"{",
"if",
"(",
"!",
"this",
".",
"isFiring",
")",
"return",
";",
"if",
"(",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"}",
"IJavaElementDelta",
"deltaToNotify",
";",
"if",
"(",
"customDelta",
"==",
"null",
")",
"{",
"deltaToNotify",
"=",
"mergeDeltas",
"(",
"this",
".",
"javaModelDeltas",
")",
";",
"}",
"else",
"{",
"deltaToNotify",
"=",
"customDelta",
";",
"}",
"if",
"(",
"deltaToNotify",
"!=",
"null",
")",
"{",
"Iterator",
"scopes",
"=",
"this",
".",
"manager",
".",
"searchScopes",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"scopes",
".",
"hasNext",
"(",
")",
")",
"{",
"AbstractSearchScope",
"scope",
"=",
"(",
"AbstractSearchScope",
")",
"scopes",
".",
"next",
"(",
")",
";",
"scope",
".",
"processDelta",
"(",
"deltaToNotify",
",",
"eventType",
")",
";",
"}",
"JavaWorkspaceScope",
"workspaceScope",
"=",
"this",
".",
"manager",
".",
"workspaceScope",
";",
"if",
"(",
"workspaceScope",
"!=",
"null",
")",
"workspaceScope",
".",
"processDelta",
"(",
"deltaToNotify",
",",
"eventType",
")",
";",
"}",
"IElementChangedListener",
"[",
"]",
"listeners",
";",
"int",
"[",
"]",
"listenerMask",
";",
"int",
"listenerCount",
";",
"synchronized",
"(",
"this",
".",
"state",
")",
"{",
"listeners",
"=",
"this",
".",
"state",
".",
"elementChangedListeners",
";",
"listenerMask",
"=",
"this",
".",
"state",
".",
"elementChangedListenerMasks",
";",
"listenerCount",
"=",
"this",
".",
"state",
".",
"elementChangedListenerCount",
";",
"}",
"switch",
"(",
"eventType",
")",
"{",
"case",
"DEFAULT_CHANGE_EVENT",
":",
"case",
"ElementChangedEvent",
".",
"POST_CHANGE",
":",
"firePostChangeDelta",
"(",
"deltaToNotify",
",",
"listeners",
",",
"listenerMask",
",",
"listenerCount",
")",
";",
"fireReconcileDelta",
"(",
"listeners",
",",
"listenerMask",
",",
"listenerCount",
")",
";",
"break",
";",
"}",
"}",
"private",
"void",
"firePostChangeDelta",
"(",
"IJavaElementDelta",
"deltaToNotify",
",",
"IElementChangedListener",
"[",
"]",
"listeners",
",",
"int",
"[",
"]",
"listenerMask",
",",
"int",
"listenerCount",
")",
"{",
"if",
"(",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"]:\"",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"deltaToNotify",
"==",
"null",
"?",
"\"<NONE>\"",
":",
"deltaToNotify",
".",
"toString",
"(",
")",
")",
";",
"}",
"if",
"(",
"deltaToNotify",
"!=",
"null",
")",
"{",
"flush",
"(",
")",
";",
"JavaModelOperation",
".",
"setAttribute",
"(",
"JavaModelOperation",
".",
"HAS_MODIFIED_RESOURCE_ATTR",
",",
"null",
")",
";",
"notifyListeners",
"(",
"deltaToNotify",
",",
"ElementChangedEvent",
".",
"POST_CHANGE",
",",
"listeners",
",",
"listenerMask",
",",
"listenerCount",
")",
";",
"}",
"}",
"private",
"void",
"fireReconcileDelta",
"(",
"IElementChangedListener",
"[",
"]",
"listeners",
",",
"int",
"[",
"]",
"listenerMask",
",",
"int",
"listenerCount",
")",
"{",
"IJavaElementDelta",
"deltaToNotify",
"=",
"mergeDeltas",
"(",
"this",
".",
"reconcileDeltas",
".",
"values",
"(",
")",
")",
";",
"if",
"(",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"]:\"",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"deltaToNotify",
"==",
"null",
"?",
"\"<NONE>\"",
":",
"deltaToNotify",
".",
"toString",
"(",
")",
")",
";",
"}",
"if",
"(",
"deltaToNotify",
"!=",
"null",
")",
"{",
"this",
".",
"reconcileDeltas",
"=",
"new",
"HashMap",
"(",
")",
";",
"notifyListeners",
"(",
"deltaToNotify",
",",
"ElementChangedEvent",
".",
"POST_RECONCILE",
",",
"listeners",
",",
"listenerMask",
",",
"listenerCount",
")",
";",
"}",
"}",
"private",
"boolean",
"isAffectedBy",
"(",
"IResourceDelta",
"rootDelta",
")",
"{",
"if",
"(",
"rootDelta",
"!=",
"null",
")",
"{",
"class",
"FoundRelevantDeltaException",
"extends",
"RuntimeException",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"7137113252936111022L",
";",
"}",
"try",
"{",
"rootDelta",
".",
"accept",
"(",
"new",
"IResourceDeltaVisitor",
"(",
")",
"{",
"public",
"boolean",
"visit",
"(",
"IResourceDelta",
"delta",
")",
"{",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"throw",
"new",
"FoundRelevantDeltaException",
"(",
")",
";",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"if",
"(",
"delta",
".",
"getAffectedChildren",
"(",
")",
".",
"length",
"==",
"0",
"&&",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"~",
"(",
"IResourceDelta",
".",
"SYNC",
"|",
"IResourceDelta",
".",
"MARKERS",
")",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"FoundRelevantDeltaException",
"(",
")",
";",
"}",
"}",
"return",
"true",
";",
"}",
"}",
",",
"IContainer",
".",
"INCLUDE_HIDDEN",
")",
";",
"}",
"catch",
"(",
"FoundRelevantDeltaException",
"e",
")",
"{",
"return",
"true",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"isPrimaryWorkingCopy",
"(",
"IJavaElement",
"element",
",",
"int",
"elementType",
")",
"{",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"COMPILATION_UNIT",
")",
"{",
"CompilationUnit",
"cu",
"=",
"(",
"CompilationUnit",
")",
"element",
";",
"return",
"cu",
".",
"isPrimary",
"(",
")",
"&&",
"cu",
".",
"isWorkingCopy",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"isResFilteredFromOutput",
"(",
"RootInfo",
"rootInfo",
",",
"OutputsInfo",
"info",
",",
"IResource",
"res",
",",
"int",
"elementType",
")",
"{",
"if",
"(",
"info",
"!=",
"null",
")",
"{",
"JavaProject",
"javaProject",
"=",
"null",
";",
"String",
"sourceLevel",
"=",
"null",
";",
"String",
"complianceLevel",
"=",
"null",
";",
"IPath",
"resPath",
"=",
"res",
".",
"getFullPath",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"info",
".",
"outputCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"info",
".",
"paths",
"[",
"i",
"]",
".",
"isPrefixOf",
"(",
"resPath",
")",
")",
"{",
"if",
"(",
"info",
".",
"traverseModes",
"[",
"i",
"]",
"!=",
"IGNORE",
")",
"{",
"if",
"(",
"info",
".",
"traverseModes",
"[",
"i",
"]",
"==",
"SOURCE",
"&&",
"elementType",
"==",
"IJavaElement",
".",
"CLASS_FILE",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"JAVA_PROJECT",
"&&",
"res",
"instanceof",
"IFile",
")",
"{",
"if",
"(",
"sourceLevel",
"==",
"null",
")",
"{",
"javaProject",
"=",
"rootInfo",
"==",
"null",
"?",
"(",
"JavaProject",
")",
"createElement",
"(",
"res",
".",
"getProject",
"(",
")",
",",
"IJavaElement",
".",
"JAVA_PROJECT",
",",
"null",
")",
":",
"rootInfo",
".",
"project",
";",
"if",
"(",
"javaProject",
"!=",
"null",
")",
"{",
"sourceLevel",
"=",
"javaProject",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_SOURCE",
",",
"true",
")",
";",
"complianceLevel",
"=",
"javaProject",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_COMPLIANCE",
",",
"true",
")",
";",
"}",
"}",
"if",
"(",
"Util",
".",
"isValidClassFileName",
"(",
"res",
".",
"getName",
"(",
")",
",",
"sourceLevel",
",",
"complianceLevel",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"else",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"IJavaElementDelta",
"mergeDeltas",
"(",
"Collection",
"deltas",
")",
"{",
"if",
"(",
"deltas",
".",
"size",
"(",
")",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"deltas",
".",
"size",
"(",
")",
"==",
"1",
")",
"return",
"(",
"IJavaElementDelta",
")",
"deltas",
".",
"iterator",
"(",
")",
".",
"next",
"(",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"MERGING",
"\"",
"+",
"deltas",
".",
"size",
"(",
")",
"+",
"\"",
"DELTAS",
"[\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"]\"",
")",
";",
"}",
"Iterator",
"iterator",
"=",
"deltas",
".",
"iterator",
"(",
")",
";",
"JavaElementDelta",
"rootDelta",
"=",
"new",
"JavaElementDelta",
"(",
"this",
".",
"manager",
".",
"javaModel",
")",
";",
"boolean",
"insertedTree",
"=",
"false",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"JavaElementDelta",
"delta",
"=",
"(",
"JavaElementDelta",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"delta",
".",
"toString",
"(",
")",
")",
";",
"}",
"IJavaElement",
"element",
"=",
"delta",
".",
"getElement",
"(",
")",
";",
"if",
"(",
"this",
".",
"manager",
".",
"javaModel",
".",
"equals",
"(",
"element",
")",
")",
"{",
"IJavaElementDelta",
"[",
"]",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"children",
".",
"length",
";",
"j",
"++",
")",
"{",
"JavaElementDelta",
"projectDelta",
"=",
"(",
"JavaElementDelta",
")",
"children",
"[",
"j",
"]",
";",
"rootDelta",
".",
"insertDeltaTree",
"(",
"projectDelta",
".",
"getElement",
"(",
")",
",",
"projectDelta",
")",
";",
"insertedTree",
"=",
"true",
";",
"}",
"IResourceDelta",
"[",
"]",
"resourceDeltas",
"=",
"delta",
".",
"getResourceDeltas",
"(",
")",
";",
"if",
"(",
"resourceDeltas",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"resourceDeltas",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"rootDelta",
".",
"addResourceDelta",
"(",
"resourceDeltas",
"[",
"i",
"]",
")",
";",
"insertedTree",
"=",
"true",
";",
"}",
"}",
"}",
"else",
"{",
"rootDelta",
".",
"insertDeltaTree",
"(",
"element",
",",
"delta",
")",
";",
"insertedTree",
"=",
"true",
";",
"}",
"}",
"if",
"(",
"insertedTree",
")",
"return",
"rootDelta",
";",
"return",
"null",
";",
"}",
"private",
"void",
"notifyListeners",
"(",
"IJavaElementDelta",
"deltaToNotify",
",",
"int",
"eventType",
",",
"IElementChangedListener",
"[",
"]",
"listeners",
",",
"int",
"[",
"]",
"listenerMask",
",",
"int",
"listenerCount",
")",
"{",
"final",
"ElementChangedEvent",
"extraEvent",
"=",
"new",
"ElementChangedEvent",
"(",
"deltaToNotify",
",",
"eventType",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"listenerCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"(",
"listenerMask",
"[",
"i",
"]",
"&",
"eventType",
")",
"!=",
"0",
")",
"{",
"final",
"IElementChangedListener",
"listener",
"=",
"listeners",
"[",
"i",
"]",
";",
"long",
"start",
"=",
"-",
"1",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"Listener",
"#\"",
"+",
"(",
"i",
"+",
"1",
")",
"+",
"\"=\"",
"+",
"listener",
".",
"toString",
"(",
")",
")",
";",
"start",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"}",
"SafeRunner",
".",
"run",
"(",
"new",
"ISafeRunnable",
"(",
")",
"{",
"public",
"void",
"handleException",
"(",
"Throwable",
"exception",
")",
"{",
"Util",
".",
"log",
"(",
"exception",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"throws",
"Exception",
"{",
"PerformanceStats",
"stats",
"=",
"null",
";",
"if",
"(",
"PERF",
")",
"{",
"stats",
"=",
"PerformanceStats",
".",
"getStats",
"(",
"JavaModelManager",
".",
"DELTA_LISTENER_PERF",
",",
"listener",
")",
";",
"stats",
".",
"startRun",
"(",
")",
";",
"}",
"listener",
".",
"elementChanged",
"(",
"extraEvent",
")",
";",
"if",
"(",
"PERF",
")",
"{",
"stats",
".",
"endRun",
"(",
")",
";",
"}",
"}",
"}",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"",
"->",
"\"",
"+",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
"-",
"start",
")",
"+",
"\"ms\"",
")",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"notifyTypeHierarchies",
"(",
"IElementChangedListener",
"[",
"]",
"listeners",
",",
"int",
"listenerCount",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"listenerCount",
";",
"i",
"++",
")",
"{",
"final",
"IElementChangedListener",
"listener",
"=",
"listeners",
"[",
"i",
"]",
";",
"if",
"(",
"!",
"(",
"listener",
"instanceof",
"TypeHierarchy",
")",
")",
"continue",
";",
"SafeRunner",
".",
"run",
"(",
"new",
"ISafeRunnable",
"(",
")",
"{",
"public",
"void",
"handleException",
"(",
"Throwable",
"exception",
")",
"{",
"Util",
".",
"log",
"(",
"exception",
",",
"\"\"",
")",
";",
"}",
"public",
"void",
"run",
"(",
")",
"throws",
"Exception",
"{",
"TypeHierarchy",
"typeHierarchy",
"=",
"(",
"TypeHierarchy",
")",
"listener",
";",
"if",
"(",
"typeHierarchy",
".",
"hasFineGrainChanges",
"(",
")",
")",
"{",
"typeHierarchy",
".",
"needsRefresh",
"=",
"true",
";",
"typeHierarchy",
".",
"fireChange",
"(",
")",
";",
"}",
"}",
"}",
")",
";",
"}",
"}",
"private",
"void",
"nonJavaResourcesChanged",
"(",
"Openable",
"element",
",",
"IResourceDelta",
"delta",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"element",
".",
"isOpen",
"(",
")",
")",
"{",
"JavaElementInfo",
"info",
"=",
"(",
"JavaElementInfo",
")",
"element",
".",
"getElementInfo",
"(",
")",
";",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"(",
"(",
"JavaModelInfo",
")",
"info",
")",
".",
"nonJavaResources",
"=",
"null",
";",
"if",
"(",
"!",
"ExternalFoldersManager",
".",
"isInternalPathForExternalFolder",
"(",
"delta",
".",
"getFullPath",
"(",
")",
")",
")",
"currentDelta",
"(",
")",
".",
"addResourceDelta",
"(",
"delta",
")",
";",
"return",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"(",
"(",
"JavaProjectElementInfo",
")",
"info",
")",
".",
"setNonJavaResources",
"(",
"null",
")",
";",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"element",
";",
"PackageFragmentRoot",
"projectRoot",
"=",
"(",
"PackageFragmentRoot",
")",
"project",
".",
"getPackageFragmentRoot",
"(",
"project",
".",
"getProject",
"(",
")",
")",
";",
"if",
"(",
"projectRoot",
".",
"isOpen",
"(",
")",
")",
"{",
"(",
"(",
"PackageFragmentRootInfo",
")",
"projectRoot",
".",
"getElementInfo",
"(",
")",
")",
".",
"setNonJavaResources",
"(",
"null",
")",
";",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"(",
"(",
"PackageFragmentInfo",
")",
"info",
")",
".",
"setNonJavaResources",
"(",
"null",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"(",
"(",
"PackageFragmentRootInfo",
")",
"info",
")",
".",
"setNonJavaResources",
"(",
"null",
")",
";",
"}",
"}",
"JavaElementDelta",
"current",
"=",
"currentDelta",
"(",
")",
";",
"JavaElementDelta",
"elementDelta",
"=",
"current",
".",
"find",
"(",
"element",
")",
";",
"if",
"(",
"elementDelta",
"==",
"null",
")",
"{",
"elementDelta",
"=",
"current",
".",
"changed",
"(",
"element",
",",
"IJavaElementDelta",
".",
"F_CONTENT",
")",
";",
"}",
"if",
"(",
"!",
"ExternalFoldersManager",
".",
"isInternalPathForExternalFolder",
"(",
"delta",
".",
"getFullPath",
"(",
")",
")",
")",
"elementDelta",
".",
"addResourceDelta",
"(",
"delta",
")",
";",
"}",
"private",
"RootInfo",
"oldRootInfo",
"(",
"IPath",
"path",
",",
"JavaProject",
"project",
")",
"{",
"RootInfo",
"oldInfo",
"=",
"(",
"RootInfo",
")",
"this",
".",
"state",
".",
"oldRoots",
".",
"get",
"(",
"path",
")",
";",
"if",
"(",
"oldInfo",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"oldInfo",
".",
"project",
".",
"equals",
"(",
"project",
")",
")",
"return",
"oldInfo",
";",
"ArrayList",
"oldInfos",
"=",
"(",
"ArrayList",
")",
"this",
".",
"state",
".",
"oldOtherRoots",
".",
"get",
"(",
"path",
")",
";",
"if",
"(",
"oldInfos",
"==",
"null",
")",
"return",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"oldInfos",
".",
"size",
"(",
")",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"oldInfo",
"=",
"(",
"RootInfo",
")",
"oldInfos",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"oldInfo",
".",
"project",
".",
"equals",
"(",
"project",
")",
")",
"return",
"oldInfo",
";",
"}",
"return",
"null",
";",
"}",
"private",
"ArrayList",
"otherRootsInfo",
"(",
"IPath",
"path",
",",
"int",
"kind",
")",
"{",
"if",
"(",
"kind",
"==",
"IResourceDelta",
".",
"REMOVED",
")",
"{",
"return",
"(",
"ArrayList",
")",
"this",
".",
"state",
".",
"oldOtherRoots",
".",
"get",
"(",
"path",
")",
";",
"}",
"return",
"(",
"ArrayList",
")",
"this",
".",
"state",
".",
"otherRoots",
".",
"get",
"(",
"path",
")",
";",
"}",
"private",
"OutputsInfo",
"outputsInfo",
"(",
"RootInfo",
"rootInfo",
",",
"IResource",
"res",
")",
"{",
"try",
"{",
"JavaProject",
"proj",
"=",
"rootInfo",
"==",
"null",
"?",
"(",
"JavaProject",
")",
"createElement",
"(",
"res",
".",
"getProject",
"(",
")",
",",
"IJavaElement",
".",
"JAVA_PROJECT",
",",
"null",
")",
":",
"rootInfo",
".",
"project",
";",
"if",
"(",
"proj",
"!=",
"null",
")",
"{",
"IPath",
"projectOutput",
"=",
"proj",
".",
"getOutputLocation",
"(",
")",
";",
"int",
"traverseMode",
"=",
"IGNORE",
";",
"if",
"(",
"proj",
".",
"getProject",
"(",
")",
".",
"getFullPath",
"(",
")",
".",
"equals",
"(",
"projectOutput",
")",
")",
"{",
"return",
"new",
"OutputsInfo",
"(",
"new",
"IPath",
"[",
"]",
"{",
"projectOutput",
"}",
",",
"new",
"int",
"[",
"]",
"{",
"SOURCE",
"}",
",",
"1",
")",
";",
"}",
"IClasspathEntry",
"[",
"]",
"classpath",
"=",
"proj",
".",
"getResolvedClasspath",
"(",
")",
";",
"IPath",
"[",
"]",
"outputs",
"=",
"new",
"IPath",
"[",
"classpath",
".",
"length",
"+",
"1",
"]",
";",
"int",
"[",
"]",
"traverseModes",
"=",
"new",
"int",
"[",
"classpath",
".",
"length",
"+",
"1",
"]",
";",
"int",
"outputCount",
"=",
"1",
";",
"outputs",
"[",
"0",
"]",
"=",
"projectOutput",
";",
"traverseModes",
"[",
"0",
"]",
"=",
"traverseMode",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"classpath",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"classpath",
"[",
"i",
"]",
";",
"IPath",
"entryPath",
"=",
"entry",
".",
"getPath",
"(",
")",
";",
"IPath",
"output",
"=",
"entry",
".",
"getOutputLocation",
"(",
")",
";",
"if",
"(",
"output",
"!=",
"null",
")",
"{",
"outputs",
"[",
"outputCount",
"]",
"=",
"output",
";",
"if",
"(",
"entryPath",
".",
"equals",
"(",
"output",
")",
")",
"{",
"traverseModes",
"[",
"outputCount",
"++",
"]",
"=",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_SOURCE",
")",
"?",
"SOURCE",
":",
"BINARY",
";",
"}",
"else",
"{",
"traverseModes",
"[",
"outputCount",
"++",
"]",
"=",
"IGNORE",
";",
"}",
"}",
"if",
"(",
"entryPath",
".",
"equals",
"(",
"projectOutput",
")",
")",
"{",
"traverseModes",
"[",
"0",
"]",
"=",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_SOURCE",
")",
"?",
"SOURCE",
":",
"BINARY",
";",
"}",
"}",
"return",
"new",
"OutputsInfo",
"(",
"outputs",
",",
"traverseModes",
",",
"outputCount",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"popUntilPrefixOf",
"(",
"IPath",
"path",
")",
"{",
"while",
"(",
"this",
".",
"currentElement",
"!=",
"null",
")",
"{",
"IPath",
"currentElementPath",
"=",
"null",
";",
"if",
"(",
"this",
".",
"currentElement",
"instanceof",
"IPackageFragmentRoot",
")",
"{",
"currentElementPath",
"=",
"(",
"(",
"IPackageFragmentRoot",
")",
"this",
".",
"currentElement",
")",
".",
"getPath",
"(",
")",
";",
"}",
"else",
"{",
"IResource",
"currentElementResource",
"=",
"this",
".",
"currentElement",
".",
"resource",
"(",
")",
";",
"if",
"(",
"currentElementResource",
"!=",
"null",
")",
"{",
"currentElementPath",
"=",
"currentElementResource",
".",
"getFullPath",
"(",
")",
";",
"}",
"}",
"if",
"(",
"currentElementPath",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"currentElement",
"instanceof",
"IPackageFragment",
"&&",
"(",
"(",
"IPackageFragment",
")",
"this",
".",
"currentElement",
")",
".",
"isDefaultPackage",
"(",
")",
"&&",
"currentElementPath",
".",
"segmentCount",
"(",
")",
"!=",
"path",
".",
"segmentCount",
"(",
")",
"-",
"1",
")",
"{",
"this",
".",
"currentElement",
"=",
"(",
"Openable",
")",
"this",
".",
"currentElement",
".",
"getParent",
"(",
")",
";",
"}",
"if",
"(",
"currentElementPath",
".",
"isPrefixOf",
"(",
"path",
")",
")",
"{",
"return",
";",
"}",
"}",
"this",
".",
"currentElement",
"=",
"(",
"Openable",
")",
"this",
".",
"currentElement",
".",
"getParent",
"(",
")",
";",
"}",
"}",
"private",
"IJavaElementDelta",
"processResourceDelta",
"(",
"IResourceDelta",
"changes",
")",
"{",
"try",
"{",
"IJavaModel",
"model",
"=",
"this",
".",
"manager",
".",
"getJavaModel",
"(",
")",
";",
"if",
"(",
"!",
"model",
".",
"isOpen",
"(",
")",
")",
"{",
"try",
"{",
"model",
".",
"open",
"(",
"null",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"if",
"(",
"VERBOSE",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"return",
"null",
";",
"}",
"}",
"this",
".",
"state",
".",
"initializeRoots",
"(",
"false",
")",
";",
"this",
".",
"currentElement",
"=",
"null",
";",
"IResourceDelta",
"[",
"]",
"deltas",
"=",
"changes",
".",
"getAffectedChildren",
"(",
"IResourceDelta",
".",
"ADDED",
"|",
"IResourceDelta",
".",
"REMOVED",
"|",
"IResourceDelta",
".",
"CHANGED",
",",
"IContainer",
".",
"INCLUDE_HIDDEN",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"deltas",
".",
"length",
";",
"i",
"++",
")",
"{",
"IResourceDelta",
"delta",
"=",
"deltas",
"[",
"i",
"]",
";",
"IResource",
"res",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"RootInfo",
"rootInfo",
"=",
"null",
";",
"int",
"elementType",
";",
"IProject",
"proj",
"=",
"(",
"IProject",
")",
"res",
";",
"boolean",
"wasJavaProject",
"=",
"this",
".",
"state",
".",
"findJavaProject",
"(",
"proj",
".",
"getName",
"(",
")",
")",
"!=",
"null",
";",
"boolean",
"isJavaProject",
"=",
"JavaProject",
".",
"hasJavaNature",
"(",
"proj",
")",
";",
"if",
"(",
"!",
"wasJavaProject",
"&&",
"!",
"isJavaProject",
")",
"{",
"elementType",
"=",
"NON_JAVA_RESOURCE",
";",
"}",
"else",
"{",
"IPath",
"rootPath",
"=",
"externalPath",
"(",
"res",
")",
";",
"rootInfo",
"=",
"enclosingRootInfo",
"(",
"rootPath",
",",
"delta",
".",
"getKind",
"(",
")",
")",
";",
"if",
"(",
"rootInfo",
"!=",
"null",
"&&",
"rootInfo",
".",
"isRootOfProject",
"(",
"rootPath",
")",
")",
"{",
"elementType",
"=",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
";",
"}",
"else",
"{",
"elementType",
"=",
"IJavaElement",
".",
"JAVA_PROJECT",
";",
"}",
"}",
"traverseDelta",
"(",
"delta",
",",
"elementType",
",",
"rootInfo",
",",
"null",
")",
";",
"if",
"(",
"elementType",
"==",
"NON_JAVA_RESOURCE",
"||",
"(",
"wasJavaProject",
"!=",
"isJavaProject",
"&&",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"==",
"IResourceDelta",
".",
"CHANGED",
")",
")",
"{",
"try",
"{",
"nonJavaResourcesChanged",
"(",
"(",
"JavaModel",
")",
"model",
",",
"delta",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"}",
"resetProjectCaches",
"(",
")",
";",
"return",
"this",
".",
"currentDelta",
";",
"}",
"finally",
"{",
"this",
".",
"currentDelta",
"=",
"null",
";",
"}",
"}",
"public",
"void",
"resetProjectCaches",
"(",
")",
"{",
"if",
"(",
"this",
".",
"projectCachesToReset",
".",
"size",
"(",
")",
"==",
"0",
")",
"return",
";",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"resetJarTypeCache",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"this",
".",
"projectCachesToReset",
".",
"iterator",
"(",
")",
";",
"HashMap",
"projectDepencies",
"=",
"this",
".",
"state",
".",
"projectDependencies",
";",
"HashSet",
"affectedDependents",
"=",
"new",
"HashSet",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"iterator",
".",
"next",
"(",
")",
";",
"project",
".",
"resetCaches",
"(",
")",
";",
"addDependentProjects",
"(",
"project",
",",
"projectDepencies",
",",
"affectedDependents",
")",
";",
"}",
"iterator",
"=",
"affectedDependents",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"iterator",
".",
"next",
"(",
")",
";",
"project",
".",
"resetCaches",
"(",
")",
";",
"}",
"this",
".",
"projectCachesToReset",
".",
"clear",
"(",
")",
";",
"}",
"public",
"void",
"registerJavaModelDelta",
"(",
"IJavaElementDelta",
"delta",
")",
"{",
"this",
".",
"javaModelDeltas",
".",
"add",
"(",
"delta",
")",
";",
"}",
"private",
"void",
"removeFromParentInfo",
"(",
"Openable",
"child",
")",
"{",
"Openable",
"parent",
"=",
"(",
"Openable",
")",
"child",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"parent",
"!=",
"null",
"&&",
"parent",
".",
"isOpen",
"(",
")",
")",
"{",
"try",
"{",
"OpenableElementInfo",
"info",
"=",
"(",
"OpenableElementInfo",
")",
"parent",
".",
"getElementInfo",
"(",
")",
";",
"info",
".",
"removeChild",
"(",
"child",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"}",
"public",
"void",
"resourceChanged",
"(",
"IResourceChangeEvent",
"event",
")",
"{",
"int",
"eventType",
"=",
"this",
".",
"overridenEventType",
"==",
"-",
"1",
"?",
"event",
".",
"getType",
"(",
")",
":",
"this",
".",
"overridenEventType",
";",
"IResource",
"resource",
"=",
"event",
".",
"getResource",
"(",
")",
";",
"IResourceDelta",
"delta",
"=",
"event",
".",
"getDelta",
"(",
")",
";",
"switch",
"(",
"eventType",
")",
"{",
"case",
"IResourceChangeEvent",
".",
"PRE_DELETE",
":",
"try",
"{",
"if",
"(",
"resource",
".",
"getType",
"(",
")",
"==",
"IResource",
".",
"PROJECT",
"&&",
"(",
"(",
"IProject",
")",
"resource",
")",
".",
"hasNature",
"(",
"JavaCore",
".",
"NATURE_ID",
")",
")",
"{",
"deleting",
"(",
"(",
"IProject",
")",
"resource",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"return",
";",
"case",
"IResourceChangeEvent",
".",
"PRE_REFRESH",
":",
"IProject",
"[",
"]",
"projects",
"=",
"null",
";",
"Object",
"o",
"=",
"event",
".",
"getSource",
"(",
")",
";",
"if",
"(",
"o",
"instanceof",
"IProject",
")",
"{",
"projects",
"=",
"new",
"IProject",
"[",
"]",
"{",
"(",
"IProject",
")",
"o",
"}",
";",
"}",
"else",
"if",
"(",
"o",
"instanceof",
"IWorkspace",
")",
"{",
"projects",
"=",
"(",
"(",
"IWorkspace",
")",
"o",
")",
".",
"getRoot",
"(",
")",
".",
"getProjects",
"(",
"IContainer",
".",
"INCLUDE_HIDDEN",
")",
";",
"}",
"JavaModelManager",
".",
"getExternalManager",
"(",
")",
".",
"refreshReferences",
"(",
"projects",
",",
"null",
")",
";",
"IJavaProject",
"[",
"]",
"javaElements",
"=",
"new",
"IJavaProject",
"[",
"projects",
".",
"length",
"]",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"projects",
".",
"length",
";",
"index",
"++",
")",
"{",
"javaElements",
"[",
"index",
"]",
"=",
"JavaCore",
".",
"create",
"(",
"projects",
"[",
"index",
"]",
")",
";",
"}",
"try",
"{",
"checkExternalArchiveChanges",
"(",
"javaElements",
",",
"true",
",",
"null",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"if",
"(",
"!",
"e",
".",
"isDoesNotExist",
"(",
")",
")",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"return",
";",
"case",
"IResourceChangeEvent",
".",
"POST_CHANGE",
":",
"HashSet",
"elementsToRefresh",
"=",
"this",
".",
"state",
".",
"removeExternalElementsToRefresh",
"(",
")",
";",
"if",
"(",
"isAffectedBy",
"(",
"delta",
")",
"||",
"elementsToRefresh",
"!=",
"null",
")",
"{",
"try",
"{",
"try",
"{",
"stopDeltas",
"(",
")",
";",
"checkProjectsAndClasspathChanges",
"(",
"delta",
")",
";",
"if",
"(",
"elementsToRefresh",
"!=",
"null",
")",
"{",
"createExternalArchiveDelta",
"(",
"elementsToRefresh",
",",
"null",
")",
";",
"}",
"HashMap",
"classpathChanges",
"=",
"this",
".",
"state",
".",
"removeAllClasspathChanges",
"(",
")",
";",
"if",
"(",
"classpathChanges",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"boolean",
"hasDelta",
"=",
"this",
".",
"currentDelta",
"!=",
"null",
";",
"JavaElementDelta",
"javaDelta",
"=",
"currentDelta",
"(",
")",
";",
"Iterator",
"changes",
"=",
"classpathChanges",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"changes",
".",
"hasNext",
"(",
")",
")",
"{",
"ClasspathChange",
"change",
"=",
"(",
"ClasspathChange",
")",
"changes",
".",
"next",
"(",
")",
";",
"int",
"result",
"=",
"change",
".",
"generateDelta",
"(",
"javaDelta",
",",
"false",
")",
";",
"if",
"(",
"(",
"result",
"&",
"ClasspathChange",
".",
"HAS_DELTA",
")",
"!=",
"0",
")",
"{",
"hasDelta",
"=",
"true",
";",
"this",
".",
"state",
".",
"rootsAreStale",
"=",
"true",
";",
"change",
".",
"requestIndexing",
"(",
")",
";",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"change",
".",
"project",
")",
";",
"}",
"if",
"(",
"(",
"result",
"&",
"ClasspathChange",
".",
"HAS_PROJECT_CHANGE",
")",
"!=",
"0",
")",
"{",
"this",
".",
"state",
".",
"addProjectReferenceChange",
"(",
"change",
".",
"project",
",",
"change",
".",
"oldResolvedClasspath",
")",
";",
"}",
"if",
"(",
"(",
"result",
"&",
"ClasspathChange",
".",
"HAS_LIBRARY_CHANGE",
")",
"!=",
"0",
")",
"{",
"this",
".",
"state",
".",
"addExternalFolderChange",
"(",
"change",
".",
"project",
",",
"change",
".",
"oldResolvedClasspath",
")",
";",
"}",
"}",
"elementsToRefresh",
"=",
"this",
".",
"state",
".",
"removeExternalElementsToRefresh",
"(",
")",
";",
"if",
"(",
"elementsToRefresh",
"!=",
"null",
")",
"{",
"hasDelta",
"|=",
"createExternalArchiveDelta",
"(",
"elementsToRefresh",
",",
"null",
")",
";",
"}",
"if",
"(",
"!",
"hasDelta",
")",
"this",
".",
"currentDelta",
"=",
"null",
";",
"}",
"IJavaElementDelta",
"translatedDelta",
"=",
"processResourceDelta",
"(",
"delta",
")",
";",
"if",
"(",
"translatedDelta",
"!=",
"null",
")",
"{",
"registerJavaModelDelta",
"(",
"translatedDelta",
")",
";",
"}",
"}",
"finally",
"{",
"this",
".",
"sourceElementParserCache",
"=",
"null",
";",
"startDeltas",
"(",
")",
";",
"}",
"IElementChangedListener",
"[",
"]",
"listeners",
";",
"int",
"listenerCount",
";",
"synchronized",
"(",
"this",
".",
"state",
")",
"{",
"listeners",
"=",
"this",
".",
"state",
".",
"elementChangedListeners",
";",
"listenerCount",
"=",
"this",
".",
"state",
".",
"elementChangedListenerCount",
";",
"}",
"notifyTypeHierarchies",
"(",
"listeners",
",",
"listenerCount",
")",
";",
"fire",
"(",
"null",
",",
"ElementChangedEvent",
".",
"POST_CHANGE",
")",
";",
"}",
"finally",
"{",
"this",
".",
"state",
".",
"resetOldJavaProjectNames",
"(",
")",
";",
"this",
".",
"oldRoots",
"=",
"null",
";",
"}",
"}",
"return",
";",
"case",
"IResourceChangeEvent",
".",
"PRE_BUILD",
":",
"this",
".",
"state",
".",
"initializeRoots",
"(",
"false",
")",
";",
"boolean",
"isAffected",
"=",
"isAffectedBy",
"(",
"delta",
")",
";",
"boolean",
"needCycleValidation",
"=",
"isAffected",
"&&",
"validateClasspaths",
"(",
"delta",
")",
";",
"ExternalFolderChange",
"[",
"]",
"folderChanges",
"=",
"this",
".",
"state",
".",
"removeExternalFolderChanges",
"(",
")",
";",
"if",
"(",
"folderChanges",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"folderChanges",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"try",
"{",
"folderChanges",
"[",
"i",
"]",
".",
"updateExternalFoldersIfNecessary",
"(",
"false",
",",
"null",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"if",
"(",
"!",
"e",
".",
"isDoesNotExist",
"(",
")",
")",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"}",
"}",
"ClasspathValidation",
"[",
"]",
"validations",
"=",
"this",
".",
"state",
".",
"removeClasspathValidations",
"(",
")",
";",
"if",
"(",
"validations",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"validations",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ClasspathValidation",
"validation",
"=",
"validations",
"[",
"i",
"]",
";",
"validation",
".",
"validate",
"(",
")",
";",
"}",
"}",
"ProjectReferenceChange",
"[",
"]",
"projectRefChanges",
"=",
"this",
".",
"state",
".",
"removeProjectReferenceChanges",
"(",
")",
";",
"if",
"(",
"projectRefChanges",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"projectRefChanges",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"try",
"{",
"projectRefChanges",
"[",
"i",
"]",
".",
"updateProjectReferencesIfNecessary",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"if",
"(",
"!",
"e",
".",
"isDoesNotExist",
"(",
")",
")",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"}",
"}",
"if",
"(",
"needCycleValidation",
"||",
"projectRefChanges",
"!=",
"null",
")",
"{",
"try",
"{",
"JavaProject",
".",
"validateCycles",
"(",
"null",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"if",
"(",
"isAffected",
")",
"{",
"JavaModel",
".",
"flushExternalFileCache",
"(",
")",
";",
"JavaBuilder",
".",
"buildStarting",
"(",
")",
";",
"}",
"return",
";",
"case",
"IResourceChangeEvent",
".",
"POST_BUILD",
":",
"JavaBuilder",
".",
"buildFinished",
"(",
")",
";",
"return",
";",
"}",
"}",
"private",
"RootInfo",
"rootInfo",
"(",
"IPath",
"path",
",",
"int",
"kind",
")",
"{",
"if",
"(",
"kind",
"==",
"IResourceDelta",
".",
"REMOVED",
")",
"{",
"return",
"(",
"RootInfo",
")",
"this",
".",
"state",
".",
"oldRoots",
".",
"get",
"(",
"path",
")",
";",
"}",
"return",
"(",
"RootInfo",
")",
"this",
".",
"state",
".",
"roots",
".",
"get",
"(",
"path",
")",
";",
"}",
"private",
"void",
"startDeltas",
"(",
")",
"{",
"this",
".",
"isFiring",
"=",
"true",
";",
"}",
"private",
"void",
"stopDeltas",
"(",
")",
"{",
"this",
".",
"isFiring",
"=",
"false",
";",
"}",
"private",
"void",
"traverseDelta",
"(",
"IResourceDelta",
"delta",
",",
"int",
"elementType",
",",
"RootInfo",
"rootInfo",
",",
"OutputsInfo",
"outputsInfo",
")",
"{",
"IResource",
"res",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"if",
"(",
"this",
".",
"currentElement",
"==",
"null",
"&&",
"rootInfo",
"!=",
"null",
")",
"{",
"this",
".",
"currentElement",
"=",
"rootInfo",
".",
"project",
";",
"}",
"boolean",
"processChildren",
"=",
"true",
";",
"if",
"(",
"res",
"instanceof",
"IProject",
")",
"{",
"this",
".",
"sourceElementParserCache",
"=",
"null",
";",
"processChildren",
"=",
"updateCurrentDeltaAndIndex",
"(",
"delta",
",",
"elementType",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
"?",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"elementType",
",",
"rootInfo",
")",
";",
"}",
"else",
"if",
"(",
"rootInfo",
"!=",
"null",
")",
"{",
"processChildren",
"=",
"updateCurrentDeltaAndIndex",
"(",
"delta",
",",
"elementType",
",",
"rootInfo",
")",
";",
"}",
"else",
"{",
"processChildren",
"=",
"true",
";",
"}",
"if",
"(",
"outputsInfo",
"==",
"null",
")",
"outputsInfo",
"=",
"outputsInfo",
"(",
"rootInfo",
",",
"res",
")",
";",
"if",
"(",
"processChildren",
")",
"{",
"IResourceDelta",
"[",
"]",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"boolean",
"oneChildOnClasspath",
"=",
"false",
";",
"int",
"length",
"=",
"children",
".",
"length",
";",
"IResourceDelta",
"[",
"]",
"orphanChildren",
"=",
"null",
";",
"Openable",
"parent",
"=",
"null",
";",
"boolean",
"isValidParent",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IResourceDelta",
"child",
"=",
"children",
"[",
"i",
"]",
";",
"IResource",
"childRes",
"=",
"child",
".",
"getResource",
"(",
")",
";",
"checkSourceAttachmentChange",
"(",
"child",
",",
"childRes",
")",
";",
"IPath",
"childPath",
"=",
"externalPath",
"(",
"childRes",
")",
";",
"int",
"childKind",
"=",
"child",
".",
"getKind",
"(",
")",
";",
"RootInfo",
"childRootInfo",
"=",
"rootInfo",
"(",
"childPath",
",",
"childKind",
")",
";",
"RootInfo",
"originalChildRootInfo",
"=",
"childRootInfo",
";",
"if",
"(",
"childRootInfo",
"!=",
"null",
"&&",
"!",
"childRootInfo",
".",
"isRootOfProject",
"(",
"childPath",
")",
")",
"{",
"childRootInfo",
"=",
"null",
";",
"}",
"int",
"childType",
"=",
"elementType",
"(",
"childRes",
",",
"childKind",
",",
"elementType",
",",
"rootInfo",
"==",
"null",
"?",
"childRootInfo",
":",
"rootInfo",
")",
";",
"boolean",
"isResFilteredFromOutput",
"=",
"isResFilteredFromOutput",
"(",
"rootInfo",
",",
"outputsInfo",
",",
"childRes",
",",
"childType",
")",
";",
"boolean",
"isNestedRoot",
"=",
"rootInfo",
"!=",
"null",
"&&",
"childRootInfo",
"!=",
"null",
";",
"if",
"(",
"!",
"isResFilteredFromOutput",
"&&",
"!",
"isNestedRoot",
")",
"{",
"traverseDelta",
"(",
"child",
",",
"childType",
",",
"rootInfo",
"==",
"null",
"?",
"childRootInfo",
":",
"rootInfo",
",",
"outputsInfo",
")",
";",
"if",
"(",
"childType",
"==",
"NON_JAVA_RESOURCE",
")",
"{",
"if",
"(",
"rootInfo",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"isValidParent",
")",
"continue",
";",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"currentElement",
"==",
"null",
"||",
"!",
"rootInfo",
".",
"project",
".",
"equals",
"(",
"this",
".",
"currentElement",
".",
"getJavaProject",
"(",
")",
")",
")",
"{",
"this",
".",
"currentElement",
"=",
"rootInfo",
".",
"project",
";",
"}",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"JAVA_PROJECT",
"||",
"(",
"elementType",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
"&&",
"res",
"instanceof",
"IProject",
")",
")",
"{",
"parent",
"=",
"rootInfo",
".",
"project",
";",
"}",
"else",
"{",
"parent",
"=",
"createElement",
"(",
"res",
",",
"elementType",
",",
"rootInfo",
")",
";",
"}",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"isValidParent",
"=",
"false",
";",
"continue",
";",
"}",
"}",
"try",
"{",
"nonJavaResourcesChanged",
"(",
"parent",
",",
"child",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"else",
"{",
"if",
"(",
"orphanChildren",
"==",
"null",
")",
"orphanChildren",
"=",
"new",
"IResourceDelta",
"[",
"length",
"]",
";",
"orphanChildren",
"[",
"i",
"]",
"=",
"child",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"rootInfo",
"==",
"null",
"&&",
"childRootInfo",
"==",
"null",
")",
"{",
"if",
"(",
"orphanChildren",
"==",
"null",
")",
"orphanChildren",
"=",
"new",
"IResourceDelta",
"[",
"length",
"]",
";",
"orphanChildren",
"[",
"i",
"]",
"=",
"child",
";",
"}",
"}",
"}",
"else",
"{",
"oneChildOnClasspath",
"=",
"true",
";",
"}",
"if",
"(",
"isNestedRoot",
"||",
"(",
"childRootInfo",
"==",
"null",
"&&",
"originalChildRootInfo",
"!=",
"null",
")",
")",
"{",
"traverseDelta",
"(",
"child",
",",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
",",
"originalChildRootInfo",
",",
"null",
")",
";",
"}",
"ArrayList",
"rootList",
";",
"if",
"(",
"(",
"rootList",
"=",
"otherRootsInfo",
"(",
"childPath",
",",
"childKind",
")",
")",
"!=",
"null",
")",
"{",
"Iterator",
"iterator",
"=",
"rootList",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"originalChildRootInfo",
"=",
"(",
"RootInfo",
")",
"iterator",
".",
"next",
"(",
")",
";",
"this",
".",
"currentElement",
"=",
"null",
";",
"traverseDelta",
"(",
"child",
",",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
",",
"originalChildRootInfo",
",",
"null",
")",
";",
"}",
"}",
"}",
"if",
"(",
"orphanChildren",
"!=",
"null",
"&&",
"(",
"oneChildOnClasspath",
"||",
"res",
"instanceof",
"IProject",
")",
")",
"{",
"IProject",
"rscProject",
"=",
"res",
".",
"getProject",
"(",
")",
";",
"JavaProject",
"adoptiveProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"rscProject",
")",
";",
"if",
"(",
"adoptiveProject",
"!=",
"null",
"&&",
"JavaProject",
".",
"hasJavaNature",
"(",
"rscProject",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"orphanChildren",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"try",
"{",
"nonJavaResourcesChanged",
"(",
"adoptiveProject",
",",
"orphanChildren",
"[",
"i",
"]",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"}",
"}",
"}",
"}",
"}",
"private",
"void",
"validateClasspaths",
"(",
"IResourceDelta",
"delta",
",",
"HashSet",
"affectedProjects",
")",
"{",
"IResource",
"resource",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"boolean",
"processChildren",
"=",
"false",
";",
"switch",
"(",
"resource",
".",
"getType",
"(",
")",
")",
"{",
"case",
"IResource",
".",
"ROOT",
":",
"if",
"(",
"delta",
".",
"getKind",
"(",
")",
"==",
"IResourceDelta",
".",
"CHANGED",
")",
"{",
"processChildren",
"=",
"true",
";",
"}",
"break",
";",
"case",
"IResource",
".",
"PROJECT",
":",
"IProject",
"project",
"=",
"(",
"IProject",
")",
"resource",
";",
"int",
"kind",
"=",
"delta",
".",
"getKind",
"(",
")",
";",
"boolean",
"isJavaProject",
"=",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
";",
"switch",
"(",
"kind",
")",
"{",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"processChildren",
"=",
"isJavaProject",
";",
"affectedProjects",
".",
"add",
"(",
"project",
".",
"getFullPath",
"(",
")",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"processChildren",
"=",
"isJavaProject",
";",
"if",
"(",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"OPEN",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"isJavaProject",
")",
"{",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
";",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"}",
"affectedProjects",
".",
"add",
"(",
"project",
".",
"getFullPath",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"DESCRIPTION",
")",
"!=",
"0",
")",
"{",
"boolean",
"wasJavaProject",
"=",
"this",
".",
"state",
".",
"findJavaProject",
"(",
"project",
".",
"getName",
"(",
")",
")",
"!=",
"null",
";",
"if",
"(",
"wasJavaProject",
"!=",
"isJavaProject",
")",
"{",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
";",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"affectedProjects",
".",
"add",
"(",
"project",
".",
"getFullPath",
"(",
")",
")",
";",
"}",
"}",
"break",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"affectedProjects",
".",
"add",
"(",
"project",
".",
"getFullPath",
"(",
")",
")",
";",
"break",
";",
"}",
"break",
";",
"case",
"IResource",
".",
"FILE",
":",
"IFile",
"file",
"=",
"(",
"IFile",
")",
"resource",
";",
"String",
"fileName",
"=",
"file",
".",
"getName",
"(",
")",
";",
"RootInfo",
"rootInfo",
"=",
"null",
";",
"if",
"(",
"fileName",
".",
"equals",
"(",
"JavaProject",
".",
"CLASSPATH_FILENAME",
")",
"||",
"(",
"(",
"rootInfo",
"=",
"rootInfo",
"(",
"file",
".",
"getFullPath",
"(",
")",
",",
"delta",
".",
"getKind",
"(",
")",
")",
")",
"!=",
"null",
"&&",
"rootInfo",
".",
"entryKind",
"==",
"IClasspathEntry",
".",
"CPE_LIBRARY",
")",
")",
"{",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"file",
".",
"getProject",
"(",
")",
")",
";",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"affectedProjects",
".",
"add",
"(",
"file",
".",
"getProject",
"(",
")",
".",
"getFullPath",
"(",
")",
")",
";",
"}",
"break",
";",
"}",
"if",
"(",
"processChildren",
")",
"{",
"IResourceDelta",
"[",
"]",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
")",
"{",
"validateClasspaths",
"(",
"children",
"[",
"i",
"]",
",",
"affectedProjects",
")",
";",
"}",
"}",
"}",
"private",
"boolean",
"validateClasspaths",
"(",
"IResourceDelta",
"delta",
")",
"{",
"HashSet",
"affectedProjects",
"=",
"new",
"HashSet",
"(",
"5",
")",
";",
"validateClasspaths",
"(",
"delta",
",",
"affectedProjects",
")",
";",
"boolean",
"needCycleValidation",
"=",
"false",
";",
"if",
"(",
"!",
"affectedProjects",
".",
"isEmpty",
"(",
")",
")",
"{",
"IWorkspaceRoot",
"workspaceRoot",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
";",
"IProject",
"[",
"]",
"projects",
"=",
"workspaceRoot",
".",
"getProjects",
"(",
")",
";",
"int",
"length",
"=",
"projects",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IProject",
"project",
"=",
"projects",
"[",
"i",
"]",
";",
"JavaProject",
"javaProject",
"=",
"(",
"JavaProject",
")",
"JavaCore",
".",
"create",
"(",
"project",
")",
";",
"try",
"{",
"IPath",
"projectPath",
"=",
"project",
".",
"getFullPath",
"(",
")",
";",
"IClasspathEntry",
"[",
"]",
"classpath",
"=",
"javaProject",
".",
"getResolvedClasspath",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"cpLength",
"=",
"classpath",
".",
"length",
";",
"j",
"<",
"cpLength",
";",
"j",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"classpath",
"[",
"j",
"]",
";",
"switch",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
")",
"{",
"case",
"IClasspathEntry",
".",
"CPE_PROJECT",
":",
"if",
"(",
"affectedProjects",
".",
"contains",
"(",
"entry",
".",
"getPath",
"(",
")",
")",
")",
"{",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"needCycleValidation",
"=",
"true",
";",
"}",
"break",
";",
"case",
"IClasspathEntry",
".",
"CPE_LIBRARY",
":",
"IPath",
"entryPath",
"=",
"entry",
".",
"getPath",
"(",
")",
";",
"IPath",
"libProjectPath",
"=",
"entryPath",
".",
"removeLastSegments",
"(",
"entryPath",
".",
"segmentCount",
"(",
")",
"-",
"1",
")",
";",
"if",
"(",
"!",
"libProjectPath",
".",
"equals",
"(",
"projectPath",
")",
"&&",
"affectedProjects",
".",
"contains",
"(",
"libProjectPath",
")",
")",
"{",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"javaProject",
")",
";",
"}",
"break",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"}",
"return",
"needCycleValidation",
";",
"}",
"public",
"boolean",
"updateCurrentDeltaAndIndex",
"(",
"IResourceDelta",
"delta",
",",
"int",
"elementType",
",",
"RootInfo",
"rootInfo",
")",
"{",
"Openable",
"element",
";",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"IResource",
"deltaRes",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"element",
"=",
"createElement",
"(",
"deltaRes",
",",
"elementType",
",",
"rootInfo",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"this",
".",
"state",
".",
"updateRoots",
"(",
"deltaRes",
".",
"getFullPath",
"(",
")",
",",
"delta",
",",
"this",
")",
";",
"return",
"rootInfo",
"!=",
"null",
"&&",
"rootInfo",
".",
"inclusionPatterns",
"!=",
"null",
";",
"}",
"updateIndex",
"(",
"element",
",",
"delta",
")",
";",
"elementAdded",
"(",
"element",
",",
"delta",
",",
"rootInfo",
")",
";",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
")",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"rootInfo",
".",
"project",
")",
";",
"return",
"elementType",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"deltaRes",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"element",
"=",
"createElement",
"(",
"deltaRes",
",",
"elementType",
",",
"rootInfo",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"this",
".",
"state",
".",
"updateRoots",
"(",
"deltaRes",
".",
"getFullPath",
"(",
")",
",",
"delta",
",",
"this",
")",
";",
"return",
"rootInfo",
"!=",
"null",
"&&",
"rootInfo",
".",
"inclusionPatterns",
"!=",
"null",
";",
"}",
"updateIndex",
"(",
"element",
",",
"delta",
")",
";",
"elementRemoved",
"(",
"element",
",",
"delta",
",",
"rootInfo",
")",
";",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
")",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"rootInfo",
".",
"project",
")",
";",
"if",
"(",
"deltaRes",
".",
"getType",
"(",
")",
"==",
"IResource",
".",
"PROJECT",
")",
"{",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"deltaRes",
")",
";",
"this",
".",
"manager",
".",
"setLastBuiltState",
"(",
"(",
"IProject",
")",
"deltaRes",
",",
"null",
")",
";",
"this",
".",
"manager",
".",
"previousSessionContainers",
".",
"remove",
"(",
"element",
")",
";",
"}",
"return",
"elementType",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
";",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"int",
"flags",
"=",
"delta",
".",
"getFlags",
"(",
")",
";",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
"&&",
"(",
"flags",
"&",
"IResourceDelta",
".",
"LOCAL_CHANGED",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"oldRootInfo",
"(",
"rootInfo",
".",
"rootPath",
",",
"rootInfo",
".",
"project",
")",
"==",
"null",
")",
"{",
"break",
";",
"}",
"deltaRes",
"=",
"delta",
".",
"getResource",
"(",
")",
";",
"Object",
"target",
"=",
"JavaModel",
".",
"getExternalTarget",
"(",
"deltaRes",
".",
"getLocation",
"(",
")",
",",
"true",
")",
";",
"element",
"=",
"createElement",
"(",
"deltaRes",
",",
"elementType",
",",
"rootInfo",
")",
";",
"updateIndex",
"(",
"element",
",",
"delta",
")",
";",
"if",
"(",
"target",
"!=",
"null",
")",
"{",
"elementAdded",
"(",
"element",
",",
"delta",
",",
"rootInfo",
")",
";",
"}",
"else",
"{",
"elementRemoved",
"(",
"element",
",",
"delta",
",",
"rootInfo",
")",
";",
"}",
"this",
".",
"state",
".",
"addClasspathValidation",
"(",
"rootInfo",
".",
"project",
")",
";",
"}",
"else",
"if",
"(",
"(",
"flags",
"&",
"IResourceDelta",
".",
"CONTENT",
")",
"!=",
"0",
"||",
"(",
"flags",
"&",
"IResourceDelta",
".",
"ENCODING",
")",
"!=",
"0",
")",
"{",
"element",
"=",
"createElement",
"(",
"delta",
".",
"getResource",
"(",
")",
",",
"elementType",
",",
"rootInfo",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"return",
"false",
";",
"updateIndex",
"(",
"element",
",",
"delta",
")",
";",
"contentChanged",
"(",
"element",
")",
";",
"}",
"else",
"if",
"(",
"elementType",
"==",
"IJavaElement",
".",
"JAVA_PROJECT",
")",
"{",
"if",
"(",
"(",
"flags",
"&",
"IResourceDelta",
".",
"OPEN",
")",
"!=",
"0",
")",
"{",
"IProject",
"res",
"=",
"(",
"IProject",
")",
"delta",
".",
"getResource",
"(",
")",
";",
"element",
"=",
"createElement",
"(",
"res",
",",
"elementType",
",",
"rootInfo",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"this",
".",
"state",
".",
"updateRoots",
"(",
"res",
".",
"getFullPath",
"(",
")",
",",
"delta",
",",
"this",
")",
";",
"return",
"false",
";",
"}",
"if",
"(",
"res",
".",
"isOpen",
"(",
")",
")",
"{",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"res",
")",
")",
"{",
"addToParentInfo",
"(",
"element",
")",
";",
"currentDelta",
"(",
")",
".",
"opened",
"(",
"element",
")",
";",
"this",
".",
"state",
".",
"updateRoots",
"(",
"element",
".",
"getPath",
"(",
")",
",",
"delta",
",",
"this",
")",
";",
"this",
".",
"projectCachesToReset",
".",
"add",
"(",
"element",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"indexAll",
"(",
"res",
")",
";",
"}",
"}",
"else",
"{",
"boolean",
"wasJavaProject",
"=",
"this",
".",
"state",
".",
"findJavaProject",
"(",
"res",
".",
"getName",
"(",
")",
")",
"!=",
"null",
";",
"if",
"(",
"wasJavaProject",
")",
"{",
"close",
"(",
"element",
")",
";",
"removeFromParentInfo",
"(",
"element",
")",
";",
"currentDelta",
"(",
")",
".",
"closed",
"(",
"element",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"discardJobs",
"(",
"element",
".",
"getElementName",
"(",
")",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"removeIndexFamily",
"(",
"res",
".",
"getFullPath",
"(",
")",
")",
";",
"}",
"}",
"return",
"false",
";",
"}",
"if",
"(",
"(",
"flags",
"&",
"IResourceDelta",
".",
"DESCRIPTION",
")",
"!=",
"0",
")",
"{",
"IProject",
"res",
"=",
"(",
"IProject",
")",
"delta",
".",
"getResource",
"(",
")",
";",
"boolean",
"wasJavaProject",
"=",
"this",
".",
"state",
".",
"findJavaProject",
"(",
"res",
".",
"getName",
"(",
")",
")",
"!=",
"null",
";",
"boolean",
"isJavaProject",
"=",
"JavaProject",
".",
"hasJavaNature",
"(",
"res",
")",
";",
"if",
"(",
"wasJavaProject",
"!=",
"isJavaProject",
")",
"{",
"element",
"=",
"createElement",
"(",
"res",
",",
"elementType",
",",
"rootInfo",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"isJavaProject",
")",
"{",
"elementAdded",
"(",
"element",
",",
"delta",
",",
"rootInfo",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"indexAll",
"(",
"res",
")",
";",
"}",
"else",
"{",
"elementRemoved",
"(",
"element",
",",
"delta",
",",
"rootInfo",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"discardJobs",
"(",
"element",
".",
"getElementName",
"(",
")",
")",
";",
"this",
".",
"manager",
".",
"indexManager",
".",
"removeIndexFamily",
"(",
"res",
".",
"getFullPath",
"(",
")",
")",
";",
"if",
"(",
"JavaBuilder",
".",
"DEBUG",
")",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"res",
")",
";",
"this",
".",
"manager",
".",
"setLastBuiltState",
"(",
"res",
",",
"null",
")",
";",
"}",
"return",
"false",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"return",
"true",
";",
"}",
"private",
"void",
"updateIndex",
"(",
"Openable",
"element",
",",
"IResourceDelta",
"delta",
")",
"{",
"IndexManager",
"indexManager",
"=",
"this",
".",
"manager",
".",
"indexManager",
";",
"if",
"(",
"indexManager",
"==",
"null",
")",
"return",
";",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"indexManager",
".",
"indexAll",
"(",
"element",
".",
"getJavaProject",
"(",
")",
".",
"getProject",
"(",
")",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"indexManager",
".",
"removeIndexFamily",
"(",
"element",
".",
"getJavaProject",
"(",
")",
".",
"getProject",
"(",
")",
".",
"getFullPath",
"(",
")",
")",
";",
"break",
";",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"if",
"(",
"element",
"instanceof",
"JarPackageFragmentRoot",
")",
"{",
"JarPackageFragmentRoot",
"root",
"=",
"(",
"JarPackageFragmentRoot",
")",
"element",
";",
"IPath",
"jarPath",
"=",
"root",
".",
"getPath",
"(",
")",
";",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"indexManager",
".",
"indexLibrary",
"(",
"jarPath",
",",
"root",
".",
"getJavaProject",
"(",
")",
".",
"getProject",
"(",
")",
",",
"root",
".",
"getIndexPath",
"(",
")",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"indexManager",
".",
"removeIndex",
"(",
"jarPath",
")",
";",
"indexManager",
".",
"indexLibrary",
"(",
"jarPath",
",",
"root",
".",
"getJavaProject",
"(",
")",
".",
"getProject",
"(",
")",
",",
"root",
".",
"getIndexPath",
"(",
")",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"indexManager",
".",
"discardJobs",
"(",
"jarPath",
".",
"toString",
"(",
")",
")",
";",
"indexManager",
".",
"removeIndex",
"(",
"jarPath",
")",
";",
"break",
";",
"}",
"break",
";",
"}",
"int",
"kind",
"=",
"delta",
".",
"getKind",
"(",
")",
";",
"if",
"(",
"kind",
"==",
"IResourceDelta",
".",
"ADDED",
"||",
"kind",
"==",
"IResourceDelta",
".",
"REMOVED",
"||",
"(",
"kind",
"==",
"IResourceDelta",
".",
"CHANGED",
"&&",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"LOCAL_CHANGED",
")",
"!=",
"0",
")",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"element",
";",
"updateRootIndex",
"(",
"root",
",",
"CharOperation",
".",
"NO_STRINGS",
",",
"delta",
")",
";",
"break",
";",
"}",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"if",
"(",
"(",
"delta",
".",
"getFlags",
"(",
")",
"&",
"IResourceDelta",
".",
"LOCAL_CHANGED",
")",
"==",
"0",
")",
"break",
";",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"IPackageFragment",
"pkg",
"=",
"null",
";",
"if",
"(",
"element",
"instanceof",
"IPackageFragmentRoot",
")",
"{",
"PackageFragmentRoot",
"root",
"=",
"(",
"PackageFragmentRoot",
")",
"element",
";",
"pkg",
"=",
"root",
".",
"getPackageFragment",
"(",
"CharOperation",
".",
"NO_STRINGS",
")",
";",
"}",
"else",
"{",
"pkg",
"=",
"(",
"IPackageFragment",
")",
"element",
";",
"}",
"RootInfo",
"rootInfo",
"=",
"rootInfo",
"(",
"pkg",
".",
"getParent",
"(",
")",
".",
"getPath",
"(",
")",
",",
"delta",
".",
"getKind",
"(",
")",
")",
";",
"boolean",
"isSource",
"=",
"rootInfo",
"==",
"null",
"||",
"rootInfo",
".",
"entryKind",
"==",
"IClasspathEntry",
".",
"CPE_SOURCE",
";",
"IResourceDelta",
"[",
"]",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"children",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IResourceDelta",
"child",
"=",
"children",
"[",
"i",
"]",
";",
"IResource",
"resource",
"=",
"child",
".",
"getResource",
"(",
")",
";",
"if",
"(",
"resource",
"instanceof",
"IFile",
")",
"{",
"String",
"name",
"=",
"resource",
".",
"getName",
"(",
")",
";",
"if",
"(",
"isSource",
")",
"{",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"isJavaLikeFileName",
"(",
"name",
")",
")",
"{",
"Openable",
"cu",
"=",
"(",
"Openable",
")",
"pkg",
".",
"getCompilationUnit",
"(",
"name",
")",
";",
"updateIndex",
"(",
"cu",
",",
"child",
")",
";",
"}",
"}",
"else",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"isClassFileName",
"(",
"name",
")",
")",
"{",
"Openable",
"classFile",
"=",
"(",
"Openable",
")",
"pkg",
".",
"getClassFile",
"(",
"name",
")",
";",
"updateIndex",
"(",
"classFile",
",",
"child",
")",
";",
"}",
"}",
"}",
"break",
";",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"IFile",
"file",
"=",
"(",
"IFile",
")",
"delta",
".",
"getResource",
"(",
")",
";",
"IJavaProject",
"project",
"=",
"element",
".",
"getJavaProject",
"(",
")",
";",
"PackageFragmentRoot",
"root",
"=",
"element",
".",
"getPackageFragmentRoot",
"(",
")",
";",
"IPath",
"binaryFolderPath",
"=",
"root",
".",
"isExternal",
"(",
")",
"&&",
"!",
"root",
".",
"isArchive",
"(",
")",
"?",
"root",
".",
"resource",
"(",
")",
".",
"getFullPath",
"(",
")",
":",
"root",
".",
"getPath",
"(",
")",
";",
"try",
"{",
"if",
"(",
"binaryFolderPath",
".",
"equals",
"(",
"project",
".",
"getOutputLocation",
"(",
")",
")",
")",
"{",
"break",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"int",
"flags",
"=",
"delta",
".",
"getFlags",
"(",
")",
";",
"if",
"(",
"(",
"flags",
"&",
"IResourceDelta",
".",
"CONTENT",
")",
"==",
"0",
"&&",
"(",
"flags",
"&",
"IResourceDelta",
".",
"ENCODING",
")",
"==",
"0",
")",
"break",
";",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"indexManager",
".",
"addBinary",
"(",
"file",
",",
"binaryFolderPath",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"String",
"containerRelativePath",
"=",
"Util",
".",
"relativePath",
"(",
"file",
".",
"getFullPath",
"(",
")",
",",
"binaryFolderPath",
".",
"segmentCount",
"(",
")",
")",
";",
"indexManager",
".",
"remove",
"(",
"containerRelativePath",
",",
"binaryFolderPath",
")",
";",
"break",
";",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"file",
"=",
"(",
"IFile",
")",
"delta",
".",
"getResource",
"(",
")",
";",
"switch",
"(",
"delta",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IResourceDelta",
".",
"CHANGED",
":",
"int",
"flags",
"=",
"delta",
".",
"getFlags",
"(",
")",
";",
"if",
"(",
"(",
"flags",
"&",
"IResourceDelta",
".",
"CONTENT",
")",
"==",
"0",
"&&",
"(",
"flags",
"&",
"IResourceDelta",
".",
"ENCODING",
")",
"==",
"0",
")",
"break",
";",
"case",
"IResourceDelta",
".",
"ADDED",
":",
"indexManager",
".",
"addSource",
"(",
"file",
",",
"file",
".",
"getProject",
"(",
")",
".",
"getFullPath",
"(",
")",
",",
"getSourceElementParser",
"(",
"element",
")",
")",
";",
"this",
".",
"manager",
".",
"secondaryTypesRemoving",
"(",
"file",
",",
"false",
")",
";",
"break",
";",
"case",
"IResourceDelta",
".",
"REMOVED",
":",
"indexManager",
".",
"remove",
"(",
"Util",
".",
"relativePath",
"(",
"file",
".",
"getFullPath",
"(",
")",
",",
"1",
")",
",",
"file",
".",
"getProject",
"(",
")",
".",
"getFullPath",
"(",
")",
")",
";",
"this",
".",
"manager",
".",
"secondaryTypesRemoving",
"(",
"file",
",",
"true",
")",
";",
"break",
";",
"}",
"}",
"}",
"public",
"void",
"updateJavaModel",
"(",
"IJavaElementDelta",
"customDelta",
")",
"{",
"if",
"(",
"customDelta",
"==",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"javaModelDeltas",
".",
"size",
"(",
")",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IJavaElementDelta",
"delta",
"=",
"(",
"IJavaElementDelta",
")",
"this",
".",
"javaModelDeltas",
".",
"get",
"(",
"i",
")",
";",
"this",
".",
"modelUpdater",
".",
"processJavaDelta",
"(",
"delta",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"modelUpdater",
".",
"processJavaDelta",
"(",
"customDelta",
")",
";",
"}",
"}",
"private",
"void",
"updateRootIndex",
"(",
"PackageFragmentRoot",
"root",
",",
"String",
"[",
"]",
"pkgName",
",",
"IResourceDelta",
"delta",
")",
"{",
"Openable",
"pkg",
"=",
"root",
".",
"getPackageFragment",
"(",
"pkgName",
")",
";",
"updateIndex",
"(",
"pkg",
",",
"delta",
")",
";",
"IResourceDelta",
"[",
"]",
"children",
"=",
"delta",
".",
"getAffectedChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"children",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IResourceDelta",
"child",
"=",
"children",
"[",
"i",
"]",
";",
"IResource",
"resource",
"=",
"child",
".",
"getResource",
"(",
")",
";",
"if",
"(",
"resource",
"instanceof",
"IFolder",
")",
"{",
"String",
"[",
"]",
"subpkgName",
"=",
"Util",
".",
"arrayConcat",
"(",
"pkgName",
",",
"resource",
".",
"getName",
"(",
")",
")",
";",
"updateRootIndex",
"(",
"root",
",",
"subpkgName",
",",
"child",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
2,823 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"ResourcesPlugin",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"CoreException",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IPath",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IClasspathContainer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IClasspathEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaProject",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"SetContainerOperation",
"extends",
"ChangeClasspathOperation",
"{",
"IPath",
"containerPath",
";",
"IJavaProject",
"[",
"]",
"affectedProjects",
";",
"IClasspathContainer",
"[",
"]",
"respectiveContainers",
";",
"public",
"SetContainerOperation",
"(",
"IPath",
"containerPath",
",",
"IJavaProject",
"[",
"]",
"affectedProjects",
",",
"IClasspathContainer",
"[",
"]",
"respectiveContainers",
")",
"{",
"super",
"(",
"new",
"IJavaElement",
"[",
"]",
"{",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getJavaModel",
"(",
")",
"}",
",",
"!",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"isTreeLocked",
"(",
")",
")",
";",
"this",
".",
"containerPath",
"=",
"containerPath",
";",
"this",
".",
"affectedProjects",
"=",
"affectedProjects",
";",
"this",
".",
"respectiveContainers",
"=",
"respectiveContainers",
";",
"}",
"protected",
"void",
"executeOperation",
"(",
")",
"throws",
"JavaModelException",
"{",
"checkCanceled",
"(",
")",
";",
"try",
"{",
"beginTask",
"(",
"\"\"",
",",
"1",
")",
";",
"if",
"(",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE",
")",
"verbose_set_container",
"(",
")",
";",
"if",
"(",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE_ADVANCED",
")",
"verbose_set_container_invocation_trace",
"(",
")",
";",
"JavaModelManager",
"manager",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
";",
"if",
"(",
"manager",
".",
"containerPutIfInitializingWithSameEntries",
"(",
"this",
".",
"containerPath",
",",
"this",
".",
"affectedProjects",
",",
"this",
".",
"respectiveContainers",
")",
")",
"return",
";",
"final",
"int",
"projectLength",
"=",
"this",
".",
"affectedProjects",
".",
"length",
";",
"final",
"IJavaProject",
"[",
"]",
"modifiedProjects",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"affectedProjects",
",",
"0",
",",
"modifiedProjects",
"=",
"new",
"IJavaProject",
"[",
"projectLength",
"]",
",",
"0",
",",
"projectLength",
")",
";",
"int",
"remaining",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"projectLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"isCanceled",
"(",
")",
")",
"return",
";",
"JavaProject",
"affectedProject",
"=",
"(",
"JavaProject",
")",
"this",
".",
"affectedProjects",
"[",
"i",
"]",
";",
"IClasspathContainer",
"newContainer",
"=",
"this",
".",
"respectiveContainers",
"[",
"i",
"]",
";",
"if",
"(",
"newContainer",
"==",
"null",
")",
"newContainer",
"=",
"JavaModelManager",
".",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
";",
"boolean",
"found",
"=",
"false",
";",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"affectedProject",
".",
"getProject",
"(",
")",
")",
")",
"{",
"IClasspathEntry",
"[",
"]",
"rawClasspath",
"=",
"affectedProject",
".",
"getRawClasspath",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"cpLength",
"=",
"rawClasspath",
".",
"length",
";",
"j",
"<",
"cpLength",
";",
"j",
"++",
")",
"{",
"IClasspathEntry",
"entry",
"=",
"rawClasspath",
"[",
"j",
"]",
";",
"if",
"(",
"entry",
".",
"getEntryKind",
"(",
")",
"==",
"IClasspathEntry",
".",
"CPE_CONTAINER",
"&&",
"entry",
".",
"getPath",
"(",
")",
".",
"equals",
"(",
"this",
".",
"containerPath",
")",
")",
"{",
"found",
"=",
"true",
";",
"break",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"found",
")",
"{",
"modifiedProjects",
"[",
"i",
"]",
"=",
"null",
";",
"manager",
".",
"containerPut",
"(",
"affectedProject",
",",
"this",
".",
"containerPath",
",",
"newContainer",
")",
";",
"continue",
";",
"}",
"IClasspathContainer",
"oldContainer",
"=",
"manager",
".",
"containerGet",
"(",
"affectedProject",
",",
"this",
".",
"containerPath",
")",
";",
"if",
"(",
"oldContainer",
"==",
"JavaModelManager",
".",
"CONTAINER_INITIALIZATION_IN_PROGRESS",
")",
"{",
"oldContainer",
"=",
"null",
";",
"}",
"if",
"(",
"(",
"oldContainer",
"!=",
"null",
"&&",
"oldContainer",
".",
"equals",
"(",
"this",
".",
"respectiveContainers",
"[",
"i",
"]",
")",
")",
"||",
"(",
"oldContainer",
"==",
"this",
".",
"respectiveContainers",
"[",
"i",
"]",
")",
")",
"{",
"modifiedProjects",
"[",
"i",
"]",
"=",
"null",
";",
"continue",
";",
"}",
"remaining",
"++",
";",
"manager",
".",
"containerPut",
"(",
"affectedProject",
",",
"this",
".",
"containerPath",
",",
"newContainer",
")",
";",
"}",
"if",
"(",
"remaining",
"==",
"0",
")",
"return",
";",
"try",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"projectLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"isCanceled",
"(",
")",
")",
"return",
";",
"JavaProject",
"affectedProject",
"=",
"(",
"JavaProject",
")",
"modifiedProjects",
"[",
"i",
"]",
";",
"if",
"(",
"affectedProject",
"==",
"null",
")",
"continue",
";",
"if",
"(",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE_ADVANCED",
")",
"verbose_update_project",
"(",
"affectedProject",
")",
";",
"ClasspathChange",
"classpathChange",
"=",
"affectedProject",
".",
"getPerProjectInfo",
"(",
")",
".",
"resetResolvedClasspath",
"(",
")",
";",
"classpathChanged",
"(",
"classpathChange",
",",
"i",
"==",
"0",
")",
";",
"if",
"(",
"this",
".",
"canChangeResources",
")",
"{",
"try",
"{",
"affectedProject",
".",
"getProject",
"(",
")",
".",
"touch",
"(",
"this",
".",
"progressMonitor",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"if",
"(",
"!",
"ExternalJavaProject",
".",
"EXTERNAL_PROJECT_NAME",
".",
"equals",
"(",
"affectedProject",
".",
"getElementName",
"(",
")",
")",
")",
"throw",
"e",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"if",
"(",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE",
"||",
"JavaModelManager",
".",
"CP_RESOLVE_VERBOSE_FAILURE",
")",
"verbose_failure",
"(",
"e",
")",
";",
"if",
"(",
"e",
"instanceof",
"JavaModelException",
")",
"{",
"throw",
"(",
"JavaModelException",
")",
"e",
";",
"}",
"else",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"}",
"finally",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"projectLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"respectiveContainers",
"[",
"i",
"]",
"==",
"null",
")",
"{",
"manager",
".",
"containerPut",
"(",
"this",
".",
"affectedProjects",
"[",
"i",
"]",
",",
"this",
".",
"containerPath",
",",
"null",
")",
";",
"}",
"}",
"}",
"}",
"finally",
"{",
"done",
"(",
")",
";",
"}",
"}",
"private",
"void",
"verbose_failure",
"(",
"CoreException",
"e",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"\"",
"+",
"this",
".",
"containerPath",
",",
"System",
".",
"err",
")",
";",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"private",
"void",
"verbose_update_project",
"(",
"JavaProject",
"affectedProject",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"tproject:",
"\"",
"+",
"affectedProject",
".",
"getElementName",
"(",
")",
"+",
"'\\n'",
"+",
"\"\"",
"+",
"this",
".",
"containerPath",
")",
";",
"}",
"private",
"void",
"verbose_set_container",
"(",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"\"",
"+",
"this",
".",
"containerPath",
"+",
"'\\n'",
"+",
"\"tprojects:",
"{\"",
"+",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"toString",
"(",
"this",
".",
"affectedProjects",
",",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"Displayable",
"(",
")",
"{",
"public",
"String",
"displayString",
"(",
"Object",
"o",
")",
"{",
"return",
"(",
"(",
"IJavaProject",
")",
"o",
")",
".",
"getElementName",
"(",
")",
";",
"}",
"}",
")",
"+",
"\"\"",
"+",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"toString",
"(",
"this",
".",
"respectiveContainers",
",",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"Displayable",
"(",
")",
"{",
"public",
"String",
"displayString",
"(",
"Object",
"o",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"tt\"",
")",
";",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"<null>\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"IClasspathContainer",
"container",
"=",
"(",
"IClasspathContainer",
")",
"o",
";",
"buffer",
".",
"append",
"(",
"container",
".",
"getDescription",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"{n\"",
")",
";",
"IClasspathEntry",
"[",
"]",
"entries",
"=",
"container",
".",
"getClasspathEntries",
"(",
")",
";",
"if",
"(",
"entries",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entries",
".",
"length",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"ttt\"",
")",
";",
"buffer",
".",
"append",
"(",
"entries",
"[",
"i",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"",
"tt}\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
")",
"+",
"\"nt}\"",
")",
";",
"}",
"private",
"void",
"verbose_set_container_invocation_trace",
"(",
")",
"{",
"Util",
".",
"verbose",
"(",
"\"\"",
"+",
"\"\"",
")",
";",
"new",
"Exception",
"(",
"\"\"",
")",
".",
"printStackTrace",
"(",
"System",
".",
"out",
")",
";",
"}",
"}",
"</s>"
] |
2,824 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IField",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaModelStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaModelStatusConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"FieldDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SimpleName",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"VariableDeclarationFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ASTRewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"public",
"class",
"CreateFieldOperation",
"extends",
"CreateTypeMemberOperation",
"{",
"public",
"CreateFieldOperation",
"(",
"IType",
"parentElement",
",",
"String",
"source",
",",
"boolean",
"force",
")",
"{",
"super",
"(",
"parentElement",
",",
"source",
",",
"force",
")",
";",
"}",
"protected",
"ASTNode",
"generateElementAST",
"(",
"ASTRewrite",
"rewriter",
",",
"ICompilationUnit",
"cu",
")",
"throws",
"JavaModelException",
"{",
"ASTNode",
"node",
"=",
"super",
".",
"generateElementAST",
"(",
"rewriter",
",",
"cu",
")",
";",
"if",
"(",
"node",
".",
"getNodeType",
"(",
")",
"!=",
"ASTNode",
".",
"FIELD_DECLARATION",
")",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_CONTENTS",
")",
")",
";",
"return",
"node",
";",
"}",
"protected",
"IJavaElement",
"generateResultHandle",
"(",
")",
"{",
"return",
"getType",
"(",
")",
".",
"getField",
"(",
"getASTNodeName",
"(",
")",
")",
";",
"}",
"public",
"String",
"getMainTaskName",
"(",
")",
"{",
"return",
"Messages",
".",
"operation_createFieldProgress",
";",
"}",
"private",
"VariableDeclarationFragment",
"getFragment",
"(",
"ASTNode",
"node",
")",
"{",
"Iterator",
"fragments",
"=",
"(",
"(",
"FieldDeclaration",
")",
"node",
")",
".",
"fragments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"if",
"(",
"this",
".",
"anchorElement",
"!=",
"null",
")",
"{",
"VariableDeclarationFragment",
"fragment",
"=",
"null",
";",
"String",
"fragmentName",
"=",
"this",
".",
"anchorElement",
".",
"getElementName",
"(",
")",
";",
"while",
"(",
"fragments",
".",
"hasNext",
"(",
")",
")",
"{",
"fragment",
"=",
"(",
"VariableDeclarationFragment",
")",
"fragments",
".",
"next",
"(",
")",
";",
"if",
"(",
"fragment",
".",
"getName",
"(",
")",
".",
"getIdentifier",
"(",
")",
".",
"equals",
"(",
"fragmentName",
")",
")",
"{",
"return",
"fragment",
";",
"}",
"}",
"return",
"fragment",
";",
"}",
"else",
"{",
"return",
"(",
"VariableDeclarationFragment",
")",
"fragments",
".",
"next",
"(",
")",
";",
"}",
"}",
"protected",
"void",
"initializeDefaultPosition",
"(",
")",
"{",
"IType",
"parentElement",
"=",
"getType",
"(",
")",
";",
"try",
"{",
"IField",
"[",
"]",
"fields",
"=",
"parentElement",
".",
"getFields",
"(",
")",
";",
"if",
"(",
"fields",
"!=",
"null",
"&&",
"fields",
".",
"length",
">",
"0",
")",
"{",
"final",
"IField",
"lastField",
"=",
"fields",
"[",
"fields",
".",
"length",
"-",
"1",
"]",
";",
"if",
"(",
"parentElement",
".",
"isEnum",
"(",
")",
")",
"{",
"IField",
"field",
"=",
"lastField",
";",
"if",
"(",
"!",
"field",
".",
"isEnumConstant",
"(",
")",
")",
"{",
"createAfter",
"(",
"lastField",
")",
";",
"}",
"}",
"else",
"{",
"createAfter",
"(",
"lastField",
")",
";",
"}",
"}",
"else",
"{",
"IJavaElement",
"[",
"]",
"elements",
"=",
"parentElement",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"elements",
"!=",
"null",
"&&",
"elements",
".",
"length",
">",
"0",
")",
"{",
"createBefore",
"(",
"elements",
"[",
"0",
"]",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"protected",
"IJavaModelStatus",
"verifyNameCollision",
"(",
")",
"{",
"if",
"(",
"this",
".",
"createdNode",
"!=",
"null",
")",
"{",
"IType",
"type",
"=",
"getType",
"(",
")",
";",
"String",
"fieldName",
"=",
"getASTNodeName",
"(",
")",
";",
"if",
"(",
"type",
".",
"getField",
"(",
"fieldName",
")",
".",
"exists",
"(",
")",
")",
"{",
"return",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"status_nameCollision",
",",
"fieldName",
")",
")",
";",
"}",
"}",
"return",
"JavaModelStatus",
".",
"VERIFIED_OK",
";",
"}",
"private",
"String",
"getASTNodeName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"alteredName",
"!=",
"null",
")",
"return",
"this",
".",
"alteredName",
";",
"return",
"getFragment",
"(",
"this",
".",
"createdNode",
")",
".",
"getName",
"(",
")",
".",
"getIdentifier",
"(",
")",
";",
"}",
"protected",
"SimpleName",
"rename",
"(",
"ASTNode",
"node",
",",
"SimpleName",
"newName",
")",
"{",
"VariableDeclarationFragment",
"fragment",
"=",
"getFragment",
"(",
"node",
")",
";",
"SimpleName",
"oldName",
"=",
"fragment",
".",
"getName",
"(",
")",
";",
"fragment",
".",
"setName",
"(",
"newName",
")",
";",
"return",
"oldName",
";",
"}",
"}",
"</s>"
] |
2,825 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"public",
"class",
"ResolvedSourceType",
"extends",
"SourceType",
"{",
"private",
"String",
"uniqueKey",
";",
"public",
"ResolvedSourceType",
"(",
"JavaElement",
"parent",
",",
"String",
"name",
",",
"String",
"uniqueKey",
")",
"{",
"super",
"(",
"parent",
",",
"name",
")",
";",
"this",
".",
"uniqueKey",
"=",
"uniqueKey",
";",
"}",
"public",
"String",
"getFullyQualifiedParameterizedName",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"getFullyQualifiedParameterizedName",
"(",
"getFullyQualifiedName",
"(",
"'.'",
")",
",",
"this",
".",
"uniqueKey",
")",
";",
"}",
"public",
"String",
"getKey",
"(",
")",
"{",
"return",
"this",
".",
"uniqueKey",
";",
"}",
"public",
"boolean",
"isResolved",
"(",
")",
"{",
"return",
"true",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"super",
".",
"toStringInfo",
"(",
"tab",
",",
"buffer",
",",
"info",
",",
"showResolvedInfo",
")",
";",
"if",
"(",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"{key=\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"getKey",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"}",
"}",
"public",
"JavaElement",
"unresolved",
"(",
")",
"{",
"SourceType",
"handle",
"=",
"new",
"SourceType",
"(",
"this",
".",
"parent",
",",
"this",
".",
"name",
")",
";",
"handle",
".",
"occurrenceCount",
"=",
"this",
".",
"occurrenceCount",
";",
"handle",
".",
"localOccurrenceCount",
"=",
"this",
".",
"localOccurrenceCount",
";",
"return",
"handle",
";",
"}",
"}",
"</s>"
] |
2,826 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"public",
"class",
"BecomeWorkingCopyOperation",
"extends",
"JavaModelOperation",
"{",
"IProblemRequestor",
"problemRequestor",
";",
"public",
"BecomeWorkingCopyOperation",
"(",
"CompilationUnit",
"workingCopy",
",",
"IProblemRequestor",
"problemRequestor",
")",
"{",
"super",
"(",
"new",
"IJavaElement",
"[",
"]",
"{",
"workingCopy",
"}",
")",
";",
"this",
".",
"problemRequestor",
"=",
"problemRequestor",
";",
"}",
"protected",
"void",
"executeOperation",
"(",
")",
"throws",
"JavaModelException",
"{",
"CompilationUnit",
"workingCopy",
"=",
"getWorkingCopy",
"(",
")",
";",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getPerWorkingCopyInfo",
"(",
"workingCopy",
",",
"true",
",",
"true",
",",
"this",
".",
"problemRequestor",
")",
";",
"workingCopy",
".",
"openWhenClosed",
"(",
"workingCopy",
".",
"createElementInfo",
"(",
")",
",",
"true",
",",
"this",
".",
"progressMonitor",
")",
";",
"if",
"(",
"!",
"workingCopy",
".",
"isPrimary",
"(",
")",
")",
"{",
"JavaElementDelta",
"delta",
"=",
"new",
"JavaElementDelta",
"(",
"getJavaModel",
"(",
")",
")",
";",
"delta",
".",
"added",
"(",
"workingCopy",
")",
";",
"addDelta",
"(",
"delta",
")",
";",
"}",
"else",
"{",
"if",
"(",
"workingCopy",
".",
"getResource",
"(",
")",
".",
"isAccessible",
"(",
")",
")",
"{",
"JavaElementDelta",
"delta",
"=",
"new",
"JavaElementDelta",
"(",
"getJavaModel",
"(",
")",
")",
";",
"delta",
".",
"changed",
"(",
"workingCopy",
",",
"IJavaElementDelta",
".",
"F_PRIMARY_WORKING_COPY",
")",
";",
"addDelta",
"(",
"delta",
")",
";",
"}",
"else",
"{",
"JavaElementDelta",
"delta",
"=",
"new",
"JavaElementDelta",
"(",
"getJavaModel",
"(",
")",
")",
";",
"delta",
".",
"added",
"(",
"workingCopy",
",",
"IJavaElementDelta",
".",
"F_PRIMARY_WORKING_COPY",
")",
";",
"addDelta",
"(",
"delta",
")",
";",
"}",
"}",
"this",
".",
"resultElements",
"=",
"new",
"IJavaElement",
"[",
"]",
"{",
"workingCopy",
"}",
";",
"}",
"protected",
"CompilationUnit",
"getWorkingCopy",
"(",
")",
"{",
"return",
"(",
"CompilationUnit",
")",
"getElementToProcess",
"(",
")",
";",
"}",
"public",
"boolean",
"isReadOnly",
"(",
")",
"{",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
2,827 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"public",
"abstract",
"class",
"MultiOperation",
"extends",
"JavaModelOperation",
"{",
"protected",
"Map",
"insertBeforeElements",
"=",
"new",
"HashMap",
"(",
"1",
")",
";",
"protected",
"Map",
"newParents",
";",
"protected",
"Map",
"renamings",
";",
"protected",
"String",
"[",
"]",
"renamingsList",
"=",
"null",
";",
"protected",
"MultiOperation",
"(",
"IJavaElement",
"[",
"]",
"elementsToProcess",
",",
"boolean",
"force",
")",
"{",
"super",
"(",
"elementsToProcess",
",",
"force",
")",
";",
"}",
"protected",
"MultiOperation",
"(",
"IJavaElement",
"[",
"]",
"elementsToProcess",
",",
"IJavaElement",
"[",
"]",
"parentElements",
",",
"boolean",
"force",
")",
"{",
"super",
"(",
"elementsToProcess",
",",
"parentElements",
",",
"force",
")",
";",
"this",
".",
"newParents",
"=",
"new",
"HashMap",
"(",
"elementsToProcess",
".",
"length",
")",
";",
"if",
"(",
"elementsToProcess",
".",
"length",
"==",
"parentElements",
".",
"length",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"elementsToProcess",
".",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"newParents",
".",
"put",
"(",
"elementsToProcess",
"[",
"i",
"]",
",",
"parentElements",
"[",
"i",
"]",
")",
";",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"elementsToProcess",
".",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"newParents",
".",
"put",
"(",
"elementsToProcess",
"[",
"i",
"]",
",",
"parentElements",
"[",
"0",
"]",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"error",
"(",
"int",
"code",
",",
"IJavaElement",
"element",
")",
"throws",
"JavaModelException",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"code",
",",
"element",
")",
")",
";",
"}",
"protected",
"void",
"executeOperation",
"(",
")",
"throws",
"JavaModelException",
"{",
"processElements",
"(",
")",
";",
"}",
"protected",
"IJavaElement",
"getDestinationParent",
"(",
"IJavaElement",
"child",
")",
"{",
"return",
"(",
"IJavaElement",
")",
"this",
".",
"newParents",
".",
"get",
"(",
"child",
")",
";",
"}",
"protected",
"abstract",
"String",
"getMainTaskName",
"(",
")",
";",
"protected",
"String",
"getNewNameFor",
"(",
"IJavaElement",
"element",
")",
"throws",
"JavaModelException",
"{",
"String",
"newName",
"=",
"null",
";",
"if",
"(",
"this",
".",
"renamings",
"!=",
"null",
")",
"newName",
"=",
"(",
"String",
")",
"this",
".",
"renamings",
".",
"get",
"(",
"element",
")",
";",
"if",
"(",
"newName",
"==",
"null",
"&&",
"element",
"instanceof",
"IMethod",
"&&",
"(",
"(",
"IMethod",
")",
"element",
")",
".",
"isConstructor",
"(",
")",
")",
"newName",
"=",
"getDestinationParent",
"(",
"element",
")",
".",
"getElementName",
"(",
")",
";",
"return",
"newName",
";",
"}",
"private",
"void",
"initializeRenamings",
"(",
")",
"{",
"if",
"(",
"this",
".",
"renamingsList",
"!=",
"null",
"&&",
"this",
".",
"renamingsList",
".",
"length",
"==",
"this",
".",
"elementsToProcess",
".",
"length",
")",
"{",
"this",
".",
"renamings",
"=",
"new",
"HashMap",
"(",
"this",
".",
"renamingsList",
".",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"renamingsList",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"renamingsList",
"[",
"i",
"]",
"!=",
"null",
")",
"{",
"this",
".",
"renamings",
".",
"put",
"(",
"this",
".",
"elementsToProcess",
"[",
"i",
"]",
",",
"this",
".",
"renamingsList",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"}",
"protected",
"boolean",
"isMove",
"(",
")",
"{",
"return",
"false",
";",
"}",
"protected",
"boolean",
"isRename",
"(",
")",
"{",
"return",
"false",
";",
"}",
"protected",
"abstract",
"void",
"processElement",
"(",
"IJavaElement",
"element",
")",
"throws",
"JavaModelException",
";",
"protected",
"void",
"processElements",
"(",
")",
"throws",
"JavaModelException",
"{",
"try",
"{",
"beginTask",
"(",
"getMainTaskName",
"(",
")",
",",
"this",
".",
"elementsToProcess",
".",
"length",
")",
";",
"IJavaModelStatus",
"[",
"]",
"errors",
"=",
"new",
"IJavaModelStatus",
"[",
"3",
"]",
";",
"int",
"errorsCounter",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"elementsToProcess",
".",
"length",
";",
"i",
"++",
")",
"{",
"try",
"{",
"verify",
"(",
"this",
".",
"elementsToProcess",
"[",
"i",
"]",
")",
";",
"processElement",
"(",
"this",
".",
"elementsToProcess",
"[",
"i",
"]",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"jme",
")",
"{",
"if",
"(",
"errorsCounter",
"==",
"errors",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"errors",
",",
"0",
",",
"(",
"errors",
"=",
"new",
"IJavaModelStatus",
"[",
"errorsCounter",
"*",
"2",
"]",
")",
",",
"0",
",",
"errorsCounter",
")",
";",
"}",
"errors",
"[",
"errorsCounter",
"++",
"]",
"=",
"jme",
".",
"getJavaModelStatus",
"(",
")",
";",
"}",
"finally",
"{",
"worked",
"(",
"1",
")",
";",
"}",
"}",
"if",
"(",
"errorsCounter",
"==",
"1",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"errors",
"[",
"0",
"]",
")",
";",
"}",
"else",
"if",
"(",
"errorsCounter",
">",
"1",
")",
"{",
"if",
"(",
"errorsCounter",
"!=",
"errors",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"errors",
",",
"0",
",",
"(",
"errors",
"=",
"new",
"IJavaModelStatus",
"[",
"errorsCounter",
"]",
")",
",",
"0",
",",
"errorsCounter",
")",
";",
"}",
"throw",
"new",
"JavaModelException",
"(",
"JavaModelStatus",
".",
"newMultiStatus",
"(",
"errors",
")",
")",
";",
"}",
"}",
"finally",
"{",
"done",
"(",
")",
";",
"}",
"}",
"public",
"void",
"setInsertBefore",
"(",
"IJavaElement",
"modifiedElement",
",",
"IJavaElement",
"newSibling",
")",
"{",
"this",
".",
"insertBeforeElements",
".",
"put",
"(",
"modifiedElement",
",",
"newSibling",
")",
";",
"}",
"public",
"void",
"setRenamings",
"(",
"String",
"[",
"]",
"renamingsList",
")",
"{",
"this",
".",
"renamingsList",
"=",
"renamingsList",
";",
"initializeRenamings",
"(",
")",
";",
"}",
"protected",
"abstract",
"void",
"verify",
"(",
"IJavaElement",
"element",
")",
"throws",
"JavaModelException",
";",
"protected",
"void",
"verifyDestination",
"(",
"IJavaElement",
"element",
",",
"IJavaElement",
"destination",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"destination",
"==",
"null",
"||",
"!",
"destination",
".",
"exists",
"(",
")",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"ELEMENT_DOES_NOT_EXIST",
",",
"destination",
")",
";",
"int",
"destType",
"=",
"destination",
".",
"getElementType",
"(",
")",
";",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"PACKAGE_DECLARATION",
":",
"case",
"IJavaElement",
".",
"IMPORT_DECLARATION",
":",
"if",
"(",
"destType",
"!=",
"IJavaElement",
".",
"COMPILATION_UNIT",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_DESTINATION",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"TYPE",
":",
"if",
"(",
"destType",
"!=",
"IJavaElement",
".",
"COMPILATION_UNIT",
"&&",
"destType",
"!=",
"IJavaElement",
".",
"TYPE",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_DESTINATION",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"METHOD",
":",
"case",
"IJavaElement",
".",
"FIELD",
":",
"case",
"IJavaElement",
".",
"INITIALIZER",
":",
"if",
"(",
"destType",
"!=",
"IJavaElement",
".",
"TYPE",
"||",
"destination",
"instanceof",
"BinaryType",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_DESTINATION",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"if",
"(",
"destType",
"!=",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_DESTINATION",
",",
"element",
")",
";",
"else",
"{",
"CompilationUnit",
"cu",
"=",
"(",
"CompilationUnit",
")",
"element",
";",
"if",
"(",
"isMove",
"(",
")",
"&&",
"cu",
".",
"isWorkingCopy",
"(",
")",
"&&",
"!",
"cu",
".",
"isPrimary",
"(",
")",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_ELEMENT_TYPES",
",",
"element",
")",
";",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"IPackageFragment",
"fragment",
"=",
"(",
"IPackageFragment",
")",
"element",
";",
"IJavaElement",
"parent",
"=",
"fragment",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"parent",
".",
"isReadOnly",
"(",
")",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"READ_ONLY",
",",
"element",
")",
";",
"else",
"if",
"(",
"destType",
"!=",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
")",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_DESTINATION",
",",
"element",
")",
";",
"break",
";",
"default",
":",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_ELEMENT_TYPES",
",",
"element",
")",
";",
"}",
"}",
"protected",
"void",
"verifyRenaming",
"(",
"IJavaElement",
"element",
")",
"throws",
"JavaModelException",
"{",
"String",
"newName",
"=",
"getNewNameFor",
"(",
"element",
")",
";",
"boolean",
"isValid",
"=",
"true",
";",
"IJavaProject",
"project",
"=",
"element",
".",
"getJavaProject",
"(",
")",
";",
"String",
"sourceLevel",
"=",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_SOURCE",
",",
"true",
")",
";",
"String",
"complianceLevel",
"=",
"project",
".",
"getOption",
"(",
"JavaCore",
".",
"COMPILER_COMPLIANCE",
",",
"true",
")",
";",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"if",
"(",
"(",
"(",
"IPackageFragment",
")",
"element",
")",
".",
"isDefaultPackage",
"(",
")",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NAME_COLLISION",
",",
"element",
")",
")",
";",
"}",
"isValid",
"=",
"JavaConventions",
".",
"validatePackageName",
"(",
"newName",
",",
"sourceLevel",
",",
"complianceLevel",
")",
".",
"getSeverity",
"(",
")",
"!=",
"IStatus",
".",
"ERROR",
";",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"isValid",
"=",
"JavaConventions",
".",
"validateCompilationUnitName",
"(",
"newName",
",",
"sourceLevel",
",",
"complianceLevel",
")",
".",
"getSeverity",
"(",
")",
"!=",
"IStatus",
".",
"ERROR",
";",
"break",
";",
"case",
"IJavaElement",
".",
"INITIALIZER",
":",
"isValid",
"=",
"false",
";",
"break",
";",
"default",
":",
"isValid",
"=",
"JavaConventions",
".",
"validateIdentifier",
"(",
"newName",
",",
"sourceLevel",
",",
"complianceLevel",
")",
".",
"getSeverity",
"(",
")",
"!=",
"IStatus",
".",
"ERROR",
";",
"break",
";",
"}",
"if",
"(",
"!",
"isValid",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_NAME",
",",
"element",
",",
"newName",
")",
")",
";",
"}",
"}",
"protected",
"void",
"verifySibling",
"(",
"IJavaElement",
"element",
",",
"IJavaElement",
"destination",
")",
"throws",
"JavaModelException",
"{",
"IJavaElement",
"insertBeforeElement",
"=",
"(",
"IJavaElement",
")",
"this",
".",
"insertBeforeElements",
".",
"get",
"(",
"element",
")",
";",
"if",
"(",
"insertBeforeElement",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"insertBeforeElement",
".",
"exists",
"(",
")",
"||",
"!",
"insertBeforeElement",
".",
"getParent",
"(",
")",
".",
"equals",
"(",
"destination",
")",
")",
"{",
"error",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_SIBLING",
",",
"insertBeforeElement",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
2,828 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"public",
"class",
"MoveResourceElementsOperation",
"extends",
"CopyResourceElementsOperation",
"{",
"public",
"MoveResourceElementsOperation",
"(",
"IJavaElement",
"[",
"]",
"elementsToMove",
",",
"IJavaElement",
"[",
"]",
"destContainers",
",",
"boolean",
"force",
")",
"{",
"super",
"(",
"elementsToMove",
",",
"destContainers",
",",
"force",
")",
";",
"}",
"protected",
"String",
"getMainTaskName",
"(",
")",
"{",
"return",
"Messages",
".",
"operation_moveResourceProgress",
";",
"}",
"protected",
"boolean",
"isMove",
"(",
")",
"{",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
2,829 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
";",
"public",
"class",
"SourceField",
"extends",
"NamedMember",
"implements",
"IField",
"{",
"protected",
"SourceField",
"(",
"JavaElement",
"parent",
",",
"String",
"name",
")",
"{",
"super",
"(",
"parent",
",",
"name",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"SourceField",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"equals",
"(",
"o",
")",
";",
"}",
"public",
"ASTNode",
"findNode",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CompilationUnit",
"ast",
")",
"{",
"ASTNode",
"node",
"=",
"super",
".",
"findNode",
"(",
"ast",
")",
";",
"if",
"(",
"node",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"node",
".",
"getNodeType",
"(",
")",
"==",
"ASTNode",
".",
"ENUM_CONSTANT_DECLARATION",
")",
"{",
"return",
"node",
";",
"}",
"return",
"node",
".",
"getParent",
"(",
")",
";",
"}",
"public",
"Object",
"getConstant",
"(",
")",
"throws",
"JavaModelException",
"{",
"Object",
"constant",
"=",
"null",
";",
"SourceFieldElementInfo",
"info",
"=",
"(",
"SourceFieldElementInfo",
")",
"getElementInfo",
"(",
")",
";",
"final",
"char",
"[",
"]",
"constantSourceChars",
"=",
"info",
".",
"initializationSource",
";",
"if",
"(",
"constantSourceChars",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",
"constantSource",
"=",
"new",
"String",
"(",
"constantSourceChars",
")",
";",
"String",
"signature",
"=",
"info",
".",
"getTypeSignature",
"(",
")",
";",
"try",
"{",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_INT",
")",
")",
"{",
"constant",
"=",
"new",
"Integer",
"(",
"constantSource",
")",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_SHORT",
")",
")",
"{",
"constant",
"=",
"new",
"Short",
"(",
"constantSource",
")",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_BYTE",
")",
")",
"{",
"constant",
"=",
"new",
"Byte",
"(",
"constantSource",
")",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_BOOLEAN",
")",
")",
"{",
"constant",
"=",
"Boolean",
".",
"valueOf",
"(",
"constantSource",
")",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_CHAR",
")",
")",
"{",
"if",
"(",
"constantSourceChars",
".",
"length",
"!=",
"3",
")",
"{",
"return",
"null",
";",
"}",
"constant",
"=",
"new",
"Character",
"(",
"constantSourceChars",
"[",
"1",
"]",
")",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_DOUBLE",
")",
")",
"{",
"constant",
"=",
"new",
"Double",
"(",
"constantSource",
")",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_FLOAT",
")",
")",
"{",
"constant",
"=",
"new",
"Float",
"(",
"constantSource",
")",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"Signature",
".",
"SIG_LONG",
")",
")",
"{",
"if",
"(",
"constantSource",
".",
"endsWith",
"(",
"\"L\"",
")",
"||",
"constantSource",
".",
"endsWith",
"(",
"\"l\"",
")",
")",
"{",
"int",
"index",
"=",
"constantSource",
".",
"lastIndexOf",
"(",
"\"L\"",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"constant",
"=",
"new",
"Long",
"(",
"constantSource",
".",
"substring",
"(",
"0",
",",
"index",
")",
")",
";",
"}",
"else",
"{",
"constant",
"=",
"new",
"Long",
"(",
"constantSource",
".",
"substring",
"(",
"0",
",",
"constantSource",
".",
"lastIndexOf",
"(",
"\"l\"",
")",
")",
")",
";",
"}",
"}",
"else",
"{",
"constant",
"=",
"new",
"Long",
"(",
"constantSource",
")",
";",
"}",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"\"QString;\"",
")",
")",
"{",
"constant",
"=",
"constantSource",
";",
"}",
"else",
"if",
"(",
"signature",
".",
"equals",
"(",
"\"\"",
")",
")",
"{",
"constant",
"=",
"constantSource",
";",
"}",
"}",
"catch",
"(",
"NumberFormatException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"return",
"constant",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"FIELD",
";",
"}",
"public",
"String",
"getKey",
"(",
")",
"{",
"try",
"{",
"return",
"getKey",
"(",
"this",
",",
"false",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}",
"protected",
"char",
"getHandleMementoDelimiter",
"(",
")",
"{",
"return",
"JavaElement",
".",
"JEM_FIELD",
";",
"}",
"public",
"IJavaElement",
"getPrimaryElement",
"(",
"boolean",
"checkOwner",
")",
"{",
"if",
"(",
"checkOwner",
")",
"{",
"CompilationUnit",
"cu",
"=",
"(",
"CompilationUnit",
")",
"getAncestor",
"(",
"COMPILATION_UNIT",
")",
";",
"if",
"(",
"cu",
".",
"isPrimary",
"(",
")",
")",
"return",
"this",
";",
"}",
"IJavaElement",
"primaryParent",
"=",
"this",
".",
"parent",
".",
"getPrimaryElement",
"(",
"false",
")",
";",
"return",
"(",
"(",
"IType",
")",
"primaryParent",
")",
".",
"getField",
"(",
"this",
".",
"name",
")",
";",
"}",
"public",
"String",
"getTypeSignature",
"(",
")",
"throws",
"JavaModelException",
"{",
"SourceFieldElementInfo",
"info",
"=",
"(",
"SourceFieldElementInfo",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"getTypeSignature",
"(",
")",
";",
"}",
"public",
"boolean",
"isEnumConstant",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"Flags",
".",
"isEnum",
"(",
"getFlags",
"(",
")",
")",
";",
"}",
"public",
"boolean",
"isResolved",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"JavaElement",
"resolved",
"(",
"Binding",
"binding",
")",
"{",
"SourceRefElement",
"resolvedHandle",
"=",
"new",
"ResolvedSourceField",
"(",
"this",
".",
"parent",
",",
"this",
".",
"name",
",",
"new",
"String",
"(",
"binding",
".",
"computeUniqueKey",
"(",
")",
")",
")",
";",
"resolvedHandle",
".",
"occurrenceCount",
"=",
"this",
".",
"occurrenceCount",
";",
"return",
"resolvedHandle",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"tabString",
"(",
"tab",
")",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"toStringName",
"(",
"buffer",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"(not",
"open)\"",
")",
";",
"}",
"else",
"if",
"(",
"info",
"==",
"NO_INFO",
")",
"{",
"toStringName",
"(",
"buffer",
")",
";",
"}",
"else",
"{",
"try",
"{",
"buffer",
".",
"append",
"(",
"Signature",
".",
"toString",
"(",
"getTypeSignature",
"(",
")",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"toStringName",
"(",
"buffer",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"buffer",
".",
"append",
"(",
"\"\"",
"+",
"getElementName",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
2,830 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"public",
"class",
"TypeParameterElementInfo",
"extends",
"SourceRefElementInfo",
"{",
"public",
"int",
"nameStart",
"=",
"-",
"1",
";",
"public",
"int",
"nameEnd",
"=",
"-",
"1",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"bounds",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"boundsSignatures",
";",
"}",
"</s>"
] |
2,831 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResource",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IWorkspace",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"jobs",
".",
"ISchedulingRule",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaModelStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaModelStatusConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AST",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTParser",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ChildListPropertyDescriptor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"StructuralPropertyDescriptor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ASTRewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ListRewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEdit",
";",
"public",
"abstract",
"class",
"CreateElementInCUOperation",
"extends",
"JavaModelOperation",
"{",
"protected",
"CompilationUnit",
"cuAST",
";",
"protected",
"static",
"final",
"int",
"INSERT_LAST",
"=",
"1",
";",
"protected",
"static",
"final",
"int",
"INSERT_AFTER",
"=",
"2",
";",
"protected",
"static",
"final",
"int",
"INSERT_BEFORE",
"=",
"3",
";",
"protected",
"int",
"insertionPolicy",
"=",
"INSERT_LAST",
";",
"protected",
"IJavaElement",
"anchorElement",
"=",
"null",
";",
"protected",
"boolean",
"creationOccurred",
"=",
"true",
";",
"public",
"CreateElementInCUOperation",
"(",
"IJavaElement",
"parentElement",
")",
"{",
"super",
"(",
"null",
",",
"new",
"IJavaElement",
"[",
"]",
"{",
"parentElement",
"}",
")",
";",
"initializeDefaultPosition",
"(",
")",
";",
"}",
"protected",
"void",
"checkCanceled",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"isNested",
")",
"{",
"super",
".",
"checkCanceled",
"(",
")",
";",
"}",
"}",
"public",
"void",
"createAfter",
"(",
"IJavaElement",
"sibling",
")",
"{",
"setRelativePosition",
"(",
"sibling",
",",
"INSERT_AFTER",
")",
";",
"}",
"public",
"void",
"createBefore",
"(",
"IJavaElement",
"sibling",
")",
"{",
"setRelativePosition",
"(",
"sibling",
",",
"INSERT_BEFORE",
")",
";",
"}",
"protected",
"void",
"executeOperation",
"(",
")",
"throws",
"JavaModelException",
"{",
"try",
"{",
"beginTask",
"(",
"getMainTaskName",
"(",
")",
",",
"getMainAmountOfWork",
"(",
")",
")",
";",
"JavaElementDelta",
"delta",
"=",
"newJavaElementDelta",
"(",
")",
";",
"ICompilationUnit",
"unit",
"=",
"getCompilationUnit",
"(",
")",
";",
"generateNewCompilationUnitAST",
"(",
"unit",
")",
";",
"if",
"(",
"this",
".",
"creationOccurred",
")",
"{",
"unit",
".",
"save",
"(",
"null",
",",
"false",
")",
";",
"boolean",
"isWorkingCopy",
"=",
"unit",
".",
"isWorkingCopy",
"(",
")",
";",
"if",
"(",
"!",
"isWorkingCopy",
")",
"setAttribute",
"(",
"HAS_MODIFIED_RESOURCE_ATTR",
",",
"TRUE",
")",
";",
"worked",
"(",
"1",
")",
";",
"this",
".",
"resultElements",
"=",
"generateResultHandles",
"(",
")",
";",
"if",
"(",
"!",
"isWorkingCopy",
"&&",
"!",
"Util",
".",
"isExcluded",
"(",
"unit",
")",
"&&",
"unit",
".",
"getParent",
"(",
")",
".",
"exists",
"(",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"resultElements",
".",
"length",
";",
"i",
"++",
")",
"{",
"delta",
".",
"added",
"(",
"this",
".",
"resultElements",
"[",
"i",
"]",
")",
";",
"}",
"addDelta",
"(",
"delta",
")",
";",
"}",
"}",
"}",
"finally",
"{",
"done",
"(",
")",
";",
"}",
"}",
"protected",
"abstract",
"StructuralPropertyDescriptor",
"getChildPropertyDescriptor",
"(",
"ASTNode",
"parent",
")",
";",
"protected",
"abstract",
"ASTNode",
"generateElementAST",
"(",
"ASTRewrite",
"rewriter",
",",
"ICompilationUnit",
"cu",
")",
"throws",
"JavaModelException",
";",
"protected",
"void",
"generateNewCompilationUnitAST",
"(",
"ICompilationUnit",
"cu",
")",
"throws",
"JavaModelException",
"{",
"this",
".",
"cuAST",
"=",
"parse",
"(",
"cu",
")",
";",
"AST",
"ast",
"=",
"this",
".",
"cuAST",
".",
"getAST",
"(",
")",
";",
"ASTRewrite",
"rewriter",
"=",
"ASTRewrite",
".",
"create",
"(",
"ast",
")",
";",
"ASTNode",
"child",
"=",
"generateElementAST",
"(",
"rewriter",
",",
"cu",
")",
";",
"if",
"(",
"child",
"!=",
"null",
")",
"{",
"ASTNode",
"parent",
"=",
"(",
"(",
"JavaElement",
")",
"getParentElement",
"(",
")",
")",
".",
"findNode",
"(",
"this",
".",
"cuAST",
")",
";",
"if",
"(",
"parent",
"==",
"null",
")",
"parent",
"=",
"this",
".",
"cuAST",
";",
"insertASTNode",
"(",
"rewriter",
",",
"parent",
",",
"child",
")",
";",
"TextEdit",
"edits",
"=",
"rewriter",
".",
"rewriteAST",
"(",
")",
";",
"applyTextEdit",
"(",
"cu",
",",
"edits",
")",
";",
"}",
"worked",
"(",
"1",
")",
";",
"}",
"protected",
"abstract",
"IJavaElement",
"generateResultHandle",
"(",
")",
";",
"protected",
"IJavaElement",
"[",
"]",
"generateResultHandles",
"(",
")",
"{",
"return",
"new",
"IJavaElement",
"[",
"]",
"{",
"generateResultHandle",
"(",
")",
"}",
";",
"}",
"protected",
"ICompilationUnit",
"getCompilationUnit",
"(",
")",
"{",
"return",
"getCompilationUnitFor",
"(",
"getParentElement",
"(",
")",
")",
";",
"}",
"protected",
"int",
"getMainAmountOfWork",
"(",
")",
"{",
"return",
"2",
";",
"}",
"public",
"abstract",
"String",
"getMainTaskName",
"(",
")",
";",
"protected",
"ISchedulingRule",
"getSchedulingRule",
"(",
")",
"{",
"IResource",
"resource",
"=",
"getCompilationUnit",
"(",
")",
".",
"getResource",
"(",
")",
";",
"IWorkspace",
"workspace",
"=",
"resource",
".",
"getWorkspace",
"(",
")",
";",
"return",
"workspace",
".",
"getRuleFactory",
"(",
")",
".",
"modifyRule",
"(",
"resource",
")",
";",
"}",
"protected",
"void",
"initializeDefaultPosition",
"(",
")",
"{",
"}",
"protected",
"void",
"insertASTNode",
"(",
"ASTRewrite",
"rewriter",
",",
"ASTNode",
"parent",
",",
"ASTNode",
"child",
")",
"throws",
"JavaModelException",
"{",
"StructuralPropertyDescriptor",
"propertyDescriptor",
"=",
"getChildPropertyDescriptor",
"(",
"parent",
")",
";",
"if",
"(",
"propertyDescriptor",
"instanceof",
"ChildListPropertyDescriptor",
")",
"{",
"ChildListPropertyDescriptor",
"childListPropertyDescriptor",
"=",
"(",
"ChildListPropertyDescriptor",
")",
"propertyDescriptor",
";",
"ListRewrite",
"rewrite",
"=",
"rewriter",
".",
"getListRewrite",
"(",
"parent",
",",
"childListPropertyDescriptor",
")",
";",
"switch",
"(",
"this",
".",
"insertionPolicy",
")",
"{",
"case",
"INSERT_BEFORE",
":",
"ASTNode",
"element",
"=",
"(",
"(",
"JavaElement",
")",
"this",
".",
"anchorElement",
")",
".",
"findNode",
"(",
"this",
".",
"cuAST",
")",
";",
"if",
"(",
"childListPropertyDescriptor",
".",
"getElementType",
"(",
")",
".",
"isAssignableFrom",
"(",
"element",
".",
"getClass",
"(",
")",
")",
")",
"rewrite",
".",
"insertBefore",
"(",
"child",
",",
"element",
",",
"null",
")",
";",
"else",
"rewrite",
".",
"insertLast",
"(",
"child",
",",
"null",
")",
";",
"break",
";",
"case",
"INSERT_AFTER",
":",
"element",
"=",
"(",
"(",
"JavaElement",
")",
"this",
".",
"anchorElement",
")",
".",
"findNode",
"(",
"this",
".",
"cuAST",
")",
";",
"if",
"(",
"childListPropertyDescriptor",
".",
"getElementType",
"(",
")",
".",
"isAssignableFrom",
"(",
"element",
".",
"getClass",
"(",
")",
")",
")",
"rewrite",
".",
"insertAfter",
"(",
"child",
",",
"element",
",",
"null",
")",
";",
"else",
"rewrite",
".",
"insertLast",
"(",
"child",
",",
"null",
")",
";",
"break",
";",
"case",
"INSERT_LAST",
":",
"rewrite",
".",
"insertLast",
"(",
"child",
",",
"null",
")",
";",
"break",
";",
"}",
"}",
"else",
"{",
"rewriter",
".",
"set",
"(",
"parent",
",",
"propertyDescriptor",
",",
"child",
",",
"null",
")",
";",
"}",
"}",
"protected",
"CompilationUnit",
"parse",
"(",
"ICompilationUnit",
"cu",
")",
"throws",
"JavaModelException",
"{",
"cu",
".",
"makeConsistent",
"(",
"this",
".",
"progressMonitor",
")",
";",
"ASTParser",
"parser",
"=",
"ASTParser",
".",
"newParser",
"(",
"AST",
".",
"JLS4",
")",
";",
"parser",
".",
"setSource",
"(",
"cu",
")",
";",
"return",
"(",
"CompilationUnit",
")",
"parser",
".",
"createAST",
"(",
"this",
".",
"progressMonitor",
")",
";",
"}",
"protected",
"void",
"setAlteredName",
"(",
"String",
"newName",
")",
"{",
"}",
"protected",
"void",
"setRelativePosition",
"(",
"IJavaElement",
"sibling",
",",
"int",
"policy",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"sibling",
"==",
"null",
")",
"{",
"this",
".",
"anchorElement",
"=",
"null",
";",
"this",
".",
"insertionPolicy",
"=",
"INSERT_LAST",
";",
"}",
"else",
"{",
"this",
".",
"anchorElement",
"=",
"sibling",
";",
"this",
".",
"insertionPolicy",
"=",
"policy",
";",
"}",
"}",
"public",
"IJavaModelStatus",
"verify",
"(",
")",
"{",
"if",
"(",
"getParentElement",
"(",
")",
"==",
"null",
")",
"{",
"return",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"NO_ELEMENTS_TO_PROCESS",
")",
";",
"}",
"if",
"(",
"this",
".",
"anchorElement",
"!=",
"null",
")",
"{",
"IJavaElement",
"domPresentParent",
"=",
"this",
".",
"anchorElement",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"domPresentParent",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"IMPORT_CONTAINER",
")",
"{",
"domPresentParent",
"=",
"domPresentParent",
".",
"getParent",
"(",
")",
";",
"}",
"if",
"(",
"!",
"domPresentParent",
".",
"equals",
"(",
"getParentElement",
"(",
")",
")",
")",
"{",
"return",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_SIBLING",
",",
"this",
".",
"anchorElement",
")",
";",
"}",
"}",
"return",
"JavaModelStatus",
".",
"VERIFIED_OK",
";",
"}",
"}",
"</s>"
] |
2,832 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResource",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IPath",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ASTNode",
";",
"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",
".",
"Literal",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"NullLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"OperatorIds",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"QualifiedNameReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"SingleNameReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"UnaryExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ExtraCompilerModifiers",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"RecoveryScanner",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"MementoTokenizer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"LocalVariable",
"extends",
"SourceRefElement",
"implements",
"ILocalVariable",
"{",
"public",
"static",
"final",
"ILocalVariable",
"[",
"]",
"NO_LOCAL_VARIABLES",
"=",
"new",
"ILocalVariable",
"[",
"0",
"]",
";",
"String",
"name",
";",
"public",
"int",
"declarationSourceStart",
",",
"declarationSourceEnd",
";",
"public",
"int",
"nameStart",
",",
"nameEnd",
";",
"String",
"typeSignature",
";",
"public",
"IAnnotation",
"[",
"]",
"annotations",
";",
"private",
"int",
"flags",
";",
"private",
"boolean",
"isParameter",
";",
"public",
"LocalVariable",
"(",
"JavaElement",
"parent",
",",
"String",
"name",
",",
"int",
"declarationSourceStart",
",",
"int",
"declarationSourceEnd",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"String",
"typeSignature",
",",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Annotation",
"[",
"]",
"astAnnotations",
",",
"int",
"flags",
",",
"boolean",
"isParameter",
")",
"{",
"super",
"(",
"parent",
")",
";",
"this",
".",
"name",
"=",
"name",
";",
"this",
".",
"declarationSourceStart",
"=",
"declarationSourceStart",
";",
"this",
".",
"declarationSourceEnd",
"=",
"declarationSourceEnd",
";",
"this",
".",
"nameStart",
"=",
"nameStart",
";",
"this",
".",
"nameEnd",
"=",
"nameEnd",
";",
"this",
".",
"typeSignature",
"=",
"typeSignature",
";",
"this",
".",
"annotations",
"=",
"getAnnotations",
"(",
"astAnnotations",
")",
";",
"this",
".",
"flags",
"=",
"flags",
";",
"this",
".",
"isParameter",
"=",
"isParameter",
";",
"}",
"protected",
"void",
"closing",
"(",
"Object",
"info",
")",
"{",
"}",
"protected",
"Object",
"createElementInfo",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"LocalVariable",
")",
")",
"return",
"false",
";",
"LocalVariable",
"other",
"=",
"(",
"LocalVariable",
")",
"o",
";",
"return",
"this",
".",
"declarationSourceStart",
"==",
"other",
".",
"declarationSourceStart",
"&&",
"this",
".",
"declarationSourceEnd",
"==",
"other",
".",
"declarationSourceEnd",
"&&",
"this",
".",
"nameStart",
"==",
"other",
".",
"nameStart",
"&&",
"this",
".",
"nameEnd",
"==",
"other",
".",
"nameEnd",
"&&",
"super",
".",
"equals",
"(",
"o",
")",
";",
"}",
"public",
"boolean",
"exists",
"(",
")",
"{",
"return",
"this",
".",
"parent",
".",
"exists",
"(",
")",
";",
"}",
"protected",
"void",
"generateInfos",
"(",
"Object",
"info",
",",
"HashMap",
"newElements",
",",
"IProgressMonitor",
"pm",
")",
"{",
"}",
"public",
"IAnnotation",
"getAnnotation",
"(",
"String",
"annotationName",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"annotations",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IAnnotation",
"annotation",
"=",
"this",
".",
"annotations",
"[",
"i",
"]",
";",
"if",
"(",
"annotation",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"annotationName",
")",
")",
"return",
"annotation",
";",
"}",
"return",
"super",
".",
"getAnnotation",
"(",
"annotationName",
")",
";",
"}",
"public",
"IAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"this",
".",
"annotations",
";",
"}",
"private",
"IAnnotation",
"[",
"]",
"getAnnotations",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Annotation",
"[",
"]",
"astAnnotations",
")",
"{",
"int",
"length",
";",
"if",
"(",
"astAnnotations",
"==",
"null",
"||",
"(",
"length",
"=",
"astAnnotations",
".",
"length",
")",
"==",
"0",
")",
"return",
"Annotation",
".",
"NO_ANNOTATIONS",
";",
"IAnnotation",
"[",
"]",
"result",
"=",
"new",
"IAnnotation",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"result",
"[",
"i",
"]",
"=",
"getAnnotation",
"(",
"astAnnotations",
"[",
"i",
"]",
",",
"this",
")",
";",
"}",
"return",
"result",
";",
"}",
"private",
"IAnnotation",
"getAnnotation",
"(",
"final",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Annotation",
"annotation",
",",
"JavaElement",
"parentElement",
")",
"{",
"final",
"int",
"typeStart",
"=",
"annotation",
".",
"type",
".",
"sourceStart",
"(",
")",
";",
"final",
"int",
"typeEnd",
"=",
"annotation",
".",
"type",
".",
"sourceEnd",
"(",
")",
";",
"final",
"int",
"sourceStart",
"=",
"annotation",
".",
"sourceStart",
"(",
")",
";",
"final",
"int",
"sourceEnd",
"=",
"annotation",
".",
"declarationSourceEnd",
";",
"class",
"LocalVarAnnotation",
"extends",
"Annotation",
"{",
"IMemberValuePair",
"[",
"]",
"memberValuePairs",
";",
"public",
"LocalVarAnnotation",
"(",
"JavaElement",
"localVar",
",",
"String",
"elementName",
")",
"{",
"super",
"(",
"localVar",
",",
"elementName",
")",
";",
"}",
"public",
"IMemberValuePair",
"[",
"]",
"getMemberValuePairs",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"this",
".",
"memberValuePairs",
";",
"}",
"public",
"ISourceRange",
"getNameRange",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"new",
"SourceRange",
"(",
"typeStart",
",",
"typeEnd",
"-",
"typeStart",
"+",
"1",
")",
";",
"}",
"public",
"ISourceRange",
"getSourceRange",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"new",
"SourceRange",
"(",
"sourceStart",
",",
"sourceEnd",
"-",
"sourceStart",
"+",
"1",
")",
";",
"}",
"public",
"boolean",
"exists",
"(",
")",
"{",
"return",
"this",
".",
"parent",
".",
"exists",
"(",
")",
";",
"}",
"}",
"String",
"annotationName",
"=",
"new",
"String",
"(",
"CharOperation",
".",
"concatWith",
"(",
"annotation",
".",
"type",
".",
"getTypeName",
"(",
")",
",",
"'.'",
")",
")",
";",
"LocalVarAnnotation",
"localVarAnnotation",
"=",
"new",
"LocalVarAnnotation",
"(",
"parentElement",
",",
"annotationName",
")",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"MemberValuePair",
"[",
"]",
"astMemberValuePairs",
"=",
"annotation",
".",
"memberValuePairs",
"(",
")",
";",
"int",
"length",
";",
"IMemberValuePair",
"[",
"]",
"memberValuePairs",
";",
"if",
"(",
"astMemberValuePairs",
"==",
"null",
"||",
"(",
"length",
"=",
"astMemberValuePairs",
".",
"length",
")",
"==",
"0",
")",
"{",
"memberValuePairs",
"=",
"Annotation",
".",
"NO_MEMBER_VALUE_PAIRS",
";",
"}",
"else",
"{",
"memberValuePairs",
"=",
"new",
"IMemberValuePair",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"MemberValuePair",
"astMemberValuePair",
"=",
"astMemberValuePairs",
"[",
"i",
"]",
";",
"MemberValuePair",
"memberValuePair",
"=",
"new",
"MemberValuePair",
"(",
"new",
"String",
"(",
"astMemberValuePair",
".",
"name",
")",
")",
";",
"memberValuePair",
".",
"value",
"=",
"getAnnotationMemberValue",
"(",
"memberValuePair",
",",
"astMemberValuePair",
".",
"value",
",",
"localVarAnnotation",
")",
";",
"memberValuePairs",
"[",
"i",
"]",
"=",
"memberValuePair",
";",
"}",
"}",
"localVarAnnotation",
".",
"memberValuePairs",
"=",
"memberValuePairs",
";",
"return",
"localVarAnnotation",
";",
"}",
"private",
"Object",
"getAnnotationMemberValue",
"(",
"MemberValuePair",
"memberValuePair",
",",
"Expression",
"expression",
",",
"JavaElement",
"parentElement",
")",
"{",
"if",
"(",
"expression",
"instanceof",
"NullLiteral",
")",
"{",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"expression",
"instanceof",
"Literal",
")",
"{",
"(",
"(",
"Literal",
")",
"expression",
")",
".",
"computeConstant",
"(",
")",
";",
"return",
"Util",
".",
"getAnnotationMemberValue",
"(",
"memberValuePair",
",",
"expression",
".",
"constant",
")",
";",
"}",
"else",
"if",
"(",
"expression",
"instanceof",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Annotation",
")",
"{",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_ANNOTATION",
";",
"return",
"getAnnotation",
"(",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Annotation",
")",
"expression",
",",
"parentElement",
")",
";",
"}",
"else",
"if",
"(",
"expression",
"instanceof",
"ClassLiteralAccess",
")",
"{",
"ClassLiteralAccess",
"classLiteral",
"=",
"(",
"ClassLiteralAccess",
")",
"expression",
";",
"char",
"[",
"]",
"typeName",
"=",
"CharOperation",
".",
"concatWith",
"(",
"classLiteral",
".",
"type",
".",
"getTypeName",
"(",
")",
",",
"'.'",
")",
";",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_CLASS",
";",
"return",
"new",
"String",
"(",
"typeName",
")",
";",
"}",
"else",
"if",
"(",
"expression",
"instanceof",
"QualifiedNameReference",
")",
"{",
"char",
"[",
"]",
"qualifiedName",
"=",
"CharOperation",
".",
"concatWith",
"(",
"(",
"(",
"QualifiedNameReference",
")",
"expression",
")",
".",
"tokens",
",",
"'.'",
")",
";",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_QUALIFIED_NAME",
";",
"return",
"new",
"String",
"(",
"qualifiedName",
")",
";",
"}",
"else",
"if",
"(",
"expression",
"instanceof",
"SingleNameReference",
")",
"{",
"char",
"[",
"]",
"simpleName",
"=",
"(",
"(",
"SingleNameReference",
")",
"expression",
")",
".",
"token",
";",
"if",
"(",
"simpleName",
"==",
"RecoveryScanner",
".",
"FAKE_IDENTIFIER",
")",
"{",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_UNKNOWN",
";",
"return",
"null",
";",
"}",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_SIMPLE_NAME",
";",
"return",
"new",
"String",
"(",
"simpleName",
")",
";",
"}",
"else",
"if",
"(",
"expression",
"instanceof",
"ArrayInitializer",
")",
"{",
"memberValuePair",
".",
"valueKind",
"=",
"-",
"1",
";",
"Expression",
"[",
"]",
"expressions",
"=",
"(",
"(",
"ArrayInitializer",
")",
"expression",
")",
".",
"expressions",
";",
"int",
"length",
"=",
"expressions",
"==",
"null",
"?",
"0",
":",
"expressions",
".",
"length",
";",
"Object",
"[",
"]",
"values",
"=",
"new",
"Object",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"int",
"previousValueKind",
"=",
"memberValuePair",
".",
"valueKind",
";",
"Object",
"value",
"=",
"getAnnotationMemberValue",
"(",
"memberValuePair",
",",
"expressions",
"[",
"i",
"]",
",",
"parentElement",
")",
";",
"if",
"(",
"previousValueKind",
"!=",
"-",
"1",
"&&",
"memberValuePair",
".",
"valueKind",
"!=",
"previousValueKind",
")",
"{",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_UNKNOWN",
";",
"}",
"values",
"[",
"i",
"]",
"=",
"value",
";",
"}",
"if",
"(",
"memberValuePair",
".",
"valueKind",
"==",
"-",
"1",
")",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_UNKNOWN",
";",
"return",
"values",
";",
"}",
"else",
"if",
"(",
"expression",
"instanceof",
"UnaryExpression",
")",
"{",
"UnaryExpression",
"unaryExpression",
"=",
"(",
"UnaryExpression",
")",
"expression",
";",
"if",
"(",
"(",
"unaryExpression",
".",
"bits",
"&",
"ASTNode",
".",
"OperatorMASK",
")",
">>",
"ASTNode",
".",
"OperatorSHIFT",
"==",
"OperatorIds",
".",
"MINUS",
")",
"{",
"if",
"(",
"unaryExpression",
".",
"expression",
"instanceof",
"Literal",
")",
"{",
"Literal",
"subExpression",
"=",
"(",
"Literal",
")",
"unaryExpression",
".",
"expression",
";",
"subExpression",
".",
"computeConstant",
"(",
")",
";",
"return",
"Util",
".",
"getNegativeAnnotationMemberValue",
"(",
"memberValuePair",
",",
"subExpression",
".",
"constant",
")",
";",
"}",
"}",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_UNKNOWN",
";",
"return",
"null",
";",
"}",
"else",
"{",
"memberValuePair",
".",
"valueKind",
"=",
"IMemberValuePair",
".",
"K_UNKNOWN",
";",
"return",
"null",
";",
"}",
"}",
"public",
"IJavaElement",
"getHandleFromMemento",
"(",
"String",
"token",
",",
"MementoTokenizer",
"memento",
",",
"WorkingCopyOwner",
"owner",
")",
"{",
"switch",
"(",
"token",
".",
"charAt",
"(",
"0",
")",
")",
"{",
"case",
"JEM_COUNT",
":",
"return",
"getHandleUpdatingCountFromMemento",
"(",
"memento",
",",
"owner",
")",
";",
"}",
"return",
"this",
";",
"}",
"protected",
"void",
"getHandleMemento",
"(",
"StringBuffer",
"buff",
")",
"{",
"(",
"(",
"JavaElement",
")",
"getParent",
"(",
")",
")",
".",
"getHandleMemento",
"(",
"buff",
")",
";",
"buff",
".",
"append",
"(",
"getHandleMementoDelimiter",
"(",
")",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"name",
")",
";",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"declarationSourceStart",
")",
";",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"declarationSourceEnd",
")",
";",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"nameStart",
")",
";",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"nameEnd",
")",
";",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"escapeMementoName",
"(",
"buff",
",",
"this",
".",
"typeSignature",
")",
";",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"flags",
")",
";",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"isParameter",
")",
";",
"if",
"(",
"this",
".",
"occurrenceCount",
">",
"1",
")",
"{",
"buff",
".",
"append",
"(",
"JEM_COUNT",
")",
";",
"buff",
".",
"append",
"(",
"this",
".",
"occurrenceCount",
")",
";",
"}",
"}",
"protected",
"char",
"getHandleMementoDelimiter",
"(",
")",
"{",
"return",
"JavaElement",
".",
"JEM_LOCALVARIABLE",
";",
"}",
"public",
"IResource",
"getCorrespondingResource",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"IMember",
"getDeclaringMember",
"(",
")",
"{",
"return",
"(",
"IMember",
")",
"this",
".",
"parent",
";",
"}",
"public",
"String",
"getElementName",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"LOCAL_VARIABLE",
";",
"}",
"public",
"int",
"getFlags",
"(",
")",
"{",
"if",
"(",
"this",
".",
"flags",
"==",
"-",
"1",
")",
"{",
"SourceMapper",
"mapper",
"=",
"getSourceMapper",
"(",
")",
";",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"try",
"{",
"ClassFile",
"classFile",
"=",
"(",
"ClassFile",
")",
"getClassFile",
"(",
")",
";",
"if",
"(",
"classFile",
"!=",
"null",
")",
"{",
"classFile",
".",
"getBuffer",
"(",
")",
";",
"return",
"mapper",
".",
"getFlags",
"(",
"this",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"return",
"0",
";",
"}",
"return",
"this",
".",
"flags",
"&",
"ExtraCompilerModifiers",
".",
"AccJustFlag",
";",
"}",
"public",
"IClassFile",
"getClassFile",
"(",
")",
"{",
"IJavaElement",
"element",
"=",
"getParent",
"(",
")",
";",
"while",
"(",
"element",
"instanceof",
"IMember",
")",
"{",
"element",
"=",
"element",
".",
"getParent",
"(",
")",
";",
"}",
"if",
"(",
"element",
"instanceof",
"IClassFile",
")",
"{",
"return",
"(",
"IClassFile",
")",
"element",
";",
"}",
"return",
"null",
";",
"}",
"public",
"ISourceRange",
"getNameRange",
"(",
")",
"{",
"if",
"(",
"this",
".",
"nameEnd",
"==",
"-",
"1",
")",
"{",
"SourceMapper",
"mapper",
"=",
"getSourceMapper",
"(",
")",
";",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"try",
"{",
"ClassFile",
"classFile",
"=",
"(",
"ClassFile",
")",
"getClassFile",
"(",
")",
";",
"if",
"(",
"classFile",
"!=",
"null",
")",
"{",
"classFile",
".",
"getBuffer",
"(",
")",
";",
"return",
"mapper",
".",
"getNameRange",
"(",
"this",
")",
";",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"return",
"SourceMapper",
".",
"UNKNOWN_RANGE",
";",
"}",
"return",
"new",
"SourceRange",
"(",
"this",
".",
"nameStart",
",",
"this",
".",
"nameEnd",
"-",
"this",
".",
"nameStart",
"+",
"1",
")",
";",
"}",
"public",
"IPath",
"getPath",
"(",
")",
"{",
"return",
"this",
".",
"parent",
".",
"getPath",
"(",
")",
";",
"}",
"public",
"IResource",
"resource",
"(",
")",
"{",
"return",
"this",
".",
"parent",
".",
"resource",
"(",
")",
";",
"}",
"public",
"String",
"getSource",
"(",
")",
"throws",
"JavaModelException",
"{",
"IOpenable",
"openable",
"=",
"this",
".",
"parent",
".",
"getOpenableParent",
"(",
")",
";",
"IBuffer",
"buffer",
"=",
"openable",
".",
"getBuffer",
"(",
")",
";",
"if",
"(",
"buffer",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"ISourceRange",
"range",
"=",
"getSourceRange",
"(",
")",
";",
"int",
"offset",
"=",
"range",
".",
"getOffset",
"(",
")",
";",
"int",
"length",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"if",
"(",
"offset",
"==",
"-",
"1",
"||",
"length",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"try",
"{",
"return",
"buffer",
".",
"getText",
"(",
"offset",
",",
"length",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"ISourceRange",
"getSourceRange",
"(",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"this",
".",
"declarationSourceEnd",
"==",
"-",
"1",
")",
"{",
"SourceMapper",
"mapper",
"=",
"getSourceMapper",
"(",
")",
";",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"ClassFile",
"classFile",
"=",
"(",
"ClassFile",
")",
"getClassFile",
"(",
")",
";",
"if",
"(",
"classFile",
"!=",
"null",
")",
"{",
"classFile",
".",
"getBuffer",
"(",
")",
";",
"return",
"mapper",
".",
"getSourceRange",
"(",
"this",
")",
";",
"}",
"}",
"return",
"SourceMapper",
".",
"UNKNOWN_RANGE",
";",
"}",
"return",
"new",
"SourceRange",
"(",
"this",
".",
"declarationSourceStart",
",",
"this",
".",
"declarationSourceEnd",
"-",
"this",
".",
"declarationSourceStart",
"+",
"1",
")",
";",
"}",
"public",
"ITypeRoot",
"getTypeRoot",
"(",
")",
"{",
"return",
"this",
".",
"getDeclaringMember",
"(",
")",
".",
"getTypeRoot",
"(",
")",
";",
"}",
"public",
"String",
"getTypeSignature",
"(",
")",
"{",
"return",
"this",
".",
"typeSignature",
";",
"}",
"public",
"IResource",
"getUnderlyingResource",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"this",
".",
"parent",
".",
"getUnderlyingResource",
"(",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"Util",
".",
"combineHashCodes",
"(",
"this",
".",
"parent",
".",
"hashCode",
"(",
")",
",",
"this",
".",
"nameStart",
")",
";",
"}",
"public",
"boolean",
"isParameter",
"(",
")",
"{",
"return",
"this",
".",
"isParameter",
";",
"}",
"public",
"boolean",
"isStructureKnown",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"true",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"tabString",
"(",
"tab",
")",
")",
";",
"if",
"(",
"info",
"!=",
"NO_INFO",
")",
"{",
"buffer",
".",
"append",
"(",
"Signature",
".",
"toString",
"(",
"getTypeSignature",
"(",
")",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"toStringName",
"(",
"buffer",
")",
";",
"}",
"}",
"</s>"
] |
2,833 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IFile",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IFolder",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProject",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IResource",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IWorkspace",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"ResourcesPlugin",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Assert",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IPath",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Path",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"MementoTokenizer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"public",
"class",
"JavaModel",
"extends",
"Openable",
"implements",
"IJavaModel",
"{",
"public",
"static",
"HashSet",
"existingExternalFiles",
"=",
"new",
"HashSet",
"(",
")",
";",
"public",
"static",
"HashSet",
"existingExternalConfirmedFiles",
"=",
"new",
"HashSet",
"(",
")",
";",
"protected",
"JavaModel",
"(",
")",
"throws",
"Error",
"{",
"super",
"(",
"null",
")",
";",
"}",
"protected",
"boolean",
"buildStructure",
"(",
"OpenableElementInfo",
"info",
",",
"IProgressMonitor",
"pm",
",",
"Map",
"newElements",
",",
"IResource",
"underlyingResource",
")",
"{",
"IProject",
"[",
"]",
"projects",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getProjects",
"(",
")",
";",
"int",
"length",
"=",
"projects",
".",
"length",
";",
"IJavaElement",
"[",
"]",
"children",
"=",
"new",
"IJavaElement",
"[",
"length",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IProject",
"project",
"=",
"projects",
"[",
"i",
"]",
";",
"if",
"(",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"children",
"[",
"index",
"++",
"]",
"=",
"getJavaProject",
"(",
"project",
")",
";",
"}",
"}",
"if",
"(",
"index",
"<",
"length",
")",
"System",
".",
"arraycopy",
"(",
"children",
",",
"0",
",",
"children",
"=",
"new",
"IJavaElement",
"[",
"index",
"]",
",",
"0",
",",
"index",
")",
";",
"info",
".",
"setChildren",
"(",
"children",
")",
";",
"newElements",
".",
"put",
"(",
"this",
",",
"info",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"contains",
"(",
"IResource",
"resource",
")",
"{",
"switch",
"(",
"resource",
".",
"getType",
"(",
")",
")",
"{",
"case",
"IResource",
".",
"ROOT",
":",
"case",
"IResource",
".",
"PROJECT",
":",
"return",
"true",
";",
"}",
"IJavaProject",
"[",
"]",
"projects",
";",
"try",
"{",
"projects",
"=",
"getJavaProjects",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"projects",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"projects",
"[",
"i",
"]",
";",
"if",
"(",
"!",
"project",
".",
"contains",
"(",
"resource",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}",
"public",
"void",
"copy",
"(",
"IJavaElement",
"[",
"]",
"elements",
",",
"IJavaElement",
"[",
"]",
"containers",
",",
"IJavaElement",
"[",
"]",
"siblings",
",",
"String",
"[",
"]",
"renamings",
",",
"boolean",
"force",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"elements",
"!=",
"null",
"&&",
"elements",
".",
"length",
">",
"0",
"&&",
"elements",
"[",
"0",
"]",
"!=",
"null",
"&&",
"elements",
"[",
"0",
"]",
".",
"getElementType",
"(",
")",
"<",
"IJavaElement",
".",
"TYPE",
")",
"{",
"runOperation",
"(",
"new",
"CopyResourceElementsOperation",
"(",
"elements",
",",
"containers",
",",
"force",
")",
",",
"elements",
",",
"siblings",
",",
"renamings",
",",
"monitor",
")",
";",
"}",
"else",
"{",
"runOperation",
"(",
"new",
"CopyElementsOperation",
"(",
"elements",
",",
"containers",
",",
"force",
")",
",",
"elements",
",",
"siblings",
",",
"renamings",
",",
"monitor",
")",
";",
"}",
"}",
"protected",
"Object",
"createElementInfo",
"(",
")",
"{",
"return",
"new",
"JavaModelInfo",
"(",
")",
";",
"}",
"public",
"void",
"delete",
"(",
"IJavaElement",
"[",
"]",
"elements",
",",
"boolean",
"force",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"elements",
"!=",
"null",
"&&",
"elements",
".",
"length",
">",
"0",
"&&",
"elements",
"[",
"0",
"]",
"!=",
"null",
"&&",
"elements",
"[",
"0",
"]",
".",
"getElementType",
"(",
")",
"<",
"IJavaElement",
".",
"TYPE",
")",
"{",
"new",
"DeleteResourceElementsOperation",
"(",
"elements",
",",
"force",
")",
".",
"runOperation",
"(",
"monitor",
")",
";",
"}",
"else",
"{",
"new",
"DeleteElementsOperation",
"(",
"elements",
",",
"force",
")",
".",
"runOperation",
"(",
"monitor",
")",
";",
"}",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"JavaModel",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"equals",
"(",
"o",
")",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"JAVA_MODEL",
";",
"}",
"public",
"static",
"void",
"flushExternalFileCache",
"(",
")",
"{",
"existingExternalFiles",
"=",
"new",
"HashSet",
"(",
")",
";",
"existingExternalConfirmedFiles",
"=",
"new",
"HashSet",
"(",
")",
";",
"}",
"public",
"IJavaElement",
"getHandleFromMemento",
"(",
"String",
"token",
",",
"MementoTokenizer",
"memento",
",",
"WorkingCopyOwner",
"owner",
")",
"{",
"switch",
"(",
"token",
".",
"charAt",
"(",
"0",
")",
")",
"{",
"case",
"JEM_JAVAPROJECT",
":",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"String",
"projectName",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"JavaElement",
"project",
"=",
"(",
"JavaElement",
")",
"getJavaProject",
"(",
"projectName",
")",
";",
"return",
"project",
".",
"getHandleFromMemento",
"(",
"memento",
",",
"owner",
")",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"void",
"getHandleMemento",
"(",
"StringBuffer",
"buff",
")",
"{",
"buff",
".",
"append",
"(",
"getElementName",
"(",
")",
")",
";",
"}",
"protected",
"char",
"getHandleMementoDelimiter",
"(",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"false",
",",
"\"\"",
")",
";",
"return",
"0",
";",
"}",
"public",
"IJavaProject",
"getJavaProject",
"(",
"String",
"projectName",
")",
"{",
"return",
"new",
"JavaProject",
"(",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getProject",
"(",
"projectName",
")",
",",
"this",
")",
";",
"}",
"public",
"IJavaProject",
"getJavaProject",
"(",
"IResource",
"resource",
")",
"{",
"switch",
"(",
"resource",
".",
"getType",
"(",
")",
")",
"{",
"case",
"IResource",
".",
"FOLDER",
":",
"return",
"new",
"JavaProject",
"(",
"(",
"(",
"IFolder",
")",
"resource",
")",
".",
"getProject",
"(",
")",
",",
"this",
")",
";",
"case",
"IResource",
".",
"FILE",
":",
"return",
"new",
"JavaProject",
"(",
"(",
"(",
"IFile",
")",
"resource",
")",
".",
"getProject",
"(",
")",
",",
"this",
")",
";",
"case",
"IResource",
".",
"PROJECT",
":",
"return",
"new",
"JavaProject",
"(",
"(",
"IProject",
")",
"resource",
",",
"this",
")",
";",
"default",
":",
"throw",
"new",
"IllegalArgumentException",
"(",
"Messages",
".",
"element_invalidResourceForProject",
")",
";",
"}",
"}",
"public",
"IJavaProject",
"[",
"]",
"getJavaProjects",
"(",
")",
"throws",
"JavaModelException",
"{",
"ArrayList",
"list",
"=",
"getChildrenOfType",
"(",
"JAVA_PROJECT",
")",
";",
"IJavaProject",
"[",
"]",
"array",
"=",
"new",
"IJavaProject",
"[",
"list",
".",
"size",
"(",
")",
"]",
";",
"list",
".",
"toArray",
"(",
"array",
")",
";",
"return",
"array",
";",
"}",
"public",
"Object",
"[",
"]",
"getNonJavaResources",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"(",
"(",
"JavaModelInfo",
")",
"getElementInfo",
"(",
")",
")",
".",
"getNonJavaResources",
"(",
")",
";",
"}",
"public",
"IPath",
"getPath",
"(",
")",
"{",
"return",
"Path",
".",
"ROOT",
";",
"}",
"public",
"IResource",
"resource",
"(",
"PackageFragmentRoot",
"root",
")",
"{",
"return",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
";",
"}",
"public",
"IResource",
"getUnderlyingResource",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"IWorkspace",
"getWorkspace",
"(",
")",
"{",
"return",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
";",
"}",
"public",
"void",
"move",
"(",
"IJavaElement",
"[",
"]",
"elements",
",",
"IJavaElement",
"[",
"]",
"containers",
",",
"IJavaElement",
"[",
"]",
"siblings",
",",
"String",
"[",
"]",
"renamings",
",",
"boolean",
"force",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"elements",
"!=",
"null",
"&&",
"elements",
".",
"length",
">",
"0",
"&&",
"elements",
"[",
"0",
"]",
"!=",
"null",
"&&",
"elements",
"[",
"0",
"]",
".",
"getElementType",
"(",
")",
"<",
"IJavaElement",
".",
"TYPE",
")",
"{",
"runOperation",
"(",
"new",
"MoveResourceElementsOperation",
"(",
"elements",
",",
"containers",
",",
"force",
")",
",",
"elements",
",",
"siblings",
",",
"renamings",
",",
"monitor",
")",
";",
"}",
"else",
"{",
"runOperation",
"(",
"new",
"MoveElementsOperation",
"(",
"elements",
",",
"containers",
",",
"force",
")",
",",
"elements",
",",
"siblings",
",",
"renamings",
",",
"monitor",
")",
";",
"}",
"}",
"public",
"void",
"refreshExternalArchives",
"(",
"IJavaElement",
"[",
"]",
"elementsScope",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"elementsScope",
"==",
"null",
")",
"{",
"elementsScope",
"=",
"new",
"IJavaElement",
"[",
"]",
"{",
"this",
"}",
";",
"}",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getDeltaProcessor",
"(",
")",
".",
"checkExternalArchiveChanges",
"(",
"elementsScope",
",",
"monitor",
")",
";",
"}",
"public",
"void",
"rename",
"(",
"IJavaElement",
"[",
"]",
"elements",
",",
"IJavaElement",
"[",
"]",
"destinations",
",",
"String",
"[",
"]",
"renamings",
",",
"boolean",
"force",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"MultiOperation",
"op",
";",
"if",
"(",
"elements",
"!=",
"null",
"&&",
"elements",
".",
"length",
">",
"0",
"&&",
"elements",
"[",
"0",
"]",
"!=",
"null",
"&&",
"elements",
"[",
"0",
"]",
".",
"getElementType",
"(",
")",
"<",
"IJavaElement",
".",
"TYPE",
")",
"{",
"op",
"=",
"new",
"RenameResourceElementsOperation",
"(",
"elements",
",",
"destinations",
",",
"renamings",
",",
"force",
")",
";",
"}",
"else",
"{",
"op",
"=",
"new",
"RenameElementsOperation",
"(",
"elements",
",",
"destinations",
",",
"renamings",
",",
"force",
")",
";",
"}",
"op",
".",
"runOperation",
"(",
"monitor",
")",
";",
"}",
"protected",
"void",
"runOperation",
"(",
"MultiOperation",
"op",
",",
"IJavaElement",
"[",
"]",
"elements",
",",
"IJavaElement",
"[",
"]",
"siblings",
",",
"String",
"[",
"]",
"renamings",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"op",
".",
"setRenamings",
"(",
"renamings",
")",
";",
"if",
"(",
"siblings",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"elements",
".",
"length",
";",
"i",
"++",
")",
"{",
"op",
".",
"setInsertBefore",
"(",
"elements",
"[",
"i",
"]",
",",
"siblings",
"[",
"i",
"]",
")",
";",
"}",
"}",
"op",
".",
"runOperation",
"(",
"monitor",
")",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"tabString",
"(",
"tab",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"Java",
"Model\"",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"(not",
"open)\"",
")",
";",
"}",
"}",
"public",
"static",
"Object",
"getTarget",
"(",
"IPath",
"path",
",",
"boolean",
"checkResourceExistence",
")",
"{",
"Object",
"target",
"=",
"getWorkspaceTarget",
"(",
"path",
")",
";",
"if",
"(",
"target",
"!=",
"null",
")",
"return",
"target",
";",
"return",
"getExternalTarget",
"(",
"path",
",",
"checkResourceExistence",
")",
";",
"}",
"public",
"static",
"IResource",
"getWorkspaceTarget",
"(",
"IPath",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
"||",
"path",
".",
"getDevice",
"(",
")",
"!=",
"null",
")",
"return",
"null",
";",
"IWorkspace",
"workspace",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
";",
"if",
"(",
"workspace",
"==",
"null",
")",
"return",
"null",
";",
"return",
"workspace",
".",
"getRoot",
"(",
")",
".",
"findMember",
"(",
"path",
")",
";",
"}",
"public",
"static",
"Object",
"getExternalTarget",
"(",
"IPath",
"path",
",",
"boolean",
"checkResourceExistence",
")",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"return",
"null",
";",
"ExternalFoldersManager",
"externalFoldersManager",
"=",
"JavaModelManager",
".",
"getExternalManager",
"(",
")",
";",
"Object",
"linkedFolder",
"=",
"externalFoldersManager",
".",
"getFolder",
"(",
"path",
")",
";",
"if",
"(",
"linkedFolder",
"!=",
"null",
")",
"{",
"if",
"(",
"checkResourceExistence",
")",
"{",
"File",
"externalFile",
"=",
"new",
"File",
"(",
"path",
".",
"toOSString",
"(",
")",
")",
";",
"if",
"(",
"!",
"externalFile",
".",
"isDirectory",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"}",
"return",
"linkedFolder",
";",
"}",
"File",
"externalFile",
"=",
"new",
"File",
"(",
"path",
".",
"toOSString",
"(",
")",
")",
";",
"if",
"(",
"!",
"checkResourceExistence",
")",
"{",
"return",
"externalFile",
";",
"}",
"else",
"if",
"(",
"existingExternalFilesContains",
"(",
"externalFile",
")",
")",
"{",
"return",
"externalFile",
";",
"}",
"else",
"{",
"if",
"(",
"JavaModelManager",
".",
"ZIP_ACCESS_VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"(\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
"+",
"path",
".",
"toString",
"(",
")",
")",
";",
"}",
"if",
"(",
"externalFile",
".",
"isFile",
"(",
")",
")",
"{",
"existingExternalFilesAdd",
"(",
"externalFile",
")",
";",
"return",
"externalFile",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"synchronized",
"static",
"void",
"existingExternalFilesAdd",
"(",
"File",
"externalFile",
")",
"{",
"existingExternalFiles",
".",
"add",
"(",
"externalFile",
")",
";",
"}",
"private",
"synchronized",
"static",
"boolean",
"existingExternalFilesContains",
"(",
"File",
"externalFile",
")",
"{",
"return",
"existingExternalFiles",
".",
"contains",
"(",
"externalFile",
")",
";",
"}",
"public",
"static",
"boolean",
"isFile",
"(",
"Object",
"target",
")",
"{",
"return",
"getFile",
"(",
"target",
")",
"!=",
"null",
";",
"}",
"public",
"static",
"synchronized",
"File",
"getFile",
"(",
"Object",
"target",
")",
"{",
"if",
"(",
"existingExternalConfirmedFiles",
".",
"contains",
"(",
"target",
")",
")",
"return",
"(",
"File",
")",
"target",
";",
"if",
"(",
"target",
"instanceof",
"File",
")",
"{",
"File",
"f",
"=",
"(",
"File",
")",
"target",
";",
"if",
"(",
"f",
".",
"isFile",
"(",
")",
")",
"{",
"existingExternalConfirmedFiles",
".",
"add",
"(",
"f",
")",
";",
"return",
"f",
";",
"}",
"}",
"return",
"null",
";",
"}",
"protected",
"IStatus",
"validateExistence",
"(",
"IResource",
"underlyingResource",
")",
"{",
"return",
"JavaModelStatus",
".",
"VERIFIED_OK",
";",
"}",
"}",
"</s>"
] |
2,834 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Flags",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IField",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IPackageFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ISourceRange",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ITypeParameter",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Signature",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"codeassist",
".",
"ISelectionRequestor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"codeassist",
".",
"SelectionEngine",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"AbstractVariableDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"LocalDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"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",
".",
"MethodBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ParameterizedTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ReferenceBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"SourceTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeVariableBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"HandleFactory",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"SelectionRequestor",
"implements",
"ISelectionRequestor",
"{",
"protected",
"NameLookup",
"nameLookup",
";",
"protected",
"Openable",
"openable",
";",
"protected",
"IJavaElement",
"[",
"]",
"elements",
"=",
"JavaElement",
".",
"NO_ELEMENTS",
";",
"protected",
"int",
"elementIndex",
"=",
"-",
"1",
";",
"protected",
"HandleFactory",
"handleFactory",
"=",
"new",
"HandleFactory",
"(",
")",
";",
"public",
"SelectionRequestor",
"(",
"NameLookup",
"nameLookup",
",",
"Openable",
"openable",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"nameLookup",
"=",
"nameLookup",
";",
"this",
".",
"openable",
"=",
"openable",
";",
"}",
"private",
"void",
"acceptBinaryMethod",
"(",
"IType",
"type",
",",
"IMethod",
"method",
",",
"char",
"[",
"]",
"uniqueKey",
",",
"boolean",
"isConstructor",
")",
"{",
"try",
"{",
"if",
"(",
"!",
"isConstructor",
"||",
"(",
"(",
"JavaElement",
")",
"method",
")",
".",
"getClassFile",
"(",
")",
".",
"getBuffer",
"(",
")",
"==",
"null",
")",
"{",
"if",
"(",
"uniqueKey",
"!=",
"null",
")",
"{",
"ResolvedBinaryMethod",
"resolvedMethod",
"=",
"new",
"ResolvedBinaryMethod",
"(",
"(",
"JavaElement",
")",
"method",
".",
"getParent",
"(",
")",
",",
"method",
".",
"getElementName",
"(",
")",
",",
"method",
".",
"getParameterTypes",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedMethod",
".",
"occurrenceCount",
"=",
"method",
".",
"getOccurrenceCount",
"(",
")",
";",
"method",
"=",
"resolvedMethod",
";",
"}",
"addElement",
"(",
"method",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"method",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"else",
"{",
"ISourceRange",
"range",
"=",
"method",
".",
"getSourceRange",
"(",
")",
";",
"if",
"(",
"range",
".",
"getOffset",
"(",
")",
"!=",
"-",
"1",
"&&",
"range",
".",
"getLength",
"(",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"uniqueKey",
"!=",
"null",
")",
"{",
"ResolvedBinaryMethod",
"resolvedMethod",
"=",
"new",
"ResolvedBinaryMethod",
"(",
"(",
"JavaElement",
")",
"method",
".",
"getParent",
"(",
")",
",",
"method",
".",
"getElementName",
"(",
")",
",",
"method",
".",
"getParameterTypes",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedMethod",
".",
"occurrenceCount",
"=",
"method",
".",
"getOccurrenceCount",
"(",
")",
";",
"method",
"=",
"resolvedMethod",
";",
"}",
"addElement",
"(",
"method",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"method",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"else",
"{",
"addElement",
"(",
"type",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"protected",
"void",
"acceptBinaryMethod",
"(",
"IType",
"type",
",",
"char",
"[",
"]",
"selector",
",",
"char",
"[",
"]",
"[",
"]",
"parameterPackageNames",
",",
"char",
"[",
"]",
"[",
"]",
"parameterTypeNames",
",",
"String",
"[",
"]",
"parameterSignatures",
",",
"char",
"[",
"]",
"[",
"]",
"typeParameterNames",
",",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"typeParameterBoundNames",
",",
"char",
"[",
"]",
"uniqueKey",
",",
"boolean",
"isConstructor",
")",
"{",
"IMethod",
"method",
"=",
"type",
".",
"getMethod",
"(",
"new",
"String",
"(",
"selector",
")",
",",
"parameterSignatures",
")",
";",
"if",
"(",
"method",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"typeParameterNames",
"!=",
"null",
"&&",
"typeParameterNames",
".",
"length",
"!=",
"0",
")",
"{",
"IMethod",
"[",
"]",
"methods",
"=",
"type",
".",
"findMethods",
"(",
"method",
")",
";",
"if",
"(",
"methods",
"!=",
"null",
"&&",
"methods",
".",
"length",
">",
"1",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"methods",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"areTypeParametersCompatible",
"(",
"methods",
"[",
"i",
"]",
",",
"typeParameterNames",
",",
"typeParameterBoundNames",
")",
")",
"{",
"acceptBinaryMethod",
"(",
"type",
",",
"method",
",",
"uniqueKey",
",",
"isConstructor",
")",
";",
"}",
"}",
"return",
";",
"}",
"}",
"acceptBinaryMethod",
"(",
"type",
",",
"method",
",",
"uniqueKey",
",",
"isConstructor",
")",
";",
"}",
"}",
"public",
"void",
"acceptType",
"(",
"char",
"[",
"]",
"packageName",
",",
"char",
"[",
"]",
"typeName",
",",
"int",
"modifiers",
",",
"boolean",
"isDeclaration",
",",
"char",
"[",
"]",
"uniqueKey",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"int",
"acceptFlags",
"=",
"0",
";",
"int",
"kind",
"=",
"modifiers",
"&",
"(",
"ClassFileConstants",
".",
"AccInterface",
"|",
"ClassFileConstants",
".",
"AccEnum",
"|",
"ClassFileConstants",
".",
"AccAnnotation",
")",
";",
"switch",
"(",
"kind",
")",
"{",
"case",
"ClassFileConstants",
".",
"AccAnnotation",
":",
"case",
"ClassFileConstants",
".",
"AccAnnotation",
"|",
"ClassFileConstants",
".",
"AccInterface",
":",
"acceptFlags",
"=",
"NameLookup",
".",
"ACCEPT_ANNOTATIONS",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"AccEnum",
":",
"acceptFlags",
"=",
"NameLookup",
".",
"ACCEPT_ENUMS",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"AccInterface",
":",
"acceptFlags",
"=",
"NameLookup",
".",
"ACCEPT_INTERFACES",
";",
"break",
";",
"default",
":",
"acceptFlags",
"=",
"NameLookup",
".",
"ACCEPT_CLASSES",
";",
"break",
";",
"}",
"IType",
"type",
"=",
"null",
";",
"if",
"(",
"isDeclaration",
")",
"{",
"type",
"=",
"resolveTypeByLocation",
"(",
"packageName",
",",
"typeName",
",",
"acceptFlags",
",",
"start",
",",
"end",
")",
";",
"}",
"else",
"{",
"type",
"=",
"resolveType",
"(",
"packageName",
",",
"typeName",
",",
"acceptFlags",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"String",
"key",
"=",
"uniqueKey",
"==",
"null",
"?",
"type",
".",
"getKey",
"(",
")",
":",
"new",
"String",
"(",
"uniqueKey",
")",
";",
"if",
"(",
"type",
".",
"isBinary",
"(",
")",
")",
"{",
"ResolvedBinaryType",
"resolvedType",
"=",
"new",
"ResolvedBinaryType",
"(",
"(",
"JavaElement",
")",
"type",
".",
"getParent",
"(",
")",
",",
"type",
".",
"getElementName",
"(",
")",
",",
"key",
")",
";",
"resolvedType",
".",
"occurrenceCount",
"=",
"type",
".",
"getOccurrenceCount",
"(",
")",
";",
"type",
"=",
"resolvedType",
";",
"}",
"else",
"{",
"ResolvedSourceType",
"resolvedType",
"=",
"new",
"ResolvedSourceType",
"(",
"(",
"JavaElement",
")",
"type",
".",
"getParent",
"(",
")",
",",
"type",
".",
"getElementName",
"(",
")",
",",
"key",
")",
";",
"resolvedType",
".",
"occurrenceCount",
"=",
"type",
".",
"getOccurrenceCount",
"(",
")",
";",
"type",
"=",
"resolvedType",
";",
"}",
"}",
"}",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"addElement",
"(",
"type",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"public",
"void",
"acceptType",
"(",
"IType",
"type",
")",
"{",
"String",
"key",
"=",
"type",
".",
"getKey",
"(",
")",
";",
"if",
"(",
"type",
".",
"isBinary",
"(",
")",
")",
"{",
"ResolvedBinaryType",
"resolvedType",
"=",
"new",
"ResolvedBinaryType",
"(",
"(",
"JavaElement",
")",
"type",
".",
"getParent",
"(",
")",
",",
"type",
".",
"getElementName",
"(",
")",
",",
"key",
")",
";",
"resolvedType",
".",
"occurrenceCount",
"=",
"type",
".",
"getOccurrenceCount",
"(",
")",
";",
"type",
"=",
"resolvedType",
";",
"}",
"else",
"{",
"ResolvedSourceType",
"resolvedType",
"=",
"new",
"ResolvedSourceType",
"(",
"(",
"JavaElement",
")",
"type",
".",
"getParent",
"(",
")",
",",
"type",
".",
"getElementName",
"(",
")",
",",
"key",
")",
";",
"resolvedType",
".",
"occurrenceCount",
"=",
"type",
".",
"getOccurrenceCount",
"(",
")",
";",
"type",
"=",
"resolvedType",
";",
"}",
"addElement",
"(",
"type",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"public",
"void",
"acceptError",
"(",
"CategorizedProblem",
"error",
")",
"{",
"}",
"public",
"void",
"acceptField",
"(",
"char",
"[",
"]",
"declaringTypePackageName",
",",
"char",
"[",
"]",
"declaringTypeName",
",",
"char",
"[",
"]",
"name",
",",
"boolean",
"isDeclaration",
",",
"char",
"[",
"]",
"uniqueKey",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"if",
"(",
"isDeclaration",
")",
"{",
"IType",
"type",
"=",
"resolveTypeByLocation",
"(",
"declaringTypePackageName",
",",
"declaringTypeName",
",",
"NameLookup",
".",
"ACCEPT_ALL",
",",
"start",
",",
"end",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"try",
"{",
"IField",
"[",
"]",
"fields",
"=",
"type",
".",
"getFields",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"fields",
".",
"length",
";",
"i",
"++",
")",
"{",
"IField",
"field",
"=",
"fields",
"[",
"i",
"]",
";",
"ISourceRange",
"range",
"=",
"field",
".",
"getNameRange",
"(",
")",
";",
"if",
"(",
"range",
".",
"getOffset",
"(",
")",
"<=",
"start",
"&&",
"range",
".",
"getOffset",
"(",
")",
"+",
"range",
".",
"getLength",
"(",
")",
">=",
"end",
"&&",
"field",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"new",
"String",
"(",
"name",
")",
")",
")",
"{",
"addElement",
"(",
"fields",
"[",
"i",
"]",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"field",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"return",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
";",
"}",
"}",
"}",
"else",
"{",
"IType",
"type",
"=",
"resolveType",
"(",
"declaringTypePackageName",
",",
"declaringTypeName",
",",
"NameLookup",
".",
"ACCEPT_ALL",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"IField",
"field",
"=",
"type",
".",
"getField",
"(",
"new",
"String",
"(",
"name",
")",
")",
";",
"if",
"(",
"field",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"uniqueKey",
"!=",
"null",
")",
"{",
"if",
"(",
"field",
".",
"isBinary",
"(",
")",
")",
"{",
"ResolvedBinaryField",
"resolvedField",
"=",
"new",
"ResolvedBinaryField",
"(",
"(",
"JavaElement",
")",
"field",
".",
"getParent",
"(",
")",
",",
"field",
".",
"getElementName",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedField",
".",
"occurrenceCount",
"=",
"field",
".",
"getOccurrenceCount",
"(",
")",
";",
"field",
"=",
"resolvedField",
";",
"}",
"else",
"{",
"ResolvedSourceField",
"resolvedField",
"=",
"new",
"ResolvedSourceField",
"(",
"(",
"JavaElement",
")",
"field",
".",
"getParent",
"(",
")",
",",
"field",
".",
"getElementName",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedField",
".",
"occurrenceCount",
"=",
"field",
".",
"getOccurrenceCount",
"(",
")",
";",
"field",
"=",
"resolvedField",
";",
"}",
"}",
"addElement",
"(",
"field",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"field",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"}",
"public",
"void",
"acceptLocalField",
"(",
"FieldBinding",
"fieldBinding",
")",
"{",
"IJavaElement",
"res",
";",
"if",
"(",
"fieldBinding",
".",
"declaringClass",
"instanceof",
"ParameterizedTypeBinding",
")",
"{",
"LocalTypeBinding",
"localTypeBinding",
"=",
"(",
"LocalTypeBinding",
")",
"(",
"(",
"ParameterizedTypeBinding",
")",
"fieldBinding",
".",
"declaringClass",
")",
".",
"genericType",
"(",
")",
";",
"res",
"=",
"findLocalElement",
"(",
"localTypeBinding",
".",
"sourceStart",
"(",
")",
")",
";",
"}",
"else",
"{",
"SourceTypeBinding",
"typeBinding",
"=",
"(",
"SourceTypeBinding",
")",
"fieldBinding",
".",
"declaringClass",
";",
"res",
"=",
"findLocalElement",
"(",
"typeBinding",
".",
"sourceStart",
"(",
")",
")",
";",
"}",
"if",
"(",
"res",
"!=",
"null",
"&&",
"res",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"TYPE",
")",
"{",
"IType",
"type",
"=",
"(",
"IType",
")",
"res",
";",
"IField",
"field",
"=",
"type",
".",
"getField",
"(",
"new",
"String",
"(",
"fieldBinding",
".",
"name",
")",
")",
";",
"if",
"(",
"field",
".",
"exists",
"(",
")",
")",
"{",
"char",
"[",
"]",
"uniqueKey",
"=",
"fieldBinding",
".",
"computeUniqueKey",
"(",
")",
";",
"if",
"(",
"field",
".",
"isBinary",
"(",
")",
")",
"{",
"ResolvedBinaryField",
"resolvedField",
"=",
"new",
"ResolvedBinaryField",
"(",
"(",
"JavaElement",
")",
"field",
".",
"getParent",
"(",
")",
",",
"field",
".",
"getElementName",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedField",
".",
"occurrenceCount",
"=",
"field",
".",
"getOccurrenceCount",
"(",
")",
";",
"field",
"=",
"resolvedField",
";",
"}",
"else",
"{",
"ResolvedSourceField",
"resolvedField",
"=",
"new",
"ResolvedSourceField",
"(",
"(",
"JavaElement",
")",
"field",
".",
"getParent",
"(",
")",
",",
"field",
".",
"getElementName",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedField",
".",
"occurrenceCount",
"=",
"field",
".",
"getOccurrenceCount",
"(",
")",
";",
"field",
"=",
"resolvedField",
";",
"}",
"addElement",
"(",
"field",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"field",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"acceptLocalMethod",
"(",
"MethodBinding",
"methodBinding",
")",
"{",
"IJavaElement",
"res",
"=",
"findLocalElement",
"(",
"methodBinding",
".",
"original",
"(",
")",
".",
"sourceStart",
"(",
")",
")",
";",
"if",
"(",
"res",
"!=",
"null",
")",
"{",
"if",
"(",
"res",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"METHOD",
")",
"{",
"IMethod",
"method",
"=",
"(",
"IMethod",
")",
"res",
";",
"char",
"[",
"]",
"uniqueKey",
"=",
"methodBinding",
".",
"computeUniqueKey",
"(",
")",
";",
"if",
"(",
"method",
".",
"isBinary",
"(",
")",
")",
"{",
"ResolvedBinaryMethod",
"resolvedRes",
"=",
"new",
"ResolvedBinaryMethod",
"(",
"(",
"JavaElement",
")",
"res",
".",
"getParent",
"(",
")",
",",
"method",
".",
"getElementName",
"(",
")",
",",
"method",
".",
"getParameterTypes",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedRes",
".",
"occurrenceCount",
"=",
"method",
".",
"getOccurrenceCount",
"(",
")",
";",
"res",
"=",
"resolvedRes",
";",
"}",
"else",
"{",
"ResolvedSourceMethod",
"resolvedRes",
"=",
"new",
"ResolvedSourceMethod",
"(",
"(",
"JavaElement",
")",
"res",
".",
"getParent",
"(",
")",
",",
"method",
".",
"getElementName",
"(",
")",
",",
"method",
".",
"getParameterTypes",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedRes",
".",
"occurrenceCount",
"=",
"method",
".",
"getOccurrenceCount",
"(",
")",
";",
"res",
"=",
"resolvedRes",
";",
"}",
"addElement",
"(",
"res",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"res",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"else",
"if",
"(",
"methodBinding",
".",
"selector",
"==",
"TypeConstants",
".",
"INIT",
"&&",
"res",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"TYPE",
")",
"{",
"res",
"=",
"(",
"(",
"JavaElement",
")",
"res",
")",
".",
"resolved",
"(",
"methodBinding",
".",
"declaringClass",
")",
";",
"addElement",
"(",
"res",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"res",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"acceptLocalType",
"(",
"TypeBinding",
"typeBinding",
")",
"{",
"IJavaElement",
"res",
"=",
"null",
";",
"if",
"(",
"typeBinding",
"instanceof",
"ParameterizedTypeBinding",
")",
"{",
"LocalTypeBinding",
"localTypeBinding",
"=",
"(",
"LocalTypeBinding",
")",
"(",
"(",
"ParameterizedTypeBinding",
")",
"typeBinding",
")",
".",
"genericType",
"(",
")",
";",
"res",
"=",
"findLocalElement",
"(",
"localTypeBinding",
".",
"sourceStart",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"typeBinding",
"instanceof",
"SourceTypeBinding",
")",
"{",
"res",
"=",
"findLocalElement",
"(",
"(",
"(",
"SourceTypeBinding",
")",
"typeBinding",
")",
".",
"sourceStart",
"(",
")",
")",
";",
"}",
"if",
"(",
"res",
"!=",
"null",
"&&",
"res",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"TYPE",
")",
"{",
"res",
"=",
"(",
"(",
"JavaElement",
")",
"res",
")",
".",
"resolved",
"(",
"typeBinding",
")",
";",
"addElement",
"(",
"res",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"res",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"public",
"void",
"acceptLocalTypeParameter",
"(",
"TypeVariableBinding",
"typeVariableBinding",
")",
"{",
"IJavaElement",
"res",
";",
"if",
"(",
"typeVariableBinding",
".",
"declaringElement",
"instanceof",
"ParameterizedTypeBinding",
")",
"{",
"LocalTypeBinding",
"localTypeBinding",
"=",
"(",
"LocalTypeBinding",
")",
"(",
"(",
"ParameterizedTypeBinding",
")",
"typeVariableBinding",
".",
"declaringElement",
")",
".",
"genericType",
"(",
")",
";",
"res",
"=",
"findLocalElement",
"(",
"localTypeBinding",
".",
"sourceStart",
"(",
")",
")",
";",
"}",
"else",
"{",
"SourceTypeBinding",
"typeBinding",
"=",
"(",
"SourceTypeBinding",
")",
"typeVariableBinding",
".",
"declaringElement",
";",
"res",
"=",
"findLocalElement",
"(",
"typeBinding",
".",
"sourceStart",
"(",
")",
")",
";",
"}",
"if",
"(",
"res",
"!=",
"null",
"&&",
"res",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"TYPE",
")",
"{",
"IType",
"type",
"=",
"(",
"IType",
")",
"res",
";",
"ITypeParameter",
"typeParameter",
"=",
"type",
".",
"getTypeParameter",
"(",
"new",
"String",
"(",
"typeVariableBinding",
".",
"sourceName",
")",
")",
";",
"if",
"(",
"typeParameter",
".",
"exists",
"(",
")",
")",
"{",
"addElement",
"(",
"typeParameter",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"typeParameter",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"acceptLocalMethodTypeParameter",
"(",
"TypeVariableBinding",
"typeVariableBinding",
")",
"{",
"MethodBinding",
"methodBinding",
"=",
"(",
"MethodBinding",
")",
"typeVariableBinding",
".",
"declaringElement",
";",
"IJavaElement",
"res",
"=",
"findLocalElement",
"(",
"methodBinding",
".",
"sourceStart",
"(",
")",
")",
";",
"if",
"(",
"res",
"!=",
"null",
"&&",
"res",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"METHOD",
")",
"{",
"IMethod",
"method",
"=",
"(",
"IMethod",
")",
"res",
";",
"ITypeParameter",
"typeParameter",
"=",
"method",
".",
"getTypeParameter",
"(",
"new",
"String",
"(",
"typeVariableBinding",
".",
"sourceName",
")",
")",
";",
"if",
"(",
"typeParameter",
".",
"exists",
"(",
")",
")",
"{",
"addElement",
"(",
"typeParameter",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"typeParameter",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"acceptLocalVariable",
"(",
"LocalVariableBinding",
"binding",
")",
"{",
"LocalDeclaration",
"local",
"=",
"binding",
".",
"declaration",
";",
"IJavaElement",
"parent",
"=",
"findLocalElement",
"(",
"local",
".",
"sourceStart",
")",
";",
"LocalVariable",
"localVar",
"=",
"null",
";",
"if",
"(",
"parent",
"!=",
"null",
")",
"{",
"localVar",
"=",
"new",
"LocalVariable",
"(",
"(",
"JavaElement",
")",
"parent",
",",
"new",
"String",
"(",
"local",
".",
"name",
")",
",",
"local",
".",
"declarationSourceStart",
",",
"local",
".",
"declarationSourceEnd",
",",
"local",
".",
"sourceStart",
",",
"local",
".",
"sourceEnd",
",",
"Util",
".",
"typeSignature",
"(",
"local",
".",
"type",
")",
",",
"local",
".",
"annotations",
",",
"local",
".",
"modifiers",
",",
"local",
".",
"getKind",
"(",
")",
"==",
"AbstractVariableDeclaration",
".",
"PARAMETER",
")",
";",
"}",
"if",
"(",
"localVar",
"!=",
"null",
")",
"{",
"addElement",
"(",
"localVar",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"localVar",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"public",
"void",
"acceptMethod",
"(",
"char",
"[",
"]",
"declaringTypePackageName",
",",
"char",
"[",
"]",
"declaringTypeName",
",",
"String",
"enclosingDeclaringTypeSignature",
",",
"char",
"[",
"]",
"selector",
",",
"char",
"[",
"]",
"[",
"]",
"parameterPackageNames",
",",
"char",
"[",
"]",
"[",
"]",
"parameterTypeNames",
",",
"String",
"[",
"]",
"parameterSignatures",
",",
"char",
"[",
"]",
"[",
"]",
"typeParameterNames",
",",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"typeParameterBoundNames",
",",
"boolean",
"isConstructor",
",",
"boolean",
"isDeclaration",
",",
"char",
"[",
"]",
"uniqueKey",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"IJavaElement",
"[",
"]",
"previousElement",
"=",
"this",
".",
"elements",
";",
"int",
"previousElementIndex",
"=",
"this",
".",
"elementIndex",
";",
"this",
".",
"elements",
"=",
"JavaElement",
".",
"NO_ELEMENTS",
";",
"this",
".",
"elementIndex",
"=",
"-",
"1",
";",
"if",
"(",
"isDeclaration",
")",
"{",
"IType",
"type",
"=",
"resolveTypeByLocation",
"(",
"declaringTypePackageName",
",",
"declaringTypeName",
",",
"NameLookup",
".",
"ACCEPT_ALL",
",",
"start",
",",
"end",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"acceptMethodDeclaration",
"(",
"type",
",",
"selector",
",",
"start",
",",
"end",
")",
";",
"}",
"}",
"else",
"{",
"IType",
"type",
"=",
"resolveType",
"(",
"declaringTypePackageName",
",",
"declaringTypeName",
",",
"NameLookup",
".",
"ACCEPT_ALL",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"if",
"(",
"type",
".",
"isBinary",
"(",
")",
")",
"{",
"IType",
"declaringDeclaringType",
"=",
"type",
".",
"getDeclaringType",
"(",
")",
";",
"boolean",
"isStatic",
"=",
"false",
";",
"try",
"{",
"isStatic",
"=",
"Flags",
".",
"isStatic",
"(",
"type",
".",
"getFlags",
"(",
")",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"if",
"(",
"declaringDeclaringType",
"!=",
"null",
"&&",
"isConstructor",
"&&",
"!",
"isStatic",
")",
"{",
"int",
"length",
"=",
"parameterPackageNames",
".",
"length",
";",
"System",
".",
"arraycopy",
"(",
"parameterPackageNames",
",",
"0",
",",
"parameterPackageNames",
"=",
"new",
"char",
"[",
"length",
"+",
"1",
"]",
"[",
"]",
",",
"1",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"parameterTypeNames",
",",
"0",
",",
"parameterTypeNames",
"=",
"new",
"char",
"[",
"length",
"+",
"1",
"]",
"[",
"]",
",",
"1",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"parameterSignatures",
",",
"0",
",",
"parameterSignatures",
"=",
"new",
"String",
"[",
"length",
"+",
"1",
"]",
",",
"1",
",",
"length",
")",
";",
"parameterPackageNames",
"[",
"0",
"]",
"=",
"declaringDeclaringType",
".",
"getPackageFragment",
"(",
")",
".",
"getElementName",
"(",
")",
".",
"toCharArray",
"(",
")",
";",
"parameterTypeNames",
"[",
"0",
"]",
"=",
"declaringDeclaringType",
".",
"getTypeQualifiedName",
"(",
")",
".",
"toCharArray",
"(",
")",
";",
"parameterSignatures",
"[",
"0",
"]",
"=",
"Signature",
".",
"getTypeErasure",
"(",
"enclosingDeclaringTypeSignature",
")",
";",
"}",
"acceptBinaryMethod",
"(",
"type",
",",
"selector",
",",
"parameterPackageNames",
",",
"parameterTypeNames",
",",
"parameterSignatures",
",",
"typeParameterNames",
",",
"typeParameterBoundNames",
",",
"uniqueKey",
",",
"isConstructor",
")",
";",
"}",
"else",
"{",
"acceptSourceMethod",
"(",
"type",
",",
"selector",
",",
"parameterPackageNames",
",",
"parameterTypeNames",
",",
"parameterSignatures",
",",
"typeParameterNames",
",",
"typeParameterBoundNames",
",",
"uniqueKey",
")",
";",
"}",
"}",
"}",
"if",
"(",
"previousElementIndex",
">",
"-",
"1",
")",
"{",
"int",
"elementsLength",
"=",
"this",
".",
"elementIndex",
"+",
"previousElementIndex",
"+",
"2",
";",
"if",
"(",
"elementsLength",
">",
"this",
".",
"elements",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"elements",
",",
"0",
",",
"this",
".",
"elements",
"=",
"new",
"IJavaElement",
"[",
"elementsLength",
"*",
"2",
"+",
"1",
"]",
",",
"0",
",",
"this",
".",
"elementIndex",
"+",
"1",
")",
";",
"}",
"System",
".",
"arraycopy",
"(",
"previousElement",
",",
"0",
",",
"this",
".",
"elements",
",",
"this",
".",
"elementIndex",
"+",
"1",
",",
"previousElementIndex",
"+",
"1",
")",
";",
"this",
".",
"elementIndex",
"+=",
"previousElementIndex",
"+",
"1",
";",
"}",
"}",
"public",
"void",
"acceptPackage",
"(",
"char",
"[",
"]",
"packageName",
")",
"{",
"IPackageFragment",
"[",
"]",
"pkgs",
"=",
"this",
".",
"nameLookup",
".",
"findPackageFragments",
"(",
"new",
"String",
"(",
"packageName",
")",
",",
"false",
")",
";",
"if",
"(",
"pkgs",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"pkgs",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"addElement",
"(",
"pkgs",
"[",
"i",
"]",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"pkgs",
"[",
"i",
"]",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"protected",
"void",
"acceptSourceMethod",
"(",
"IType",
"type",
",",
"char",
"[",
"]",
"selector",
",",
"char",
"[",
"]",
"[",
"]",
"parameterPackageNames",
",",
"char",
"[",
"]",
"[",
"]",
"parameterTypeNames",
",",
"String",
"[",
"]",
"parameterSignatures",
",",
"char",
"[",
"]",
"[",
"]",
"typeParameterNames",
",",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"typeParameterBoundNames",
",",
"char",
"[",
"]",
"uniqueKey",
")",
"{",
"String",
"name",
"=",
"new",
"String",
"(",
"selector",
")",
";",
"IMethod",
"[",
"]",
"methods",
"=",
"null",
";",
"try",
"{",
"methods",
"=",
"type",
".",
"getMethods",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"methods",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"methods",
"[",
"i",
"]",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"name",
")",
"&&",
"methods",
"[",
"i",
"]",
".",
"getParameterTypes",
"(",
")",
".",
"length",
"==",
"parameterTypeNames",
".",
"length",
")",
"{",
"IMethod",
"method",
"=",
"methods",
"[",
"i",
"]",
";",
"if",
"(",
"uniqueKey",
"!=",
"null",
")",
"{",
"ResolvedSourceMethod",
"resolvedMethod",
"=",
"new",
"ResolvedSourceMethod",
"(",
"(",
"JavaElement",
")",
"method",
".",
"getParent",
"(",
")",
",",
"method",
".",
"getElementName",
"(",
")",
",",
"method",
".",
"getParameterTypes",
"(",
")",
",",
"new",
"String",
"(",
"uniqueKey",
")",
")",
";",
"resolvedMethod",
".",
"occurrenceCount",
"=",
"method",
".",
"getOccurrenceCount",
"(",
")",
";",
"method",
"=",
"resolvedMethod",
";",
"}",
"addElement",
"(",
"method",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
";",
"}",
"if",
"(",
"this",
".",
"elementIndex",
"==",
"-",
"1",
")",
"{",
"addElement",
"(",
"type",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"return",
";",
"}",
"if",
"(",
"this",
".",
"elementIndex",
"==",
"0",
")",
"{",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"this",
".",
"elements",
"[",
"0",
"]",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"return",
";",
"}",
"IJavaElement",
"[",
"]",
"matches",
"=",
"this",
".",
"elements",
";",
"int",
"matchesIndex",
"=",
"this",
".",
"elementIndex",
";",
"this",
".",
"elements",
"=",
"JavaElement",
".",
"NO_ELEMENTS",
";",
"this",
".",
"elementIndex",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"matchesIndex",
";",
"i",
"++",
")",
"{",
"IMethod",
"method",
"=",
"(",
"IMethod",
")",
"matches",
"[",
"i",
"]",
";",
"String",
"[",
"]",
"signatures",
"=",
"method",
".",
"getParameterTypes",
"(",
")",
";",
"boolean",
"match",
"=",
"true",
";",
"for",
"(",
"int",
"p",
"=",
"0",
";",
"p",
"<",
"signatures",
".",
"length",
";",
"p",
"++",
")",
"{",
"String",
"simpleName",
"=",
"Signature",
".",
"getSimpleName",
"(",
"Signature",
".",
"toString",
"(",
"Signature",
".",
"getTypeErasure",
"(",
"signatures",
"[",
"p",
"]",
")",
")",
")",
";",
"char",
"[",
"]",
"simpleParameterName",
"=",
"CharOperation",
".",
"lastSegment",
"(",
"parameterTypeNames",
"[",
"p",
"]",
",",
"'.'",
")",
";",
"if",
"(",
"!",
"simpleName",
".",
"equals",
"(",
"new",
"String",
"(",
"simpleParameterName",
")",
")",
")",
"{",
"match",
"=",
"false",
";",
"break",
";",
"}",
"}",
"if",
"(",
"match",
"&&",
"!",
"areTypeParametersCompatible",
"(",
"method",
",",
"typeParameterNames",
",",
"typeParameterBoundNames",
")",
")",
"{",
"match",
"=",
"false",
";",
"}",
"if",
"(",
"match",
")",
"{",
"addElement",
"(",
"method",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"method",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"protected",
"void",
"acceptMethodDeclaration",
"(",
"IType",
"type",
",",
"char",
"[",
"]",
"selector",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"String",
"name",
"=",
"new",
"String",
"(",
"selector",
")",
";",
"IMethod",
"[",
"]",
"methods",
"=",
"null",
";",
"try",
"{",
"methods",
"=",
"type",
".",
"getMethods",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"methods",
".",
"length",
";",
"i",
"++",
")",
"{",
"ISourceRange",
"range",
"=",
"methods",
"[",
"i",
"]",
".",
"getNameRange",
"(",
")",
";",
"if",
"(",
"range",
".",
"getOffset",
"(",
")",
"<=",
"start",
"&&",
"range",
".",
"getOffset",
"(",
")",
"+",
"range",
".",
"getLength",
"(",
")",
">=",
"end",
"&&",
"methods",
"[",
"i",
"]",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"{",
"addElement",
"(",
"methods",
"[",
"i",
"]",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"this",
".",
"elements",
"[",
"0",
"]",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"return",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
";",
"}",
"addElement",
"(",
"type",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"return",
";",
"}",
"public",
"void",
"acceptTypeParameter",
"(",
"char",
"[",
"]",
"declaringTypePackageName",
",",
"char",
"[",
"]",
"declaringTypeName",
",",
"char",
"[",
"]",
"typeParameterName",
",",
"boolean",
"isDeclaration",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"IType",
"type",
";",
"if",
"(",
"isDeclaration",
")",
"{",
"type",
"=",
"resolveTypeByLocation",
"(",
"declaringTypePackageName",
",",
"declaringTypeName",
",",
"NameLookup",
".",
"ACCEPT_ALL",
",",
"start",
",",
"end",
")",
";",
"}",
"else",
"{",
"type",
"=",
"resolveType",
"(",
"declaringTypePackageName",
",",
"declaringTypeName",
",",
"NameLookup",
".",
"ACCEPT_ALL",
")",
";",
"}",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"ITypeParameter",
"typeParameter",
"=",
"type",
".",
"getTypeParameter",
"(",
"new",
"String",
"(",
"typeParameterName",
")",
")",
";",
"if",
"(",
"typeParameter",
"==",
"null",
")",
"{",
"addElement",
"(",
"type",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"else",
"{",
"addElement",
"(",
"typeParameter",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"typeParameter",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"acceptMethodTypeParameter",
"(",
"char",
"[",
"]",
"declaringTypePackageName",
",",
"char",
"[",
"]",
"declaringTypeName",
",",
"char",
"[",
"]",
"selector",
",",
"int",
"selectorStart",
",",
"int",
"selectorEnd",
",",
"char",
"[",
"]",
"typeParameterName",
",",
"boolean",
"isDeclaration",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"IType",
"type",
"=",
"resolveTypeByLocation",
"(",
"declaringTypePackageName",
",",
"declaringTypeName",
",",
"NameLookup",
".",
"ACCEPT_ALL",
",",
"selectorStart",
",",
"selectorEnd",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"IMethod",
"method",
"=",
"null",
";",
"String",
"name",
"=",
"new",
"String",
"(",
"selector",
")",
";",
"IMethod",
"[",
"]",
"methods",
"=",
"null",
";",
"try",
"{",
"methods",
"=",
"type",
".",
"getMethods",
"(",
")",
";",
"done",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"methods",
".",
"length",
";",
"i",
"++",
")",
"{",
"ISourceRange",
"range",
"=",
"methods",
"[",
"i",
"]",
".",
"getNameRange",
"(",
")",
";",
"if",
"(",
"range",
".",
"getOffset",
"(",
")",
">=",
"selectorStart",
"&&",
"range",
".",
"getOffset",
"(",
")",
"+",
"range",
".",
"getLength",
"(",
")",
"<=",
"selectorEnd",
"&&",
"methods",
"[",
"i",
"]",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"{",
"method",
"=",
"methods",
"[",
"i",
"]",
";",
"break",
"done",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"if",
"(",
"method",
"==",
"null",
")",
"{",
"addElement",
"(",
"type",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"type",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"else",
"{",
"ITypeParameter",
"typeParameter",
"=",
"method",
".",
"getTypeParameter",
"(",
"new",
"String",
"(",
"typeParameterName",
")",
")",
";",
"if",
"(",
"typeParameter",
"==",
"null",
")",
"{",
"addElement",
"(",
"method",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"method",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"else",
"{",
"addElement",
"(",
"typeParameter",
")",
";",
"if",
"(",
"SelectionEngine",
".",
"DEBUG",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"typeParameter",
".",
"toString",
"(",
")",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\")\"",
")",
";",
"}",
"}",
"}",
"}",
"}",
"protected",
"void",
"addElement",
"(",
"IJavaElement",
"element",
")",
"{",
"int",
"elementLength",
"=",
"this",
".",
"elementIndex",
"+",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"elementLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"elements",
"[",
"i",
"]",
".",
"equals",
"(",
"element",
")",
")",
"{",
"return",
";",
"}",
"}",
"if",
"(",
"elementLength",
"==",
"this",
".",
"elements",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"elements",
",",
"0",
",",
"this",
".",
"elements",
"=",
"new",
"IJavaElement",
"[",
"(",
"elementLength",
"*",
"2",
")",
"+",
"1",
"]",
",",
"0",
",",
"elementLength",
")",
";",
"}",
"this",
".",
"elements",
"[",
"++",
"this",
".",
"elementIndex",
"]",
"=",
"element",
";",
"}",
"private",
"boolean",
"areTypeParametersCompatible",
"(",
"IMethod",
"method",
",",
"char",
"[",
"]",
"[",
"]",
"typeParameterNames",
",",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"typeParameterBoundNames",
")",
"{",
"try",
"{",
"ITypeParameter",
"[",
"]",
"typeParameters",
"=",
"method",
".",
"getTypeParameters",
"(",
")",
";",
"int",
"length1",
"=",
"typeParameters",
"==",
"null",
"?",
"0",
":",
"typeParameters",
".",
"length",
";",
"int",
"length2",
"=",
"typeParameterNames",
"==",
"null",
"?",
"0",
":",
"typeParameterNames",
".",
"length",
";",
"if",
"(",
"length1",
"!=",
"length2",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"length1",
";",
"j",
"++",
")",
"{",
"ITypeParameter",
"typeParameter",
"=",
"typeParameters",
"[",
"j",
"]",
";",
"String",
"typeParameterName",
"=",
"typeParameter",
".",
"getElementName",
"(",
")",
";",
"if",
"(",
"!",
"typeParameterName",
".",
"equals",
"(",
"new",
"String",
"(",
"typeParameterNames",
"[",
"j",
"]",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"String",
"[",
"]",
"bounds",
"=",
"typeParameter",
".",
"getBounds",
"(",
")",
";",
"int",
"boundCount",
"=",
"typeParameterBoundNames",
"[",
"j",
"]",
"==",
"null",
"?",
"0",
":",
"typeParameterBoundNames",
"[",
"j",
"]",
".",
"length",
";",
"if",
"(",
"bounds",
".",
"length",
"!=",
"boundCount",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"boundCount",
";",
"k",
"++",
")",
"{",
"String",
"simpleName",
"=",
"Signature",
".",
"getSimpleName",
"(",
"bounds",
"[",
"k",
"]",
")",
";",
"int",
"index",
"=",
"simpleName",
".",
"indexOf",
"(",
"'<'",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
")",
"{",
"simpleName",
"=",
"simpleName",
".",
"substring",
"(",
"0",
",",
"index",
")",
";",
"}",
"if",
"(",
"!",
"simpleName",
".",
"equals",
"(",
"new",
"String",
"(",
"typeParameterBoundNames",
"[",
"j",
"]",
"[",
"k",
"]",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"protected",
"IJavaElement",
"findLocalElement",
"(",
"int",
"pos",
")",
"{",
"IJavaElement",
"res",
"=",
"null",
";",
"if",
"(",
"this",
".",
"openable",
"instanceof",
"ICompilationUnit",
")",
"{",
"ICompilationUnit",
"cu",
"=",
"(",
"ICompilationUnit",
")",
"this",
".",
"openable",
";",
"try",
"{",
"res",
"=",
"cu",
".",
"getElementAt",
"(",
"pos",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"else",
"if",
"(",
"this",
".",
"openable",
"instanceof",
"ClassFile",
")",
"{",
"ClassFile",
"cf",
"=",
"(",
"ClassFile",
")",
"this",
".",
"openable",
";",
"try",
"{",
"res",
"=",
"cf",
".",
"getElementAtConsideringSibling",
"(",
"pos",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"return",
"res",
";",
"}",
"public",
"IJavaElement",
"findMethodFromBinding",
"(",
"MethodBinding",
"method",
",",
"String",
"[",
"]",
"signatures",
",",
"ReferenceBinding",
"declaringClass",
")",
"{",
"IType",
"foundType",
"=",
"this",
".",
"resolveType",
"(",
"declaringClass",
".",
"qualifiedPackageName",
"(",
")",
",",
"declaringClass",
".",
"qualifiedSourceName",
"(",
")",
",",
"NameLookup",
".",
"ACCEPT_CLASSES",
"&",
"NameLookup",
".",
"ACCEPT_INTERFACES",
")",
";",
"if",
"(",
"foundType",
"!=",
"null",
")",
"{",
"if",
"(",
"foundType",
"instanceof",
"BinaryType",
")",
"{",
"try",
"{",
"return",
"Util",
".",
"findMethod",
"(",
"foundType",
",",
"method",
".",
"selector",
",",
"signatures",
",",
"method",
".",
"isConstructor",
"(",
")",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}",
"else",
"{",
"return",
"foundType",
".",
"getMethod",
"(",
"new",
"String",
"(",
"method",
".",
"selector",
")",
",",
"signatures",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"IJavaElement",
"[",
"]",
"getElements",
"(",
")",
"{",
"int",
"elementLength",
"=",
"this",
".",
"elementIndex",
"+",
"1",
";",
"if",
"(",
"this",
".",
"elements",
".",
"length",
"!=",
"elementLength",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"elements",
",",
"0",
",",
"this",
".",
"elements",
"=",
"new",
"IJavaElement",
"[",
"elementLength",
"]",
",",
"0",
",",
"elementLength",
")",
";",
"}",
"return",
"this",
".",
"elements",
";",
"}",
"protected",
"IType",
"resolveType",
"(",
"char",
"[",
"]",
"packageName",
",",
"char",
"[",
"]",
"typeName",
",",
"int",
"acceptFlags",
")",
"{",
"IType",
"type",
"=",
"null",
";",
"if",
"(",
"this",
".",
"openable",
"instanceof",
"CompilationUnit",
"&&",
"(",
"(",
"CompilationUnit",
")",
"this",
".",
"openable",
")",
".",
"isWorkingCopy",
"(",
")",
")",
"{",
"CompilationUnit",
"wc",
"=",
"(",
"CompilationUnit",
")",
"this",
".",
"openable",
";",
"try",
"{",
"if",
"(",
"(",
"(",
"packageName",
"==",
"null",
"||",
"packageName",
".",
"length",
"==",
"0",
")",
"&&",
"wc",
".",
"getPackageDeclarations",
"(",
")",
".",
"length",
"==",
"0",
")",
"||",
"(",
"!",
"(",
"packageName",
"==",
"null",
"||",
"packageName",
".",
"length",
"==",
"0",
")",
"&&",
"wc",
".",
"getPackageDeclaration",
"(",
"new",
"String",
"(",
"packageName",
")",
")",
".",
"exists",
"(",
")",
")",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"compoundName",
"=",
"CharOperation",
".",
"splitOn",
"(",
"'.'",
",",
"typeName",
")",
";",
"if",
"(",
"compoundName",
".",
"length",
">",
"0",
")",
"{",
"type",
"=",
"wc",
".",
"getType",
"(",
"new",
"String",
"(",
"compoundName",
"[",
"0",
"]",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
",",
"length",
"=",
"compoundName",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"type",
"=",
"type",
".",
"getType",
"(",
"new",
"String",
"(",
"compoundName",
"[",
"i",
"]",
")",
")",
";",
"}",
"}",
"if",
"(",
"type",
"!=",
"null",
"&&",
"!",
"type",
".",
"exists",
"(",
")",
")",
"{",
"type",
"=",
"null",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"IPackageFragment",
"[",
"]",
"pkgs",
"=",
"this",
".",
"nameLookup",
".",
"findPackageFragments",
"(",
"(",
"packageName",
"==",
"null",
"||",
"packageName",
".",
"length",
"==",
"0",
")",
"?",
"IPackageFragment",
".",
"DEFAULT_PACKAGE_NAME",
":",
"new",
"String",
"(",
"packageName",
")",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"pkgs",
"==",
"null",
"?",
"0",
":",
"pkgs",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"type",
"=",
"this",
".",
"nameLookup",
".",
"findType",
"(",
"new",
"String",
"(",
"typeName",
")",
",",
"pkgs",
"[",
"i",
"]",
",",
"false",
",",
"acceptFlags",
",",
"true",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"break",
";",
"}",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"String",
"pName",
"=",
"IPackageFragment",
".",
"DEFAULT_PACKAGE_NAME",
";",
"if",
"(",
"packageName",
"!=",
"null",
")",
"{",
"pName",
"=",
"new",
"String",
"(",
"packageName",
")",
";",
"}",
"if",
"(",
"this",
".",
"openable",
"!=",
"null",
"&&",
"this",
".",
"openable",
".",
"getParent",
"(",
")",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"pName",
")",
")",
"{",
"String",
"tName",
"=",
"new",
"String",
"(",
"typeName",
")",
";",
"tName",
"=",
"tName",
".",
"replace",
"(",
"'.'",
",",
"'$'",
")",
";",
"IType",
"[",
"]",
"allTypes",
"=",
"null",
";",
"try",
"{",
"ArrayList",
"list",
"=",
"this",
".",
"openable",
".",
"getChildrenOfType",
"(",
"IJavaElement",
".",
"TYPE",
")",
";",
"allTypes",
"=",
"new",
"IType",
"[",
"list",
".",
"size",
"(",
")",
"]",
";",
"list",
".",
"toArray",
"(",
"allTypes",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"allTypes",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"allTypes",
"[",
"i",
"]",
".",
"getTypeQualifiedName",
"(",
")",
".",
"equals",
"(",
"tName",
")",
")",
"{",
"return",
"allTypes",
"[",
"i",
"]",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"type",
";",
"}",
"protected",
"IType",
"resolveTypeByLocation",
"(",
"char",
"[",
"]",
"packageName",
",",
"char",
"[",
"]",
"typeName",
",",
"int",
"acceptFlags",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"IType",
"type",
"=",
"null",
";",
"if",
"(",
"this",
".",
"openable",
"instanceof",
"CompilationUnit",
"&&",
"(",
"(",
"CompilationUnit",
")",
"this",
".",
"openable",
")",
".",
"isOpen",
"(",
")",
")",
"{",
"CompilationUnit",
"wc",
"=",
"(",
"CompilationUnit",
")",
"this",
".",
"openable",
";",
"try",
"{",
"if",
"(",
"(",
"(",
"packageName",
"==",
"null",
"||",
"packageName",
".",
"length",
"==",
"0",
")",
"&&",
"wc",
".",
"getPackageDeclarations",
"(",
")",
".",
"length",
"==",
"0",
")",
"||",
"(",
"!",
"(",
"packageName",
"==",
"null",
"||",
"packageName",
".",
"length",
"==",
"0",
")",
"&&",
"wc",
".",
"getPackageDeclaration",
"(",
"new",
"String",
"(",
"packageName",
")",
")",
".",
"exists",
"(",
")",
")",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"compoundName",
"=",
"CharOperation",
".",
"splitOn",
"(",
"'.'",
",",
"typeName",
")",
";",
"if",
"(",
"compoundName",
".",
"length",
">",
"0",
")",
"{",
"IType",
"[",
"]",
"tTypes",
"=",
"wc",
".",
"getTypes",
"(",
")",
";",
"int",
"i",
"=",
"0",
";",
"int",
"depth",
"=",
"0",
";",
"done",
":",
"while",
"(",
"i",
"<",
"tTypes",
".",
"length",
")",
"{",
"ISourceRange",
"range",
"=",
"tTypes",
"[",
"i",
"]",
".",
"getSourceRange",
"(",
")",
";",
"if",
"(",
"range",
".",
"getOffset",
"(",
")",
"<=",
"start",
"&&",
"range",
".",
"getOffset",
"(",
")",
"+",
"range",
".",
"getLength",
"(",
")",
">=",
"end",
"&&",
"tTypes",
"[",
"i",
"]",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"new",
"String",
"(",
"compoundName",
"[",
"depth",
"]",
")",
")",
")",
"{",
"if",
"(",
"depth",
"==",
"compoundName",
".",
"length",
"-",
"1",
")",
"{",
"type",
"=",
"tTypes",
"[",
"i",
"]",
";",
"break",
"done",
";",
"}",
"tTypes",
"=",
"tTypes",
"[",
"i",
"]",
".",
"getTypes",
"(",
")",
";",
"i",
"=",
"0",
";",
"depth",
"++",
";",
"continue",
"done",
";",
"}",
"i",
"++",
";",
"}",
"}",
"if",
"(",
"type",
"!=",
"null",
"&&",
"!",
"type",
".",
"exists",
"(",
")",
")",
"{",
"type",
"=",
"null",
";",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"}",
"}",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"IPackageFragment",
"[",
"]",
"pkgs",
"=",
"this",
".",
"nameLookup",
".",
"findPackageFragments",
"(",
"(",
"packageName",
"==",
"null",
"||",
"packageName",
".",
"length",
"==",
"0",
")",
"?",
"IPackageFragment",
".",
"DEFAULT_PACKAGE_NAME",
":",
"new",
"String",
"(",
"packageName",
")",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"pkgs",
"==",
"null",
"?",
"0",
":",
"pkgs",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"type",
"=",
"this",
".",
"nameLookup",
".",
"findType",
"(",
"new",
"String",
"(",
"typeName",
")",
",",
"pkgs",
"[",
"i",
"]",
",",
"false",
",",
"acceptFlags",
",",
"true",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"break",
";",
"}",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"String",
"pName",
"=",
"IPackageFragment",
".",
"DEFAULT_PACKAGE_NAME",
";",
"if",
"(",
"packageName",
"!=",
"null",
")",
"{",
"pName",
"=",
"new",
"String",
"(",
"packageName",
")",
";",
"}",
"if",
"(",
"this",
".",
"openable",
"!=",
"null",
"&&",
"this",
".",
"openable",
".",
"getParent",
"(",
")",
".",
"getElementName",
"(",
")",
".",
"equals",
"(",
"pName",
")",
")",
"{",
"String",
"tName",
"=",
"new",
"String",
"(",
"typeName",
")",
";",
"tName",
"=",
"tName",
".",
"replace",
"(",
"'.'",
",",
"'$'",
")",
";",
"IType",
"[",
"]",
"allTypes",
"=",
"null",
";",
"try",
"{",
"ArrayList",
"list",
"=",
"this",
".",
"openable",
".",
"getChildrenOfType",
"(",
"IJavaElement",
".",
"TYPE",
")",
";",
"allTypes",
"=",
"new",
"IType",
"[",
"list",
".",
"size",
"(",
")",
"]",
";",
"list",
".",
"toArray",
"(",
"allTypes",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"allTypes",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"allTypes",
"[",
"i",
"]",
".",
"getTypeQualifiedName",
"(",
")",
".",
"equals",
"(",
"tName",
")",
")",
"{",
"return",
"allTypes",
"[",
"i",
"]",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"type",
";",
"}",
"}",
"</s>"
] |
2,835 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"public",
"class",
"SourceMethodWithChildrenInfo",
"extends",
"SourceMethodInfo",
"{",
"protected",
"IJavaElement",
"[",
"]",
"children",
";",
"public",
"SourceMethodWithChildrenInfo",
"(",
"IJavaElement",
"[",
"]",
"children",
")",
"{",
"this",
".",
"children",
"=",
"children",
";",
"}",
"public",
"IJavaElement",
"[",
"]",
"getChildren",
"(",
")",
"{",
"return",
"this",
".",
"children",
";",
"}",
"}",
"</s>"
] |
2,836 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElementDelta",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IParent",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"JavaElementDeltaBuilder",
"{",
"IJavaElement",
"javaElement",
";",
"int",
"maxDepth",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"Map",
"infos",
";",
"Map",
"annotationInfos",
";",
"Map",
"oldPositions",
";",
"Map",
"newPositions",
";",
"public",
"JavaElementDelta",
"delta",
"=",
"null",
";",
"HashSet",
"added",
";",
"HashSet",
"removed",
";",
"static",
"class",
"ListItem",
"{",
"public",
"IJavaElement",
"previous",
";",
"public",
"IJavaElement",
"next",
";",
"public",
"ListItem",
"(",
"IJavaElement",
"previous",
",",
"IJavaElement",
"next",
")",
"{",
"this",
".",
"previous",
"=",
"previous",
";",
"this",
".",
"next",
"=",
"next",
";",
"}",
"}",
"public",
"JavaElementDeltaBuilder",
"(",
"IJavaElement",
"javaElement",
")",
"{",
"this",
".",
"javaElement",
"=",
"javaElement",
";",
"initialize",
"(",
")",
";",
"recordElementInfo",
"(",
"javaElement",
",",
"(",
"JavaModel",
")",
"this",
".",
"javaElement",
".",
"getJavaModel",
"(",
")",
",",
"0",
")",
";",
"}",
"public",
"JavaElementDeltaBuilder",
"(",
"IJavaElement",
"javaElement",
",",
"int",
"maxDepth",
")",
"{",
"this",
".",
"javaElement",
"=",
"javaElement",
";",
"this",
".",
"maxDepth",
"=",
"maxDepth",
";",
"initialize",
"(",
")",
";",
"recordElementInfo",
"(",
"javaElement",
",",
"(",
"JavaModel",
")",
"this",
".",
"javaElement",
".",
"getJavaModel",
"(",
")",
",",
"0",
")",
";",
"}",
"private",
"void",
"added",
"(",
"IJavaElement",
"element",
")",
"{",
"this",
".",
"added",
".",
"add",
"(",
"element",
")",
";",
"ListItem",
"current",
"=",
"getNewPosition",
"(",
"element",
")",
";",
"ListItem",
"previous",
"=",
"null",
",",
"next",
"=",
"null",
";",
"if",
"(",
"current",
".",
"previous",
"!=",
"null",
")",
"previous",
"=",
"getNewPosition",
"(",
"current",
".",
"previous",
")",
";",
"if",
"(",
"current",
".",
"next",
"!=",
"null",
")",
"next",
"=",
"getNewPosition",
"(",
"current",
".",
"next",
")",
";",
"if",
"(",
"previous",
"!=",
"null",
")",
"previous",
".",
"next",
"=",
"current",
".",
"next",
";",
"if",
"(",
"next",
"!=",
"null",
")",
"next",
".",
"previous",
"=",
"current",
".",
"previous",
";",
"}",
"public",
"void",
"buildDeltas",
"(",
")",
"{",
"this",
".",
"delta",
"=",
"new",
"JavaElementDelta",
"(",
"this",
".",
"javaElement",
")",
";",
"if",
"(",
"this",
".",
"javaElement",
".",
"getElementType",
"(",
")",
">=",
"IJavaElement",
".",
"COMPILATION_UNIT",
")",
"{",
"this",
".",
"delta",
".",
"fineGrained",
"(",
")",
";",
"}",
"recordNewPositions",
"(",
"this",
".",
"javaElement",
",",
"0",
")",
";",
"findAdditions",
"(",
"this",
".",
"javaElement",
",",
"0",
")",
";",
"findDeletions",
"(",
")",
";",
"findChangesInPositioning",
"(",
"this",
".",
"javaElement",
",",
"0",
")",
";",
"trimDelta",
"(",
"this",
".",
"delta",
")",
";",
"if",
"(",
"this",
".",
"delta",
".",
"getAffectedChildren",
"(",
")",
".",
"length",
"==",
"0",
")",
"{",
"this",
".",
"delta",
".",
"contentChanged",
"(",
")",
";",
"}",
"}",
"private",
"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",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"first",
"[",
"i",
"]",
",",
"second",
"[",
"i",
"]",
")",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"private",
"void",
"findAdditions",
"(",
"IJavaElement",
"newElement",
",",
"int",
"depth",
")",
"{",
"JavaElementInfo",
"oldInfo",
"=",
"getElementInfo",
"(",
"newElement",
")",
";",
"if",
"(",
"oldInfo",
"==",
"null",
"&&",
"depth",
"<",
"this",
".",
"maxDepth",
")",
"{",
"this",
".",
"delta",
".",
"added",
"(",
"newElement",
")",
";",
"added",
"(",
"newElement",
")",
";",
"}",
"else",
"{",
"removeElementInfo",
"(",
"newElement",
")",
";",
"}",
"if",
"(",
"depth",
">=",
"this",
".",
"maxDepth",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"newElement",
",",
"IJavaElementDelta",
".",
"F_CONTENT",
")",
";",
"return",
";",
"}",
"JavaElementInfo",
"newInfo",
"=",
"null",
";",
"try",
"{",
"newInfo",
"=",
"(",
"JavaElementInfo",
")",
"(",
"(",
"JavaElement",
")",
"newElement",
")",
".",
"getElementInfo",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"npe",
")",
"{",
"return",
";",
"}",
"findContentChange",
"(",
"oldInfo",
",",
"newInfo",
",",
"newElement",
")",
";",
"if",
"(",
"oldInfo",
"!=",
"null",
"&&",
"newElement",
"instanceof",
"IParent",
")",
"{",
"IJavaElement",
"[",
"]",
"children",
"=",
"newInfo",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"children",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"children",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"findAdditions",
"(",
"children",
"[",
"i",
"]",
",",
"depth",
"+",
"1",
")",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"findChangesInPositioning",
"(",
"IJavaElement",
"element",
",",
"int",
"depth",
")",
"{",
"if",
"(",
"depth",
">=",
"this",
".",
"maxDepth",
"||",
"this",
".",
"added",
".",
"contains",
"(",
"element",
")",
"||",
"this",
".",
"removed",
".",
"contains",
"(",
"element",
")",
")",
"return",
";",
"if",
"(",
"!",
"isPositionedCorrectly",
"(",
"element",
")",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"element",
",",
"IJavaElementDelta",
".",
"F_REORDER",
")",
";",
"}",
"if",
"(",
"element",
"instanceof",
"IParent",
")",
"{",
"JavaElementInfo",
"info",
"=",
"null",
";",
"try",
"{",
"info",
"=",
"(",
"JavaElementInfo",
")",
"(",
"(",
"JavaElement",
")",
"element",
")",
".",
"getElementInfo",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"npe",
")",
"{",
"return",
";",
"}",
"IJavaElement",
"[",
"]",
"children",
"=",
"info",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"children",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"children",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"findChangesInPositioning",
"(",
"children",
"[",
"i",
"]",
",",
"depth",
"+",
"1",
")",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"findAnnotationChanges",
"(",
"IAnnotation",
"[",
"]",
"oldAnnotations",
",",
"IAnnotation",
"[",
"]",
"newAnnotations",
",",
"IJavaElement",
"parent",
")",
"{",
"ArrayList",
"annotationDeltas",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"newAnnotations",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IAnnotation",
"newAnnotation",
"=",
"newAnnotations",
"[",
"i",
"]",
";",
"Object",
"oldInfo",
"=",
"this",
".",
"annotationInfos",
".",
"remove",
"(",
"newAnnotation",
")",
";",
"if",
"(",
"oldInfo",
"==",
"null",
")",
"{",
"JavaElementDelta",
"annotationDelta",
"=",
"new",
"JavaElementDelta",
"(",
"newAnnotation",
")",
";",
"annotationDelta",
".",
"added",
"(",
")",
";",
"if",
"(",
"annotationDeltas",
"==",
"null",
")",
"annotationDeltas",
"=",
"new",
"ArrayList",
"(",
")",
";",
"annotationDeltas",
".",
"add",
"(",
"annotationDelta",
")",
";",
"continue",
";",
"}",
"else",
"{",
"AnnotationInfo",
"newInfo",
"=",
"null",
";",
"try",
"{",
"newInfo",
"=",
"(",
"AnnotationInfo",
")",
"(",
"(",
"JavaElement",
")",
"newAnnotation",
")",
".",
"getElementInfo",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"npe",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"Util",
".",
"equalArraysOrNull",
"(",
"(",
"(",
"AnnotationInfo",
")",
"oldInfo",
")",
".",
"members",
",",
"newInfo",
".",
"members",
")",
")",
"{",
"JavaElementDelta",
"annotationDelta",
"=",
"new",
"JavaElementDelta",
"(",
"newAnnotation",
")",
";",
"annotationDelta",
".",
"changed",
"(",
"IJavaElementDelta",
".",
"F_CONTENT",
")",
";",
"if",
"(",
"annotationDeltas",
"==",
"null",
")",
"annotationDeltas",
"=",
"new",
"ArrayList",
"(",
")",
";",
"annotationDeltas",
".",
"add",
"(",
"annotationDelta",
")",
";",
"}",
"}",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"oldAnnotations",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IAnnotation",
"oldAnnotation",
"=",
"oldAnnotations",
"[",
"i",
"]",
";",
"if",
"(",
"this",
".",
"annotationInfos",
".",
"remove",
"(",
"oldAnnotation",
")",
"!=",
"null",
")",
"{",
"JavaElementDelta",
"annotationDelta",
"=",
"new",
"JavaElementDelta",
"(",
"oldAnnotation",
")",
";",
"annotationDelta",
".",
"removed",
"(",
")",
";",
"if",
"(",
"annotationDeltas",
"==",
"null",
")",
"annotationDeltas",
"=",
"new",
"ArrayList",
"(",
")",
";",
"annotationDeltas",
".",
"add",
"(",
"annotationDelta",
")",
";",
"}",
"}",
"if",
"(",
"annotationDeltas",
"==",
"null",
")",
"return",
";",
"int",
"size",
"=",
"annotationDeltas",
".",
"size",
"(",
")",
";",
"if",
"(",
"size",
">",
"0",
")",
"{",
"JavaElementDelta",
"parentDelta",
"=",
"this",
".",
"delta",
".",
"changed",
"(",
"parent",
",",
"IJavaElementDelta",
".",
"F_ANNOTATIONS",
")",
";",
"parentDelta",
".",
"annotationDeltas",
"=",
"(",
"IJavaElementDelta",
"[",
"]",
")",
"annotationDeltas",
".",
"toArray",
"(",
"new",
"IJavaElementDelta",
"[",
"size",
"]",
")",
";",
"}",
"}",
"private",
"void",
"findContentChange",
"(",
"JavaElementInfo",
"oldInfo",
",",
"JavaElementInfo",
"newInfo",
",",
"IJavaElement",
"newElement",
")",
"{",
"if",
"(",
"oldInfo",
"instanceof",
"MemberElementInfo",
"&&",
"newInfo",
"instanceof",
"MemberElementInfo",
")",
"{",
"if",
"(",
"(",
"(",
"MemberElementInfo",
")",
"oldInfo",
")",
".",
"getModifiers",
"(",
")",
"!=",
"(",
"(",
"MemberElementInfo",
")",
"newInfo",
")",
".",
"getModifiers",
"(",
")",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"newElement",
",",
"IJavaElementDelta",
".",
"F_MODIFIERS",
")",
";",
"}",
"if",
"(",
"oldInfo",
"instanceof",
"AnnotatableInfo",
"&&",
"newInfo",
"instanceof",
"AnnotatableInfo",
")",
"{",
"findAnnotationChanges",
"(",
"(",
"(",
"AnnotatableInfo",
")",
"oldInfo",
")",
".",
"annotations",
",",
"(",
"(",
"AnnotatableInfo",
")",
"newInfo",
")",
".",
"annotations",
",",
"newElement",
")",
";",
"}",
"if",
"(",
"oldInfo",
"instanceof",
"SourceMethodElementInfo",
"&&",
"newInfo",
"instanceof",
"SourceMethodElementInfo",
")",
"{",
"SourceMethodElementInfo",
"oldSourceMethodInfo",
"=",
"(",
"SourceMethodElementInfo",
")",
"oldInfo",
";",
"SourceMethodElementInfo",
"newSourceMethodInfo",
"=",
"(",
"SourceMethodElementInfo",
")",
"newInfo",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"oldSourceMethodInfo",
".",
"getReturnTypeName",
"(",
")",
",",
"newSourceMethodInfo",
".",
"getReturnTypeName",
"(",
")",
")",
"||",
"!",
"CharOperation",
".",
"equals",
"(",
"oldSourceMethodInfo",
".",
"getTypeParameterNames",
"(",
")",
",",
"newSourceMethodInfo",
".",
"getTypeParameterNames",
"(",
")",
")",
"||",
"!",
"equals",
"(",
"oldSourceMethodInfo",
".",
"getTypeParameterBounds",
"(",
")",
",",
"newSourceMethodInfo",
".",
"getTypeParameterBounds",
"(",
")",
")",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"newElement",
",",
"IJavaElementDelta",
".",
"F_CONTENT",
")",
";",
"}",
"}",
"else",
"if",
"(",
"oldInfo",
"instanceof",
"SourceFieldElementInfo",
"&&",
"newInfo",
"instanceof",
"SourceFieldElementInfo",
")",
"{",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"(",
"(",
"SourceFieldElementInfo",
")",
"oldInfo",
")",
".",
"getTypeName",
"(",
")",
",",
"(",
"(",
"SourceFieldElementInfo",
")",
"newInfo",
")",
".",
"getTypeName",
"(",
")",
")",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"newElement",
",",
"IJavaElementDelta",
".",
"F_CONTENT",
")",
";",
"}",
"}",
"else",
"if",
"(",
"oldInfo",
"instanceof",
"SourceTypeElementInfo",
"&&",
"newInfo",
"instanceof",
"SourceTypeElementInfo",
")",
"{",
"SourceTypeElementInfo",
"oldSourceTypeInfo",
"=",
"(",
"SourceTypeElementInfo",
")",
"oldInfo",
";",
"SourceTypeElementInfo",
"newSourceTypeInfo",
"=",
"(",
"SourceTypeElementInfo",
")",
"newInfo",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"oldSourceTypeInfo",
".",
"getSuperclassName",
"(",
")",
",",
"newSourceTypeInfo",
".",
"getSuperclassName",
"(",
")",
")",
"||",
"!",
"CharOperation",
".",
"equals",
"(",
"oldSourceTypeInfo",
".",
"getInterfaceNames",
"(",
")",
",",
"newSourceTypeInfo",
".",
"getInterfaceNames",
"(",
")",
")",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"newElement",
",",
"IJavaElementDelta",
".",
"F_SUPER_TYPES",
")",
";",
"}",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"oldSourceTypeInfo",
".",
"getTypeParameterNames",
"(",
")",
",",
"newSourceTypeInfo",
".",
"getTypeParameterNames",
"(",
")",
")",
"||",
"!",
"equals",
"(",
"oldSourceTypeInfo",
".",
"getTypeParameterBounds",
"(",
")",
",",
"newSourceTypeInfo",
".",
"getTypeParameterBounds",
"(",
")",
")",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"newElement",
",",
"IJavaElementDelta",
".",
"F_CONTENT",
")",
";",
"}",
"HashMap",
"oldTypeCategories",
"=",
"oldSourceTypeInfo",
".",
"categories",
";",
"HashMap",
"newTypeCategories",
"=",
"newSourceTypeInfo",
".",
"categories",
";",
"if",
"(",
"oldTypeCategories",
"!=",
"null",
")",
"{",
"Set",
"elements",
";",
"if",
"(",
"newTypeCategories",
"!=",
"null",
")",
"{",
"elements",
"=",
"new",
"HashSet",
"(",
"oldTypeCategories",
".",
"keySet",
"(",
")",
")",
";",
"elements",
".",
"addAll",
"(",
"newTypeCategories",
".",
"keySet",
"(",
")",
")",
";",
"}",
"else",
"elements",
"=",
"oldTypeCategories",
".",
"keySet",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"elements",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"IJavaElement",
"element",
"=",
"(",
"IJavaElement",
")",
"iterator",
".",
"next",
"(",
")",
";",
"String",
"[",
"]",
"oldCategories",
"=",
"(",
"String",
"[",
"]",
")",
"oldTypeCategories",
".",
"get",
"(",
"element",
")",
";",
"String",
"[",
"]",
"newCategories",
"=",
"newTypeCategories",
"==",
"null",
"?",
"null",
":",
"(",
"String",
"[",
"]",
")",
"newTypeCategories",
".",
"get",
"(",
"element",
")",
";",
"if",
"(",
"!",
"Util",
".",
"equalArraysOrNull",
"(",
"oldCategories",
",",
"newCategories",
")",
")",
"{",
"this",
".",
"delta",
".",
"changed",
"(",
"element",
",",
"IJavaElementDelta",
".",
"F_CATEGORIES",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"newTypeCategories",
"!=",
"null",
")",
"{",
"Iterator",
"elements",
"=",
"newTypeCategories",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"elements",
".",
"hasNext",
"(",
")",
")",
"{",
"IJavaElement",
"element",
"=",
"(",
"IJavaElement",
")",
"elements",
".",
"next",
"(",
")",
";",
"this",
".",
"delta",
".",
"changed",
"(",
"element",
",",
"IJavaElementDelta",
".",
"F_CATEGORIES",
")",
";",
"}",
"}",
"}",
"}",
"}",
"private",
"void",
"findDeletions",
"(",
")",
"{",
"Iterator",
"iter",
"=",
"this",
".",
"infos",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iter",
".",
"hasNext",
"(",
")",
")",
"{",
"IJavaElement",
"element",
"=",
"(",
"IJavaElement",
")",
"iter",
".",
"next",
"(",
")",
";",
"this",
".",
"delta",
".",
"removed",
"(",
"element",
")",
";",
"removed",
"(",
"element",
")",
";",
"}",
"}",
"private",
"JavaElementInfo",
"getElementInfo",
"(",
"IJavaElement",
"element",
")",
"{",
"return",
"(",
"JavaElementInfo",
")",
"this",
".",
"infos",
".",
"get",
"(",
"element",
")",
";",
"}",
"private",
"ListItem",
"getNewPosition",
"(",
"IJavaElement",
"element",
")",
"{",
"return",
"(",
"ListItem",
")",
"this",
".",
"newPositions",
".",
"get",
"(",
"element",
")",
";",
"}",
"private",
"ListItem",
"getOldPosition",
"(",
"IJavaElement",
"element",
")",
"{",
"return",
"(",
"ListItem",
")",
"this",
".",
"oldPositions",
".",
"get",
"(",
"element",
")",
";",
"}",
"private",
"void",
"initialize",
"(",
")",
"{",
"this",
".",
"infos",
"=",
"new",
"HashMap",
"(",
"20",
")",
";",
"this",
".",
"oldPositions",
"=",
"new",
"HashMap",
"(",
"20",
")",
";",
"this",
".",
"newPositions",
"=",
"new",
"HashMap",
"(",
"20",
")",
";",
"this",
".",
"oldPositions",
".",
"put",
"(",
"this",
".",
"javaElement",
",",
"new",
"ListItem",
"(",
"null",
",",
"null",
")",
")",
";",
"this",
".",
"newPositions",
".",
"put",
"(",
"this",
".",
"javaElement",
",",
"new",
"ListItem",
"(",
"null",
",",
"null",
")",
")",
";",
"this",
".",
"added",
"=",
"new",
"HashSet",
"(",
"5",
")",
";",
"this",
".",
"removed",
"=",
"new",
"HashSet",
"(",
"5",
")",
";",
"}",
"private",
"void",
"insertPositions",
"(",
"IJavaElement",
"[",
"]",
"elements",
",",
"boolean",
"isNew",
")",
"{",
"int",
"length",
"=",
"elements",
".",
"length",
";",
"IJavaElement",
"previous",
"=",
"null",
",",
"current",
"=",
"null",
",",
"next",
"=",
"(",
"length",
">",
"0",
")",
"?",
"elements",
"[",
"0",
"]",
":",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"previous",
"=",
"current",
";",
"current",
"=",
"next",
";",
"next",
"=",
"(",
"i",
"+",
"1",
"<",
"length",
")",
"?",
"elements",
"[",
"i",
"+",
"1",
"]",
":",
"null",
";",
"if",
"(",
"isNew",
")",
"{",
"this",
".",
"newPositions",
".",
"put",
"(",
"current",
",",
"new",
"ListItem",
"(",
"previous",
",",
"next",
")",
")",
";",
"}",
"else",
"{",
"this",
".",
"oldPositions",
".",
"put",
"(",
"current",
",",
"new",
"ListItem",
"(",
"previous",
",",
"next",
")",
")",
";",
"}",
"}",
"}",
"private",
"boolean",
"isPositionedCorrectly",
"(",
"IJavaElement",
"element",
")",
"{",
"ListItem",
"oldListItem",
"=",
"getOldPosition",
"(",
"element",
")",
";",
"if",
"(",
"oldListItem",
"==",
"null",
")",
"return",
"false",
";",
"ListItem",
"newListItem",
"=",
"getNewPosition",
"(",
"element",
")",
";",
"if",
"(",
"newListItem",
"==",
"null",
")",
"return",
"false",
";",
"IJavaElement",
"oldPrevious",
"=",
"oldListItem",
".",
"previous",
";",
"IJavaElement",
"newPrevious",
"=",
"newListItem",
".",
"previous",
";",
"if",
"(",
"oldPrevious",
"==",
"null",
")",
"{",
"return",
"newPrevious",
"==",
"null",
";",
"}",
"else",
"{",
"return",
"oldPrevious",
".",
"equals",
"(",
"newPrevious",
")",
";",
"}",
"}",
"private",
"void",
"recordElementInfo",
"(",
"IJavaElement",
"element",
",",
"JavaModel",
"model",
",",
"int",
"depth",
")",
"{",
"if",
"(",
"depth",
">=",
"this",
".",
"maxDepth",
")",
"{",
"return",
";",
"}",
"JavaElementInfo",
"info",
"=",
"(",
"JavaElementInfo",
")",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getInfo",
"(",
"element",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"return",
";",
"this",
".",
"infos",
".",
"put",
"(",
"element",
",",
"info",
")",
";",
"if",
"(",
"element",
"instanceof",
"IParent",
")",
"{",
"IJavaElement",
"[",
"]",
"children",
"=",
"info",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"children",
"!=",
"null",
")",
"{",
"insertPositions",
"(",
"children",
",",
"false",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"children",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"recordElementInfo",
"(",
"children",
"[",
"i",
"]",
",",
"model",
",",
"depth",
"+",
"1",
")",
";",
"}",
"}",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"null",
";",
"if",
"(",
"info",
"instanceof",
"AnnotatableInfo",
")",
"annotations",
"=",
"(",
"(",
"AnnotatableInfo",
")",
"info",
")",
".",
"annotations",
";",
"if",
"(",
"annotations",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"annotationInfos",
"==",
"null",
")",
"this",
".",
"annotationInfos",
"=",
"new",
"HashMap",
"(",
")",
";",
"JavaModelManager",
"manager",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"annotations",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"annotationInfos",
".",
"put",
"(",
"annotations",
"[",
"i",
"]",
",",
"manager",
".",
"getInfo",
"(",
"annotations",
"[",
"i",
"]",
")",
")",
";",
"}",
"}",
"}",
"private",
"void",
"recordNewPositions",
"(",
"IJavaElement",
"newElement",
",",
"int",
"depth",
")",
"{",
"if",
"(",
"depth",
"<",
"this",
".",
"maxDepth",
"&&",
"newElement",
"instanceof",
"IParent",
")",
"{",
"JavaElementInfo",
"info",
"=",
"null",
";",
"try",
"{",
"info",
"=",
"(",
"JavaElementInfo",
")",
"(",
"(",
"JavaElement",
")",
"newElement",
")",
".",
"getElementInfo",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"npe",
")",
"{",
"return",
";",
"}",
"IJavaElement",
"[",
"]",
"children",
"=",
"info",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"children",
"!=",
"null",
")",
"{",
"insertPositions",
"(",
"children",
",",
"true",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"children",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"recordNewPositions",
"(",
"children",
"[",
"i",
"]",
",",
"depth",
"+",
"1",
")",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"removed",
"(",
"IJavaElement",
"element",
")",
"{",
"this",
".",
"removed",
".",
"add",
"(",
"element",
")",
";",
"ListItem",
"current",
"=",
"getOldPosition",
"(",
"element",
")",
";",
"ListItem",
"previous",
"=",
"null",
",",
"next",
"=",
"null",
";",
"if",
"(",
"current",
".",
"previous",
"!=",
"null",
")",
"previous",
"=",
"getOldPosition",
"(",
"current",
".",
"previous",
")",
";",
"if",
"(",
"current",
".",
"next",
"!=",
"null",
")",
"next",
"=",
"getOldPosition",
"(",
"current",
".",
"next",
")",
";",
"if",
"(",
"previous",
"!=",
"null",
")",
"previous",
".",
"next",
"=",
"current",
".",
"next",
";",
"if",
"(",
"next",
"!=",
"null",
")",
"next",
".",
"previous",
"=",
"current",
".",
"previous",
";",
"}",
"private",
"void",
"removeElementInfo",
"(",
"IJavaElement",
"element",
")",
"{",
"this",
".",
"infos",
".",
"remove",
"(",
"element",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"delta",
"==",
"null",
"?",
"\"<null>\"",
":",
"this",
".",
"delta",
".",
"toString",
"(",
")",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"private",
"void",
"trimDelta",
"(",
"JavaElementDelta",
"elementDelta",
")",
"{",
"if",
"(",
"elementDelta",
".",
"getKind",
"(",
")",
"==",
"IJavaElementDelta",
".",
"REMOVED",
")",
"{",
"IJavaElementDelta",
"[",
"]",
"children",
"=",
"elementDelta",
".",
"getAffectedChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"children",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"elementDelta",
".",
"removeAffectedChild",
"(",
"(",
"JavaElementDelta",
")",
"children",
"[",
"i",
"]",
")",
";",
"}",
"}",
"else",
"{",
"IJavaElementDelta",
"[",
"]",
"children",
"=",
"elementDelta",
".",
"getAffectedChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"children",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"trimDelta",
"(",
"(",
"JavaElementDelta",
")",
"children",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
2,837 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMemberValuePair",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"MemberValuePair",
"implements",
"IMemberValuePair",
"{",
"String",
"memberName",
";",
"public",
"Object",
"value",
";",
"public",
"int",
"valueKind",
"=",
"K_UNKNOWN",
";",
"public",
"MemberValuePair",
"(",
"String",
"memberName",
")",
"{",
"this",
".",
"memberName",
"=",
"memberName",
";",
"}",
"public",
"MemberValuePair",
"(",
"String",
"memberName",
",",
"Object",
"value",
",",
"int",
"valueKind",
")",
"{",
"this",
"(",
"memberName",
")",
";",
"this",
".",
"value",
"=",
"value",
";",
"this",
".",
"valueKind",
"=",
"valueKind",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"!",
"(",
"obj",
"instanceof",
"MemberValuePair",
")",
")",
"{",
"return",
"false",
";",
"}",
"MemberValuePair",
"other",
"=",
"(",
"MemberValuePair",
")",
"obj",
";",
"return",
"this",
".",
"valueKind",
"==",
"other",
".",
"valueKind",
"&&",
"this",
".",
"memberName",
".",
"equals",
"(",
"other",
".",
"memberName",
")",
"&&",
"(",
"this",
".",
"value",
"==",
"other",
".",
"value",
"||",
"(",
"this",
".",
"value",
"!=",
"null",
"&&",
"this",
".",
"value",
".",
"equals",
"(",
"other",
".",
"value",
")",
")",
"||",
"(",
"this",
".",
"value",
"instanceof",
"Object",
"[",
"]",
"&&",
"other",
".",
"value",
"instanceof",
"Object",
"[",
"]",
"&&",
"Util",
".",
"equalArraysOrNull",
"(",
"(",
"Object",
"[",
"]",
")",
"this",
".",
"value",
",",
"(",
"Object",
"[",
"]",
")",
"other",
".",
"value",
")",
")",
")",
";",
"}",
"public",
"String",
"getMemberName",
"(",
")",
"{",
"return",
"this",
".",
"memberName",
";",
"}",
"public",
"Object",
"getValue",
"(",
")",
"{",
"return",
"this",
".",
"value",
";",
"}",
"public",
"int",
"getValueKind",
"(",
")",
"{",
"return",
"this",
".",
"valueKind",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"(",
"(",
"this",
".",
"memberName",
"==",
"null",
")",
"?",
"0",
":",
"this",
".",
"memberName",
".",
"hashCode",
"(",
")",
")",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"(",
"(",
"this",
".",
"value",
"==",
"null",
")",
"?",
"0",
":",
"this",
".",
"value",
".",
"hashCode",
"(",
")",
")",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"this",
".",
"valueKind",
";",
"return",
"result",
";",
"}",
"}",
"</s>"
] |
2,838 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"LRUCache",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"JavaModelCache",
"{",
"public",
"static",
"boolean",
"VERBOSE",
"=",
"false",
";",
"public",
"static",
"final",
"int",
"DEFAULT_PROJECT_SIZE",
"=",
"5",
";",
"public",
"static",
"final",
"int",
"DEFAULT_ROOT_SIZE",
"=",
"50",
";",
"public",
"static",
"final",
"int",
"DEFAULT_PKG_SIZE",
"=",
"500",
";",
"public",
"static",
"final",
"int",
"DEFAULT_OPENABLE_SIZE",
"=",
"250",
";",
"public",
"static",
"final",
"int",
"DEFAULT_CHILDREN_SIZE",
"=",
"250",
"*",
"20",
";",
"public",
"static",
"final",
"String",
"RATIO_PROPERTY",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"JAR_TYPE_RATIO_PROPERTY",
"=",
"\"\"",
";",
"public",
"static",
"final",
"Object",
"NON_EXISTING_JAR_TYPE_INFO",
"=",
"new",
"Object",
"(",
")",
";",
"protected",
"double",
"memoryRatio",
"=",
"-",
"1",
";",
"protected",
"Object",
"modelInfo",
";",
"protected",
"HashMap",
"projectCache",
";",
"protected",
"ElementCache",
"rootCache",
";",
"protected",
"ElementCache",
"pkgCache",
";",
"protected",
"ElementCache",
"openableCache",
";",
"protected",
"Map",
"childrenCache",
";",
"protected",
"LRUCache",
"jarTypeCache",
";",
"public",
"JavaModelCache",
"(",
")",
"{",
"double",
"ratio",
"=",
"getMemoryRatio",
"(",
")",
";",
"double",
"openableRatio",
"=",
"getOpenableRatio",
"(",
")",
";",
"this",
".",
"projectCache",
"=",
"new",
"HashMap",
"(",
"DEFAULT_PROJECT_SIZE",
")",
";",
"if",
"(",
"VERBOSE",
")",
"{",
"this",
".",
"rootCache",
"=",
"new",
"VerboseElementCache",
"(",
"(",
"int",
")",
"(",
"DEFAULT_ROOT_SIZE",
"*",
"ratio",
")",
",",
"\"Root",
"cache\"",
")",
";",
"this",
".",
"pkgCache",
"=",
"new",
"VerboseElementCache",
"(",
"(",
"int",
")",
"(",
"DEFAULT_PKG_SIZE",
"*",
"ratio",
")",
",",
"\"\"",
")",
";",
"this",
".",
"openableCache",
"=",
"new",
"VerboseElementCache",
"(",
"(",
"int",
")",
"(",
"DEFAULT_OPENABLE_SIZE",
"*",
"ratio",
"*",
"openableRatio",
")",
",",
"\"\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"rootCache",
"=",
"new",
"ElementCache",
"(",
"(",
"int",
")",
"(",
"DEFAULT_ROOT_SIZE",
"*",
"ratio",
")",
")",
";",
"this",
".",
"pkgCache",
"=",
"new",
"ElementCache",
"(",
"(",
"int",
")",
"(",
"DEFAULT_PKG_SIZE",
"*",
"ratio",
")",
")",
";",
"this",
".",
"openableCache",
"=",
"new",
"ElementCache",
"(",
"(",
"int",
")",
"(",
"DEFAULT_OPENABLE_SIZE",
"*",
"ratio",
"*",
"openableRatio",
")",
")",
";",
"}",
"this",
".",
"childrenCache",
"=",
"new",
"HashMap",
"(",
"(",
"int",
")",
"(",
"DEFAULT_CHILDREN_SIZE",
"*",
"ratio",
"*",
"openableRatio",
")",
")",
";",
"resetJarTypeCache",
"(",
")",
";",
"}",
"private",
"double",
"getOpenableRatio",
"(",
")",
"{",
"return",
"getRatioForProperty",
"(",
"RATIO_PROPERTY",
")",
";",
"}",
"private",
"double",
"getJarTypeRatio",
"(",
")",
"{",
"return",
"getRatioForProperty",
"(",
"JAR_TYPE_RATIO_PROPERTY",
")",
";",
"}",
"private",
"double",
"getRatioForProperty",
"(",
"String",
"propertyName",
")",
"{",
"String",
"property",
"=",
"System",
".",
"getProperty",
"(",
"propertyName",
")",
";",
"if",
"(",
"property",
"!=",
"null",
")",
"{",
"try",
"{",
"return",
"Double",
".",
"parseDouble",
"(",
"property",
")",
";",
"}",
"catch",
"(",
"NumberFormatException",
"e",
")",
"{",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
"+",
"propertyName",
"+",
"\":",
"\"",
"+",
"property",
")",
";",
"}",
"}",
"return",
"1.0",
";",
"}",
"public",
"Object",
"getInfo",
"(",
"IJavaElement",
"element",
")",
"{",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"return",
"this",
".",
"modelInfo",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"return",
"this",
".",
"projectCache",
".",
"get",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"return",
"this",
".",
"rootCache",
".",
"get",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"return",
"this",
".",
"pkgCache",
".",
"get",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"return",
"this",
".",
"openableCache",
".",
"get",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"TYPE",
":",
"Object",
"result",
"=",
"this",
".",
"jarTypeCache",
".",
"get",
"(",
"element",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"return",
"result",
";",
"else",
"return",
"this",
".",
"childrenCache",
".",
"get",
"(",
"element",
")",
";",
"default",
":",
"return",
"this",
".",
"childrenCache",
".",
"get",
"(",
"element",
")",
";",
"}",
"}",
"public",
"IJavaElement",
"getExistingElement",
"(",
"IJavaElement",
"element",
")",
"{",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"return",
"element",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"return",
"element",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"return",
"(",
"IJavaElement",
")",
"this",
".",
"rootCache",
".",
"getKey",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"return",
"(",
"IJavaElement",
")",
"this",
".",
"pkgCache",
".",
"getKey",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"return",
"(",
"IJavaElement",
")",
"this",
".",
"openableCache",
".",
"getKey",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"TYPE",
":",
"return",
"element",
";",
"default",
":",
"return",
"element",
";",
"}",
"}",
"protected",
"double",
"getMemoryRatio",
"(",
")",
"{",
"if",
"(",
"(",
"int",
")",
"this",
".",
"memoryRatio",
"==",
"-",
"1",
")",
"{",
"long",
"maxMemory",
"=",
"Runtime",
".",
"getRuntime",
"(",
")",
".",
"maxMemory",
"(",
")",
";",
"this",
".",
"memoryRatio",
"=",
"maxMemory",
"==",
"Long",
".",
"MAX_VALUE",
"?",
"4d",
":",
"(",
"(",
"double",
")",
"maxMemory",
")",
"/",
"(",
"64",
"*",
"0x100000",
")",
";",
"}",
"return",
"this",
".",
"memoryRatio",
";",
"}",
"protected",
"Object",
"peekAtInfo",
"(",
"IJavaElement",
"element",
")",
"{",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"return",
"this",
".",
"modelInfo",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"return",
"this",
".",
"projectCache",
".",
"get",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"return",
"this",
".",
"rootCache",
".",
"peek",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"return",
"this",
".",
"pkgCache",
".",
"peek",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"return",
"this",
".",
"openableCache",
".",
"peek",
"(",
"element",
")",
";",
"case",
"IJavaElement",
".",
"TYPE",
":",
"Object",
"result",
"=",
"this",
".",
"jarTypeCache",
".",
"peek",
"(",
"element",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"return",
"result",
";",
"else",
"return",
"this",
".",
"childrenCache",
".",
"get",
"(",
"element",
")",
";",
"default",
":",
"return",
"this",
".",
"childrenCache",
".",
"get",
"(",
"element",
")",
";",
"}",
"}",
"protected",
"void",
"putInfo",
"(",
"IJavaElement",
"element",
",",
"Object",
"info",
")",
"{",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"this",
".",
"modelInfo",
"=",
"info",
";",
"break",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"this",
".",
"projectCache",
".",
"put",
"(",
"element",
",",
"info",
")",
";",
"this",
".",
"rootCache",
".",
"ensureSpaceLimit",
"(",
"info",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"this",
".",
"rootCache",
".",
"put",
"(",
"element",
",",
"info",
")",
";",
"this",
".",
"pkgCache",
".",
"ensureSpaceLimit",
"(",
"info",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"this",
".",
"pkgCache",
".",
"put",
"(",
"element",
",",
"info",
")",
";",
"this",
".",
"openableCache",
".",
"ensureSpaceLimit",
"(",
"info",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"this",
".",
"openableCache",
".",
"put",
"(",
"element",
",",
"info",
")",
";",
"break",
";",
"default",
":",
"this",
".",
"childrenCache",
".",
"put",
"(",
"element",
",",
"info",
")",
";",
"}",
"}",
"protected",
"void",
"removeInfo",
"(",
"JavaElement",
"element",
")",
"{",
"switch",
"(",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"JAVA_MODEL",
":",
"this",
".",
"modelInfo",
"=",
"null",
";",
"break",
";",
"case",
"IJavaElement",
".",
"JAVA_PROJECT",
":",
"this",
".",
"projectCache",
".",
"remove",
"(",
"element",
")",
";",
"this",
".",
"rootCache",
".",
"resetSpaceLimit",
"(",
"(",
"int",
")",
"(",
"DEFAULT_ROOT_SIZE",
"*",
"getMemoryRatio",
"(",
")",
")",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT_ROOT",
":",
"this",
".",
"rootCache",
".",
"remove",
"(",
"element",
")",
";",
"this",
".",
"pkgCache",
".",
"resetSpaceLimit",
"(",
"(",
"int",
")",
"(",
"DEFAULT_PKG_SIZE",
"*",
"getMemoryRatio",
"(",
")",
")",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
":",
"this",
".",
"pkgCache",
".",
"remove",
"(",
"element",
")",
";",
"this",
".",
"openableCache",
".",
"resetSpaceLimit",
"(",
"(",
"int",
")",
"(",
"DEFAULT_OPENABLE_SIZE",
"*",
"getMemoryRatio",
"(",
")",
"*",
"getOpenableRatio",
"(",
")",
")",
",",
"element",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"case",
"IJavaElement",
".",
"CLASS_FILE",
":",
"this",
".",
"openableCache",
".",
"remove",
"(",
"element",
")",
";",
"break",
";",
"default",
":",
"this",
".",
"childrenCache",
".",
"remove",
"(",
"element",
")",
";",
"}",
"}",
"protected",
"void",
"resetJarTypeCache",
"(",
")",
"{",
"this",
".",
"jarTypeCache",
"=",
"new",
"LRUCache",
"(",
"(",
"int",
")",
"(",
"DEFAULT_OPENABLE_SIZE",
"*",
"getMemoryRatio",
"(",
")",
"*",
"getJarTypeRatio",
"(",
")",
")",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"toStringFillingRation",
"(",
"\"\"",
")",
";",
"}",
"public",
"String",
"toStringFillingRation",
"(",
"String",
"prefix",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"prefix",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"projectCache",
".",
"size",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"projectsn\"",
")",
";",
"buffer",
".",
"append",
"(",
"prefix",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"rootCache",
".",
"toStringFillingRation",
"(",
"\"Root",
"cache\"",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"prefix",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"pkgCache",
".",
"toStringFillingRation",
"(",
"\"\"",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"prefix",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"openableCache",
".",
"toStringFillingRation",
"(",
"\"\"",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"buffer",
".",
"append",
"(",
"prefix",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"jarTypeCache",
".",
"toStringFillingRation",
"(",
"\"\"",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,839 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"public",
"class",
"ResolvedBinaryType",
"extends",
"BinaryType",
"{",
"private",
"String",
"uniqueKey",
";",
"public",
"ResolvedBinaryType",
"(",
"JavaElement",
"parent",
",",
"String",
"name",
",",
"String",
"uniqueKey",
")",
"{",
"super",
"(",
"parent",
",",
"name",
")",
";",
"this",
".",
"uniqueKey",
"=",
"uniqueKey",
";",
"}",
"public",
"String",
"getFullyQualifiedParameterizedName",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"getFullyQualifiedParameterizedName",
"(",
"getFullyQualifiedName",
"(",
"'.'",
")",
",",
"this",
".",
"uniqueKey",
")",
";",
"}",
"public",
"String",
"getKey",
"(",
")",
"{",
"return",
"this",
".",
"uniqueKey",
";",
"}",
"public",
"boolean",
"isResolved",
"(",
")",
"{",
"return",
"true",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"super",
".",
"toStringInfo",
"(",
"tab",
",",
"buffer",
",",
"info",
",",
"showResolvedInfo",
")",
";",
"if",
"(",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"{key=\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"uniqueKey",
")",
";",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"}",
"}",
"public",
"JavaElement",
"unresolved",
"(",
")",
"{",
"SourceRefElement",
"handle",
"=",
"new",
"BinaryType",
"(",
"this",
".",
"parent",
",",
"this",
".",
"name",
")",
";",
"handle",
".",
"occurrenceCount",
"=",
"this",
".",
"occurrenceCount",
";",
"return",
"handle",
";",
"}",
"}",
"</s>"
] |
2,840 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"io",
".",
"ByteArrayInputStream",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"io",
".",
"InputStream",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipEntry",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipFile",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IStorage",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"CoreException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJarEntryResource",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaModelStatusConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"JarEntryFile",
"extends",
"JarEntryResource",
"{",
"private",
"static",
"final",
"IJarEntryResource",
"[",
"]",
"NO_CHILDREN",
"=",
"new",
"IJarEntryResource",
"[",
"0",
"]",
";",
"public",
"JarEntryFile",
"(",
"String",
"simpleName",
")",
"{",
"super",
"(",
"simpleName",
")",
";",
"}",
"public",
"JarEntryResource",
"clone",
"(",
"Object",
"newParent",
")",
"{",
"JarEntryFile",
"file",
"=",
"new",
"JarEntryFile",
"(",
"this",
".",
"simpleName",
")",
";",
"file",
".",
"setParent",
"(",
"newParent",
")",
";",
"return",
"file",
";",
"}",
"public",
"InputStream",
"getContents",
"(",
")",
"throws",
"CoreException",
"{",
"ZipFile",
"zipFile",
"=",
"null",
";",
"try",
"{",
"zipFile",
"=",
"getZipFile",
"(",
")",
";",
"if",
"(",
"JavaModelManager",
".",
"ZIP_ACCESS_VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"(\"",
"+",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
"+",
"zipFile",
".",
"getName",
"(",
")",
")",
";",
"}",
"String",
"entryName",
"=",
"getEntryName",
"(",
")",
";",
"ZipEntry",
"zipEntry",
"=",
"zipFile",
".",
"getEntry",
"(",
"entryName",
")",
";",
"if",
"(",
"zipEntry",
"==",
"null",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"INVALID_PATH",
",",
"entryName",
")",
")",
";",
"}",
"byte",
"[",
"]",
"contents",
"=",
"Util",
".",
"getZipEntryByteContent",
"(",
"zipEntry",
",",
"zipFile",
")",
";",
"return",
"new",
"ByteArrayInputStream",
"(",
"contents",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
",",
"IJavaModelStatusConstants",
".",
"IO_EXCEPTION",
")",
";",
"}",
"finally",
"{",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"closeZipFile",
"(",
"zipFile",
")",
";",
"}",
"}",
"public",
"IJarEntryResource",
"[",
"]",
"getChildren",
"(",
")",
"{",
"return",
"NO_CHILDREN",
";",
"}",
"public",
"boolean",
"isFile",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
"+",
"getEntryName",
"(",
")",
"+",
"\"]\"",
";",
"}",
"}",
"</s>"
] |
2,841 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProject",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"ResourcesPlugin",
";",
"public",
"class",
"JavaModelInfo",
"extends",
"OpenableElementInfo",
"{",
"Object",
"[",
"]",
"nonJavaResources",
";",
"private",
"Object",
"[",
"]",
"computeNonJavaResources",
"(",
")",
"{",
"IProject",
"[",
"]",
"projects",
"=",
"ResourcesPlugin",
".",
"getWorkspace",
"(",
")",
".",
"getRoot",
"(",
")",
".",
"getProjects",
"(",
")",
";",
"int",
"length",
"=",
"projects",
".",
"length",
";",
"Object",
"[",
"]",
"resources",
"=",
"null",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IProject",
"project",
"=",
"projects",
"[",
"i",
"]",
";",
"if",
"(",
"!",
"JavaProject",
".",
"hasJavaNature",
"(",
"project",
")",
")",
"{",
"if",
"(",
"resources",
"==",
"null",
")",
"{",
"resources",
"=",
"new",
"Object",
"[",
"length",
"]",
";",
"}",
"resources",
"[",
"index",
"++",
"]",
"=",
"project",
";",
"}",
"}",
"if",
"(",
"index",
"==",
"0",
")",
"return",
"NO_NON_JAVA_RESOURCES",
";",
"if",
"(",
"index",
"<",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"resources",
",",
"0",
",",
"resources",
"=",
"new",
"Object",
"[",
"index",
"]",
",",
"0",
",",
"index",
")",
";",
"}",
"return",
"resources",
";",
"}",
"Object",
"[",
"]",
"getNonJavaResources",
"(",
")",
"{",
"if",
"(",
"this",
".",
"nonJavaResources",
"==",
"null",
")",
"{",
"this",
".",
"nonJavaResources",
"=",
"computeNonJavaResources",
"(",
")",
";",
"}",
"return",
"this",
".",
"nonJavaResources",
";",
"}",
"}",
"</s>"
] |
2,842 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"public",
"class",
"PackageDeclaration",
"extends",
"SourceRefElement",
"implements",
"IPackageDeclaration",
"{",
"String",
"name",
";",
"protected",
"PackageDeclaration",
"(",
"CompilationUnit",
"parent",
",",
"String",
"name",
")",
"{",
"super",
"(",
"parent",
")",
";",
"this",
".",
"name",
"=",
"name",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"PackageDeclaration",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"equals",
"(",
"o",
")",
";",
"}",
"public",
"String",
"getElementName",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"PACKAGE_DECLARATION",
";",
"}",
"protected",
"char",
"getHandleMementoDelimiter",
"(",
")",
"{",
"return",
"JavaElement",
".",
"JEM_PACKAGEDECLARATION",
";",
"}",
"public",
"ISourceRange",
"getNameRange",
"(",
")",
"throws",
"JavaModelException",
"{",
"AnnotatableInfo",
"info",
"=",
"(",
"AnnotatableInfo",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"getNameRange",
"(",
")",
";",
"}",
"public",
"IJavaElement",
"getPrimaryElement",
"(",
"boolean",
"checkOwner",
")",
"{",
"CompilationUnit",
"cu",
"=",
"(",
"CompilationUnit",
")",
"getAncestor",
"(",
"COMPILATION_UNIT",
")",
";",
"if",
"(",
"checkOwner",
"&&",
"cu",
".",
"isPrimary",
"(",
")",
")",
"return",
"this",
";",
"return",
"cu",
".",
"getPackageDeclaration",
"(",
"this",
".",
"name",
")",
";",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"tabString",
"(",
"tab",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"package",
"\"",
")",
";",
"toStringName",
"(",
"buffer",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"(not",
"open)\"",
")",
";",
"}",
"}",
"}",
"</s>"
] |
2,843 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"CoreException",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IPath",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IClasspathEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"public",
"class",
"ExternalFolderChange",
"{",
"private",
"JavaProject",
"project",
";",
"private",
"IClasspathEntry",
"[",
"]",
"oldResolvedClasspath",
";",
"public",
"ExternalFolderChange",
"(",
"JavaProject",
"project",
",",
"IClasspathEntry",
"[",
"]",
"oldResolvedClasspath",
")",
"{",
"this",
".",
"project",
"=",
"project",
";",
"this",
".",
"oldResolvedClasspath",
"=",
"oldResolvedClasspath",
";",
"}",
"public",
"void",
"updateExternalFoldersIfNecessary",
"(",
"boolean",
"refreshIfExistAlready",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"HashSet",
"oldFolders",
"=",
"ExternalFoldersManager",
".",
"getExternalFolders",
"(",
"this",
".",
"oldResolvedClasspath",
")",
";",
"IClasspathEntry",
"[",
"]",
"newResolvedClasspath",
"=",
"this",
".",
"project",
".",
"getResolvedClasspath",
"(",
")",
";",
"HashSet",
"newFolders",
"=",
"ExternalFoldersManager",
".",
"getExternalFolders",
"(",
"newResolvedClasspath",
")",
";",
"if",
"(",
"newFolders",
"==",
"null",
")",
"return",
";",
"ExternalFoldersManager",
"foldersManager",
"=",
"JavaModelManager",
".",
"getExternalManager",
"(",
")",
";",
"Iterator",
"iterator",
"=",
"newFolders",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"Object",
"folderPath",
"=",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"oldFolders",
"==",
"null",
"||",
"!",
"oldFolders",
".",
"remove",
"(",
"folderPath",
")",
"||",
"foldersManager",
".",
"removePendingFolder",
"(",
"folderPath",
")",
")",
"{",
"try",
"{",
"foldersManager",
".",
"createLinkFolder",
"(",
"(",
"IPath",
")",
"folderPath",
",",
"refreshIfExistAlready",
",",
"monitor",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"throw",
"new",
"JavaModelException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
"+",
"this",
".",
"project",
".",
"getElementName",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,844 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
";",
"import",
"java",
".",
"io",
".",
"InputStream",
";",
"import",
"java",
".",
"net",
".",
"URL",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Assert",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"OperationCanceledException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"search",
".",
"SearchEngine",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"codeassist",
".",
"CompletionEngine",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"SuffixConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaModelManager",
".",
"PerProjectInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"hierarchy",
".",
"TypeHierarchy",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"MementoTokenizer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Messages",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"public",
"class",
"BinaryType",
"extends",
"BinaryMember",
"implements",
"IType",
",",
"SuffixConstants",
"{",
"private",
"static",
"final",
"IField",
"[",
"]",
"NO_FIELDS",
"=",
"new",
"IField",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"IMethod",
"[",
"]",
"NO_METHODS",
"=",
"new",
"IMethod",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"IType",
"[",
"]",
"NO_TYPES",
"=",
"new",
"IType",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"IInitializer",
"[",
"]",
"NO_INITIALIZERS",
"=",
"new",
"IInitializer",
"[",
"0",
"]",
";",
"public",
"static",
"final",
"JavadocContents",
"EMPTY_JAVADOC",
"=",
"new",
"JavadocContents",
"(",
"null",
",",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"EMPTY_STRING",
")",
";",
"protected",
"BinaryType",
"(",
"JavaElement",
"parent",
",",
"String",
"name",
")",
"{",
"super",
"(",
"parent",
",",
"name",
")",
";",
"}",
"protected",
"void",
"closing",
"(",
"Object",
"info",
")",
"throws",
"JavaModelException",
"{",
"ClassFileInfo",
"cfi",
"=",
"getClassFileInfo",
"(",
")",
";",
"cfi",
".",
"removeBinaryChildren",
"(",
")",
";",
"}",
"public",
"void",
"codeComplete",
"(",
"char",
"[",
"]",
"snippet",
",",
"int",
"insertion",
",",
"int",
"position",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableTypeNames",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableNames",
",",
"int",
"[",
"]",
"localVariableModifiers",
",",
"boolean",
"isStatic",
",",
"ICompletionRequestor",
"requestor",
")",
"throws",
"JavaModelException",
"{",
"codeComplete",
"(",
"snippet",
",",
"insertion",
",",
"position",
",",
"localVariableTypeNames",
",",
"localVariableNames",
",",
"localVariableModifiers",
",",
"isStatic",
",",
"requestor",
",",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
")",
";",
"}",
"public",
"void",
"codeComplete",
"(",
"char",
"[",
"]",
"snippet",
",",
"int",
"insertion",
",",
"int",
"position",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableTypeNames",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableNames",
",",
"int",
"[",
"]",
"localVariableModifiers",
",",
"boolean",
"isStatic",
",",
"ICompletionRequestor",
"requestor",
",",
"WorkingCopyOwner",
"owner",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"requestor",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"codeComplete",
"(",
"snippet",
",",
"insertion",
",",
"position",
",",
"localVariableTypeNames",
",",
"localVariableNames",
",",
"localVariableModifiers",
",",
"isStatic",
",",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"codeassist",
".",
"CompletionRequestorWrapper",
"(",
"requestor",
")",
",",
"owner",
")",
";",
"}",
"public",
"void",
"codeComplete",
"(",
"char",
"[",
"]",
"snippet",
",",
"int",
"insertion",
",",
"int",
"position",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableTypeNames",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableNames",
",",
"int",
"[",
"]",
"localVariableModifiers",
",",
"boolean",
"isStatic",
",",
"CompletionRequestor",
"requestor",
")",
"throws",
"JavaModelException",
"{",
"codeComplete",
"(",
"snippet",
",",
"insertion",
",",
"position",
",",
"localVariableTypeNames",
",",
"localVariableNames",
",",
"localVariableModifiers",
",",
"isStatic",
",",
"requestor",
",",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
")",
";",
"}",
"public",
"void",
"codeComplete",
"(",
"char",
"[",
"]",
"snippet",
",",
"int",
"insertion",
",",
"int",
"position",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableTypeNames",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableNames",
",",
"int",
"[",
"]",
"localVariableModifiers",
",",
"boolean",
"isStatic",
",",
"CompletionRequestor",
"requestor",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"codeComplete",
"(",
"snippet",
",",
"insertion",
",",
"position",
",",
"localVariableTypeNames",
",",
"localVariableNames",
",",
"localVariableModifiers",
",",
"isStatic",
",",
"requestor",
",",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
",",
"monitor",
")",
";",
"}",
"public",
"void",
"codeComplete",
"(",
"char",
"[",
"]",
"snippet",
",",
"int",
"insertion",
",",
"int",
"position",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableTypeNames",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableNames",
",",
"int",
"[",
"]",
"localVariableModifiers",
",",
"boolean",
"isStatic",
",",
"CompletionRequestor",
"requestor",
",",
"WorkingCopyOwner",
"owner",
")",
"throws",
"JavaModelException",
"{",
"codeComplete",
"(",
"snippet",
",",
"insertion",
",",
"position",
",",
"localVariableTypeNames",
",",
"localVariableNames",
",",
"localVariableModifiers",
",",
"isStatic",
",",
"requestor",
",",
"owner",
",",
"null",
")",
";",
"}",
"public",
"void",
"codeComplete",
"(",
"char",
"[",
"]",
"snippet",
",",
"int",
"insertion",
",",
"int",
"position",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableTypeNames",
",",
"char",
"[",
"]",
"[",
"]",
"localVariableNames",
",",
"int",
"[",
"]",
"localVariableModifiers",
",",
"boolean",
"isStatic",
",",
"CompletionRequestor",
"requestor",
",",
"WorkingCopyOwner",
"owner",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"requestor",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"getJavaProject",
"(",
")",
";",
"SearchableEnvironment",
"environment",
"=",
"project",
".",
"newSearchableNameEnvironment",
"(",
"owner",
")",
";",
"CompletionEngine",
"engine",
"=",
"new",
"CompletionEngine",
"(",
"environment",
",",
"requestor",
",",
"project",
".",
"getOptions",
"(",
"true",
")",
",",
"project",
",",
"owner",
",",
"monitor",
")",
";",
"String",
"source",
"=",
"getClassFile",
"(",
")",
".",
"getSource",
"(",
")",
";",
"if",
"(",
"source",
"!=",
"null",
"&&",
"insertion",
">",
"-",
"1",
"&&",
"insertion",
"<",
"source",
".",
"length",
"(",
")",
")",
"{",
"char",
"[",
"]",
"prefix",
"=",
"CharOperation",
".",
"concat",
"(",
"source",
".",
"substring",
"(",
"0",
",",
"insertion",
")",
".",
"toCharArray",
"(",
")",
",",
"new",
"char",
"[",
"]",
"{",
"'{'",
"}",
")",
";",
"char",
"[",
"]",
"suffix",
"=",
"CharOperation",
".",
"concat",
"(",
"new",
"char",
"[",
"]",
"{",
"'}'",
"}",
",",
"source",
".",
"substring",
"(",
"insertion",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"char",
"[",
"]",
"fakeSource",
"=",
"CharOperation",
".",
"concat",
"(",
"prefix",
",",
"snippet",
",",
"suffix",
")",
";",
"BasicCompilationUnit",
"cu",
"=",
"new",
"BasicCompilationUnit",
"(",
"fakeSource",
",",
"null",
",",
"getElementName",
"(",
")",
",",
"project",
")",
";",
"engine",
".",
"complete",
"(",
"cu",
",",
"prefix",
".",
"length",
"+",
"position",
",",
"prefix",
".",
"length",
",",
"null",
")",
";",
"}",
"else",
"{",
"engine",
".",
"complete",
"(",
"this",
",",
"snippet",
",",
"position",
",",
"localVariableTypeNames",
",",
"localVariableNames",
",",
"localVariableModifiers",
",",
"isStatic",
")",
";",
"}",
"if",
"(",
"NameLookup",
".",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
"+",
"environment",
".",
"nameLookup",
".",
"timeSpentInSeekTypesInSourcePackage",
"+",
"\"ms\"",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
"+",
"environment",
".",
"nameLookup",
".",
"timeSpentInSeekTypesInBinaryPackage",
"+",
"\"ms\"",
")",
";",
"}",
"}",
"public",
"IField",
"createField",
"(",
"String",
"contents",
",",
"IJavaElement",
"sibling",
",",
"boolean",
"force",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"READ_ONLY",
",",
"this",
")",
")",
";",
"}",
"public",
"IInitializer",
"createInitializer",
"(",
"String",
"contents",
",",
"IJavaElement",
"sibling",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"READ_ONLY",
",",
"this",
")",
")",
";",
"}",
"public",
"IMethod",
"createMethod",
"(",
"String",
"contents",
",",
"IJavaElement",
"sibling",
",",
"boolean",
"force",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"READ_ONLY",
",",
"this",
")",
")",
";",
"}",
"public",
"IType",
"createType",
"(",
"String",
"contents",
",",
"IJavaElement",
"sibling",
",",
"boolean",
"force",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"throw",
"new",
"JavaModelException",
"(",
"new",
"JavaModelStatus",
"(",
"IJavaModelStatusConstants",
".",
"READ_ONLY",
",",
"this",
")",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"BinaryType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"equals",
"(",
"o",
")",
";",
"}",
"public",
"IMethod",
"[",
"]",
"findMethods",
"(",
"IMethod",
"method",
")",
"{",
"try",
"{",
"return",
"findMethods",
"(",
"method",
",",
"getMethods",
"(",
")",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"IAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"IBinaryAnnotation",
"[",
"]",
"binaryAnnotations",
"=",
"info",
".",
"getAnnotations",
"(",
")",
";",
"return",
"getAnnotations",
"(",
"binaryAnnotations",
",",
"info",
".",
"getTagBits",
"(",
")",
")",
";",
"}",
"public",
"IJavaElement",
"[",
"]",
"getChildren",
"(",
")",
"throws",
"JavaModelException",
"{",
"ClassFileInfo",
"cfi",
"=",
"getClassFileInfo",
"(",
")",
";",
"return",
"cfi",
".",
"binaryChildren",
";",
"}",
"public",
"IJavaElement",
"[",
"]",
"getChildrenForCategory",
"(",
"String",
"category",
")",
"throws",
"JavaModelException",
"{",
"IJavaElement",
"[",
"]",
"children",
"=",
"getChildren",
"(",
")",
";",
"int",
"length",
"=",
"children",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"children",
";",
"SourceMapper",
"mapper",
"=",
"getSourceMapper",
"(",
")",
";",
"if",
"(",
"mapper",
"!=",
"null",
")",
"{",
"(",
"(",
"ClassFile",
")",
"getClassFile",
"(",
")",
")",
".",
"getBuffer",
"(",
")",
";",
"HashMap",
"categories",
"=",
"mapper",
".",
"categories",
";",
"IJavaElement",
"[",
"]",
"result",
"=",
"new",
"IJavaElement",
"[",
"length",
"]",
";",
"int",
"index",
"=",
"0",
";",
"if",
"(",
"categories",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IJavaElement",
"child",
"=",
"children",
"[",
"i",
"]",
";",
"String",
"[",
"]",
"cats",
"=",
"(",
"String",
"[",
"]",
")",
"categories",
".",
"get",
"(",
"child",
")",
";",
"if",
"(",
"cats",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"length2",
"=",
"cats",
".",
"length",
";",
"j",
"<",
"length2",
";",
"j",
"++",
")",
"{",
"if",
"(",
"cats",
"[",
"j",
"]",
".",
"equals",
"(",
"category",
")",
")",
"{",
"result",
"[",
"index",
"++",
"]",
"=",
"child",
";",
"break",
";",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"index",
"<",
"length",
")",
"System",
".",
"arraycopy",
"(",
"result",
",",
"0",
",",
"result",
"=",
"new",
"IJavaElement",
"[",
"index",
"]",
",",
"0",
",",
"index",
")",
";",
"return",
"result",
";",
"}",
"return",
"NO_ELEMENTS",
";",
"}",
"protected",
"ClassFileInfo",
"getClassFileInfo",
"(",
")",
"throws",
"JavaModelException",
"{",
"ClassFile",
"cf",
"=",
"(",
"ClassFile",
")",
"this",
".",
"parent",
";",
"return",
"(",
"ClassFileInfo",
")",
"cf",
".",
"getElementInfo",
"(",
")",
";",
"}",
"public",
"IType",
"getDeclaringType",
"(",
")",
"{",
"IClassFile",
"classFile",
"=",
"getClassFile",
"(",
")",
";",
"if",
"(",
"classFile",
".",
"isOpen",
"(",
")",
")",
"{",
"try",
"{",
"char",
"[",
"]",
"enclosingTypeName",
"=",
"(",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
")",
".",
"getEnclosingTypeName",
"(",
")",
";",
"if",
"(",
"enclosingTypeName",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"enclosingTypeName",
"=",
"ClassFile",
".",
"unqualifiedName",
"(",
"enclosingTypeName",
")",
";",
"if",
"(",
"classFile",
".",
"getElementName",
"(",
")",
".",
"length",
"(",
")",
">",
"enclosingTypeName",
".",
"length",
"+",
"1",
"&&",
"Character",
".",
"isDigit",
"(",
"classFile",
".",
"getElementName",
"(",
")",
".",
"charAt",
"(",
"enclosingTypeName",
".",
"length",
"+",
"1",
")",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"getPackageFragment",
"(",
")",
".",
"getClassFile",
"(",
"new",
"String",
"(",
"enclosingTypeName",
")",
"+",
"SUFFIX_STRING_class",
")",
".",
"getType",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"npe",
")",
"{",
"return",
"null",
";",
"}",
"}",
"else",
"{",
"String",
"classFileName",
"=",
"classFile",
".",
"getElementName",
"(",
")",
";",
"int",
"lastDollar",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"classFileName",
".",
"length",
"(",
")",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"c",
"=",
"classFileName",
".",
"charAt",
"(",
"i",
")",
";",
"if",
"(",
"Character",
".",
"isDigit",
"(",
"c",
")",
"&&",
"lastDollar",
"==",
"i",
"-",
"1",
")",
"{",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"c",
"==",
"'$'",
")",
"{",
"lastDollar",
"=",
"i",
";",
"}",
"}",
"if",
"(",
"lastDollar",
"==",
"-",
"1",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"String",
"enclosingName",
"=",
"classFileName",
".",
"substring",
"(",
"0",
",",
"lastDollar",
")",
";",
"String",
"enclosingClassFileName",
"=",
"enclosingName",
"+",
"SUFFIX_STRING_class",
";",
"return",
"new",
"BinaryType",
"(",
"(",
"JavaElement",
")",
"getPackageFragment",
"(",
")",
".",
"getClassFile",
"(",
"enclosingClassFileName",
")",
",",
"Util",
".",
"localTypeName",
"(",
"enclosingName",
",",
"enclosingName",
".",
"lastIndexOf",
"(",
"'$'",
")",
",",
"enclosingName",
".",
"length",
"(",
")",
")",
")",
";",
"}",
"}",
"}",
"public",
"Object",
"getElementInfo",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"JavaModelManager",
"manager",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
";",
"Object",
"info",
"=",
"manager",
".",
"getInfo",
"(",
"this",
")",
";",
"if",
"(",
"info",
"!=",
"null",
"&&",
"info",
"!=",
"JavaModelCache",
".",
"NON_EXISTING_JAR_TYPE_INFO",
")",
"return",
"info",
";",
"return",
"openWhenClosed",
"(",
"createElementInfo",
"(",
")",
",",
"false",
",",
"monitor",
")",
";",
"}",
"public",
"int",
"getElementType",
"(",
")",
"{",
"return",
"TYPE",
";",
"}",
"public",
"IField",
"getField",
"(",
"String",
"fieldName",
")",
"{",
"return",
"new",
"BinaryField",
"(",
"this",
",",
"fieldName",
")",
";",
"}",
"public",
"IField",
"[",
"]",
"getFields",
"(",
")",
"throws",
"JavaModelException",
"{",
"ArrayList",
"list",
"=",
"getChildrenOfType",
"(",
"FIELD",
")",
";",
"int",
"size",
";",
"if",
"(",
"(",
"size",
"=",
"list",
".",
"size",
"(",
")",
")",
"==",
"0",
")",
"{",
"return",
"NO_FIELDS",
";",
"}",
"else",
"{",
"IField",
"[",
"]",
"array",
"=",
"new",
"IField",
"[",
"size",
"]",
";",
"list",
".",
"toArray",
"(",
"array",
")",
";",
"return",
"array",
";",
"}",
"}",
"public",
"int",
"getFlags",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"getModifiers",
"(",
")",
"&",
"~",
"ClassFileConstants",
".",
"AccSuper",
";",
"}",
"public",
"String",
"getFullyQualifiedName",
"(",
")",
"{",
"return",
"this",
".",
"getFullyQualifiedName",
"(",
"'$'",
")",
";",
"}",
"public",
"String",
"getFullyQualifiedName",
"(",
"char",
"enclosingTypeSeparator",
")",
"{",
"try",
"{",
"return",
"getFullyQualifiedName",
"(",
"enclosingTypeSeparator",
",",
"false",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"String",
"getFullyQualifiedParameterizedName",
"(",
")",
"throws",
"JavaModelException",
"{",
"return",
"getFullyQualifiedName",
"(",
"'.'",
",",
"true",
")",
";",
"}",
"public",
"IJavaElement",
"getHandleFromMemento",
"(",
"String",
"token",
",",
"MementoTokenizer",
"memento",
",",
"WorkingCopyOwner",
"workingCopyOwner",
")",
"{",
"switch",
"(",
"token",
".",
"charAt",
"(",
"0",
")",
")",
"{",
"case",
"JEM_COUNT",
":",
"return",
"getHandleUpdatingCountFromMemento",
"(",
"memento",
",",
"workingCopyOwner",
")",
";",
"case",
"JEM_FIELD",
":",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"String",
"fieldName",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"JavaElement",
"field",
"=",
"(",
"JavaElement",
")",
"getField",
"(",
"fieldName",
")",
";",
"return",
"field",
".",
"getHandleFromMemento",
"(",
"memento",
",",
"workingCopyOwner",
")",
";",
"case",
"JEM_INITIALIZER",
":",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"String",
"count",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"JavaElement",
"initializer",
"=",
"(",
"JavaElement",
")",
"getInitializer",
"(",
"Integer",
".",
"parseInt",
"(",
"count",
")",
")",
";",
"return",
"initializer",
".",
"getHandleFromMemento",
"(",
"memento",
",",
"workingCopyOwner",
")",
";",
"case",
"JEM_METHOD",
":",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"String",
"selector",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"ArrayList",
"params",
"=",
"new",
"ArrayList",
"(",
")",
";",
"nextParam",
":",
"while",
"(",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"{",
"token",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"switch",
"(",
"token",
".",
"charAt",
"(",
"0",
")",
")",
"{",
"case",
"JEM_TYPE",
":",
"case",
"JEM_TYPE_PARAMETER",
":",
"case",
"JEM_ANNOTATION",
":",
"break",
"nextParam",
";",
"case",
"JEM_METHOD",
":",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"String",
"param",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"while",
"(",
"param",
".",
"length",
"(",
")",
"==",
"1",
"&&",
"Signature",
".",
"C_ARRAY",
"==",
"param",
".",
"charAt",
"(",
"0",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"Signature",
".",
"C_ARRAY",
")",
";",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"param",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"}",
"params",
".",
"add",
"(",
"buffer",
".",
"toString",
"(",
")",
"+",
"param",
")",
";",
"break",
";",
"default",
":",
"break",
"nextParam",
";",
"}",
"}",
"String",
"[",
"]",
"parameters",
"=",
"new",
"String",
"[",
"params",
".",
"size",
"(",
")",
"]",
";",
"params",
".",
"toArray",
"(",
"parameters",
")",
";",
"JavaElement",
"method",
"=",
"(",
"JavaElement",
")",
"getMethod",
"(",
"selector",
",",
"parameters",
")",
";",
"switch",
"(",
"token",
".",
"charAt",
"(",
"0",
")",
")",
"{",
"case",
"JEM_TYPE",
":",
"case",
"JEM_TYPE_PARAMETER",
":",
"case",
"JEM_LOCALVARIABLE",
":",
"case",
"JEM_ANNOTATION",
":",
"return",
"method",
".",
"getHandleFromMemento",
"(",
"token",
",",
"memento",
",",
"workingCopyOwner",
")",
";",
"default",
":",
"return",
"method",
";",
"}",
"case",
"JEM_TYPE",
":",
"String",
"typeName",
";",
"if",
"(",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"{",
"typeName",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"char",
"firstChar",
"=",
"typeName",
".",
"charAt",
"(",
"0",
")",
";",
"if",
"(",
"firstChar",
"==",
"JEM_FIELD",
"||",
"firstChar",
"==",
"JEM_INITIALIZER",
"||",
"firstChar",
"==",
"JEM_METHOD",
"||",
"firstChar",
"==",
"JEM_TYPE",
"||",
"firstChar",
"==",
"JEM_COUNT",
")",
"{",
"token",
"=",
"typeName",
";",
"typeName",
"=",
"\"\"",
";",
"}",
"else",
"{",
"token",
"=",
"null",
";",
"}",
"}",
"else",
"{",
"typeName",
"=",
"\"\"",
";",
"token",
"=",
"null",
";",
"}",
"JavaElement",
"type",
"=",
"(",
"JavaElement",
")",
"getType",
"(",
"typeName",
")",
";",
"if",
"(",
"token",
"==",
"null",
")",
"{",
"return",
"type",
".",
"getHandleFromMemento",
"(",
"memento",
",",
"workingCopyOwner",
")",
";",
"}",
"else",
"{",
"return",
"type",
".",
"getHandleFromMemento",
"(",
"token",
",",
"memento",
",",
"workingCopyOwner",
")",
";",
"}",
"case",
"JEM_TYPE_PARAMETER",
":",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"String",
"typeParameterName",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"JavaElement",
"typeParameter",
"=",
"new",
"TypeParameter",
"(",
"this",
",",
"typeParameterName",
")",
";",
"return",
"typeParameter",
".",
"getHandleFromMemento",
"(",
"memento",
",",
"workingCopyOwner",
")",
";",
"case",
"JEM_ANNOTATION",
":",
"if",
"(",
"!",
"memento",
".",
"hasMoreTokens",
"(",
")",
")",
"return",
"this",
";",
"String",
"annotationName",
"=",
"memento",
".",
"nextToken",
"(",
")",
";",
"JavaElement",
"annotation",
"=",
"new",
"Annotation",
"(",
"this",
",",
"annotationName",
")",
";",
"return",
"annotation",
".",
"getHandleFromMemento",
"(",
"memento",
",",
"workingCopyOwner",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"IInitializer",
"getInitializer",
"(",
"int",
"count",
")",
"{",
"return",
"new",
"Initializer",
"(",
"this",
",",
"count",
")",
";",
"}",
"public",
"IInitializer",
"[",
"]",
"getInitializers",
"(",
")",
"{",
"return",
"NO_INITIALIZERS",
";",
"}",
"public",
"String",
"getKey",
"(",
"boolean",
"forceOpen",
")",
"throws",
"JavaModelException",
"{",
"return",
"getKey",
"(",
"this",
",",
"forceOpen",
")",
";",
"}",
"public",
"IMethod",
"getMethod",
"(",
"String",
"selector",
",",
"String",
"[",
"]",
"parameterTypeSignatures",
")",
"{",
"return",
"new",
"BinaryMethod",
"(",
"this",
",",
"selector",
",",
"parameterTypeSignatures",
")",
";",
"}",
"public",
"IMethod",
"[",
"]",
"getMethods",
"(",
")",
"throws",
"JavaModelException",
"{",
"ArrayList",
"list",
"=",
"getChildrenOfType",
"(",
"METHOD",
")",
";",
"int",
"size",
";",
"if",
"(",
"(",
"size",
"=",
"list",
".",
"size",
"(",
")",
")",
"==",
"0",
")",
"{",
"return",
"NO_METHODS",
";",
"}",
"else",
"{",
"IMethod",
"[",
"]",
"array",
"=",
"new",
"IMethod",
"[",
"size",
"]",
";",
"list",
".",
"toArray",
"(",
"array",
")",
";",
"return",
"array",
";",
"}",
"}",
"public",
"IPackageFragment",
"getPackageFragment",
"(",
")",
"{",
"IJavaElement",
"parentElement",
"=",
"this",
".",
"parent",
";",
"while",
"(",
"parentElement",
"!=",
"null",
")",
"{",
"if",
"(",
"parentElement",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
")",
"{",
"return",
"(",
"IPackageFragment",
")",
"parentElement",
";",
"}",
"else",
"{",
"parentElement",
"=",
"parentElement",
".",
"getParent",
"(",
")",
";",
"}",
"}",
"Assert",
".",
"isTrue",
"(",
"false",
")",
";",
"return",
"null",
";",
"}",
"public",
"String",
"getSuperclassTypeSignature",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"genericSignature",
"=",
"info",
".",
"getGenericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"!=",
"null",
")",
"{",
"int",
"signatureLength",
"=",
"genericSignature",
".",
"length",
";",
"int",
"index",
"=",
"0",
";",
"if",
"(",
"genericSignature",
"[",
"0",
"]",
"==",
"'<'",
")",
"{",
"int",
"count",
"=",
"1",
";",
"while",
"(",
"count",
">",
"0",
"&&",
"++",
"index",
"<",
"signatureLength",
")",
"{",
"switch",
"(",
"genericSignature",
"[",
"index",
"]",
")",
"{",
"case",
"'<'",
":",
"count",
"++",
";",
"break",
";",
"case",
"'>'",
":",
"count",
"--",
";",
"break",
";",
"}",
"}",
"index",
"++",
";",
"}",
"int",
"start",
"=",
"index",
";",
"index",
"=",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"scanClassTypeSignature",
"(",
"genericSignature",
",",
"start",
")",
"+",
"1",
";",
"char",
"[",
"]",
"superclassSig",
"=",
"CharOperation",
".",
"subarray",
"(",
"genericSignature",
",",
"start",
",",
"index",
")",
";",
"return",
"new",
"String",
"(",
"ClassFile",
".",
"translatedName",
"(",
"superclassSig",
")",
")",
";",
"}",
"else",
"{",
"char",
"[",
"]",
"superclassName",
"=",
"info",
".",
"getSuperclassName",
"(",
")",
";",
"if",
"(",
"superclassName",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"String",
"(",
"Signature",
".",
"createTypeSignature",
"(",
"ClassFile",
".",
"translatedName",
"(",
"superclassName",
")",
",",
"true",
")",
")",
";",
"}",
"}",
"public",
"String",
"getSourceFileName",
"(",
"IBinaryType",
"info",
")",
"{",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"try",
"{",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"IType",
"type",
"=",
"this",
";",
"IType",
"enclosingType",
"=",
"getDeclaringType",
"(",
")",
";",
"while",
"(",
"enclosingType",
"!=",
"null",
")",
"{",
"type",
"=",
"enclosingType",
";",
"enclosingType",
"=",
"type",
".",
"getDeclaringType",
"(",
")",
";",
"}",
"return",
"type",
".",
"getElementName",
"(",
")",
"+",
"Util",
".",
"defaultJavaExtension",
"(",
")",
";",
"}",
"}",
"return",
"sourceFileName",
"(",
"info",
")",
";",
"}",
"public",
"String",
"getSuperclassName",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"superclassName",
"=",
"info",
".",
"getSuperclassName",
"(",
")",
";",
"if",
"(",
"superclassName",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"String",
"(",
"ClassFile",
".",
"translatedName",
"(",
"superclassName",
")",
")",
";",
"}",
"public",
"String",
"[",
"]",
"getSuperInterfaceNames",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"names",
"=",
"info",
".",
"getInterfaceNames",
"(",
")",
";",
"int",
"length",
";",
"if",
"(",
"names",
"==",
"null",
"||",
"(",
"length",
"=",
"names",
".",
"length",
")",
"==",
"0",
")",
"{",
"return",
"CharOperation",
".",
"NO_STRINGS",
";",
"}",
"names",
"=",
"ClassFile",
".",
"translatedNames",
"(",
"names",
")",
";",
"String",
"[",
"]",
"strings",
"=",
"new",
"String",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"strings",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"names",
"[",
"i",
"]",
")",
";",
"}",
"return",
"strings",
";",
"}",
"public",
"String",
"[",
"]",
"getSuperInterfaceTypeSignatures",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"genericSignature",
"=",
"info",
".",
"getGenericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"!=",
"null",
")",
"{",
"ArrayList",
"interfaces",
"=",
"new",
"ArrayList",
"(",
")",
";",
"int",
"signatureLength",
"=",
"genericSignature",
".",
"length",
";",
"int",
"index",
"=",
"0",
";",
"if",
"(",
"genericSignature",
"[",
"0",
"]",
"==",
"'<'",
")",
"{",
"int",
"count",
"=",
"1",
";",
"while",
"(",
"count",
">",
"0",
"&&",
"++",
"index",
"<",
"signatureLength",
")",
"{",
"switch",
"(",
"genericSignature",
"[",
"index",
"]",
")",
"{",
"case",
"'<'",
":",
"count",
"++",
";",
"break",
";",
"case",
"'>'",
":",
"count",
"--",
";",
"break",
";",
"}",
"}",
"index",
"++",
";",
"}",
"index",
"=",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"scanClassTypeSignature",
"(",
"genericSignature",
",",
"index",
")",
"+",
"1",
";",
"while",
"(",
"index",
"<",
"signatureLength",
")",
"{",
"int",
"start",
"=",
"index",
";",
"index",
"=",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"scanClassTypeSignature",
"(",
"genericSignature",
",",
"start",
")",
"+",
"1",
";",
"char",
"[",
"]",
"interfaceSig",
"=",
"CharOperation",
".",
"subarray",
"(",
"genericSignature",
",",
"start",
",",
"index",
")",
";",
"interfaces",
".",
"add",
"(",
"new",
"String",
"(",
"ClassFile",
".",
"translatedName",
"(",
"interfaceSig",
")",
")",
")",
";",
"}",
"int",
"size",
"=",
"interfaces",
".",
"size",
"(",
")",
";",
"String",
"[",
"]",
"result",
"=",
"new",
"String",
"[",
"size",
"]",
";",
"interfaces",
".",
"toArray",
"(",
"result",
")",
";",
"return",
"result",
";",
"}",
"else",
"{",
"char",
"[",
"]",
"[",
"]",
"names",
"=",
"info",
".",
"getInterfaceNames",
"(",
")",
";",
"int",
"length",
";",
"if",
"(",
"names",
"==",
"null",
"||",
"(",
"length",
"=",
"names",
".",
"length",
")",
"==",
"0",
")",
"{",
"return",
"CharOperation",
".",
"NO_STRINGS",
";",
"}",
"names",
"=",
"ClassFile",
".",
"translatedNames",
"(",
"names",
")",
";",
"String",
"[",
"]",
"strings",
"=",
"new",
"String",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"strings",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"Signature",
".",
"createTypeSignature",
"(",
"names",
"[",
"i",
"]",
",",
"true",
")",
")",
";",
"}",
"return",
"strings",
";",
"}",
"}",
"public",
"ITypeParameter",
"[",
"]",
"getTypeParameters",
"(",
")",
"throws",
"JavaModelException",
"{",
"String",
"[",
"]",
"typeParameterSignatures",
"=",
"getTypeParameterSignatures",
"(",
")",
";",
"int",
"length",
"=",
"typeParameterSignatures",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"TypeParameter",
".",
"NO_TYPE_PARAMETERS",
";",
"ITypeParameter",
"[",
"]",
"typeParameters",
"=",
"new",
"ITypeParameter",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"typeParameterSignatures",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"typeParameterName",
"=",
"Signature",
".",
"getTypeVariable",
"(",
"typeParameterSignatures",
"[",
"i",
"]",
")",
";",
"typeParameters",
"[",
"i",
"]",
"=",
"new",
"TypeParameter",
"(",
"this",
",",
"typeParameterName",
")",
";",
"}",
"return",
"typeParameters",
";",
"}",
"public",
"String",
"[",
"]",
"getTypeParameterSignatures",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"char",
"[",
"]",
"genericSignature",
"=",
"info",
".",
"getGenericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"==",
"null",
")",
"return",
"CharOperation",
".",
"NO_STRINGS",
";",
"char",
"[",
"]",
"dotBaseSignature",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"genericSignature",
",",
"'/'",
",",
"'.'",
")",
";",
"char",
"[",
"]",
"[",
"]",
"typeParams",
"=",
"Signature",
".",
"getTypeParameters",
"(",
"dotBaseSignature",
")",
";",
"return",
"CharOperation",
".",
"toStrings",
"(",
"typeParams",
")",
";",
"}",
"public",
"IType",
"getType",
"(",
"String",
"typeName",
")",
"{",
"IClassFile",
"classFile",
"=",
"getPackageFragment",
"(",
")",
".",
"getClassFile",
"(",
"getTypeQualifiedName",
"(",
")",
"+",
"\"$\"",
"+",
"typeName",
"+",
"SUFFIX_STRING_class",
")",
";",
"return",
"new",
"BinaryType",
"(",
"(",
"JavaElement",
")",
"classFile",
",",
"typeName",
")",
";",
"}",
"public",
"ITypeParameter",
"getTypeParameter",
"(",
"String",
"typeParameterName",
")",
"{",
"return",
"new",
"TypeParameter",
"(",
"this",
",",
"typeParameterName",
")",
";",
"}",
"public",
"String",
"getTypeQualifiedName",
"(",
")",
"{",
"return",
"this",
".",
"getTypeQualifiedName",
"(",
"'$'",
")",
";",
"}",
"public",
"String",
"getTypeQualifiedName",
"(",
"char",
"enclosingTypeSeparator",
")",
"{",
"try",
"{",
"return",
"getTypeQualifiedName",
"(",
"enclosingTypeSeparator",
",",
"false",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"IType",
"[",
"]",
"getTypes",
"(",
")",
"throws",
"JavaModelException",
"{",
"ArrayList",
"list",
"=",
"getChildrenOfType",
"(",
"TYPE",
")",
";",
"int",
"size",
";",
"if",
"(",
"(",
"size",
"=",
"list",
".",
"size",
"(",
")",
")",
"==",
"0",
")",
"{",
"return",
"NO_TYPES",
";",
"}",
"else",
"{",
"IType",
"[",
"]",
"array",
"=",
"new",
"IType",
"[",
"size",
"]",
";",
"list",
".",
"toArray",
"(",
"array",
")",
";",
"return",
"array",
";",
"}",
"}",
"public",
"boolean",
"isAnonymous",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"isAnonymous",
"(",
")",
";",
"}",
"public",
"boolean",
"isClass",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"return",
"TypeDeclaration",
".",
"kind",
"(",
"info",
".",
"getModifiers",
"(",
")",
")",
"==",
"TypeDeclaration",
".",
"CLASS_DECL",
";",
"}",
"public",
"boolean",
"isEnum",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"return",
"TypeDeclaration",
".",
"kind",
"(",
"info",
".",
"getModifiers",
"(",
")",
")",
"==",
"TypeDeclaration",
".",
"ENUM_DECL",
";",
"}",
"public",
"boolean",
"isInterface",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"switch",
"(",
"TypeDeclaration",
".",
"kind",
"(",
"info",
".",
"getModifiers",
"(",
")",
")",
")",
"{",
"case",
"TypeDeclaration",
".",
"INTERFACE_DECL",
":",
"case",
"TypeDeclaration",
".",
"ANNOTATION_TYPE_DECL",
":",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isAnnotation",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"return",
"TypeDeclaration",
".",
"kind",
"(",
"info",
".",
"getModifiers",
"(",
")",
")",
"==",
"TypeDeclaration",
".",
"ANNOTATION_TYPE_DECL",
";",
"}",
"public",
"boolean",
"isLocal",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"isLocal",
"(",
")",
";",
"}",
"public",
"boolean",
"isMember",
"(",
")",
"throws",
"JavaModelException",
"{",
"IBinaryType",
"info",
"=",
"(",
"IBinaryType",
")",
"getElementInfo",
"(",
")",
";",
"return",
"info",
".",
"isMember",
"(",
")",
";",
"}",
"public",
"boolean",
"isResolved",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"ITypeHierarchy",
"loadTypeHierachy",
"(",
"InputStream",
"input",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"return",
"loadTypeHierachy",
"(",
"input",
",",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
",",
"monitor",
")",
";",
"}",
"public",
"ITypeHierarchy",
"loadTypeHierachy",
"(",
"InputStream",
"input",
",",
"WorkingCopyOwner",
"owner",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"return",
"TypeHierarchy",
".",
"load",
"(",
"this",
",",
"input",
",",
"owner",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newSupertypeHierarchy",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"return",
"this",
".",
"newSupertypeHierarchy",
"(",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
",",
"monitor",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newSupertypeHierarchy",
"(",
"ICompilationUnit",
"[",
"]",
"workingCopies",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"CreateTypeHierarchyOperation",
"op",
"=",
"new",
"CreateTypeHierarchyOperation",
"(",
"this",
",",
"workingCopies",
",",
"SearchEngine",
".",
"createWorkspaceScope",
"(",
")",
",",
"false",
")",
";",
"op",
".",
"runOperation",
"(",
"monitor",
")",
";",
"return",
"op",
".",
"getResult",
"(",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newSupertypeHierarchy",
"(",
"IWorkingCopy",
"[",
"]",
"workingCopies",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"ICompilationUnit",
"[",
"]",
"copies",
";",
"if",
"(",
"workingCopies",
"==",
"null",
")",
"{",
"copies",
"=",
"null",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"workingCopies",
".",
"length",
";",
"System",
".",
"arraycopy",
"(",
"workingCopies",
",",
"0",
",",
"copies",
"=",
"new",
"ICompilationUnit",
"[",
"length",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"return",
"newSupertypeHierarchy",
"(",
"copies",
",",
"monitor",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newSupertypeHierarchy",
"(",
"WorkingCopyOwner",
"owner",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"ICompilationUnit",
"[",
"]",
"workingCopies",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getWorkingCopies",
"(",
"owner",
",",
"true",
")",
";",
"CreateTypeHierarchyOperation",
"op",
"=",
"new",
"CreateTypeHierarchyOperation",
"(",
"this",
",",
"workingCopies",
",",
"SearchEngine",
".",
"createWorkspaceScope",
"(",
")",
",",
"false",
")",
";",
"op",
".",
"runOperation",
"(",
"monitor",
")",
";",
"return",
"op",
".",
"getResult",
"(",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newTypeHierarchy",
"(",
"IJavaProject",
"project",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"return",
"newTypeHierarchy",
"(",
"project",
",",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
",",
"monitor",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newTypeHierarchy",
"(",
"IJavaProject",
"project",
",",
"WorkingCopyOwner",
"owner",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"project",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"Messages",
".",
"hierarchy_nullProject",
")",
";",
"}",
"ICompilationUnit",
"[",
"]",
"workingCopies",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getWorkingCopies",
"(",
"owner",
",",
"true",
")",
";",
"ICompilationUnit",
"[",
"]",
"projectWCs",
"=",
"null",
";",
"if",
"(",
"workingCopies",
"!=",
"null",
")",
"{",
"int",
"length",
"=",
"workingCopies",
".",
"length",
";",
"projectWCs",
"=",
"new",
"ICompilationUnit",
"[",
"length",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ICompilationUnit",
"wc",
"=",
"workingCopies",
"[",
"i",
"]",
";",
"if",
"(",
"project",
".",
"equals",
"(",
"wc",
".",
"getJavaProject",
"(",
")",
")",
")",
"{",
"projectWCs",
"[",
"index",
"++",
"]",
"=",
"wc",
";",
"}",
"}",
"if",
"(",
"index",
"!=",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"projectWCs",
",",
"0",
",",
"projectWCs",
"=",
"new",
"ICompilationUnit",
"[",
"index",
"]",
",",
"0",
",",
"index",
")",
";",
"}",
"}",
"CreateTypeHierarchyOperation",
"op",
"=",
"new",
"CreateTypeHierarchyOperation",
"(",
"this",
",",
"projectWCs",
",",
"project",
",",
"true",
")",
";",
"op",
".",
"runOperation",
"(",
"monitor",
")",
";",
"return",
"op",
".",
"getResult",
"(",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newTypeHierarchy",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"return",
"newTypeHierarchy",
"(",
"DefaultWorkingCopyOwner",
".",
"PRIMARY",
",",
"monitor",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newTypeHierarchy",
"(",
"ICompilationUnit",
"[",
"]",
"workingCopies",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"CreateTypeHierarchyOperation",
"op",
"=",
"new",
"CreateTypeHierarchyOperation",
"(",
"this",
",",
"workingCopies",
",",
"SearchEngine",
".",
"createWorkspaceScope",
"(",
")",
",",
"true",
")",
";",
"op",
".",
"runOperation",
"(",
"monitor",
")",
";",
"return",
"op",
".",
"getResult",
"(",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newTypeHierarchy",
"(",
"IWorkingCopy",
"[",
"]",
"workingCopies",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"ICompilationUnit",
"[",
"]",
"copies",
";",
"if",
"(",
"workingCopies",
"==",
"null",
")",
"{",
"copies",
"=",
"null",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"workingCopies",
".",
"length",
";",
"System",
".",
"arraycopy",
"(",
"workingCopies",
",",
"0",
",",
"copies",
"=",
"new",
"ICompilationUnit",
"[",
"length",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"return",
"newTypeHierarchy",
"(",
"copies",
",",
"monitor",
")",
";",
"}",
"public",
"ITypeHierarchy",
"newTypeHierarchy",
"(",
"WorkingCopyOwner",
"owner",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"ICompilationUnit",
"[",
"]",
"workingCopies",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getWorkingCopies",
"(",
"owner",
",",
"true",
")",
";",
"CreateTypeHierarchyOperation",
"op",
"=",
"new",
"CreateTypeHierarchyOperation",
"(",
"this",
",",
"workingCopies",
",",
"SearchEngine",
".",
"createWorkspaceScope",
"(",
")",
",",
"true",
")",
";",
"op",
".",
"runOperation",
"(",
"monitor",
")",
";",
"return",
"op",
".",
"getResult",
"(",
")",
";",
"}",
"public",
"JavaElement",
"resolved",
"(",
"Binding",
"binding",
")",
"{",
"SourceRefElement",
"resolvedHandle",
"=",
"new",
"ResolvedBinaryType",
"(",
"this",
".",
"parent",
",",
"this",
".",
"name",
",",
"new",
"String",
"(",
"binding",
".",
"computeUniqueKey",
"(",
")",
")",
")",
";",
"resolvedHandle",
".",
"occurrenceCount",
"=",
"this",
".",
"occurrenceCount",
";",
"return",
"resolvedHandle",
";",
"}",
"public",
"String",
"sourceFileName",
"(",
"IBinaryType",
"info",
")",
"{",
"char",
"[",
"]",
"sourceFileName",
"=",
"info",
".",
"sourceFileName",
"(",
")",
";",
"if",
"(",
"sourceFileName",
"==",
"null",
")",
"{",
"if",
"(",
"info",
".",
"isMember",
"(",
")",
")",
"{",
"IType",
"enclosingType",
"=",
"getDeclaringType",
"(",
")",
";",
"if",
"(",
"enclosingType",
"==",
"null",
")",
"return",
"null",
";",
"while",
"(",
"enclosingType",
".",
"getDeclaringType",
"(",
")",
"!=",
"null",
")",
"{",
"enclosingType",
"=",
"enclosingType",
".",
"getDeclaringType",
"(",
")",
";",
"}",
"return",
"enclosingType",
".",
"getElementName",
"(",
")",
"+",
"Util",
".",
"defaultJavaExtension",
"(",
")",
";",
"}",
"else",
"if",
"(",
"info",
".",
"isLocal",
"(",
")",
"||",
"info",
".",
"isAnonymous",
"(",
")",
")",
"{",
"String",
"typeQualifiedName",
"=",
"getTypeQualifiedName",
"(",
")",
";",
"int",
"dollar",
"=",
"typeQualifiedName",
".",
"indexOf",
"(",
"'$'",
")",
";",
"if",
"(",
"dollar",
"==",
"-",
"1",
")",
"{",
"return",
"getElementName",
"(",
")",
"+",
"Util",
".",
"defaultJavaExtension",
"(",
")",
";",
"}",
"return",
"typeQualifiedName",
".",
"substring",
"(",
"0",
",",
"dollar",
")",
"+",
"Util",
".",
"defaultJavaExtension",
"(",
")",
";",
"}",
"else",
"{",
"return",
"getElementName",
"(",
")",
"+",
"Util",
".",
"defaultJavaExtension",
"(",
")",
";",
"}",
"}",
"else",
"{",
"int",
"index",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"'/'",
",",
"sourceFileName",
")",
";",
"return",
"new",
"String",
"(",
"sourceFileName",
",",
"index",
"+",
"1",
",",
"sourceFileName",
".",
"length",
"-",
"index",
"-",
"1",
")",
";",
"}",
"}",
"protected",
"void",
"toStringInfo",
"(",
"int",
"tab",
",",
"StringBuffer",
"buffer",
",",
"Object",
"info",
",",
"boolean",
"showResolvedInfo",
")",
"{",
"buffer",
".",
"append",
"(",
"tabString",
"(",
"tab",
")",
")",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"toStringName",
"(",
"buffer",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"(not",
"open)\"",
")",
";",
"}",
"else",
"if",
"(",
"info",
"==",
"NO_INFO",
")",
"{",
"toStringName",
"(",
"buffer",
")",
";",
"}",
"else",
"{",
"try",
"{",
"if",
"(",
"isAnnotation",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"@interface",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"isEnum",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"enum",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"isInterface",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"interface",
"\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"class",
"\"",
")",
";",
"}",
"toStringName",
"(",
"buffer",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"buffer",
".",
"append",
"(",
"\"\"",
"+",
"getElementName",
"(",
")",
")",
";",
"}",
"}",
"}",
"protected",
"void",
"toStringName",
"(",
"StringBuffer",
"buffer",
")",
"{",
"if",
"(",
"getElementName",
"(",
")",
".",
"length",
"(",
")",
">",
"0",
")",
"super",
".",
"toStringName",
"(",
"buffer",
")",
";",
"else",
"buffer",
".",
"append",
"(",
"\"<anonymous>\"",
")",
";",
"}",
"public",
"String",
"getAttachedJavadoc",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"JavadocContents",
"javadocContents",
"=",
"getJavadocContents",
"(",
"monitor",
")",
";",
"if",
"(",
"javadocContents",
"==",
"null",
")",
"return",
"null",
";",
"return",
"javadocContents",
".",
"getTypeDoc",
"(",
")",
";",
"}",
"public",
"JavadocContents",
"getJavadocContents",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"PerProjectInfo",
"projectInfo",
"=",
"JavaModelManager",
".",
"getJavaModelManager",
"(",
")",
".",
"getPerProjectInfoCheckExistence",
"(",
"getJavaProject",
"(",
")",
".",
"getProject",
"(",
")",
")",
";",
"JavadocContents",
"cachedJavadoc",
"=",
"null",
";",
"synchronized",
"(",
"projectInfo",
".",
"javadocCache",
")",
"{",
"cachedJavadoc",
"=",
"(",
"JavadocContents",
")",
"projectInfo",
".",
"javadocCache",
".",
"get",
"(",
"this",
")",
";",
"}",
"if",
"(",
"cachedJavadoc",
"!=",
"null",
"&&",
"cachedJavadoc",
"!=",
"EMPTY_JAVADOC",
")",
"{",
"return",
"cachedJavadoc",
";",
"}",
"URL",
"baseLocation",
"=",
"getJavadocBaseLocation",
"(",
")",
";",
"if",
"(",
"baseLocation",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"StringBuffer",
"pathBuffer",
"=",
"new",
"StringBuffer",
"(",
"baseLocation",
".",
"toExternalForm",
"(",
")",
")",
";",
"if",
"(",
"!",
"(",
"pathBuffer",
".",
"charAt",
"(",
"pathBuffer",
".",
"length",
"(",
")",
"-",
"1",
")",
"==",
"'/'",
")",
")",
"{",
"pathBuffer",
".",
"append",
"(",
"'/'",
")",
";",
"}",
"IPackageFragment",
"pack",
"=",
"getPackageFragment",
"(",
")",
";",
"String",
"typeQualifiedName",
"=",
"null",
";",
"if",
"(",
"isMember",
"(",
")",
")",
"{",
"IType",
"currentType",
"=",
"this",
";",
"StringBuffer",
"typeName",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"while",
"(",
"currentType",
"!=",
"null",
")",
"{",
"typeName",
".",
"insert",
"(",
"0",
",",
"currentType",
".",
"getElementName",
"(",
")",
")",
";",
"currentType",
"=",
"currentType",
".",
"getDeclaringType",
"(",
")",
";",
"if",
"(",
"currentType",
"!=",
"null",
")",
"{",
"typeName",
".",
"insert",
"(",
"0",
",",
"'.'",
")",
";",
"}",
"}",
"typeQualifiedName",
"=",
"new",
"String",
"(",
"typeName",
".",
"toString",
"(",
")",
")",
";",
"}",
"else",
"{",
"typeQualifiedName",
"=",
"getElementName",
"(",
")",
";",
"}",
"pathBuffer",
".",
"append",
"(",
"pack",
".",
"getElementName",
"(",
")",
".",
"replace",
"(",
"'.'",
",",
"'/'",
")",
")",
".",
"append",
"(",
"'/'",
")",
".",
"append",
"(",
"typeQualifiedName",
")",
".",
"append",
"(",
"JavadocConstants",
".",
"HTML_EXTENSION",
")",
";",
"if",
"(",
"monitor",
"!=",
"null",
"&&",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"throw",
"new",
"OperationCanceledException",
"(",
")",
";",
"final",
"String",
"contents",
"=",
"getURLContents",
"(",
"String",
".",
"valueOf",
"(",
"pathBuffer",
")",
")",
";",
"JavadocContents",
"javadocContents",
"=",
"new",
"JavadocContents",
"(",
"this",
",",
"contents",
")",
";",
"synchronized",
"(",
"projectInfo",
".",
"javadocCache",
")",
"{",
"projectInfo",
".",
"javadocCache",
".",
"put",
"(",
"this",
",",
"javadocContents",
")",
";",
"}",
"return",
"javadocContents",
";",
"}",
"}",
"</s>"
] |
2,845 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"java",
".",
"util",
".",
"Locale",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CategorizedProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"CompilationResult",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"DefaultErrorHandlingPolicies",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"CompilationUnitDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ConstructorDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Expression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"batch",
".",
"CompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"DefaultProblemFactory",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"ProblemReporter",
";",
"public",
"class",
"CodeSnippetParsingUtil",
"{",
"public",
"RecordedParsingInformation",
"recordedParsingInformation",
";",
"public",
"boolean",
"ignoreMethodBodies",
";",
"public",
"CodeSnippetParsingUtil",
"(",
"boolean",
"ignoreMethodBodies",
")",
"{",
"this",
".",
"ignoreMethodBodies",
"=",
"ignoreMethodBodies",
";",
"}",
"public",
"CodeSnippetParsingUtil",
"(",
")",
"{",
"this",
"(",
"false",
")",
";",
"}",
"private",
"RecordedParsingInformation",
"getRecordedParsingInformation",
"(",
"CompilationResult",
"compilationResult",
",",
"int",
"[",
"]",
"[",
"]",
"commentPositions",
")",
"{",
"int",
"problemsCount",
"=",
"compilationResult",
".",
"problemCount",
";",
"CategorizedProblem",
"[",
"]",
"problems",
"=",
"null",
";",
"if",
"(",
"problemsCount",
"!=",
"0",
")",
"{",
"final",
"CategorizedProblem",
"[",
"]",
"compilationResultProblems",
"=",
"compilationResult",
".",
"problems",
";",
"if",
"(",
"compilationResultProblems",
".",
"length",
"==",
"problemsCount",
")",
"{",
"problems",
"=",
"compilationResultProblems",
";",
"}",
"else",
"{",
"System",
".",
"arraycopy",
"(",
"compilationResultProblems",
",",
"0",
",",
"(",
"problems",
"=",
"new",
"CategorizedProblem",
"[",
"problemsCount",
"]",
")",
",",
"0",
",",
"problemsCount",
")",
";",
"}",
"}",
"return",
"new",
"RecordedParsingInformation",
"(",
"problems",
",",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
",",
"commentPositions",
")",
";",
"}",
"public",
"ASTNode",
"[",
"]",
"parseClassBodyDeclarations",
"(",
"char",
"[",
"]",
"source",
",",
"Map",
"settings",
",",
"boolean",
"recordParsingInformation",
")",
"{",
"return",
"parseClassBodyDeclarations",
"(",
"source",
",",
"0",
",",
"source",
".",
"length",
",",
"settings",
",",
"recordParsingInformation",
",",
"false",
")",
";",
"}",
"public",
"ASTNode",
"[",
"]",
"parseClassBodyDeclarations",
"(",
"char",
"[",
"]",
"source",
",",
"int",
"offset",
",",
"int",
"length",
",",
"Map",
"settings",
",",
"boolean",
"recordParsingInformation",
",",
"boolean",
"enabledStatementRecovery",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"CompilerOptions",
"compilerOptions",
"=",
"new",
"CompilerOptions",
"(",
"settings",
")",
";",
"compilerOptions",
".",
"ignoreMethodBodies",
"=",
"this",
".",
"ignoreMethodBodies",
";",
"final",
"ProblemReporter",
"problemReporter",
"=",
"new",
"ProblemReporter",
"(",
"DefaultErrorHandlingPolicies",
".",
"proceedWithAllProblems",
"(",
")",
",",
"compilerOptions",
",",
"new",
"DefaultProblemFactory",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")",
")",
";",
"CommentRecorderParser",
"parser",
"=",
"new",
"CommentRecorderParser",
"(",
"problemReporter",
",",
"false",
")",
";",
"parser",
".",
"setMethodsFullRecovery",
"(",
"false",
")",
";",
"parser",
".",
"setStatementsRecovery",
"(",
"enabledStatementRecovery",
")",
";",
"ICompilationUnit",
"sourceUnit",
"=",
"new",
"CompilationUnit",
"(",
"source",
",",
"\"\"",
",",
"compilerOptions",
".",
"defaultEncoding",
")",
";",
"CompilationResult",
"compilationResult",
"=",
"new",
"CompilationResult",
"(",
"sourceUnit",
",",
"0",
",",
"0",
",",
"compilerOptions",
".",
"maxProblemsPerUnit",
")",
";",
"final",
"CompilationUnitDeclaration",
"compilationUnitDeclaration",
"=",
"new",
"CompilationUnitDeclaration",
"(",
"problemReporter",
",",
"compilationResult",
",",
"source",
".",
"length",
")",
";",
"ASTNode",
"[",
"]",
"result",
"=",
"parser",
".",
"parseClassBodyDeclarations",
"(",
"source",
",",
"offset",
",",
"length",
",",
"compilationUnitDeclaration",
")",
";",
"if",
"(",
"recordParsingInformation",
")",
"{",
"this",
".",
"recordedParsingInformation",
"=",
"getRecordedParsingInformation",
"(",
"compilationResult",
",",
"compilationUnitDeclaration",
".",
"comments",
")",
";",
"}",
"return",
"result",
";",
"}",
"public",
"CompilationUnitDeclaration",
"parseCompilationUnit",
"(",
"char",
"[",
"]",
"source",
",",
"Map",
"settings",
",",
"boolean",
"recordParsingInformation",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"CompilerOptions",
"compilerOptions",
"=",
"new",
"CompilerOptions",
"(",
"settings",
")",
";",
"compilerOptions",
".",
"ignoreMethodBodies",
"=",
"this",
".",
"ignoreMethodBodies",
";",
"CommentRecorderParser",
"parser",
"=",
"new",
"CommentRecorderParser",
"(",
"new",
"ProblemReporter",
"(",
"DefaultErrorHandlingPolicies",
".",
"proceedWithAllProblems",
"(",
")",
",",
"compilerOptions",
",",
"new",
"DefaultProblemFactory",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")",
")",
",",
"false",
")",
";",
"ICompilationUnit",
"sourceUnit",
"=",
"new",
"CompilationUnit",
"(",
"source",
",",
"\"\"",
",",
"compilerOptions",
".",
"defaultEncoding",
")",
";",
"final",
"CompilationResult",
"compilationResult",
"=",
"new",
"CompilationResult",
"(",
"sourceUnit",
",",
"0",
",",
"0",
",",
"compilerOptions",
".",
"maxProblemsPerUnit",
")",
";",
"CompilationUnitDeclaration",
"compilationUnitDeclaration",
"=",
"parser",
".",
"dietParse",
"(",
"sourceUnit",
",",
"compilationResult",
")",
";",
"if",
"(",
"recordParsingInformation",
")",
"{",
"this",
".",
"recordedParsingInformation",
"=",
"getRecordedParsingInformation",
"(",
"compilationResult",
",",
"compilationUnitDeclaration",
".",
"comments",
")",
";",
"}",
"if",
"(",
"compilationUnitDeclaration",
".",
"ignoreMethodBodies",
")",
"{",
"compilationUnitDeclaration",
".",
"ignoreFurtherInvestigation",
"=",
"true",
";",
"return",
"compilationUnitDeclaration",
";",
"}",
"parser",
".",
"scanner",
".",
"setSource",
"(",
"compilationResult",
")",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"TypeDeclaration",
"[",
"]",
"types",
"=",
"compilationUnitDeclaration",
".",
"types",
";",
"if",
"(",
"types",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"types",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"types",
"[",
"i",
"]",
".",
"parseMethods",
"(",
"parser",
",",
"compilationUnitDeclaration",
")",
";",
"}",
"}",
"if",
"(",
"recordParsingInformation",
")",
"{",
"this",
".",
"recordedParsingInformation",
".",
"updateRecordedParsingInformation",
"(",
"compilationResult",
")",
";",
"}",
"return",
"compilationUnitDeclaration",
";",
"}",
"public",
"Expression",
"parseExpression",
"(",
"char",
"[",
"]",
"source",
",",
"Map",
"settings",
",",
"boolean",
"recordParsingInformation",
")",
"{",
"return",
"parseExpression",
"(",
"source",
",",
"0",
",",
"source",
".",
"length",
",",
"settings",
",",
"recordParsingInformation",
")",
";",
"}",
"public",
"Expression",
"parseExpression",
"(",
"char",
"[",
"]",
"source",
",",
"int",
"offset",
",",
"int",
"length",
",",
"Map",
"settings",
",",
"boolean",
"recordParsingInformation",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"CompilerOptions",
"compilerOptions",
"=",
"new",
"CompilerOptions",
"(",
"settings",
")",
";",
"final",
"ProblemReporter",
"problemReporter",
"=",
"new",
"ProblemReporter",
"(",
"DefaultErrorHandlingPolicies",
".",
"proceedWithAllProblems",
"(",
")",
",",
"compilerOptions",
",",
"new",
"DefaultProblemFactory",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")",
")",
";",
"CommentRecorderParser",
"parser",
"=",
"new",
"CommentRecorderParser",
"(",
"problemReporter",
",",
"false",
")",
";",
"ICompilationUnit",
"sourceUnit",
"=",
"new",
"CompilationUnit",
"(",
"source",
",",
"\"\"",
",",
"compilerOptions",
".",
"defaultEncoding",
")",
";",
"CompilationResult",
"compilationResult",
"=",
"new",
"CompilationResult",
"(",
"sourceUnit",
",",
"0",
",",
"0",
",",
"compilerOptions",
".",
"maxProblemsPerUnit",
")",
";",
"CompilationUnitDeclaration",
"unit",
"=",
"new",
"CompilationUnitDeclaration",
"(",
"problemReporter",
",",
"compilationResult",
",",
"source",
".",
"length",
")",
";",
"Expression",
"result",
"=",
"parser",
".",
"parseExpression",
"(",
"source",
",",
"offset",
",",
"length",
",",
"unit",
")",
";",
"if",
"(",
"recordParsingInformation",
")",
"{",
"this",
".",
"recordedParsingInformation",
"=",
"getRecordedParsingInformation",
"(",
"compilationResult",
",",
"unit",
".",
"comments",
")",
";",
"}",
"return",
"result",
";",
"}",
"public",
"ConstructorDeclaration",
"parseStatements",
"(",
"char",
"[",
"]",
"source",
",",
"Map",
"settings",
",",
"boolean",
"recordParsingInformation",
",",
"boolean",
"enabledStatementRecovery",
")",
"{",
"return",
"parseStatements",
"(",
"source",
",",
"0",
",",
"source",
".",
"length",
",",
"settings",
",",
"recordParsingInformation",
",",
"enabledStatementRecovery",
")",
";",
"}",
"public",
"ConstructorDeclaration",
"parseStatements",
"(",
"char",
"[",
"]",
"source",
",",
"int",
"offset",
",",
"int",
"length",
",",
"Map",
"settings",
",",
"boolean",
"recordParsingInformation",
",",
"boolean",
"enabledStatementRecovery",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"CompilerOptions",
"compilerOptions",
"=",
"new",
"CompilerOptions",
"(",
"settings",
")",
";",
"final",
"ProblemReporter",
"problemReporter",
"=",
"new",
"ProblemReporter",
"(",
"DefaultErrorHandlingPolicies",
".",
"proceedWithAllProblems",
"(",
")",
",",
"compilerOptions",
",",
"new",
"DefaultProblemFactory",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")",
")",
";",
"CommentRecorderParser",
"parser",
"=",
"new",
"CommentRecorderParser",
"(",
"problemReporter",
",",
"false",
")",
";",
"parser",
".",
"setMethodsFullRecovery",
"(",
"false",
")",
";",
"parser",
".",
"setStatementsRecovery",
"(",
"enabledStatementRecovery",
")",
";",
"ICompilationUnit",
"sourceUnit",
"=",
"new",
"CompilationUnit",
"(",
"source",
",",
"\"\"",
",",
"compilerOptions",
".",
"defaultEncoding",
")",
";",
"final",
"CompilationResult",
"compilationResult",
"=",
"new",
"CompilationResult",
"(",
"sourceUnit",
",",
"0",
",",
"0",
",",
"compilerOptions",
".",
"maxProblemsPerUnit",
")",
";",
"CompilationUnitDeclaration",
"compilationUnitDeclaration",
"=",
"new",
"CompilationUnitDeclaration",
"(",
"problemReporter",
",",
"compilationResult",
",",
"length",
")",
";",
"ConstructorDeclaration",
"constructorDeclaration",
"=",
"new",
"ConstructorDeclaration",
"(",
"compilationResult",
")",
";",
"constructorDeclaration",
".",
"sourceEnd",
"=",
"-",
"1",
";",
"constructorDeclaration",
".",
"declarationSourceEnd",
"=",
"offset",
"+",
"length",
"-",
"1",
";",
"constructorDeclaration",
".",
"bodyStart",
"=",
"offset",
";",
"constructorDeclaration",
".",
"bodyEnd",
"=",
"offset",
"+",
"length",
"-",
"1",
";",
"parser",
".",
"scanner",
".",
"setSource",
"(",
"compilationResult",
")",
";",
"parser",
".",
"scanner",
".",
"resetTo",
"(",
"offset",
",",
"offset",
"+",
"length",
")",
";",
"parser",
".",
"parse",
"(",
"constructorDeclaration",
",",
"compilationUnitDeclaration",
",",
"true",
")",
";",
"if",
"(",
"recordParsingInformation",
")",
"{",
"this",
".",
"recordedParsingInformation",
"=",
"getRecordedParsingInformation",
"(",
"compilationResult",
",",
"compilationUnitDeclaration",
".",
"comments",
")",
";",
"}",
"return",
"constructorDeclaration",
";",
"}",
"}",
"</s>"
] |
2,846 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ISourceAttribute",
";",
"public",
"class",
"SourceFileAttribute",
"extends",
"ClassFileAttribute",
"implements",
"ISourceAttribute",
"{",
"private",
"int",
"sourceFileIndex",
";",
"private",
"char",
"[",
"]",
"sourceFileName",
";",
"public",
"SourceFileAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"this",
".",
"sourceFileIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"sourceFileIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"sourceFileName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"public",
"int",
"getSourceFileIndex",
"(",
")",
"{",
"return",
"this",
".",
"sourceFileIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getSourceFileName",
"(",
")",
"{",
"return",
"this",
".",
"sourceFileName",
";",
"}",
"}",
"</s>"
] |
2,847 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"public",
"abstract",
"class",
"ReferenceInfoAdapter",
"{",
"public",
"void",
"acceptAnnotationTypeReference",
"(",
"char",
"[",
"]",
"[",
"]",
"typeName",
",",
"int",
"sourceStart",
",",
"int",
"sourceEnd",
")",
"{",
"}",
"public",
"void",
"acceptAnnotationTypeReference",
"(",
"char",
"[",
"]",
"typeName",
",",
"int",
"sourcePosition",
")",
"{",
"}",
"public",
"void",
"acceptConstructorReference",
"(",
"char",
"[",
"]",
"typeName",
",",
"int",
"argCount",
",",
"int",
"sourcePosition",
")",
"{",
"}",
"public",
"void",
"acceptFieldReference",
"(",
"char",
"[",
"]",
"fieldName",
",",
"int",
"sourcePosition",
")",
"{",
"}",
"public",
"void",
"acceptMethodReference",
"(",
"char",
"[",
"]",
"methodName",
",",
"int",
"argCount",
",",
"int",
"sourcePosition",
")",
"{",
"}",
"public",
"void",
"acceptTypeReference",
"(",
"char",
"[",
"]",
"[",
"]",
"typeName",
",",
"int",
"sourceStart",
",",
"int",
"sourceEnd",
")",
"{",
"}",
"public",
"void",
"acceptTypeReference",
"(",
"char",
"[",
"]",
"typeName",
",",
"int",
"sourcePosition",
")",
"{",
"}",
"public",
"void",
"acceptUnknownReference",
"(",
"char",
"[",
"]",
"[",
"]",
"name",
",",
"int",
"sourceStart",
",",
"int",
"sourceEnd",
")",
"{",
"}",
"public",
"void",
"acceptUnknownReference",
"(",
"char",
"[",
"]",
"name",
",",
"int",
"sourcePosition",
")",
"{",
"}",
"}",
"</s>"
] |
2,848 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantValueAttribute",
";",
"public",
"class",
"ConstantValueAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IConstantValueAttribute",
"{",
"private",
"int",
"constantValueIndex",
";",
"private",
"IConstantPoolEntry",
"constantPoolEntry",
";",
"ConstantValueAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"this",
".",
"constantValueIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"constantValueIndex",
")",
";",
"}",
"public",
"IConstantPoolEntry",
"getConstantValue",
"(",
")",
"{",
"return",
"this",
".",
"constantPoolEntry",
";",
"}",
"public",
"int",
"getConstantValueIndex",
"(",
")",
"{",
"return",
"this",
".",
"constantValueIndex",
";",
"}",
"}",
"</s>"
] |
2,849 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IAnnotatable",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IOpenable",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IPackageFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ITypeRoot",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Signature",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"WorkingCopyOwner",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"SuffixConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"*",
";",
"public",
"class",
"JavaElementFinder",
"extends",
"BindingKeyParser",
"{",
"private",
"JavaProject",
"project",
";",
"private",
"WorkingCopyOwner",
"owner",
";",
"public",
"IJavaElement",
"element",
";",
"public",
"JavaModelException",
"exception",
";",
"private",
"ArrayList",
"types",
"=",
"new",
"ArrayList",
"(",
")",
";",
"public",
"JavaElementFinder",
"(",
"String",
"key",
",",
"JavaProject",
"project",
",",
"WorkingCopyOwner",
"owner",
")",
"{",
"super",
"(",
"key",
")",
";",
"this",
".",
"project",
"=",
"project",
";",
"this",
".",
"owner",
"=",
"owner",
";",
"}",
"private",
"JavaElementFinder",
"(",
"BindingKeyParser",
"parser",
",",
"JavaProject",
"project",
",",
"WorkingCopyOwner",
"owner",
")",
"{",
"super",
"(",
"parser",
")",
";",
"this",
".",
"project",
"=",
"project",
";",
"this",
".",
"owner",
"=",
"owner",
";",
"}",
"public",
"void",
"consumeAnnotation",
"(",
")",
"{",
"if",
"(",
"!",
"(",
"this",
".",
"element",
"instanceof",
"IAnnotatable",
")",
")",
"return",
";",
"int",
"size",
"=",
"this",
".",
"types",
".",
"size",
"(",
")",
";",
"if",
"(",
"size",
"==",
"0",
")",
"return",
";",
"IJavaElement",
"annotationType",
"=",
"(",
"(",
"JavaElementFinder",
")",
"this",
".",
"types",
".",
"get",
"(",
"size",
"-",
"1",
")",
")",
".",
"element",
";",
"this",
".",
"element",
"=",
"(",
"(",
"IAnnotatable",
")",
"this",
".",
"element",
")",
".",
"getAnnotation",
"(",
"annotationType",
".",
"getElementName",
"(",
")",
")",
";",
"}",
"public",
"void",
"consumeField",
"(",
"char",
"[",
"]",
"fieldName",
")",
"{",
"if",
"(",
"!",
"(",
"this",
".",
"element",
"instanceof",
"IType",
")",
")",
"return",
";",
"this",
".",
"element",
"=",
"(",
"(",
"IType",
")",
"this",
".",
"element",
")",
".",
"getField",
"(",
"new",
"String",
"(",
"fieldName",
")",
")",
";",
"}",
"public",
"void",
"consumeFullyQualifiedName",
"(",
"char",
"[",
"]",
"fullyQualifiedName",
")",
"{",
"try",
"{",
"this",
".",
"element",
"=",
"this",
".",
"project",
".",
"findType",
"(",
"new",
"String",
"(",
"CharOperation",
".",
"replaceOnCopy",
"(",
"fullyQualifiedName",
",",
"'/'",
",",
"'.'",
")",
")",
",",
"this",
".",
"owner",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"this",
".",
"exception",
"=",
"e",
";",
"}",
"}",
"public",
"void",
"consumeLocalType",
"(",
"char",
"[",
"]",
"uniqueKey",
")",
"{",
"if",
"(",
"this",
".",
"element",
"==",
"null",
")",
"return",
";",
"if",
"(",
"this",
".",
"element",
"instanceof",
"BinaryType",
")",
"{",
"int",
"lastSlash",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"'/'",
",",
"uniqueKey",
")",
";",
"int",
"end",
"=",
"CharOperation",
".",
"indexOf",
"(",
"';'",
",",
"uniqueKey",
",",
"lastSlash",
"+",
"1",
")",
";",
"char",
"[",
"]",
"localName",
"=",
"CharOperation",
".",
"subarray",
"(",
"uniqueKey",
",",
"lastSlash",
"+",
"1",
",",
"end",
")",
";",
"IPackageFragment",
"pkg",
"=",
"(",
"IPackageFragment",
")",
"this",
".",
"element",
".",
"getAncestor",
"(",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
")",
";",
"this",
".",
"element",
"=",
"pkg",
".",
"getClassFile",
"(",
"new",
"String",
"(",
"localName",
")",
"+",
"SuffixConstants",
".",
"SUFFIX_STRING_class",
")",
";",
"}",
"else",
"{",
"int",
"firstDollar",
"=",
"CharOperation",
".",
"indexOf",
"(",
"'$'",
",",
"uniqueKey",
")",
";",
"int",
"end",
"=",
"CharOperation",
".",
"indexOf",
"(",
"'$'",
",",
"uniqueKey",
",",
"firstDollar",
"+",
"1",
")",
";",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"end",
"=",
"CharOperation",
".",
"indexOf",
"(",
"';'",
",",
"uniqueKey",
",",
"firstDollar",
"+",
"1",
")",
";",
"char",
"[",
"]",
"sourceStart",
"=",
"CharOperation",
".",
"subarray",
"(",
"uniqueKey",
",",
"firstDollar",
"+",
"1",
",",
"end",
")",
";",
"int",
"position",
"=",
"Integer",
".",
"parseInt",
"(",
"new",
"String",
"(",
"sourceStart",
")",
")",
";",
"try",
"{",
"this",
".",
"element",
"=",
"(",
"(",
"ITypeRoot",
")",
"this",
".",
"element",
".",
"getOpenable",
"(",
")",
")",
".",
"getElementAt",
"(",
"position",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"this",
".",
"exception",
"=",
"e",
";",
"}",
"}",
"}",
"public",
"void",
"consumeMemberType",
"(",
"char",
"[",
"]",
"simpleTypeName",
")",
"{",
"if",
"(",
"!",
"(",
"this",
".",
"element",
"instanceof",
"IType",
")",
")",
"return",
";",
"this",
".",
"element",
"=",
"(",
"(",
"IType",
")",
"this",
".",
"element",
")",
".",
"getType",
"(",
"new",
"String",
"(",
"simpleTypeName",
")",
")",
";",
"}",
"public",
"void",
"consumeMethod",
"(",
"char",
"[",
"]",
"selector",
",",
"char",
"[",
"]",
"signature",
")",
"{",
"if",
"(",
"!",
"(",
"this",
".",
"element",
"instanceof",
"IType",
")",
")",
"return",
";",
"String",
"[",
"]",
"parameterTypes",
"=",
"Signature",
".",
"getParameterTypes",
"(",
"new",
"String",
"(",
"signature",
")",
")",
";",
"IType",
"type",
"=",
"(",
"IType",
")",
"this",
".",
"element",
";",
"IMethod",
"method",
"=",
"type",
".",
"getMethod",
"(",
"new",
"String",
"(",
"selector",
")",
",",
"parameterTypes",
")",
";",
"IMethod",
"[",
"]",
"methods",
"=",
"type",
".",
"findMethods",
"(",
"method",
")",
";",
"if",
"(",
"methods",
".",
"length",
">",
"0",
")",
"this",
".",
"element",
"=",
"methods",
"[",
"0",
"]",
";",
"}",
"public",
"void",
"consumePackage",
"(",
"char",
"[",
"]",
"pkgName",
")",
"{",
"pkgName",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"pkgName",
",",
"'/'",
",",
"'.'",
")",
";",
"try",
"{",
"this",
".",
"element",
"=",
"this",
".",
"project",
".",
"findPackageFragment",
"(",
"new",
"String",
"(",
"pkgName",
")",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"this",
".",
"exception",
"=",
"e",
";",
"}",
"}",
"public",
"void",
"consumeParser",
"(",
"BindingKeyParser",
"parser",
")",
"{",
"this",
".",
"types",
".",
"add",
"(",
"parser",
")",
";",
"}",
"public",
"void",
"consumeSecondaryType",
"(",
"char",
"[",
"]",
"simpleTypeName",
")",
"{",
"if",
"(",
"this",
".",
"element",
"==",
"null",
")",
"return",
";",
"IOpenable",
"openable",
"=",
"this",
".",
"element",
".",
"getOpenable",
"(",
")",
";",
"if",
"(",
"!",
"(",
"openable",
"instanceof",
"ICompilationUnit",
")",
")",
"return",
";",
"this",
".",
"element",
"=",
"(",
"(",
"ICompilationUnit",
")",
"openable",
")",
".",
"getType",
"(",
"new",
"String",
"(",
"simpleTypeName",
")",
")",
";",
"}",
"public",
"void",
"consumeTypeVariable",
"(",
"char",
"[",
"]",
"position",
",",
"char",
"[",
"]",
"typeVariableName",
")",
"{",
"if",
"(",
"this",
".",
"element",
"==",
"null",
")",
"return",
";",
"switch",
"(",
"this",
".",
"element",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"TYPE",
":",
"this",
".",
"element",
"=",
"(",
"(",
"IType",
")",
"this",
".",
"element",
")",
".",
"getTypeParameter",
"(",
"new",
"String",
"(",
"typeVariableName",
")",
")",
";",
"break",
";",
"case",
"IJavaElement",
".",
"METHOD",
":",
"this",
".",
"element",
"=",
"(",
"(",
"IMethod",
")",
"this",
".",
"element",
")",
".",
"getTypeParameter",
"(",
"new",
"String",
"(",
"typeVariableName",
")",
")",
";",
"break",
";",
"}",
"}",
"public",
"BindingKeyParser",
"newParser",
"(",
")",
"{",
"return",
"new",
"JavaElementFinder",
"(",
"this",
",",
"this",
".",
"project",
",",
"this",
".",
"owner",
")",
";",
"}",
"}",
"</s>"
] |
2,850 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IParameterAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IRuntimeInvisibleParameterAnnotationsAttribute",
";",
"public",
"class",
"RuntimeInvisibleParameterAnnotationsAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IRuntimeInvisibleParameterAnnotationsAttribute",
"{",
"private",
"static",
"final",
"IParameterAnnotation",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"IParameterAnnotation",
"[",
"0",
"]",
";",
"private",
"IParameterAnnotation",
"[",
"]",
"parameterAnnotations",
";",
"private",
"int",
"parametersNumber",
";",
"public",
"RuntimeInvisibleParameterAnnotationsAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u1At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"parametersNumber",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"7",
";",
"this",
".",
"parameterAnnotations",
"=",
"new",
"IParameterAnnotation",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ParameterAnnotation",
"parameterAnnotation",
"=",
"new",
"ParameterAnnotation",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"parameterAnnotations",
"[",
"i",
"]",
"=",
"parameterAnnotation",
";",
"readOffset",
"+=",
"parameterAnnotation",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"parameterAnnotations",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"IParameterAnnotation",
"[",
"]",
"getParameterAnnotations",
"(",
")",
"{",
"return",
"this",
".",
"parameterAnnotations",
";",
"}",
"public",
"int",
"getParametersNumber",
"(",
")",
"{",
"return",
"this",
".",
"parametersNumber",
";",
"}",
"}",
"</s>"
] |
2,851 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableTypeTableAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableTypeTableEntry",
";",
"public",
"class",
"LocalVariableTypeAttribute",
"extends",
"ClassFileAttribute",
"implements",
"ILocalVariableTypeTableAttribute",
"{",
"private",
"static",
"final",
"ILocalVariableTypeTableEntry",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"ILocalVariableTypeTableEntry",
"[",
"0",
"]",
";",
"private",
"int",
"localVariableTypeTableLength",
";",
"private",
"ILocalVariableTypeTableEntry",
"[",
"]",
"localVariableTypeTableEntries",
";",
"public",
"LocalVariableTypeAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"localVariableTypeTableLength",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"localVariableTypeTableEntries",
"=",
"new",
"ILocalVariableTypeTableEntry",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"localVariableTypeTableEntries",
"[",
"i",
"]",
"=",
"new",
"LocalVariableTypeTableEntry",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"readOffset",
"+=",
"10",
";",
"}",
"}",
"else",
"{",
"this",
".",
"localVariableTypeTableEntries",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"ILocalVariableTypeTableEntry",
"[",
"]",
"getLocalVariableTypeTable",
"(",
")",
"{",
"return",
"this",
".",
"localVariableTypeTableEntries",
";",
"}",
"public",
"int",
"getLocalVariableTypeTableLength",
"(",
")",
"{",
"return",
"this",
".",
"localVariableTypeTableLength",
";",
"}",
"}",
"</s>"
] |
2,852 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"public",
"class",
"KeyKind",
"extends",
"BindingKeyParser",
"{",
"public",
"static",
"final",
"int",
"F_TYPE",
"=",
"0x0001",
";",
"public",
"static",
"final",
"int",
"F_METHOD",
"=",
"0x0002",
";",
"public",
"static",
"final",
"int",
"F_FIELD",
"=",
"0x0004",
";",
"public",
"static",
"final",
"int",
"F_TYPE_PARAMETER",
"=",
"0x0008",
";",
"public",
"static",
"final",
"int",
"F_LOCAL_VAR",
"=",
"0x0010",
";",
"public",
"static",
"final",
"int",
"F_MEMBER",
"=",
"0x0020",
";",
"public",
"static",
"final",
"int",
"F_LOCAL",
"=",
"0x0040",
";",
"public",
"static",
"final",
"int",
"F_PARAMETERIZED_TYPE",
"=",
"0x0080",
";",
"public",
"static",
"final",
"int",
"F_RAW_TYPE",
"=",
"0x0100",
";",
"public",
"static",
"final",
"int",
"F_WILDCARD_TYPE",
"=",
"0x0200",
";",
"public",
"static",
"final",
"int",
"F_PARAMETERIZED_METHOD",
"=",
"0x0400",
";",
"public",
"static",
"final",
"int",
"F_CAPTURE",
"=",
"0x0800",
";",
"public",
"static",
"final",
"int",
"F_CONSTRUCTOR",
"=",
"0x1000",
";",
"public",
"int",
"flags",
"=",
"0",
";",
"private",
"KeyKind",
"innerKeyKind",
";",
"public",
"KeyKind",
"(",
"BindingKeyParser",
"parser",
")",
"{",
"super",
"(",
"parser",
")",
";",
"}",
"public",
"KeyKind",
"(",
"String",
"key",
")",
"{",
"super",
"(",
"key",
")",
";",
"}",
"public",
"void",
"consumeBaseType",
"(",
"char",
"[",
"]",
"baseTypeSig",
")",
"{",
"this",
".",
"flags",
"|=",
"F_TYPE",
";",
"}",
"public",
"void",
"consumeCapture",
"(",
"int",
"position",
")",
"{",
"this",
".",
"flags",
"|=",
"F_CAPTURE",
";",
"}",
"public",
"void",
"consumeField",
"(",
"char",
"[",
"]",
"fieldName",
")",
"{",
"this",
".",
"flags",
"|=",
"F_FIELD",
";",
"}",
"public",
"void",
"consumeLocalType",
"(",
"char",
"[",
"]",
"uniqueKey",
")",
"{",
"this",
".",
"flags",
"|=",
"F_LOCAL",
";",
"}",
"public",
"void",
"consumeLocalVar",
"(",
"char",
"[",
"]",
"varName",
",",
"int",
"occurrenceCount",
")",
"{",
"this",
".",
"flags",
"|=",
"F_LOCAL_VAR",
";",
"}",
"public",
"void",
"consumeMemberType",
"(",
"char",
"[",
"]",
"simpleTypeName",
")",
"{",
"this",
".",
"flags",
"|=",
"F_MEMBER",
";",
"}",
"public",
"void",
"consumeMethod",
"(",
"char",
"[",
"]",
"selector",
",",
"char",
"[",
"]",
"signature",
")",
"{",
"this",
".",
"flags",
"|=",
"F_METHOD",
";",
"if",
"(",
"selector",
".",
"length",
"==",
"0",
")",
"this",
".",
"flags",
"|=",
"F_CONSTRUCTOR",
";",
"}",
"public",
"void",
"consumeParameterizedGenericMethod",
"(",
")",
"{",
"this",
".",
"flags",
"|=",
"F_PARAMETERIZED_METHOD",
";",
"}",
"public",
"void",
"consumeParameterizedType",
"(",
"char",
"[",
"]",
"simpleTypeName",
",",
"boolean",
"isRaw",
")",
"{",
"this",
".",
"flags",
"|=",
"isRaw",
"?",
"F_RAW_TYPE",
":",
"F_PARAMETERIZED_TYPE",
";",
"}",
"public",
"void",
"consumeParser",
"(",
"BindingKeyParser",
"parser",
")",
"{",
"this",
".",
"innerKeyKind",
"=",
"(",
"KeyKind",
")",
"parser",
";",
"}",
"public",
"void",
"consumeRawType",
"(",
")",
"{",
"this",
".",
"flags",
"|=",
"F_RAW_TYPE",
";",
"}",
"public",
"void",
"consumeTopLevelType",
"(",
")",
"{",
"this",
".",
"flags",
"|=",
"F_TYPE",
";",
"}",
"public",
"void",
"consumeTypeParameter",
"(",
"char",
"[",
"]",
"typeParameterName",
")",
"{",
"this",
".",
"flags",
"|=",
"F_TYPE_PARAMETER",
";",
"}",
"public",
"void",
"consumeTypeWithCapture",
"(",
")",
"{",
"this",
".",
"flags",
"=",
"this",
".",
"innerKeyKind",
".",
"flags",
";",
"}",
"public",
"void",
"consumeWildCard",
"(",
"int",
"kind",
")",
"{",
"this",
".",
"flags",
"|=",
"F_WILDCARD_TYPE",
";",
"}",
"public",
"BindingKeyParser",
"newParser",
"(",
")",
"{",
"return",
"new",
"KeyKind",
"(",
"this",
")",
";",
"}",
"}",
"</s>"
] |
2,853 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"public",
"class",
"ConstantPoolEntry",
"implements",
"IConstantPoolEntry",
"{",
"private",
"int",
"kind",
";",
"private",
"int",
"classInfoNameIndex",
";",
"private",
"int",
"classIndex",
";",
"private",
"int",
"nameAndTypeIndex",
";",
"private",
"int",
"stringIndex",
";",
"private",
"char",
"[",
"]",
"stringValue",
";",
"private",
"int",
"integerValue",
";",
"private",
"float",
"floatValue",
";",
"private",
"double",
"doubleValue",
";",
"private",
"long",
"longValue",
";",
"private",
"int",
"nameAndTypeDescriptorIndex",
";",
"private",
"int",
"nameAndTypeNameIndex",
";",
"private",
"char",
"[",
"]",
"className",
";",
"private",
"char",
"[",
"]",
"fieldName",
";",
"private",
"char",
"[",
"]",
"methodName",
";",
"private",
"char",
"[",
"]",
"fieldDescriptor",
";",
"private",
"char",
"[",
"]",
"methodDescriptor",
";",
"private",
"char",
"[",
"]",
"utf8Value",
";",
"private",
"int",
"utf8Length",
";",
"private",
"char",
"[",
"]",
"classInfoName",
";",
"public",
"ConstantPoolEntry",
"(",
")",
"{",
"this",
".",
"classInfoNameIndex",
"=",
"-",
"1",
";",
"this",
".",
"classIndex",
"=",
"-",
"1",
";",
"this",
".",
"nameAndTypeIndex",
"=",
"-",
"1",
";",
"this",
".",
"stringIndex",
"=",
"-",
"1",
";",
"this",
".",
"stringValue",
"=",
"null",
";",
"this",
".",
"integerValue",
"=",
"-",
"1",
";",
"this",
".",
"floatValue",
"=",
"-",
"0.0f",
";",
"this",
".",
"doubleValue",
"=",
"-",
"0",
"-",
"0",
";",
"this",
".",
"longValue",
"=",
"-",
"1",
";",
"this",
".",
"nameAndTypeDescriptorIndex",
"=",
"-",
"1",
";",
"this",
".",
"nameAndTypeNameIndex",
"=",
"-",
"1",
";",
"this",
".",
"className",
"=",
"null",
";",
"this",
".",
"fieldName",
"=",
"null",
";",
"this",
".",
"methodName",
"=",
"null",
";",
"this",
".",
"fieldDescriptor",
"=",
"null",
";",
"this",
".",
"methodDescriptor",
"=",
"null",
";",
"this",
".",
"utf8Value",
"=",
"null",
";",
"this",
".",
"utf8Length",
"=",
"-",
"1",
";",
"this",
".",
"classInfoName",
"=",
"null",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"this",
".",
"kind",
";",
"}",
"public",
"void",
"setKind",
"(",
"int",
"kind",
")",
"{",
"this",
".",
"kind",
"=",
"kind",
";",
"}",
"public",
"int",
"getClassInfoNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"classInfoNameIndex",
";",
"}",
"public",
"int",
"getClassIndex",
"(",
")",
"{",
"return",
"this",
".",
"classIndex",
";",
"}",
"public",
"int",
"getNameAndTypeIndex",
"(",
")",
"{",
"return",
"this",
".",
"nameAndTypeIndex",
";",
"}",
"public",
"int",
"getStringIndex",
"(",
")",
"{",
"return",
"this",
".",
"stringIndex",
";",
"}",
"public",
"String",
"getStringValue",
"(",
")",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"stringValue",
")",
";",
"}",
"public",
"int",
"getIntegerValue",
"(",
")",
"{",
"return",
"this",
".",
"integerValue",
";",
"}",
"public",
"float",
"getFloatValue",
"(",
")",
"{",
"return",
"this",
".",
"floatValue",
";",
"}",
"public",
"double",
"getDoubleValue",
"(",
")",
"{",
"return",
"this",
".",
"doubleValue",
";",
"}",
"public",
"long",
"getLongValue",
"(",
")",
"{",
"return",
"this",
".",
"longValue",
";",
"}",
"public",
"int",
"getNameAndTypeInfoDescriptorIndex",
"(",
")",
"{",
"return",
"this",
".",
"nameAndTypeDescriptorIndex",
";",
"}",
"public",
"int",
"getNameAndTypeInfoNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"nameAndTypeNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getClassName",
"(",
")",
"{",
"return",
"this",
".",
"className",
";",
"}",
"public",
"char",
"[",
"]",
"getFieldName",
"(",
")",
"{",
"return",
"this",
".",
"fieldName",
";",
"}",
"public",
"char",
"[",
"]",
"getMethodName",
"(",
")",
"{",
"return",
"this",
".",
"methodName",
";",
"}",
"public",
"char",
"[",
"]",
"getFieldDescriptor",
"(",
")",
"{",
"return",
"this",
".",
"fieldDescriptor",
";",
"}",
"public",
"char",
"[",
"]",
"getMethodDescriptor",
"(",
")",
"{",
"return",
"this",
".",
"methodDescriptor",
";",
"}",
"public",
"char",
"[",
"]",
"getUtf8Value",
"(",
")",
"{",
"return",
"this",
".",
"utf8Value",
";",
"}",
"public",
"char",
"[",
"]",
"getClassInfoName",
"(",
")",
"{",
"return",
"this",
".",
"classInfoName",
";",
"}",
"public",
"void",
"setClassInfoNameIndex",
"(",
"int",
"classInfoNameIndex",
")",
"{",
"this",
".",
"classInfoNameIndex",
"=",
"classInfoNameIndex",
";",
"}",
"public",
"void",
"setClassIndex",
"(",
"int",
"classIndex",
")",
"{",
"this",
".",
"classIndex",
"=",
"classIndex",
";",
"}",
"public",
"void",
"setNameAndTypeIndex",
"(",
"int",
"nameAndTypeIndex",
")",
"{",
"this",
".",
"nameAndTypeIndex",
"=",
"nameAndTypeIndex",
";",
"}",
"public",
"void",
"setStringIndex",
"(",
"int",
"stringIndex",
")",
"{",
"this",
".",
"stringIndex",
"=",
"stringIndex",
";",
"}",
"public",
"void",
"setStringValue",
"(",
"char",
"[",
"]",
"stringValue",
")",
"{",
"this",
".",
"stringValue",
"=",
"stringValue",
";",
"}",
"public",
"void",
"setIntegerValue",
"(",
"int",
"integerValue",
")",
"{",
"this",
".",
"integerValue",
"=",
"integerValue",
";",
"}",
"public",
"void",
"setFloatValue",
"(",
"float",
"floatValue",
")",
"{",
"this",
".",
"floatValue",
"=",
"floatValue",
";",
"}",
"public",
"void",
"setDoubleValue",
"(",
"double",
"doubleValue",
")",
"{",
"this",
".",
"doubleValue",
"=",
"doubleValue",
";",
"}",
"public",
"void",
"setLongValue",
"(",
"long",
"longValue",
")",
"{",
"this",
".",
"longValue",
"=",
"longValue",
";",
"}",
"public",
"int",
"getNameAndTypeDescriptorIndex",
"(",
")",
"{",
"return",
"this",
".",
"nameAndTypeDescriptorIndex",
";",
"}",
"public",
"void",
"setNameAndTypeDescriptorIndex",
"(",
"int",
"nameAndTypeDescriptorIndex",
")",
"{",
"this",
".",
"nameAndTypeDescriptorIndex",
"=",
"nameAndTypeDescriptorIndex",
";",
"}",
"public",
"int",
"getNameAndTypeNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"nameAndTypeNameIndex",
";",
"}",
"public",
"void",
"setNameAndTypeNameIndex",
"(",
"int",
"nameAndTypeNameIndex",
")",
"{",
"this",
".",
"nameAndTypeNameIndex",
"=",
"nameAndTypeNameIndex",
";",
"}",
"public",
"void",
"setClassName",
"(",
"char",
"[",
"]",
"className",
")",
"{",
"this",
".",
"className",
"=",
"className",
";",
"}",
"public",
"void",
"setFieldName",
"(",
"char",
"[",
"]",
"fieldName",
")",
"{",
"this",
".",
"fieldName",
"=",
"fieldName",
";",
"}",
"public",
"void",
"setMethodName",
"(",
"char",
"[",
"]",
"methodName",
")",
"{",
"this",
".",
"methodName",
"=",
"methodName",
";",
"}",
"public",
"void",
"setFieldDescriptor",
"(",
"char",
"[",
"]",
"fieldDescriptor",
")",
"{",
"this",
".",
"fieldDescriptor",
"=",
"fieldDescriptor",
";",
"}",
"public",
"void",
"setMethodDescriptor",
"(",
"char",
"[",
"]",
"methodDescriptor",
")",
"{",
"this",
".",
"methodDescriptor",
"=",
"methodDescriptor",
";",
"}",
"public",
"void",
"setUtf8Value",
"(",
"char",
"[",
"]",
"utf8Value",
")",
"{",
"this",
".",
"utf8Value",
"=",
"utf8Value",
";",
"}",
"public",
"void",
"setClassInfoName",
"(",
"char",
"[",
"]",
"classInfoName",
")",
"{",
"this",
".",
"classInfoName",
"=",
"classInfoName",
";",
"}",
"public",
"int",
"getUtf8Length",
"(",
")",
"{",
"return",
"this",
".",
"utf8Length",
";",
"}",
"public",
"void",
"setUtf8Length",
"(",
"int",
"utf8Length",
")",
"{",
"this",
".",
"utf8Length",
"=",
"utf8Length",
";",
"}",
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"kind",
"=",
"0",
";",
"this",
".",
"classInfoNameIndex",
"=",
"0",
";",
"this",
".",
"classIndex",
"=",
"0",
";",
"this",
".",
"nameAndTypeIndex",
"=",
"0",
";",
"this",
".",
"stringIndex",
"=",
"0",
";",
"this",
".",
"stringValue",
"=",
"null",
";",
"this",
".",
"integerValue",
"=",
"0",
";",
"this",
".",
"floatValue",
"=",
"0.0f",
";",
"this",
".",
"doubleValue",
"=",
"0.0",
";",
"this",
".",
"longValue",
"=",
"0L",
";",
"this",
".",
"nameAndTypeDescriptorIndex",
"=",
"0",
";",
"this",
".",
"nameAndTypeNameIndex",
"=",
"0",
";",
"this",
".",
"className",
"=",
"null",
";",
"this",
".",
"fieldName",
"=",
"null",
";",
"this",
".",
"methodName",
"=",
"null",
";",
"this",
".",
"fieldDescriptor",
"=",
"null",
";",
"this",
".",
"methodDescriptor",
"=",
"null",
";",
"this",
".",
"utf8Value",
"=",
"null",
";",
"this",
".",
"utf8Length",
"=",
"0",
";",
"this",
".",
"classInfoName",
"=",
"null",
";",
"}",
"}",
"</s>"
] |
2,854 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"public",
"final",
"class",
"SimpleWordSet",
"{",
"public",
"char",
"[",
"]",
"[",
"]",
"words",
";",
"public",
"int",
"elementSize",
";",
"public",
"int",
"threshold",
";",
"public",
"SimpleWordSet",
"(",
"int",
"size",
")",
"{",
"this",
".",
"elementSize",
"=",
"0",
";",
"this",
".",
"threshold",
"=",
"size",
";",
"int",
"extraRoom",
"=",
"(",
"int",
")",
"(",
"size",
"*",
"1.5f",
")",
";",
"if",
"(",
"this",
".",
"threshold",
"==",
"extraRoom",
")",
"extraRoom",
"++",
";",
"this",
".",
"words",
"=",
"new",
"char",
"[",
"extraRoom",
"]",
"[",
"]",
";",
"}",
"public",
"char",
"[",
"]",
"add",
"(",
"char",
"[",
"]",
"word",
")",
"{",
"int",
"length",
"=",
"this",
".",
"words",
".",
"length",
";",
"int",
"index",
"=",
"CharOperation",
".",
"hashCode",
"(",
"word",
")",
"%",
"length",
";",
"char",
"[",
"]",
"current",
";",
"while",
"(",
"(",
"current",
"=",
"this",
".",
"words",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"current",
",",
"word",
")",
")",
"return",
"current",
";",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"index",
"=",
"0",
";",
"}",
"this",
".",
"words",
"[",
"index",
"]",
"=",
"word",
";",
"if",
"(",
"++",
"this",
".",
"elementSize",
">",
"this",
".",
"threshold",
")",
"rehash",
"(",
")",
";",
"return",
"word",
";",
"}",
"public",
"boolean",
"includes",
"(",
"char",
"[",
"]",
"word",
")",
"{",
"int",
"length",
"=",
"this",
".",
"words",
".",
"length",
";",
"int",
"index",
"=",
"CharOperation",
".",
"hashCode",
"(",
"word",
")",
"%",
"length",
";",
"char",
"[",
"]",
"current",
";",
"while",
"(",
"(",
"current",
"=",
"this",
".",
"words",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"current",
",",
"word",
")",
")",
"return",
"true",
";",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"index",
"=",
"0",
";",
"}",
"return",
"false",
";",
"}",
"private",
"void",
"rehash",
"(",
")",
"{",
"SimpleWordSet",
"newSet",
"=",
"new",
"SimpleWordSet",
"(",
"this",
".",
"elementSize",
"*",
"2",
")",
";",
"char",
"[",
"]",
"current",
";",
"for",
"(",
"int",
"i",
"=",
"this",
".",
"words",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"(",
"current",
"=",
"this",
".",
"words",
"[",
"i",
"]",
")",
"!=",
"null",
")",
"newSet",
".",
"add",
"(",
"current",
")",
";",
"this",
".",
"words",
"=",
"newSet",
".",
"words",
";",
"this",
".",
"elementSize",
"=",
"newSet",
".",
"elementSize",
";",
"this",
".",
"threshold",
"=",
"newSet",
".",
"threshold",
";",
"}",
"}",
"</s>"
] |
2,855 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotationComponentValue",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"public",
"class",
"AnnotationComponentValue",
"extends",
"ClassFileStruct",
"implements",
"IAnnotationComponentValue",
"{",
"private",
"static",
"final",
"IAnnotationComponentValue",
"[",
"]",
"NO_VALUES",
"=",
"new",
"AnnotationComponentValue",
"[",
"0",
"]",
";",
"private",
"IAnnotationComponentValue",
"[",
"]",
"annotationComponentValues",
";",
"private",
"IAnnotation",
"annotationValue",
";",
"private",
"IConstantPoolEntry",
"classInfo",
";",
"private",
"int",
"classFileInfoIndex",
";",
"private",
"IConstantPoolEntry",
"constantValue",
";",
"private",
"int",
"constantValueIndex",
";",
"private",
"int",
"enumConstantTypeNameIndex",
";",
"private",
"int",
"enumConstantNameIndex",
";",
"private",
"char",
"[",
"]",
"enumConstantTypeName",
";",
"private",
"char",
"[",
"]",
"enumConstantName",
";",
"private",
"int",
"readOffset",
";",
"private",
"int",
"tag",
";",
"private",
"int",
"valuesNumber",
";",
"public",
"AnnotationComponentValue",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"this",
".",
"classFileInfoIndex",
"=",
"-",
"1",
";",
"this",
".",
"constantValueIndex",
"=",
"-",
"1",
";",
"this",
".",
"enumConstantTypeNameIndex",
"=",
"-",
"1",
";",
"this",
".",
"enumConstantNameIndex",
"=",
"-",
"1",
";",
"final",
"int",
"t",
"=",
"u1At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"tag",
"=",
"t",
";",
"this",
".",
"readOffset",
"=",
"1",
";",
"switch",
"(",
"t",
")",
"{",
"case",
"'B'",
":",
"case",
"'C'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'S'",
":",
"case",
"'Z'",
":",
"case",
"'s'",
":",
"final",
"int",
"constantIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"this",
".",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"constantValueIndex",
"=",
"constantIndex",
";",
"if",
"(",
"constantIndex",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"constantIndex",
")",
";",
"switch",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
":",
"break",
";",
"default",
":",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"constantValue",
"=",
"constantPoolEntry",
";",
"}",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'e'",
":",
"int",
"index",
"=",
"u2At",
"(",
"classFileBytes",
",",
"this",
".",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"enumConstantTypeNameIndex",
"=",
"index",
";",
"if",
"(",
"index",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"enumConstantTypeName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"this",
".",
"readOffset",
"+=",
"2",
";",
"index",
"=",
"u2At",
"(",
"classFileBytes",
",",
"this",
".",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"enumConstantNameIndex",
"=",
"index",
";",
"if",
"(",
"index",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"enumConstantName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'c'",
":",
"final",
"int",
"classFileIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"this",
".",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"classFileInfoIndex",
"=",
"classFileIndex",
";",
"if",
"(",
"classFileIndex",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"classFileIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"classInfo",
"=",
"constantPoolEntry",
";",
"}",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'@'",
":",
"Annotation",
"annotation",
"=",
"new",
"Annotation",
"(",
"classFileBytes",
",",
"constantPool",
",",
"this",
".",
"readOffset",
"+",
"offset",
")",
";",
"this",
".",
"annotationValue",
"=",
"annotation",
";",
"this",
".",
"readOffset",
"+=",
"annotation",
".",
"sizeInBytes",
"(",
")",
";",
"break",
";",
"case",
"'['",
":",
"final",
"int",
"numberOfValues",
"=",
"u2At",
"(",
"classFileBytes",
",",
"this",
".",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"valuesNumber",
"=",
"numberOfValues",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"numberOfValues",
"!=",
"0",
")",
"{",
"this",
".",
"annotationComponentValues",
"=",
"new",
"IAnnotationComponentValue",
"[",
"numberOfValues",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfValues",
";",
"i",
"++",
")",
"{",
"AnnotationComponentValue",
"value",
"=",
"new",
"AnnotationComponentValue",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"annotationComponentValues",
"[",
"i",
"]",
"=",
"value",
";",
"this",
".",
"readOffset",
"+=",
"value",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"annotationComponentValues",
"=",
"NO_VALUES",
";",
"}",
"break",
";",
"}",
"}",
"public",
"IAnnotationComponentValue",
"[",
"]",
"getAnnotationComponentValues",
"(",
")",
"{",
"return",
"this",
".",
"annotationComponentValues",
";",
"}",
"public",
"IAnnotation",
"getAnnotationValue",
"(",
")",
"{",
"return",
"this",
".",
"annotationValue",
";",
"}",
"public",
"IConstantPoolEntry",
"getClassInfo",
"(",
")",
"{",
"return",
"this",
".",
"classInfo",
";",
"}",
"public",
"int",
"getClassInfoIndex",
"(",
")",
"{",
"return",
"this",
".",
"classFileInfoIndex",
";",
"}",
"public",
"IConstantPoolEntry",
"getConstantValue",
"(",
")",
"{",
"return",
"this",
".",
"constantValue",
";",
"}",
"public",
"int",
"getConstantValueIndex",
"(",
")",
"{",
"return",
"this",
".",
"constantValueIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getEnumConstantName",
"(",
")",
"{",
"return",
"this",
".",
"enumConstantName",
";",
"}",
"public",
"int",
"getEnumConstantNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"enumConstantNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getEnumConstantTypeName",
"(",
")",
"{",
"return",
"this",
".",
"enumConstantTypeName",
";",
"}",
"public",
"int",
"getEnumConstantTypeNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"enumConstantTypeNameIndex",
";",
"}",
"public",
"int",
"getTag",
"(",
")",
"{",
"return",
"this",
".",
"tag",
";",
"}",
"public",
"int",
"getValuesNumber",
"(",
")",
"{",
"return",
"this",
".",
"valuesNumber",
";",
"}",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"readOffset",
";",
"}",
"}",
"</s>"
] |
2,856 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IExceptionTableEntry",
";",
"public",
"class",
"ExceptionTableEntry",
"extends",
"ClassFileStruct",
"implements",
"IExceptionTableEntry",
"{",
"private",
"int",
"startPC",
";",
"private",
"int",
"endPC",
";",
"private",
"int",
"handlerPC",
";",
"private",
"int",
"catchTypeIndex",
";",
"private",
"char",
"[",
"]",
"catchType",
";",
"ExceptionTableEntry",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"this",
".",
"startPC",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"endPC",
"=",
"u2At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"this",
".",
"handlerPC",
"=",
"u2At",
"(",
"classFileBytes",
",",
"4",
",",
"offset",
")",
";",
"this",
".",
"catchTypeIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"if",
"(",
"this",
".",
"catchTypeIndex",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"catchTypeIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"catchType",
"=",
"constantPoolEntry",
".",
"getClassInfoName",
"(",
")",
";",
"}",
"}",
"public",
"int",
"getStartPC",
"(",
")",
"{",
"return",
"this",
".",
"startPC",
";",
"}",
"public",
"int",
"getEndPC",
"(",
")",
"{",
"return",
"this",
".",
"endPC",
";",
"}",
"public",
"int",
"getHandlerPC",
"(",
")",
"{",
"return",
"this",
".",
"handlerPC",
";",
"}",
"public",
"int",
"getCatchTypeIndex",
"(",
")",
"{",
"return",
"this",
".",
"catchTypeIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getCatchType",
"(",
")",
"{",
"return",
"this",
".",
"catchType",
";",
"}",
"}",
"</s>"
] |
2,857 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableTableEntry",
";",
"public",
"class",
"LocalVariableTableEntry",
"extends",
"ClassFileStruct",
"implements",
"ILocalVariableTableEntry",
"{",
"private",
"int",
"startPC",
";",
"private",
"int",
"length",
";",
"private",
"int",
"nameIndex",
";",
"private",
"int",
"descriptorIndex",
";",
"private",
"char",
"[",
"]",
"name",
";",
"private",
"char",
"[",
"]",
"descriptor",
";",
"private",
"int",
"index",
";",
"public",
"LocalVariableTableEntry",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"this",
".",
"startPC",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"this",
".",
"nameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"4",
",",
"offset",
")",
";",
"this",
".",
"descriptorIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"index",
"=",
"u2At",
"(",
"classFileBytes",
",",
"8",
",",
"offset",
")",
";",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"nameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"name",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"descriptorIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"descriptor",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"public",
"int",
"getStartPC",
"(",
")",
"{",
"return",
"this",
".",
"startPC",
";",
"}",
"public",
"int",
"getLength",
"(",
")",
"{",
"return",
"this",
".",
"length",
";",
"}",
"public",
"int",
"getNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"nameIndex",
";",
"}",
"public",
"int",
"getDescriptorIndex",
"(",
")",
"{",
"return",
"this",
".",
"descriptorIndex",
";",
"}",
"public",
"int",
"getIndex",
"(",
")",
"{",
"return",
"this",
".",
"index",
";",
"}",
"public",
"char",
"[",
"]",
"getName",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"char",
"[",
"]",
"getDescriptor",
"(",
")",
"{",
"return",
"this",
".",
"descriptor",
";",
"}",
"}",
"</s>"
] |
2,858 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotationComponent",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotationComponentValue",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"public",
"class",
"AnnotationComponent",
"extends",
"ClassFileStruct",
"implements",
"IAnnotationComponent",
"{",
"private",
"int",
"componentNameIndex",
";",
"private",
"char",
"[",
"]",
"componentName",
";",
"private",
"IAnnotationComponentValue",
"componentValue",
";",
"private",
"int",
"readOffset",
";",
"public",
"AnnotationComponent",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"final",
"int",
"nameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"componentNameIndex",
"=",
"nameIndex",
";",
"if",
"(",
"nameIndex",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"nameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"componentName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"this",
".",
"readOffset",
"=",
"2",
";",
"AnnotationComponentValue",
"value",
"=",
"new",
"AnnotationComponentValue",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"componentValue",
"=",
"value",
";",
"this",
".",
"readOffset",
"+=",
"value",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"public",
"int",
"getComponentNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"componentNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getComponentName",
"(",
")",
"{",
"return",
"this",
".",
"componentName",
";",
"}",
"public",
"IAnnotationComponentValue",
"getComponentValue",
"(",
")",
"{",
"return",
"this",
".",
"componentValue",
";",
"}",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"readOffset",
";",
"}",
"}",
"</s>"
] |
2,859 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IStackMapFrame",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IStackMapAttribute",
";",
"public",
"class",
"StackMapAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IStackMapAttribute",
"{",
"private",
"static",
"final",
"IStackMapFrame",
"[",
"]",
"NO_FRAMES",
"=",
"new",
"IStackMapFrame",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"byte",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"byte",
"[",
"0",
"]",
";",
"private",
"int",
"numberOfEntries",
";",
"private",
"IStackMapFrame",
"[",
"]",
"frames",
";",
"private",
"byte",
"[",
"]",
"bytes",
";",
"public",
"StackMapAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"numberOfEntries",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"frames",
"=",
"new",
"IStackMapFrame",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"DefaultStackMapFrame",
"frame",
"=",
"new",
"DefaultStackMapFrame",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"frames",
"[",
"i",
"]",
"=",
"frame",
";",
"readOffset",
"+=",
"frame",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"frames",
"=",
"NO_FRAMES",
";",
"}",
"final",
"int",
"byteLength",
"=",
"(",
"int",
")",
"u4At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"System",
".",
"arraycopy",
"(",
"classFileBytes",
",",
"offset",
"+",
"6",
",",
"this",
".",
"bytes",
"=",
"new",
"byte",
"[",
"byteLength",
"]",
",",
"0",
",",
"byteLength",
")",
";",
"}",
"else",
"{",
"this",
".",
"bytes",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"int",
"getNumberOfEntries",
"(",
")",
"{",
"return",
"this",
".",
"numberOfEntries",
";",
"}",
"public",
"IStackMapFrame",
"[",
"]",
"getStackMapFrame",
"(",
")",
"{",
"return",
"this",
".",
"frames",
";",
"}",
"public",
"byte",
"[",
"]",
"getBytes",
"(",
")",
"{",
"return",
"this",
".",
"bytes",
";",
"}",
"}",
"</s>"
] |
2,860 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IBootstrapMethodsEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"public",
"class",
"BootstrapMethodsEntry",
"extends",
"ClassFileStruct",
"implements",
"IBootstrapMethodsEntry",
"{",
"private",
"int",
"bootstrapMethodReference",
";",
"private",
"int",
"[",
"]",
"bootstrapArguments",
";",
"public",
"BootstrapMethodsEntry",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"this",
".",
"bootstrapMethodReference",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"int",
"[",
"]",
"arguments",
"=",
"new",
"int",
"[",
"length",
"]",
";",
"int",
"position",
"=",
"4",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"arguments",
"[",
"i",
"]",
"=",
"u2At",
"(",
"classFileBytes",
",",
"position",
",",
"offset",
")",
";",
"position",
"+=",
"2",
";",
"}",
"this",
".",
"bootstrapArguments",
"=",
"arguments",
";",
"}",
"public",
"int",
"[",
"]",
"getBootstrapArguments",
"(",
")",
"{",
"return",
"this",
".",
"bootstrapArguments",
";",
"}",
"public",
"int",
"getBootstrapMethodReference",
"(",
")",
"{",
"return",
"this",
".",
"bootstrapMethodReference",
";",
"}",
"}",
"</s>"
] |
2,861 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"java",
".",
"text",
".",
"MessageFormat",
";",
"import",
"org",
".",
"eclipse",
".",
"osgi",
".",
"util",
".",
"NLS",
";",
"public",
"final",
"class",
"Messages",
"extends",
"NLS",
"{",
"private",
"static",
"final",
"String",
"BUNDLE_NAME",
"=",
"\"\"",
";",
"private",
"Messages",
"(",
")",
"{",
"}",
"public",
"static",
"String",
"hierarchy_nullProject",
";",
"public",
"static",
"String",
"hierarchy_nullRegion",
";",
"public",
"static",
"String",
"hierarchy_nullFocusType",
";",
"public",
"static",
"String",
"hierarchy_creating",
";",
"public",
"static",
"String",
"hierarchy_creatingOnType",
";",
"public",
"static",
"String",
"element_doesNotExist",
";",
"public",
"static",
"String",
"element_notOnClasspath",
";",
"public",
"static",
"String",
"element_invalidClassFileName",
";",
"public",
"static",
"String",
"element_reconciling",
";",
"public",
"static",
"String",
"element_attachingSource",
";",
"public",
"static",
"String",
"element_invalidResourceForProject",
";",
"public",
"static",
"String",
"element_nullName",
";",
"public",
"static",
"String",
"element_nullType",
";",
"public",
"static",
"String",
"element_illegalParent",
";",
"public",
"static",
"String",
"javamodel_initialization",
";",
"public",
"static",
"String",
"javamodel_initializing_delta_state",
";",
"public",
"static",
"String",
"javamodel_building_after_upgrade",
";",
"public",
"static",
"String",
"javamodel_configuring",
";",
"public",
"static",
"String",
"javamodel_configuring_classpath_containers",
";",
"public",
"static",
"String",
"javamodel_configuring_searchengine",
";",
"public",
"static",
"String",
"javamodel_getting_build_state_number",
";",
"public",
"static",
"String",
"javamodel_refreshing_external_jars",
";",
"public",
"static",
"String",
"javamodel_resetting_source_attachment_properties",
";",
"public",
"static",
"String",
"operation_needElements",
";",
"public",
"static",
"String",
"operation_needName",
";",
"public",
"static",
"String",
"operation_needPath",
";",
"public",
"static",
"String",
"operation_needAbsolutePath",
";",
"public",
"static",
"String",
"operation_needString",
";",
"public",
"static",
"String",
"operation_notSupported",
";",
"public",
"static",
"String",
"operation_cancelled",
";",
"public",
"static",
"String",
"operation_nullContainer",
";",
"public",
"static",
"String",
"operation_nullName",
";",
"public",
"static",
"String",
"operation_copyElementProgress",
";",
"public",
"static",
"String",
"operation_moveElementProgress",
";",
"public",
"static",
"String",
"operation_renameElementProgress",
";",
"public",
"static",
"String",
"operation_copyResourceProgress",
";",
"public",
"static",
"String",
"operation_moveResourceProgress",
";",
"public",
"static",
"String",
"operation_renameResourceProgress",
";",
"public",
"static",
"String",
"operation_createUnitProgress",
";",
"public",
"static",
"String",
"operation_createFieldProgress",
";",
"public",
"static",
"String",
"operation_createImportsProgress",
";",
"public",
"static",
"String",
"operation_createInitializerProgress",
";",
"public",
"static",
"String",
"operation_createMethodProgress",
";",
"public",
"static",
"String",
"operation_createPackageProgress",
";",
"public",
"static",
"String",
"operation_createPackageFragmentProgress",
";",
"public",
"static",
"String",
"operation_createTypeProgress",
";",
"public",
"static",
"String",
"operation_deleteElementProgress",
";",
"public",
"static",
"String",
"operation_deleteResourceProgress",
";",
"public",
"static",
"String",
"operation_cannotRenameDefaultPackage",
";",
"public",
"static",
"String",
"operation_pathOutsideProject",
";",
"public",
"static",
"String",
"operation_sortelements",
";",
"public",
"static",
"String",
"workingCopy_commit",
";",
"public",
"static",
"String",
"buffer_closed",
";",
"public",
"static",
"String",
"build_preparingBuild",
";",
"public",
"static",
"String",
"build_readStateProgress",
";",
"public",
"static",
"String",
"build_saveStateProgress",
";",
"public",
"static",
"String",
"build_saveStateComplete",
";",
"public",
"static",
"String",
"build_readingDelta",
";",
"public",
"static",
"String",
"build_analyzingDeltas",
";",
"public",
"static",
"String",
"build_analyzingSources",
";",
"public",
"static",
"String",
"build_cleaningOutput",
";",
"public",
"static",
"String",
"build_copyingResources",
";",
"public",
"static",
"String",
"build_compiling",
";",
"public",
"static",
"String",
"build_foundHeader",
";",
"public",
"static",
"String",
"build_fixedHeader",
";",
"public",
"static",
"String",
"build_oneError",
";",
"public",
"static",
"String",
"build_oneWarning",
";",
"public",
"static",
"String",
"build_multipleErrors",
";",
"public",
"static",
"String",
"build_multipleWarnings",
";",
"public",
"static",
"String",
"build_done",
";",
"public",
"static",
"String",
"build_wrongFileFormat",
";",
"public",
"static",
"String",
"build_cannotSaveState",
";",
"public",
"static",
"String",
"build_cannotSaveStates",
";",
"public",
"static",
"String",
"build_initializationError",
";",
"public",
"static",
"String",
"build_serializationError",
";",
"public",
"static",
"String",
"build_classFileCollision",
";",
"public",
"static",
"String",
"build_duplicateClassFile",
";",
"public",
"static",
"String",
"build_duplicateResource",
";",
"public",
"static",
"String",
"build_inconsistentClassFile",
";",
"public",
"static",
"String",
"build_inconsistentProject",
";",
"public",
"static",
"String",
"build_incompleteClassPath",
";",
"public",
"static",
"String",
"build_missingSourceFile",
";",
"public",
"static",
"String",
"build_prereqProjectHasClasspathProblems",
";",
"public",
"static",
"String",
"build_prereqProjectMustBeRebuilt",
";",
"public",
"static",
"String",
"build_abortDueToClasspathProblems",
";",
"public",
"static",
"String",
"status_cannot_retrieve_attached_javadoc",
";",
"public",
"static",
"String",
"status_timeout_javadoc",
";",
"public",
"static",
"String",
"status_cannotUseDeviceOnPath",
";",
"public",
"static",
"String",
"status_coreException",
";",
"public",
"static",
"String",
"status_defaultPackageReadOnly",
";",
"public",
"static",
"String",
"status_evaluationError",
";",
"public",
"static",
"String",
"status_JDOMError",
";",
"public",
"static",
"String",
"status_IOException",
";",
"public",
"static",
"String",
"status_indexOutOfBounds",
";",
"public",
"static",
"String",
"status_invalidContents",
";",
"public",
"static",
"String",
"status_invalidDestination",
";",
"public",
"static",
"String",
"status_invalidName",
";",
"public",
"static",
"String",
"status_invalidPackage",
";",
"public",
"static",
"String",
"status_invalidPath",
";",
"public",
"static",
"String",
"status_invalidProject",
";",
"public",
"static",
"String",
"status_invalidResource",
";",
"public",
"static",
"String",
"status_invalidResourceType",
";",
"public",
"static",
"String",
"status_invalidSibling",
";",
"public",
"static",
"String",
"status_nameCollision",
";",
"public",
"static",
"String",
"status_noLocalContents",
";",
"public",
"static",
"String",
"status_OK",
";",
"public",
"static",
"String",
"status_readOnly",
";",
"public",
"static",
"String",
"status_targetException",
";",
"public",
"static",
"String",
"status_unknown_javadoc_format",
";",
"public",
"static",
"String",
"status_updateConflict",
";",
"public",
"static",
"String",
"classpath_buildPath",
";",
"public",
"static",
"String",
"classpath_cannotNestEntryInEntry",
";",
"public",
"static",
"String",
"classpath_cannotNestEntryInEntryNoExclusion",
";",
"public",
"static",
"String",
"classpath_cannotNestEntryInLibrary",
";",
"public",
"static",
"String",
"classpath_cannotNestEntryInOutput",
";",
"public",
"static",
"String",
"classpath_cannotNestOutputInEntry",
";",
"public",
"static",
"String",
"classpath_cannotNestOutputInOutput",
";",
"public",
"static",
"String",
"classpath_cannotReadClasspathFile",
";",
"public",
"static",
"String",
"classpath_cannotReferToItself",
";",
"public",
"static",
"String",
"classpath_cannotUseDistinctSourceFolderAsOutput",
";",
"public",
"static",
"String",
"classpath_cannotUseLibraryAsOutput",
";",
"public",
"static",
"String",
"classpath_closedProject",
";",
"public",
"static",
"String",
"classpath_couldNotWriteClasspathFile",
";",
"public",
"static",
"String",
"classpath_cycle",
";",
"public",
"static",
"String",
"classpath_duplicateEntryPath",
";",
"public",
"static",
"String",
"classpath_illegalContainerPath",
";",
"public",
"static",
"String",
"classpath_illegalEntryInClasspathFile",
";",
"public",
"static",
"String",
"classpath_illegalLibraryPath",
";",
"public",
"static",
"String",
"classpath_illegalLibraryPathInContainer",
";",
"public",
"static",
"String",
"classpath_illegalLibraryArchive",
";",
"public",
"static",
"String",
"classpath_archiveReadError",
";",
"public",
"static",
"String",
"classpath_illegalExternalFolder",
";",
"public",
"static",
"String",
"classpath_illegalExternalFolderInContainer",
";",
"public",
"static",
"String",
"classpath_illegalProjectPath",
";",
"public",
"static",
"String",
"classpath_illegalSourceFolderPath",
";",
"public",
"static",
"String",
"classpath_illegalVariablePath",
";",
"public",
"static",
"String",
"classpath_invalidClasspathInClasspathFile",
";",
"public",
"static",
"String",
"classpath_invalidContainer",
";",
"public",
"static",
"String",
"classpath_mustEndWithSlash",
";",
"public",
"static",
"String",
"classpath_unboundContainerPath",
";",
"public",
"static",
"String",
"classpath_unboundLibrary",
";",
"public",
"static",
"String",
"classpath_userLibraryInfo",
";",
"public",
"static",
"String",
"classpath_containerInfo",
";",
"public",
"static",
"String",
"classpath_unboundLibraryInContainer",
";",
"public",
"static",
"String",
"classpath_unboundProject",
";",
"public",
"static",
"String",
"classpath_settingOutputLocationProgress",
";",
"public",
"static",
"String",
"classpath_settingProgress",
";",
"public",
"static",
"String",
"classpath_unboundSourceAttachment",
";",
"public",
"static",
"String",
"classpath_unboundSourceAttachmentInContainedLibrary",
";",
"public",
"static",
"String",
"classpath_unboundSourceFolder",
";",
"public",
"static",
"String",
"classpath_unboundVariablePath",
";",
"public",
"static",
"String",
"classpath_unknownKind",
";",
"public",
"static",
"String",
"classpath_xmlFormatError",
";",
"public",
"static",
"String",
"classpath_disabledInclusionExclusionPatterns",
";",
"public",
"static",
"String",
"classpath_disabledMultipleOutputLocations",
";",
"public",
"static",
"String",
"classpath_incompatibleLibraryJDKLevel",
";",
"public",
"static",
"String",
"classpath_incompatibleLibraryJDKLevelInContainer",
";",
"public",
"static",
"String",
"classpath_duplicateEntryExtraAttribute",
";",
"public",
"static",
"String",
"classpath_deprecated_variable",
";",
"public",
"static",
"String",
"file_notFound",
";",
"public",
"static",
"String",
"file_badFormat",
";",
"public",
"static",
"String",
"path_nullPath",
";",
"public",
"static",
"String",
"path_mustBeAbsolute",
";",
"public",
"static",
"String",
"cache_invalidLoadFactor",
";",
"public",
"static",
"String",
"savedState_jobName",
";",
"public",
"static",
"String",
"refreshing_external_folders",
";",
"public",
"static",
"String",
"updating_external_archives_jobName",
";",
"public",
"static",
"String",
"convention_unit_nullName",
";",
"public",
"static",
"String",
"convention_unit_notJavaName",
";",
"public",
"static",
"String",
"convention_classFile_nullName",
";",
"public",
"static",
"String",
"convention_classFile_notClassFileName",
";",
"public",
"static",
"String",
"convention_illegalIdentifier",
";",
"public",
"static",
"String",
"convention_import_nullImport",
";",
"public",
"static",
"String",
"convention_import_unqualifiedImport",
";",
"public",
"static",
"String",
"convention_type_nullName",
";",
"public",
"static",
"String",
"convention_type_nameWithBlanks",
";",
"public",
"static",
"String",
"convention_type_dollarName",
";",
"public",
"static",
"String",
"convention_type_lowercaseName",
";",
"public",
"static",
"String",
"convention_type_invalidName",
";",
"public",
"static",
"String",
"convention_package_nullName",
";",
"public",
"static",
"String",
"convention_package_emptyName",
";",
"public",
"static",
"String",
"convention_package_dotName",
";",
"public",
"static",
"String",
"convention_package_nameWithBlanks",
";",
"public",
"static",
"String",
"convention_package_consecutiveDotsName",
";",
"public",
"static",
"String",
"convention_package_uppercaseName",
";",
"public",
"static",
"String",
"dom_cannotDetail",
";",
"public",
"static",
"String",
"dom_nullTypeParameter",
";",
"public",
"static",
"String",
"dom_nullNameParameter",
";",
"public",
"static",
"String",
"dom_nullReturnType",
";",
"public",
"static",
"String",
"dom_nullExceptionType",
";",
"public",
"static",
"String",
"dom_mismatchArgNamesAndTypes",
";",
"public",
"static",
"String",
"dom_addNullChild",
";",
"public",
"static",
"String",
"dom_addIncompatibleChild",
";",
"public",
"static",
"String",
"dom_addChildWithParent",
";",
"public",
"static",
"String",
"dom_unableAddChild",
";",
"public",
"static",
"String",
"dom_addAncestorAsChild",
";",
"public",
"static",
"String",
"dom_addNullSibling",
";",
"public",
"static",
"String",
"dom_addSiblingBeforeRoot",
";",
"public",
"static",
"String",
"dom_addIncompatibleSibling",
";",
"public",
"static",
"String",
"dom_addSiblingWithParent",
";",
"public",
"static",
"String",
"dom_addAncestorAsSibling",
";",
"public",
"static",
"String",
"dom_addNullInterface",
";",
"public",
"static",
"String",
"dom_nullInterfaces",
";",
"public",
"static",
"String",
"importRewrite_processDescription",
";",
"public",
"static",
"String",
"correction_nullRequestor",
";",
"public",
"static",
"String",
"correction_nullUnit",
";",
"public",
"static",
"String",
"engine_completing",
";",
"public",
"static",
"String",
"engine_searching",
";",
"public",
"static",
"String",
"engine_searching_indexing",
";",
"public",
"static",
"String",
"engine_searching_matching",
";",
"public",
"static",
"String",
"exception_wrongFormat",
";",
"public",
"static",
"String",
"process_name",
";",
"public",
"static",
"String",
"jobmanager_filesToIndex",
";",
"public",
"static",
"String",
"jobmanager_indexing",
";",
"public",
"static",
"String",
"disassembler_description",
";",
"public",
"static",
"String",
"disassembler_opentypedeclaration",
";",
"public",
"static",
"String",
"disassembler_closetypedeclaration",
";",
"public",
"static",
"String",
"disassembler_parametername",
";",
"public",
"static",
"String",
"disassembler_localvariablename",
";",
"public",
"static",
"String",
"disassembler_endofmethodheader",
";",
"public",
"static",
"String",
"disassembler_begincommentline",
";",
"public",
"static",
"String",
"disassembler_fieldhasconstant",
";",
"public",
"static",
"String",
"disassembler_endoffieldheader",
";",
"public",
"static",
"String",
"disassembler_sourceattributeheader",
";",
"public",
"static",
"String",
"disassembler_enclosingmethodheader",
";",
"public",
"static",
"String",
"disassembler_exceptiontableheader",
";",
"public",
"static",
"String",
"disassembler_linenumberattributeheader",
";",
"public",
"static",
"String",
"disassembler_localvariabletableattributeheader",
";",
"public",
"static",
"String",
"disassembler_localvariabletypetableattributeheader",
";",
"public",
"static",
"String",
"disassembler_arraydimensions",
";",
"public",
"static",
"String",
"disassembler_innerattributesheader",
";",
"public",
"static",
"String",
"disassembler_inner_class_info_name",
";",
"public",
"static",
"String",
"disassembler_outer_class_info_name",
";",
"public",
"static",
"String",
"disassembler_inner_name",
";",
"public",
"static",
"String",
"disassembler_inner_accessflags",
";",
"public",
"static",
"String",
"disassembler_genericattributeheader",
";",
"public",
"static",
"String",
"disassembler_signatureattributeheader",
";",
"public",
"static",
"String",
"disassembler_bootstrapmethodattributesheader",
";",
"public",
"static",
"String",
"disassembler_bootstrapmethodentry",
";",
"public",
"static",
"String",
"disassembler_bootstrapmethodentry_argument",
";",
"public",
"static",
"String",
"disassembler_indentation",
";",
"public",
"static",
"String",
"disassembler_constantpoolindex",
";",
"public",
"static",
"String",
"disassembler_space",
";",
"public",
"static",
"String",
"disassembler_comma",
";",
"public",
"static",
"String",
"disassembler_openinnerclassentry",
";",
"public",
"static",
"String",
"disassembler_closeinnerclassentry",
";",
"public",
"static",
"String",
"disassembler_deprecated",
";",
"public",
"static",
"String",
"disassembler_constantpoolheader",
";",
"public",
"static",
"String",
"disassembler_constantpool_class",
";",
"public",
"static",
"String",
"disassembler_constantpool_double",
";",
"public",
"static",
"String",
"disassembler_constantpool_float",
";",
"public",
"static",
"String",
"disassembler_constantpool_integer",
";",
"public",
"static",
"String",
"disassembler_constantpool_long",
";",
"public",
"static",
"String",
"disassembler_constantpool_string",
";",
"public",
"static",
"String",
"disassembler_constantpool_fieldref",
";",
"public",
"static",
"String",
"disassembler_constantpool_interfacemethodref",
";",
"public",
"static",
"String",
"disassembler_constantpool_methodref",
";",
"public",
"static",
"String",
"disassembler_constantpool_name_and_type",
";",
"public",
"static",
"String",
"disassembler_constantpool_utf8",
";",
"public",
"static",
"String",
"disassembler_constantpool_methodhandle",
";",
"public",
"static",
"String",
"disassembler_constantpool_methodtype",
";",
"public",
"static",
"String",
"disassembler_constantpool_invokedynamic",
";",
"public",
"static",
"String",
"disassembler_annotationdefaultheader",
";",
"public",
"static",
"String",
"disassembler_annotationdefaultvalue",
";",
"public",
"static",
"String",
"disassembler_annotationenumvalue",
";",
"public",
"static",
"String",
"disassembler_annotationclassvalue",
";",
"public",
"static",
"String",
"disassembler_annotationannotationvalue",
";",
"public",
"static",
"String",
"disassembler_annotationarrayvaluestart",
";",
"public",
"static",
"String",
"disassembler_annotationarrayvalueend",
";",
"public",
"static",
"String",
"disassembler_annotationentrystart",
";",
"public",
"static",
"String",
"disassembler_annotationentryend",
";",
"public",
"static",
"String",
"disassembler_annotationcomponent",
";",
"public",
"static",
"String",
"disassembler_runtimevisibleannotationsattributeheader",
";",
"public",
"static",
"String",
"disassembler_runtimeinvisibleannotationsattributeheader",
";",
"public",
"static",
"String",
"disassembler_runtimevisibleparameterannotationsattributeheader",
";",
"public",
"static",
"String",
"disassembler_runtimeinvisibleparameterannotationsattributeheader",
";",
"public",
"static",
"String",
"disassembler_parameterannotationentrystart",
";",
"public",
"static",
"String",
"disassembler_stackmaptableattributeheader",
";",
"public",
"static",
"String",
"disassembler_stackmapattributeheader",
";",
"public",
"static",
"String",
"classfileformat_versiondetails",
";",
"public",
"static",
"String",
"classfileformat_methoddescriptor",
";",
"public",
"static",
"String",
"classfileformat_fieldddescriptor",
";",
"public",
"static",
"String",
"classfileformat_stacksAndLocals",
";",
"public",
"static",
"String",
"classfileformat_superflagisnotset",
";",
"public",
"static",
"String",
"classfileformat_superflagisset",
";",
"public",
"static",
"String",
"classfileformat_clinitname",
";",
"public",
"static",
"String",
"classformat_classformatexception",
";",
"public",
"static",
"String",
"classformat_anewarray",
";",
"public",
"static",
"String",
"classformat_checkcast",
";",
"public",
"static",
"String",
"classformat_instanceof",
";",
"public",
"static",
"String",
"classformat_ldc_w_class",
";",
"public",
"static",
"String",
"classformat_ldc_w_float",
";",
"public",
"static",
"String",
"classformat_ldc_w_integer",
";",
"public",
"static",
"String",
"classformat_ldc_w_string",
";",
"public",
"static",
"String",
"classformat_ldc2_w_long",
";",
"public",
"static",
"String",
"classformat_ldc2_w_double",
";",
"public",
"static",
"String",
"classformat_multianewarray",
";",
"public",
"static",
"String",
"classformat_new",
";",
"public",
"static",
"String",
"classformat_iinc",
";",
"public",
"static",
"String",
"classformat_invokespecial",
";",
"public",
"static",
"String",
"classformat_invokeinterface",
";",
"public",
"static",
"String",
"classformat_invokestatic",
";",
"public",
"static",
"String",
"classformat_invokevirtual",
";",
"public",
"static",
"String",
"classformat_invokedynamic",
";",
"public",
"static",
"String",
"classformat_getfield",
";",
"public",
"static",
"String",
"classformat_getstatic",
";",
"public",
"static",
"String",
"classformat_putstatic",
";",
"public",
"static",
"String",
"classformat_putfield",
";",
"public",
"static",
"String",
"classformat_newarray_boolean",
";",
"public",
"static",
"String",
"classformat_newarray_char",
";",
"public",
"static",
"String",
"classformat_newarray_float",
";",
"public",
"static",
"String",
"classformat_newarray_double",
";",
"public",
"static",
"String",
"classformat_newarray_byte",
";",
"public",
"static",
"String",
"classformat_newarray_short",
";",
"public",
"static",
"String",
"classformat_newarray_int",
";",
"public",
"static",
"String",
"classformat_newarray_long",
";",
"public",
"static",
"String",
"classformat_store",
";",
"public",
"static",
"String",
"classformat_load",
";",
"public",
"static",
"String",
"classfileformat_anyexceptionhandler",
";",
"public",
"static",
"String",
"classfileformat_exceptiontableentry",
";",
"public",
"static",
"String",
"classfileformat_linenumbertableentry",
";",
"public",
"static",
"String",
"classfileformat_localvariabletableentry",
";",
"public",
"static",
"String",
"classfileformat_versionUnknown",
";",
"public",
"static",
"String",
"disassembler_frame_same_locals_1_stack_item_extended",
";",
"public",
"static",
"String",
"disassembler_frame_chop",
";",
"public",
"static",
"String",
"disassembler_frame_same_frame_extended",
";",
"public",
"static",
"String",
"disassembler_frame_append",
";",
"public",
"static",
"String",
"disassembler_frame_full_frame",
";",
"public",
"static",
"String",
"disassembler_frame_same_frame",
";",
"public",
"static",
"String",
"disassembler_frame_same_locals_1_stack_item",
";",
"public",
"static",
"String",
"code_assist_internal_error",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_getfield",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_putfield",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_getstatic",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_putstatic",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_invokestatic",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_invokevirtual",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_invokespecial",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_invokeinterface",
";",
"public",
"static",
"String",
"disassembler_method_type_ref_newinvokespecial",
";",
"static",
"{",
"NLS",
".",
"initializeMessages",
"(",
"BUNDLE_NAME",
",",
"Messages",
".",
"class",
")",
";",
"}",
"public",
"static",
"String",
"bind",
"(",
"String",
"message",
")",
"{",
"return",
"bind",
"(",
"message",
",",
"null",
")",
";",
"}",
"public",
"static",
"String",
"bind",
"(",
"String",
"message",
",",
"Object",
"binding",
")",
"{",
"return",
"bind",
"(",
"message",
",",
"new",
"Object",
"[",
"]",
"{",
"binding",
"}",
")",
";",
"}",
"public",
"static",
"String",
"bind",
"(",
"String",
"message",
",",
"Object",
"binding1",
",",
"Object",
"binding2",
")",
"{",
"return",
"bind",
"(",
"message",
",",
"new",
"Object",
"[",
"]",
"{",
"binding1",
",",
"binding2",
"}",
")",
";",
"}",
"public",
"static",
"String",
"bind",
"(",
"String",
"message",
",",
"Object",
"[",
"]",
"bindings",
")",
"{",
"return",
"MessageFormat",
".",
"format",
"(",
"message",
",",
"bindings",
")",
";",
"}",
"}",
"</s>"
] |
2,862 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableTableEntry",
";",
"public",
"class",
"LocalVariableAttribute",
"extends",
"ClassFileAttribute",
"implements",
"ILocalVariableAttribute",
"{",
"private",
"static",
"final",
"ILocalVariableTableEntry",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"ILocalVariableTableEntry",
"[",
"0",
"]",
";",
"private",
"int",
"localVariableTableLength",
";",
"private",
"ILocalVariableTableEntry",
"[",
"]",
"localVariableTable",
";",
"public",
"LocalVariableAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"localVariableTableLength",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"localVariableTable",
"=",
"new",
"ILocalVariableTableEntry",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"localVariableTable",
"[",
"i",
"]",
"=",
"new",
"LocalVariableTableEntry",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"readOffset",
"+=",
"10",
";",
"}",
"}",
"else",
"{",
"this",
".",
"localVariableTable",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"ILocalVariableTableEntry",
"[",
"]",
"getLocalVariableTable",
"(",
")",
"{",
"return",
"this",
".",
"localVariableTable",
";",
"}",
"public",
"int",
"getLocalVariableTableLength",
"(",
")",
"{",
"return",
"this",
".",
"localVariableTableLength",
";",
"}",
"}",
"</s>"
] |
2,863 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"public",
"final",
"class",
"HashSetOfCharArrayArray",
"implements",
"Cloneable",
"{",
"public",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"set",
";",
"public",
"int",
"elementSize",
";",
"int",
"threshold",
";",
"public",
"HashSetOfCharArrayArray",
"(",
")",
"{",
"this",
"(",
"13",
")",
";",
"}",
"public",
"HashSetOfCharArrayArray",
"(",
"int",
"size",
")",
"{",
"this",
".",
"elementSize",
"=",
"0",
";",
"this",
".",
"threshold",
"=",
"size",
";",
"int",
"extraRoom",
"=",
"(",
"int",
")",
"(",
"size",
"*",
"1.75f",
")",
";",
"if",
"(",
"this",
".",
"threshold",
"==",
"extraRoom",
")",
"extraRoom",
"++",
";",
"this",
".",
"set",
"=",
"new",
"char",
"[",
"extraRoom",
"]",
"[",
"]",
"[",
"]",
";",
"}",
"public",
"Object",
"clone",
"(",
")",
"throws",
"CloneNotSupportedException",
"{",
"HashSetOfCharArrayArray",
"result",
"=",
"(",
"HashSetOfCharArrayArray",
")",
"super",
".",
"clone",
"(",
")",
";",
"result",
".",
"elementSize",
"=",
"this",
".",
"elementSize",
";",
"result",
".",
"threshold",
"=",
"this",
".",
"threshold",
";",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"result",
".",
"set",
"=",
"new",
"char",
"[",
"length",
"]",
"[",
"]",
"[",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"set",
",",
"0",
",",
"result",
".",
"set",
",",
"0",
",",
"length",
")",
";",
"return",
"result",
";",
"}",
"public",
"boolean",
"contains",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"int",
"index",
"=",
"hashCode",
"(",
"array",
")",
"%",
"length",
";",
"int",
"arrayLength",
"=",
"array",
".",
"length",
";",
"char",
"[",
"]",
"[",
"]",
"currentArray",
";",
"while",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentArray",
".",
"length",
"==",
"arrayLength",
"&&",
"CharOperation",
".",
"equals",
"(",
"currentArray",
",",
"array",
")",
")",
"return",
"true",
";",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"int",
"hashCode",
"(",
"char",
"[",
"]",
"[",
"]",
"element",
")",
"{",
"return",
"hashCode",
"(",
"element",
",",
"element",
".",
"length",
")",
";",
"}",
"private",
"int",
"hashCode",
"(",
"char",
"[",
"]",
"[",
"]",
"element",
",",
"int",
"length",
")",
"{",
"int",
"hash",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"hash",
"=",
"Util",
".",
"combineHashCodes",
"(",
"hash",
",",
"CharOperation",
".",
"hashCode",
"(",
"element",
"[",
"i",
"]",
")",
")",
";",
"return",
"hash",
"&",
"0x7FFFFFFF",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"add",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"int",
"index",
"=",
"hashCode",
"(",
"array",
")",
"%",
"length",
";",
"int",
"arrayLength",
"=",
"array",
".",
"length",
";",
"char",
"[",
"]",
"[",
"]",
"currentArray",
";",
"while",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentArray",
".",
"length",
"==",
"arrayLength",
"&&",
"CharOperation",
".",
"equals",
"(",
"currentArray",
",",
"array",
")",
")",
"return",
"this",
".",
"set",
"[",
"index",
"]",
"=",
"array",
";",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"this",
".",
"set",
"[",
"index",
"]",
"=",
"array",
";",
"if",
"(",
"++",
"this",
".",
"elementSize",
">",
"this",
".",
"threshold",
")",
"rehash",
"(",
")",
";",
"return",
"array",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"remove",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"int",
"index",
"=",
"hashCode",
"(",
"array",
")",
"%",
"length",
";",
"int",
"arrayLength",
"=",
"array",
".",
"length",
";",
"char",
"[",
"]",
"[",
"]",
"currentArray",
";",
"while",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentArray",
".",
"length",
"==",
"arrayLength",
"&&",
"CharOperation",
".",
"equals",
"(",
"currentArray",
",",
"array",
")",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"existing",
"=",
"this",
".",
"set",
"[",
"index",
"]",
";",
"this",
".",
"elementSize",
"--",
";",
"this",
".",
"set",
"[",
"index",
"]",
"=",
"null",
";",
"rehash",
"(",
")",
";",
"return",
"existing",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"rehash",
"(",
")",
"{",
"HashSetOfCharArrayArray",
"newHashSet",
"=",
"new",
"HashSetOfCharArrayArray",
"(",
"this",
".",
"elementSize",
"*",
"2",
")",
";",
"char",
"[",
"]",
"[",
"]",
"currentArray",
";",
"for",
"(",
"int",
"i",
"=",
"this",
".",
"set",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"i",
"]",
")",
"!=",
"null",
")",
"newHashSet",
".",
"add",
"(",
"currentArray",
")",
";",
"this",
".",
"set",
"=",
"newHashSet",
".",
"set",
";",
"this",
".",
"threshold",
"=",
"newHashSet",
".",
"threshold",
";",
"}",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"this",
".",
"elementSize",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"arrayArray",
"=",
"this",
".",
"set",
"[",
"i",
"]",
";",
"if",
"(",
"arrayArray",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"{\"",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"length2",
"=",
"arrayArray",
".",
"length",
";",
"j",
"<",
"length2",
";",
"j",
"++",
")",
"{",
"char",
"[",
"]",
"array",
"=",
"arrayArray",
"[",
"j",
"]",
";",
"buffer",
".",
"append",
"(",
"'{'",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
",",
"length3",
"=",
"array",
".",
"length",
";",
"k",
"<",
"length3",
";",
"k",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"'\\''",
")",
";",
"buffer",
".",
"append",
"(",
"array",
"[",
"k",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\''",
")",
";",
"if",
"(",
"k",
"!=",
"length3",
"-",
"1",
")",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'}'",
")",
";",
"if",
"(",
"j",
"!=",
"length2",
"-",
"1",
")",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"if",
"(",
"i",
"!=",
"length",
"-",
"1",
")",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,864 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"CharArrayBuffer",
"{",
"protected",
"char",
"[",
"]",
"[",
"]",
"buffer",
";",
"public",
"static",
"final",
"int",
"DEFAULT_BUFFER_SIZE",
"=",
"10",
";",
"protected",
"int",
"end",
";",
"protected",
"int",
"size",
";",
"protected",
"int",
"[",
"]",
"[",
"]",
"ranges",
";",
"public",
"CharArrayBuffer",
"(",
")",
"{",
"this",
"(",
"null",
",",
"DEFAULT_BUFFER_SIZE",
")",
";",
"}",
"public",
"CharArrayBuffer",
"(",
"char",
"[",
"]",
"first",
")",
"{",
"this",
"(",
"first",
",",
"DEFAULT_BUFFER_SIZE",
")",
";",
"}",
"public",
"CharArrayBuffer",
"(",
"char",
"[",
"]",
"first",
",",
"int",
"size",
")",
"{",
"this",
".",
"size",
"=",
"(",
"size",
">",
"0",
")",
"?",
"size",
":",
"DEFAULT_BUFFER_SIZE",
";",
"this",
".",
"buffer",
"=",
"new",
"char",
"[",
"this",
".",
"size",
"]",
"[",
"]",
";",
"this",
".",
"ranges",
"=",
"new",
"int",
"[",
"this",
".",
"size",
"]",
"[",
"]",
";",
"this",
".",
"end",
"=",
"0",
";",
"if",
"(",
"first",
"!=",
"null",
")",
"append",
"(",
"first",
",",
"0",
",",
"first",
".",
"length",
")",
";",
"}",
"public",
"CharArrayBuffer",
"(",
"int",
"size",
")",
"{",
"this",
"(",
"null",
",",
"size",
")",
";",
"}",
"public",
"CharArrayBuffer",
"append",
"(",
"char",
"[",
"]",
"src",
")",
"{",
"if",
"(",
"src",
"!=",
"null",
")",
"append",
"(",
"src",
",",
"0",
",",
"src",
".",
"length",
")",
";",
"return",
"this",
";",
"}",
"public",
"CharArrayBuffer",
"append",
"(",
"char",
"[",
"]",
"src",
",",
"int",
"start",
",",
"int",
"length",
")",
"{",
"if",
"(",
"start",
"<",
"0",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
")",
";",
"if",
"(",
"length",
"<",
"0",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
")",
";",
"if",
"(",
"src",
"!=",
"null",
")",
"{",
"int",
"srcLength",
"=",
"src",
".",
"length",
";",
"if",
"(",
"start",
">",
"srcLength",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
")",
";",
"if",
"(",
"length",
"+",
"start",
">",
"srcLength",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
")",
";",
"if",
"(",
"length",
">",
"0",
")",
"{",
"if",
"(",
"this",
".",
"end",
"==",
"this",
".",
"size",
")",
"{",
"int",
"size2",
"=",
"this",
".",
"size",
"*",
"2",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"buffer",
",",
"0",
",",
"(",
"this",
".",
"buffer",
"=",
"new",
"char",
"[",
"size2",
"]",
"[",
"]",
")",
",",
"0",
",",
"this",
".",
"size",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"ranges",
",",
"0",
",",
"(",
"this",
".",
"ranges",
"=",
"new",
"int",
"[",
"size2",
"]",
"[",
"]",
")",
",",
"0",
",",
"this",
".",
"size",
")",
";",
"this",
".",
"size",
"*=",
"2",
";",
"}",
"this",
".",
"buffer",
"[",
"this",
".",
"end",
"]",
"=",
"src",
";",
"this",
".",
"ranges",
"[",
"this",
".",
"end",
"]",
"=",
"new",
"int",
"[",
"]",
"{",
"start",
",",
"length",
"}",
";",
"this",
".",
"end",
"++",
";",
"}",
"}",
"return",
"this",
";",
"}",
"public",
"CharArrayBuffer",
"append",
"(",
"char",
"c",
")",
"{",
"append",
"(",
"new",
"char",
"[",
"]",
"{",
"c",
"}",
",",
"0",
",",
"1",
")",
";",
"return",
"this",
";",
"}",
"public",
"CharArrayBuffer",
"append",
"(",
"String",
"src",
")",
"{",
"if",
"(",
"src",
"!=",
"null",
")",
"append",
"(",
"src",
".",
"toCharArray",
"(",
")",
",",
"0",
",",
"src",
".",
"length",
"(",
")",
")",
";",
"return",
"this",
";",
"}",
"public",
"char",
"[",
"]",
"getContents",
"(",
")",
"{",
"if",
"(",
"this",
".",
"end",
"==",
"0",
")",
"return",
"null",
";",
"int",
"length",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"end",
";",
"i",
"++",
")",
"length",
"+=",
"this",
".",
"ranges",
"[",
"i",
"]",
"[",
"1",
"]",
";",
"if",
"(",
"length",
">",
"0",
")",
"{",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"int",
"current",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"end",
";",
"i",
"++",
")",
"{",
"int",
"[",
"]",
"range",
"=",
"this",
".",
"ranges",
"[",
"i",
"]",
";",
"int",
"length2",
"=",
"range",
"[",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"buffer",
"[",
"i",
"]",
",",
"range",
"[",
"0",
"]",
",",
"result",
",",
"current",
",",
"length2",
")",
";",
"current",
"+=",
"length2",
";",
"}",
"return",
"result",
";",
"}",
"return",
"null",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"char",
"[",
"]",
"contents",
"=",
"getContents",
"(",
")",
";",
"return",
"(",
"contents",
"!=",
"null",
")",
"?",
"new",
"String",
"(",
"contents",
")",
":",
"Util",
".",
"EMPTY_STRING",
";",
"}",
"}",
"</s>"
] |
2,865 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IExceptionAttribute",
";",
"public",
"class",
"ExceptionAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IExceptionAttribute",
"{",
"private",
"int",
"exceptionsNumber",
";",
"private",
"char",
"[",
"]",
"[",
"]",
"exceptionNames",
";",
"private",
"int",
"[",
"]",
"exceptionIndexes",
";",
"ExceptionAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"this",
".",
"exceptionsNumber",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"int",
"exceptionLength",
"=",
"this",
".",
"exceptionsNumber",
";",
"this",
".",
"exceptionNames",
"=",
"CharOperation",
".",
"NO_CHAR_CHAR",
";",
"this",
".",
"exceptionIndexes",
"=",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"EMPTY_INT_ARRAY",
";",
"if",
"(",
"exceptionLength",
"!=",
"0",
")",
"{",
"this",
".",
"exceptionNames",
"=",
"new",
"char",
"[",
"exceptionLength",
"]",
"[",
"]",
";",
"this",
".",
"exceptionIndexes",
"=",
"new",
"int",
"[",
"exceptionLength",
"]",
";",
"}",
"int",
"readOffset",
"=",
"8",
";",
"IConstantPoolEntry",
"constantPoolEntry",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"exceptionLength",
";",
"i",
"++",
")",
"{",
"this",
".",
"exceptionIndexes",
"[",
"i",
"]",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"offset",
")",
";",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"exceptionIndexes",
"[",
"i",
"]",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"exceptionNames",
"[",
"i",
"]",
"=",
"constantPoolEntry",
".",
"getClassInfoName",
"(",
")",
";",
"readOffset",
"+=",
"2",
";",
"}",
"}",
"public",
"int",
"[",
"]",
"getExceptionIndexes",
"(",
")",
"{",
"return",
"this",
".",
"exceptionIndexes",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"getExceptionNames",
"(",
")",
"{",
"return",
"this",
".",
"exceptionNames",
";",
"}",
"public",
"int",
"getExceptionsNumber",
"(",
")",
"{",
"return",
"this",
".",
"exceptionsNumber",
";",
"}",
"}",
"</s>"
] |
2,866 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"java",
".",
"lang",
".",
"ref",
".",
"ReferenceQueue",
";",
"import",
"java",
".",
"lang",
".",
"ref",
".",
"WeakReference",
";",
"public",
"class",
"WeakHashSet",
"{",
"public",
"static",
"class",
"HashableWeakReference",
"extends",
"WeakReference",
"{",
"public",
"int",
"hashCode",
";",
"public",
"HashableWeakReference",
"(",
"Object",
"referent",
",",
"ReferenceQueue",
"queue",
")",
"{",
"super",
"(",
"referent",
",",
"queue",
")",
";",
"this",
".",
"hashCode",
"=",
"referent",
".",
"hashCode",
"(",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"!",
"(",
"obj",
"instanceof",
"HashableWeakReference",
")",
")",
"return",
"false",
";",
"Object",
"referent",
"=",
"get",
"(",
")",
";",
"Object",
"other",
"=",
"(",
"(",
"HashableWeakReference",
")",
"obj",
")",
".",
"get",
"(",
")",
";",
"if",
"(",
"referent",
"==",
"null",
")",
"return",
"other",
"==",
"null",
";",
"return",
"referent",
".",
"equals",
"(",
"other",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"this",
".",
"hashCode",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"Object",
"referent",
"=",
"get",
"(",
")",
";",
"if",
"(",
"referent",
"==",
"null",
")",
"return",
"\"[hashCode=\"",
"+",
"this",
".",
"hashCode",
"+",
"\"\"",
";",
"return",
"\"[hashCode=\"",
"+",
"this",
".",
"hashCode",
"+",
"\"]",
"\"",
"+",
"referent",
".",
"toString",
"(",
")",
";",
"}",
"}",
"HashableWeakReference",
"[",
"]",
"values",
";",
"public",
"int",
"elementSize",
";",
"int",
"threshold",
";",
"ReferenceQueue",
"referenceQueue",
"=",
"new",
"ReferenceQueue",
"(",
")",
";",
"public",
"WeakHashSet",
"(",
")",
"{",
"this",
"(",
"5",
")",
";",
"}",
"public",
"WeakHashSet",
"(",
"int",
"size",
")",
"{",
"this",
".",
"elementSize",
"=",
"0",
";",
"this",
".",
"threshold",
"=",
"size",
";",
"int",
"extraRoom",
"=",
"(",
"int",
")",
"(",
"size",
"*",
"1.75f",
")",
";",
"if",
"(",
"this",
".",
"threshold",
"==",
"extraRoom",
")",
"extraRoom",
"++",
";",
"this",
".",
"values",
"=",
"new",
"HashableWeakReference",
"[",
"extraRoom",
"]",
";",
"}",
"public",
"Object",
"add",
"(",
"Object",
"obj",
")",
"{",
"cleanupGarbageCollectedValues",
"(",
")",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
",",
"index",
"=",
"(",
"obj",
".",
"hashCode",
"(",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"Object",
"referent",
";",
"if",
"(",
"obj",
".",
"equals",
"(",
"referent",
"=",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"return",
"referent",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"new",
"HashableWeakReference",
"(",
"obj",
",",
"this",
".",
"referenceQueue",
")",
";",
"if",
"(",
"++",
"this",
".",
"elementSize",
">",
"this",
".",
"threshold",
")",
"rehash",
"(",
")",
";",
"return",
"obj",
";",
"}",
"private",
"void",
"addValue",
"(",
"HashableWeakReference",
"value",
")",
"{",
"Object",
"obj",
"=",
"value",
".",
"get",
"(",
")",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"return",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"value",
".",
"hashCode",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"obj",
".",
"equals",
"(",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"value",
";",
"if",
"(",
"++",
"this",
".",
"elementSize",
">",
"this",
".",
"threshold",
")",
"rehash",
"(",
")",
";",
"}",
"private",
"void",
"cleanupGarbageCollectedValues",
"(",
")",
"{",
"HashableWeakReference",
"toBeRemoved",
";",
"while",
"(",
"(",
"toBeRemoved",
"=",
"(",
"HashableWeakReference",
")",
"this",
".",
"referenceQueue",
".",
"poll",
"(",
")",
")",
"!=",
"null",
")",
"{",
"int",
"hashCode",
"=",
"toBeRemoved",
".",
"hashCode",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"hashCode",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentValue",
"==",
"toBeRemoved",
")",
"{",
"int",
"sameHash",
"=",
"index",
";",
"int",
"current",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"current",
"=",
"(",
"sameHash",
"+",
"1",
")",
"%",
"valuesLength",
"]",
")",
"!=",
"null",
"&&",
"currentValue",
".",
"hashCode",
"==",
"hashCode",
")",
"sameHash",
"=",
"current",
";",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"this",
".",
"values",
"[",
"sameHash",
"]",
";",
"this",
".",
"values",
"[",
"sameHash",
"]",
"=",
"null",
";",
"this",
".",
"elementSize",
"--",
";",
"break",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"}",
"}",
"public",
"boolean",
"contains",
"(",
"Object",
"obj",
")",
"{",
"return",
"get",
"(",
"obj",
")",
"!=",
"null",
";",
"}",
"public",
"Object",
"get",
"(",
"Object",
"obj",
")",
"{",
"cleanupGarbageCollectedValues",
"(",
")",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"obj",
".",
"hashCode",
"(",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"Object",
"referent",
";",
"if",
"(",
"obj",
".",
"equals",
"(",
"referent",
"=",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"return",
"referent",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"rehash",
"(",
")",
"{",
"WeakHashSet",
"newHashSet",
"=",
"new",
"WeakHashSet",
"(",
"this",
".",
"elementSize",
"*",
"2",
")",
";",
"newHashSet",
".",
"referenceQueue",
"=",
"this",
".",
"referenceQueue",
";",
"HashableWeakReference",
"currentValue",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"values",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"if",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"i",
"]",
")",
"!=",
"null",
")",
"newHashSet",
".",
"addValue",
"(",
"currentValue",
")",
";",
"this",
".",
"values",
"=",
"newHashSet",
".",
"values",
";",
"this",
".",
"threshold",
"=",
"newHashSet",
".",
"threshold",
";",
"this",
".",
"elementSize",
"=",
"newHashSet",
".",
"elementSize",
";",
"}",
"public",
"Object",
"remove",
"(",
"Object",
"obj",
")",
"{",
"cleanupGarbageCollectedValues",
"(",
")",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"obj",
".",
"hashCode",
"(",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"Object",
"referent",
";",
"if",
"(",
"obj",
".",
"equals",
"(",
"referent",
"=",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"this",
".",
"elementSize",
"--",
";",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"null",
";",
"rehash",
"(",
")",
";",
"return",
"referent",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"this",
".",
"elementSize",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"{\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"values",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"HashableWeakReference",
"value",
"=",
"this",
".",
"values",
"[",
"i",
"]",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"Object",
"ref",
"=",
"value",
".",
"get",
"(",
")",
";",
"if",
"(",
"ref",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"ref",
".",
"toString",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,867 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Signature",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ASTVisitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"Compiler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ArrayReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Assignment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"CastExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"CompilationUnitDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ConditionalExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"FieldReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"MessageSend",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"QualifiedNameReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"SingleNameReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Wildcard",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ArrayBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"BlockScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"CaptureBinding",
";",
"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",
".",
"PackageBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ParameterizedTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"PolymorphicMethodBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"RawTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ReferenceBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"SourceTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TagBits",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeVariableBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"VariableBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"WildcardBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"HashtableOfObject",
";",
"public",
"class",
"BindingKeyResolver",
"extends",
"BindingKeyParser",
"{",
"Compiler",
"compiler",
";",
"Binding",
"compilerBinding",
";",
"char",
"[",
"]",
"[",
"]",
"compoundName",
";",
"int",
"dimension",
";",
"LookupEnvironment",
"environment",
";",
"ReferenceBinding",
"genericType",
";",
"MethodBinding",
"methodBinding",
";",
"AnnotationBinding",
"annotationBinding",
";",
"char",
"[",
"]",
"secondarySimpleName",
";",
"CompilationUnitDeclaration",
"parsedUnit",
";",
"BlockScope",
"scope",
";",
"TypeBinding",
"typeBinding",
";",
"TypeDeclaration",
"typeDeclaration",
";",
"ArrayList",
"types",
"=",
"new",
"ArrayList",
"(",
")",
";",
"int",
"wildcardRank",
";",
"CompilationUnitDeclaration",
"outerMostParsedUnit",
";",
"HashtableOfObject",
"resolvedUnits",
";",
"private",
"BindingKeyResolver",
"(",
"BindingKeyParser",
"parser",
",",
"Compiler",
"compiler",
",",
"LookupEnvironment",
"environment",
",",
"CompilationUnitDeclaration",
"outerMostParsedUnit",
",",
"HashtableOfObject",
"parsedUnits",
")",
"{",
"super",
"(",
"parser",
")",
";",
"this",
".",
"compiler",
"=",
"compiler",
";",
"this",
".",
"environment",
"=",
"environment",
";",
"this",
".",
"outerMostParsedUnit",
"=",
"outerMostParsedUnit",
";",
"this",
".",
"resolvedUnits",
"=",
"parsedUnits",
";",
"}",
"public",
"BindingKeyResolver",
"(",
"String",
"key",
",",
"Compiler",
"compiler",
",",
"LookupEnvironment",
"environment",
")",
"{",
"super",
"(",
"key",
")",
";",
"this",
".",
"compiler",
"=",
"compiler",
";",
"this",
".",
"environment",
"=",
"environment",
";",
"this",
".",
"resolvedUnits",
"=",
"new",
"HashtableOfObject",
"(",
")",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"compoundName",
"(",
")",
"{",
"return",
"this",
".",
"compoundName",
";",
"}",
"public",
"void",
"consumeAnnotation",
"(",
")",
"{",
"int",
"size",
"=",
"this",
".",
"types",
".",
"size",
"(",
")",
";",
"if",
"(",
"size",
"==",
"0",
")",
"return",
";",
"Binding",
"annotationType",
"=",
"(",
"(",
"BindingKeyResolver",
")",
"this",
".",
"types",
".",
"get",
"(",
"size",
"-",
"1",
")",
")",
".",
"compilerBinding",
";",
"AnnotationBinding",
"[",
"]",
"annotationBindings",
";",
"if",
"(",
"this",
".",
"compilerBinding",
"==",
"null",
"&&",
"this",
".",
"typeBinding",
"instanceof",
"ReferenceBinding",
")",
"{",
"annotationBindings",
"=",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
".",
"getAnnotations",
"(",
")",
";",
"}",
"else",
"if",
"(",
"this",
".",
"compilerBinding",
"instanceof",
"MethodBinding",
")",
"{",
"annotationBindings",
"=",
"(",
"(",
"MethodBinding",
")",
"this",
".",
"compilerBinding",
")",
".",
"getAnnotations",
"(",
")",
";",
"}",
"else",
"if",
"(",
"this",
".",
"compilerBinding",
"instanceof",
"VariableBinding",
")",
"{",
"annotationBindings",
"=",
"(",
"(",
"VariableBinding",
")",
"this",
".",
"compilerBinding",
")",
".",
"getAnnotations",
"(",
")",
";",
"}",
"else",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"annotationBindings",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"AnnotationBinding",
"binding",
"=",
"annotationBindings",
"[",
"i",
"]",
";",
"if",
"(",
"binding",
".",
"getAnnotationType",
"(",
")",
"==",
"annotationType",
")",
"{",
"this",
".",
"annotationBinding",
"=",
"binding",
";",
"break",
";",
"}",
"}",
"}",
"public",
"void",
"consumeArrayDimension",
"(",
"char",
"[",
"]",
"brakets",
")",
"{",
"this",
".",
"dimension",
"=",
"brakets",
".",
"length",
";",
"}",
"public",
"void",
"consumeBaseType",
"(",
"char",
"[",
"]",
"baseTypeSig",
")",
"{",
"this",
".",
"compoundName",
"=",
"new",
"char",
"[",
"]",
"[",
"]",
"{",
"getKey",
"(",
")",
".",
"toCharArray",
"(",
")",
"}",
";",
"TypeBinding",
"baseTypeBinding",
"=",
"getBaseTypeBinding",
"(",
"baseTypeSig",
")",
";",
"if",
"(",
"baseTypeBinding",
"!=",
"null",
")",
"{",
"this",
".",
"typeBinding",
"=",
"baseTypeBinding",
";",
"}",
"}",
"public",
"void",
"consumeCapture",
"(",
"final",
"int",
"position",
")",
"{",
"CompilationUnitDeclaration",
"outerParsedUnit",
"=",
"this",
".",
"outerMostParsedUnit",
"==",
"null",
"?",
"this",
".",
"parsedUnit",
":",
"this",
".",
"outerMostParsedUnit",
";",
"if",
"(",
"outerParsedUnit",
"==",
"null",
")",
"return",
";",
"final",
"Binding",
"wildcardBinding",
"=",
"(",
"(",
"BindingKeyResolver",
")",
"this",
".",
"types",
".",
"get",
"(",
"0",
")",
")",
".",
"compilerBinding",
";",
"class",
"CaptureFinder",
"extends",
"ASTVisitor",
"{",
"CaptureBinding",
"capture",
";",
"boolean",
"checkType",
"(",
"TypeBinding",
"binding",
")",
"{",
"if",
"(",
"binding",
"==",
"null",
")",
"return",
"false",
";",
"switch",
"(",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"PARAMETERIZED_TYPE",
":",
"TypeBinding",
"[",
"]",
"arguments",
"=",
"(",
"(",
"ParameterizedTypeBinding",
")",
"binding",
")",
".",
"arguments",
";",
"if",
"(",
"arguments",
"==",
"null",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"arguments",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"checkType",
"(",
"arguments",
"[",
"i",
"]",
")",
")",
"return",
"true",
";",
"}",
"break",
";",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"return",
"checkType",
"(",
"(",
"(",
"WildcardBinding",
")",
"binding",
")",
".",
"bound",
")",
";",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"if",
"(",
"checkType",
"(",
"(",
"(",
"WildcardBinding",
")",
"binding",
")",
".",
"bound",
")",
")",
"return",
"true",
";",
"TypeBinding",
"[",
"]",
"otherBounds",
"=",
"(",
"(",
"WildcardBinding",
")",
"binding",
")",
".",
"otherBounds",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"otherBounds",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"checkType",
"(",
"otherBounds",
"[",
"i",
"]",
")",
")",
"return",
"true",
";",
"}",
"break",
";",
"case",
"Binding",
".",
"ARRAY_TYPE",
":",
"return",
"checkType",
"(",
"(",
"(",
"ArrayBinding",
")",
"binding",
")",
".",
"leafComponentType",
")",
";",
"case",
"Binding",
".",
"TYPE_PARAMETER",
":",
"if",
"(",
"binding",
".",
"isCapture",
"(",
")",
")",
"{",
"CaptureBinding",
"captureBinding",
"=",
"(",
"CaptureBinding",
")",
"binding",
";",
"if",
"(",
"captureBinding",
".",
"position",
"==",
"position",
"&&",
"captureBinding",
".",
"wildcard",
"==",
"wildcardBinding",
")",
"{",
"this",
".",
"capture",
"=",
"captureBinding",
";",
"return",
"true",
";",
"}",
"}",
"break",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleNameReference",
"singleNameReference",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"singleNameReference",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"singleNameReference",
",",
"blockScope",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"QualifiedNameReference",
"qualifiedNameReference",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"qualifiedNameReference",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"qualifiedNameReference",
",",
"blockScope",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MessageSend",
"messageSend",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"messageSend",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"messageSend",
",",
"blockScope",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldReference",
"fieldReference",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"fieldReference",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"fieldReference",
",",
"blockScope",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConditionalExpression",
"conditionalExpression",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"conditionalExpression",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"conditionalExpression",
",",
"blockScope",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CastExpression",
"castExpression",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"castExpression",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"castExpression",
",",
"blockScope",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Assignment",
"assignment",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"assignment",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"assignment",
",",
"blockScope",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayReference",
"arrayReference",
",",
"BlockScope",
"blockScope",
")",
"{",
"if",
"(",
"checkType",
"(",
"arrayReference",
".",
"resolvedType",
")",
")",
"return",
"false",
";",
"return",
"super",
".",
"visit",
"(",
"arrayReference",
",",
"blockScope",
")",
";",
"}",
"}",
"CaptureFinder",
"captureFinder",
"=",
"new",
"CaptureFinder",
"(",
")",
";",
"outerParsedUnit",
".",
"traverse",
"(",
"captureFinder",
",",
"outerParsedUnit",
".",
"scope",
")",
";",
"this",
".",
"typeBinding",
"=",
"captureFinder",
".",
"capture",
";",
"}",
"public",
"void",
"consumeException",
"(",
")",
"{",
"this",
".",
"types",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"public",
"void",
"consumeField",
"(",
"char",
"[",
"]",
"fieldName",
")",
"{",
"if",
"(",
"this",
".",
"typeBinding",
"==",
"null",
")",
"return",
";",
"FieldBinding",
"[",
"]",
"fields",
"=",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
".",
"availableFields",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"fields",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"FieldBinding",
"field",
"=",
"fields",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"fieldName",
",",
"field",
".",
"name",
")",
")",
"{",
"this",
".",
"typeBinding",
"=",
"null",
";",
"this",
".",
"compilerBinding",
"=",
"field",
";",
"return",
";",
"}",
"}",
"}",
"public",
"void",
"consumeParameterizedGenericMethod",
"(",
")",
"{",
"if",
"(",
"this",
".",
"methodBinding",
"==",
"null",
")",
"return",
";",
"TypeBinding",
"[",
"]",
"arguments",
"=",
"getTypeBindingArguments",
"(",
")",
";",
"if",
"(",
"arguments",
"==",
"null",
")",
"{",
"this",
".",
"methodBinding",
"=",
"null",
";",
"this",
".",
"compilerBinding",
"=",
"null",
";",
"return",
";",
"}",
"if",
"(",
"arguments",
".",
"length",
"!=",
"this",
".",
"methodBinding",
".",
"typeVariables",
"(",
")",
".",
"length",
")",
"this",
".",
"methodBinding",
"=",
"this",
".",
"environment",
".",
"createParameterizedGenericMethod",
"(",
"this",
".",
"methodBinding",
",",
"(",
"RawTypeBinding",
")",
"null",
")",
";",
"else",
"this",
".",
"methodBinding",
"=",
"this",
".",
"environment",
".",
"createParameterizedGenericMethod",
"(",
"this",
".",
"methodBinding",
",",
"arguments",
")",
";",
"this",
".",
"compilerBinding",
"=",
"this",
".",
"methodBinding",
";",
"}",
"public",
"void",
"consumeLocalType",
"(",
"char",
"[",
"]",
"uniqueKey",
")",
"{",
"LocalTypeBinding",
"[",
"]",
"localTypeBindings",
"=",
"this",
".",
"parsedUnit",
".",
"localTypes",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"parsedUnit",
".",
"localTypeCount",
";",
"i",
"++",
")",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"uniqueKey",
",",
"localTypeBindings",
"[",
"i",
"]",
".",
"computeUniqueKey",
"(",
"false",
")",
")",
")",
"{",
"this",
".",
"typeBinding",
"=",
"localTypeBindings",
"[",
"i",
"]",
";",
"return",
";",
"}",
"}",
"public",
"void",
"consumeLocalVar",
"(",
"char",
"[",
"]",
"varName",
",",
"int",
"occurrenceCount",
")",
"{",
"if",
"(",
"this",
".",
"scope",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"methodBinding",
"==",
"null",
")",
"return",
";",
"this",
".",
"scope",
"=",
"this",
".",
"methodBinding",
".",
"sourceMethod",
"(",
")",
".",
"scope",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"scope",
".",
"localIndex",
";",
"i",
"++",
")",
"{",
"LocalVariableBinding",
"local",
"=",
"this",
".",
"scope",
".",
"locals",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"local",
".",
"name",
",",
"varName",
")",
"&&",
"occurrenceCount",
"--",
"==",
"0",
")",
"{",
"this",
".",
"methodBinding",
"=",
"null",
";",
"this",
".",
"compilerBinding",
"=",
"local",
";",
"return",
";",
"}",
"}",
"}",
"public",
"void",
"consumeMethod",
"(",
"char",
"[",
"]",
"selector",
",",
"char",
"[",
"]",
"signature",
")",
"{",
"if",
"(",
"this",
".",
"typeBinding",
"==",
"null",
")",
"return",
";",
"MethodBinding",
"[",
"]",
"methods",
"=",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
".",
"availableMethods",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"methodLength",
"=",
"methods",
".",
"length",
";",
"i",
"<",
"methodLength",
";",
"i",
"++",
")",
"{",
"MethodBinding",
"method",
"=",
"methods",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"selector",
",",
"method",
".",
"selector",
")",
"||",
"(",
"selector",
".",
"length",
"==",
"0",
"&&",
"method",
".",
"isConstructor",
"(",
")",
")",
")",
"{",
"char",
"[",
"]",
"methodSignature",
"=",
"method",
".",
"genericSignature",
"(",
")",
";",
"if",
"(",
"methodSignature",
"==",
"null",
")",
"methodSignature",
"=",
"method",
".",
"signature",
"(",
")",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"signature",
",",
"methodSignature",
")",
")",
"{",
"this",
".",
"typeBinding",
"=",
"null",
";",
"this",
".",
"methodBinding",
"=",
"method",
";",
"this",
".",
"compilerBinding",
"=",
"this",
".",
"methodBinding",
";",
"return",
";",
"}",
"else",
"if",
"(",
"(",
"method",
".",
"tagBits",
"&",
"TagBits",
".",
"AnnotationPolymorphicSignature",
")",
"!=",
"0",
")",
"{",
"this",
".",
"typeBinding",
"=",
"null",
";",
"char",
"[",
"]",
"[",
"]",
"typeParameters",
"=",
"Signature",
".",
"getParameterTypes",
"(",
"signature",
")",
";",
"int",
"length",
"=",
"typeParameters",
".",
"length",
";",
"TypeBinding",
"[",
"]",
"parameterTypes",
"=",
"new",
"TypeBinding",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"length",
";",
"j",
"++",
")",
"{",
"parameterTypes",
"[",
"j",
"]",
"=",
"getType",
"(",
"typeParameters",
"[",
"j",
"]",
")",
";",
"}",
"PolymorphicMethodBinding",
"polymorphicMethod",
"=",
"this",
".",
"environment",
".",
"createPolymorphicMethod",
"(",
"method",
",",
"parameterTypes",
")",
";",
"this",
".",
"methodBinding",
"=",
"polymorphicMethod",
";",
"this",
".",
"methodBinding",
"=",
"this",
".",
"environment",
".",
"updatePolymorphicMethodReturnType",
"(",
"polymorphicMethod",
",",
"getType",
"(",
"Signature",
".",
"getReturnType",
"(",
"signature",
")",
")",
")",
";",
"this",
".",
"compilerBinding",
"=",
"this",
".",
"methodBinding",
";",
"return",
";",
"}",
"}",
"}",
"}",
"private",
"TypeBinding",
"getType",
"(",
"char",
"[",
"]",
"type",
")",
"{",
"TypeBinding",
"binding",
"=",
"null",
";",
"int",
"length",
"=",
"type",
".",
"length",
";",
"switch",
"(",
"length",
")",
"{",
"case",
"1",
":",
"switch",
"(",
"type",
"[",
"0",
"]",
")",
"{",
"case",
"'I'",
":",
"binding",
"=",
"TypeBinding",
".",
"INT",
";",
"break",
";",
"case",
"'Z'",
":",
"binding",
"=",
"TypeBinding",
".",
"BOOLEAN",
";",
"break",
";",
"case",
"'V'",
":",
"binding",
"=",
"TypeBinding",
".",
"VOID",
";",
"break",
";",
"case",
"'C'",
":",
"binding",
"=",
"TypeBinding",
".",
"CHAR",
";",
"break",
";",
"case",
"'D'",
":",
"binding",
"=",
"TypeBinding",
".",
"DOUBLE",
";",
"break",
";",
"case",
"'B'",
":",
"binding",
"=",
"TypeBinding",
".",
"BYTE",
";",
"break",
";",
"case",
"'F'",
":",
"binding",
"=",
"TypeBinding",
".",
"FLOAT",
";",
"break",
";",
"case",
"'J'",
":",
"binding",
"=",
"TypeBinding",
".",
"LONG",
";",
"break",
";",
"case",
"'S'",
":",
"binding",
"=",
"TypeBinding",
".",
"SHORT",
";",
"break",
";",
"}",
"break",
";",
"default",
":",
"int",
"dimensions",
"=",
"0",
";",
"int",
"start",
"=",
"0",
";",
"while",
"(",
"type",
"[",
"start",
"]",
"==",
"'['",
")",
"{",
"start",
"++",
";",
"dimensions",
"++",
";",
"}",
"binding",
"=",
"this",
".",
"environment",
".",
"getType",
"(",
"CharOperation",
".",
"splitOn",
"(",
"'/'",
",",
"type",
",",
"start",
"+",
"1",
",",
"length",
"-",
"1",
")",
")",
";",
"if",
"(",
"dimensions",
"!=",
"0",
")",
"{",
"binding",
"=",
"this",
".",
"environment",
".",
"createArrayType",
"(",
"binding",
",",
"dimensions",
")",
";",
"}",
"}",
"return",
"binding",
";",
"}",
"public",
"void",
"consumeMemberType",
"(",
"char",
"[",
"]",
"simpleTypeName",
")",
"{",
"this",
".",
"typeBinding",
"=",
"getTypeBinding",
"(",
"simpleTypeName",
")",
";",
"}",
"public",
"void",
"consumePackage",
"(",
"char",
"[",
"]",
"pkgName",
")",
"{",
"this",
".",
"compoundName",
"=",
"CharOperation",
".",
"splitOn",
"(",
"'/'",
",",
"pkgName",
")",
";",
"this",
".",
"compilerBinding",
"=",
"new",
"PackageBinding",
"(",
"this",
".",
"compoundName",
",",
"null",
",",
"this",
".",
"environment",
")",
";",
"}",
"public",
"void",
"consumeParameterizedType",
"(",
"char",
"[",
"]",
"simpleTypeName",
",",
"boolean",
"isRaw",
")",
"{",
"if",
"(",
"this",
".",
"typeBinding",
"==",
"null",
")",
"return",
";",
"TypeBinding",
"[",
"]",
"arguments",
"=",
"getTypeBindingArguments",
"(",
")",
";",
"if",
"(",
"arguments",
"==",
"null",
")",
"{",
"this",
".",
"typeBinding",
"=",
"null",
";",
"this",
".",
"genericType",
"=",
"null",
";",
"return",
";",
"}",
"if",
"(",
"simpleTypeName",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"genericType",
"==",
"null",
")",
"{",
"this",
".",
"genericType",
"=",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
".",
"getMemberType",
"(",
"simpleTypeName",
")",
";",
"}",
"else",
"{",
"this",
".",
"genericType",
"=",
"this",
".",
"genericType",
".",
"getMemberType",
"(",
"simpleTypeName",
")",
";",
"}",
"if",
"(",
"!",
"isRaw",
")",
"this",
".",
"typeBinding",
"=",
"this",
".",
"environment",
".",
"createParameterizedType",
"(",
"this",
".",
"genericType",
",",
"arguments",
",",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
";",
"else",
"this",
".",
"typeBinding",
"=",
"this",
".",
"environment",
".",
"createRawType",
"(",
"this",
".",
"genericType",
",",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
";",
"}",
"else",
"{",
"this",
".",
"genericType",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
";",
"ReferenceBinding",
"enclosing",
"=",
"this",
".",
"genericType",
".",
"enclosingType",
"(",
")",
";",
"if",
"(",
"enclosing",
"!=",
"null",
")",
"enclosing",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"environment",
".",
"convertToRawType",
"(",
"enclosing",
",",
"false",
")",
";",
"this",
".",
"typeBinding",
"=",
"this",
".",
"environment",
".",
"createParameterizedType",
"(",
"this",
".",
"genericType",
",",
"arguments",
",",
"enclosing",
")",
";",
"}",
"}",
"public",
"void",
"consumeParser",
"(",
"BindingKeyParser",
"parser",
")",
"{",
"this",
".",
"types",
".",
"add",
"(",
"parser",
")",
";",
"}",
"public",
"void",
"consumeScope",
"(",
"int",
"scopeNumber",
")",
"{",
"if",
"(",
"this",
".",
"scope",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"methodBinding",
"==",
"null",
")",
"return",
";",
"this",
".",
"scope",
"=",
"this",
".",
"methodBinding",
".",
"sourceMethod",
"(",
")",
".",
"scope",
";",
"}",
"if",
"(",
"scopeNumber",
">=",
"this",
".",
"scope",
".",
"subscopeCount",
")",
"return",
";",
"this",
".",
"scope",
"=",
"(",
"BlockScope",
")",
"this",
".",
"scope",
".",
"subscopes",
"[",
"scopeNumber",
"]",
";",
"}",
"public",
"void",
"consumeRawType",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeBinding",
"==",
"null",
")",
"return",
";",
"this",
".",
"typeBinding",
"=",
"this",
".",
"environment",
".",
"convertToRawType",
"(",
"this",
".",
"typeBinding",
",",
"false",
")",
";",
"}",
"public",
"void",
"consumeSecondaryType",
"(",
"char",
"[",
"]",
"simpleTypeName",
")",
"{",
"this",
".",
"secondarySimpleName",
"=",
"simpleTypeName",
";",
"}",
"public",
"void",
"consumeFullyQualifiedName",
"(",
"char",
"[",
"]",
"fullyQualifiedName",
")",
"{",
"this",
".",
"compoundName",
"=",
"CharOperation",
".",
"splitOn",
"(",
"'/'",
",",
"fullyQualifiedName",
")",
";",
"}",
"public",
"void",
"consumeTopLevelType",
"(",
")",
"{",
"char",
"[",
"]",
"fileName",
";",
"this",
".",
"parsedUnit",
"=",
"getCompilationUnitDeclaration",
"(",
")",
";",
"if",
"(",
"this",
".",
"parsedUnit",
"!=",
"null",
"&&",
"this",
".",
"compiler",
"!=",
"null",
"&&",
"!",
"this",
".",
"resolvedUnits",
".",
"containsKey",
"(",
"fileName",
"=",
"this",
".",
"parsedUnit",
".",
"getFileName",
"(",
")",
")",
")",
"{",
"this",
".",
"compiler",
".",
"process",
"(",
"this",
".",
"parsedUnit",
",",
"this",
".",
"compiler",
".",
"totalUnits",
"+",
"1",
")",
";",
"this",
".",
"resolvedUnits",
".",
"put",
"(",
"fileName",
",",
"fileName",
")",
";",
"}",
"if",
"(",
"this",
".",
"parsedUnit",
"==",
"null",
")",
"{",
"this",
".",
"typeBinding",
"=",
"getBinaryBinding",
"(",
")",
";",
"}",
"else",
"{",
"char",
"[",
"]",
"typeName",
"=",
"this",
".",
"secondarySimpleName",
"==",
"null",
"?",
"this",
".",
"compoundName",
"[",
"this",
".",
"compoundName",
".",
"length",
"-",
"1",
"]",
":",
"this",
".",
"secondarySimpleName",
";",
"this",
".",
"typeBinding",
"=",
"getTypeBinding",
"(",
"typeName",
")",
";",
"}",
"}",
"public",
"void",
"consumeKey",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeBinding",
"!=",
"null",
")",
"{",
"this",
".",
"typeBinding",
"=",
"getArrayBinding",
"(",
"this",
".",
"dimension",
",",
"this",
".",
"typeBinding",
")",
";",
"this",
".",
"compilerBinding",
"=",
"this",
".",
"typeBinding",
";",
"}",
"}",
"public",
"void",
"consumeTypeVariable",
"(",
"char",
"[",
"]",
"position",
",",
"char",
"[",
"]",
"typeVariableName",
")",
"{",
"if",
"(",
"position",
".",
"length",
">",
"0",
")",
"{",
"if",
"(",
"this",
".",
"typeBinding",
"==",
"null",
")",
"return",
";",
"int",
"pos",
"=",
"Integer",
".",
"parseInt",
"(",
"new",
"String",
"(",
"position",
")",
")",
";",
"MethodBinding",
"[",
"]",
"methods",
"=",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
".",
"availableMethods",
"(",
")",
";",
"if",
"(",
"methods",
"!=",
"null",
"&&",
"pos",
"<",
"methods",
".",
"length",
")",
"{",
"this",
".",
"methodBinding",
"=",
"methods",
"[",
"pos",
"]",
";",
"}",
"}",
"TypeVariableBinding",
"[",
"]",
"typeVariableBindings",
";",
"if",
"(",
"this",
".",
"methodBinding",
"!=",
"null",
")",
"{",
"typeVariableBindings",
"=",
"this",
".",
"methodBinding",
".",
"typeVariables",
"(",
")",
";",
"}",
"else",
"if",
"(",
"this",
".",
"typeBinding",
"!=",
"null",
")",
"{",
"typeVariableBindings",
"=",
"this",
".",
"typeBinding",
".",
"typeVariables",
"(",
")",
";",
"}",
"else",
"{",
"return",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"typeVariableBindings",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"typeVariableBindings",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeVariableName",
",",
"typeVariableBinding",
".",
"sourceName",
"(",
")",
")",
")",
"{",
"this",
".",
"typeBinding",
"=",
"typeVariableBinding",
";",
"return",
";",
"}",
"}",
"}",
"public",
"void",
"consumeTypeWithCapture",
"(",
")",
"{",
"BindingKeyResolver",
"resolver",
"=",
"(",
"BindingKeyResolver",
")",
"this",
".",
"types",
".",
"get",
"(",
"0",
")",
";",
"this",
".",
"typeBinding",
"=",
"(",
"TypeBinding",
")",
"resolver",
".",
"compilerBinding",
";",
"}",
"public",
"void",
"consumeWildcardRank",
"(",
"int",
"aRank",
")",
"{",
"this",
".",
"wildcardRank",
"=",
"aRank",
";",
"}",
"public",
"void",
"consumeWildCard",
"(",
"int",
"kind",
")",
"{",
"switch",
"(",
"kind",
")",
"{",
"case",
"Wildcard",
".",
"EXTENDS",
":",
"case",
"Wildcard",
".",
"SUPER",
":",
"BindingKeyResolver",
"boundResolver",
"=",
"(",
"BindingKeyResolver",
")",
"this",
".",
"types",
".",
"get",
"(",
"0",
")",
";",
"final",
"Binding",
"boundBinding",
"=",
"boundResolver",
".",
"compilerBinding",
";",
"if",
"(",
"boundBinding",
"instanceof",
"TypeBinding",
")",
"{",
"this",
".",
"typeBinding",
"=",
"this",
".",
"environment",
".",
"createWildcard",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
",",
"this",
".",
"wildcardRank",
",",
"(",
"TypeBinding",
")",
"boundBinding",
",",
"null",
",",
"kind",
")",
";",
"}",
"else",
"{",
"this",
".",
"typeBinding",
"=",
"null",
";",
"}",
"break",
";",
"case",
"Wildcard",
".",
"UNBOUND",
":",
"this",
".",
"typeBinding",
"=",
"this",
".",
"environment",
".",
"createWildcard",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
",",
"this",
".",
"wildcardRank",
",",
"null",
",",
"null",
",",
"kind",
")",
";",
"break",
";",
"}",
"}",
"public",
"AnnotationBinding",
"getAnnotationBinding",
"(",
")",
"{",
"return",
"this",
".",
"annotationBinding",
";",
"}",
"private",
"TypeBinding",
"getArrayBinding",
"(",
"int",
"dim",
",",
"TypeBinding",
"binding",
")",
"{",
"if",
"(",
"binding",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"dim",
"==",
"0",
")",
"return",
"binding",
";",
"return",
"this",
".",
"environment",
".",
"createArrayType",
"(",
"binding",
",",
"dim",
")",
";",
"}",
"private",
"TypeBinding",
"getBaseTypeBinding",
"(",
"char",
"[",
"]",
"signature",
")",
"{",
"switch",
"(",
"signature",
"[",
"0",
"]",
")",
"{",
"case",
"'I'",
":",
"return",
"TypeBinding",
".",
"INT",
";",
"case",
"'Z'",
":",
"return",
"TypeBinding",
".",
"BOOLEAN",
";",
"case",
"'V'",
":",
"return",
"TypeBinding",
".",
"VOID",
";",
"case",
"'C'",
":",
"return",
"TypeBinding",
".",
"CHAR",
";",
"case",
"'D'",
":",
"return",
"TypeBinding",
".",
"DOUBLE",
";",
"case",
"'B'",
":",
"return",
"TypeBinding",
".",
"BYTE",
";",
"case",
"'F'",
":",
"return",
"TypeBinding",
".",
"FLOAT",
";",
"case",
"'J'",
":",
"return",
"TypeBinding",
".",
"LONG",
";",
"case",
"'S'",
":",
"return",
"TypeBinding",
".",
"SHORT",
";",
"case",
"'N'",
":",
"return",
"TypeBinding",
".",
"NULL",
";",
"default",
":",
"return",
"null",
";",
"}",
"}",
"private",
"TypeBinding",
"getBinaryBinding",
"(",
")",
"{",
"if",
"(",
"this",
".",
"compoundName",
".",
"length",
"==",
"0",
")",
"return",
"null",
";",
"return",
"this",
".",
"environment",
".",
"getType",
"(",
"this",
".",
"compoundName",
")",
";",
"}",
"public",
"CompilationUnitDeclaration",
"getCompilationUnitDeclaration",
"(",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"name",
"=",
"this",
".",
"compoundName",
";",
"if",
"(",
"name",
".",
"length",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"this",
".",
"environment",
"==",
"null",
")",
"return",
"null",
";",
"ReferenceBinding",
"binding",
"=",
"this",
".",
"environment",
".",
"getType",
"(",
"name",
")",
";",
"if",
"(",
"!",
"(",
"binding",
"instanceof",
"SourceTypeBinding",
")",
")",
"{",
"if",
"(",
"this",
".",
"secondarySimpleName",
"==",
"null",
")",
"return",
"null",
";",
"int",
"length",
"=",
"name",
".",
"length",
";",
"System",
".",
"arraycopy",
"(",
"name",
",",
"0",
",",
"name",
"=",
"new",
"char",
"[",
"length",
"]",
"[",
"]",
",",
"0",
",",
"length",
"-",
"1",
")",
";",
"name",
"[",
"length",
"-",
"1",
"]",
"=",
"this",
".",
"secondarySimpleName",
";",
"binding",
"=",
"this",
".",
"environment",
".",
"getType",
"(",
"name",
")",
";",
"if",
"(",
"!",
"(",
"binding",
"instanceof",
"SourceTypeBinding",
")",
")",
"return",
"null",
";",
"}",
"SourceTypeBinding",
"sourceTypeBinding",
"=",
"(",
"SourceTypeBinding",
")",
"binding",
";",
"if",
"(",
"sourceTypeBinding",
".",
"scope",
"==",
"null",
")",
"return",
"null",
";",
"return",
"sourceTypeBinding",
".",
"scope",
".",
"compilationUnitScope",
"(",
")",
".",
"referenceContext",
";",
"}",
"public",
"Binding",
"getCompilerBinding",
"(",
")",
"{",
"try",
"{",
"parse",
"(",
")",
";",
"return",
"this",
".",
"compilerBinding",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
"+",
"getKey",
"(",
")",
")",
";",
"return",
"null",
";",
"}",
"}",
"private",
"TypeBinding",
"getTypeBinding",
"(",
"char",
"[",
"]",
"simpleTypeName",
")",
"{",
"if",
"(",
"this",
".",
"typeBinding",
"instanceof",
"ReferenceBinding",
")",
"{",
"return",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"typeBinding",
")",
".",
"getMemberType",
"(",
"simpleTypeName",
")",
";",
"}",
"TypeDeclaration",
"[",
"]",
"typeDeclarations",
"=",
"this",
".",
"typeDeclaration",
"==",
"null",
"?",
"(",
"this",
".",
"parsedUnit",
"==",
"null",
"?",
"null",
":",
"this",
".",
"parsedUnit",
".",
"types",
")",
":",
"this",
".",
"typeDeclaration",
".",
"memberTypes",
";",
"if",
"(",
"typeDeclarations",
"==",
"null",
")",
"return",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"typeDeclarations",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"TypeDeclaration",
"declaration",
"=",
"typeDeclarations",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"simpleTypeName",
",",
"declaration",
".",
"name",
")",
")",
"{",
"this",
".",
"typeDeclaration",
"=",
"declaration",
";",
"return",
"declaration",
".",
"binding",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"TypeBinding",
"[",
"]",
"getTypeBindingArguments",
"(",
")",
"{",
"int",
"size",
"=",
"this",
".",
"types",
".",
"size",
"(",
")",
";",
"TypeBinding",
"[",
"]",
"arguments",
"=",
"new",
"TypeBinding",
"[",
"size",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"{",
"BindingKeyResolver",
"resolver",
"=",
"(",
"BindingKeyResolver",
")",
"this",
".",
"types",
".",
"get",
"(",
"i",
")",
";",
"TypeBinding",
"compilerBinding2",
"=",
"(",
"TypeBinding",
")",
"resolver",
".",
"compilerBinding",
";",
"if",
"(",
"compilerBinding2",
"==",
"null",
")",
"{",
"this",
".",
"types",
"=",
"new",
"ArrayList",
"(",
")",
";",
"return",
"null",
";",
"}",
"arguments",
"[",
"i",
"]",
"=",
"compilerBinding2",
";",
"}",
"this",
".",
"types",
"=",
"new",
"ArrayList",
"(",
")",
";",
"return",
"arguments",
";",
"}",
"public",
"void",
"malformedKey",
"(",
")",
"{",
"this",
".",
"compoundName",
"=",
"CharOperation",
".",
"NO_CHAR_CHAR",
";",
"}",
"public",
"BindingKeyParser",
"newParser",
"(",
")",
"{",
"return",
"new",
"BindingKeyResolver",
"(",
"this",
",",
"this",
".",
"compiler",
",",
"this",
".",
"environment",
",",
"this",
".",
"outerMostParsedUnit",
"==",
"null",
"?",
"this",
".",
"parsedUnit",
":",
"this",
".",
"outerMostParsedUnit",
",",
"this",
".",
"resolvedUnits",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"getKey",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,868 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IBootstrapMethodsAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IBootstrapMethodsEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"public",
"class",
"BootstrapMethodsAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IBootstrapMethodsAttribute",
"{",
"private",
"static",
"final",
"IBootstrapMethodsEntry",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"IBootstrapMethodsEntry",
"[",
"0",
"]",
";",
"private",
"IBootstrapMethodsEntry",
"[",
"]",
"entries",
";",
"private",
"int",
"numberOfBootstrapMethods",
";",
"public",
"BootstrapMethodsAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"this",
".",
"numberOfBootstrapMethods",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"this",
".",
"numberOfBootstrapMethods",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"entries",
"=",
"new",
"IBootstrapMethodsEntry",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"entries",
"[",
"i",
"]",
"=",
"new",
"BootstrapMethodsEntry",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"readOffset",
"+=",
"8",
";",
"}",
"}",
"else",
"{",
"this",
".",
"entries",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"IBootstrapMethodsEntry",
"[",
"]",
"getBootstrapMethods",
"(",
")",
"{",
"return",
"this",
".",
"entries",
";",
"}",
"public",
"int",
"getBootstrapMethodsLength",
"(",
")",
"{",
"return",
"this",
".",
"numberOfBootstrapMethods",
";",
"}",
"}",
"</s>"
] |
2,869 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IParameterAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IRuntimeVisibleParameterAnnotationsAttribute",
";",
"public",
"class",
"RuntimeVisibleParameterAnnotationsAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IRuntimeVisibleParameterAnnotationsAttribute",
"{",
"private",
"static",
"final",
"IParameterAnnotation",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"IParameterAnnotation",
"[",
"0",
"]",
";",
"private",
"int",
"parametersNumber",
";",
"private",
"IParameterAnnotation",
"[",
"]",
"parameterAnnotations",
";",
"public",
"RuntimeVisibleParameterAnnotationsAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u1At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"parametersNumber",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"7",
";",
"this",
".",
"parameterAnnotations",
"=",
"new",
"IParameterAnnotation",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ParameterAnnotation",
"parameterAnnotation",
"=",
"new",
"ParameterAnnotation",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"parameterAnnotations",
"[",
"i",
"]",
"=",
"parameterAnnotation",
";",
"readOffset",
"+=",
"parameterAnnotation",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"parameterAnnotations",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"IParameterAnnotation",
"[",
"]",
"getParameterAnnotations",
"(",
")",
"{",
"return",
"this",
".",
"parameterAnnotations",
";",
"}",
"public",
"int",
"getParametersNumber",
"(",
")",
"{",
"return",
"this",
".",
"parametersNumber",
";",
"}",
"}",
"</s>"
] |
2,870 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IClassFileAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IClassFileReader",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ICodeAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IExceptionAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IMethodInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IModifierConstants",
";",
"public",
"class",
"MethodInfo",
"extends",
"ClassFileStruct",
"implements",
"IMethodInfo",
"{",
"private",
"int",
"accessFlags",
";",
"private",
"int",
"attributeBytes",
";",
"private",
"IClassFileAttribute",
"[",
"]",
"attributes",
";",
"private",
"int",
"attributesCount",
";",
"private",
"ICodeAttribute",
"codeAttribute",
";",
"private",
"char",
"[",
"]",
"descriptor",
";",
"private",
"int",
"descriptorIndex",
";",
"private",
"IExceptionAttribute",
"exceptionAttribute",
";",
"private",
"boolean",
"isDeprecated",
";",
"private",
"boolean",
"isSynthetic",
";",
"private",
"char",
"[",
"]",
"name",
";",
"private",
"int",
"nameIndex",
";",
"public",
"MethodInfo",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
",",
"int",
"decodingFlags",
")",
"throws",
"ClassFormatException",
"{",
"boolean",
"no_code_attribute",
"=",
"(",
"decodingFlags",
"&",
"IClassFileReader",
".",
"METHOD_BODIES",
")",
"==",
"0",
";",
"final",
"int",
"flags",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"accessFlags",
"=",
"flags",
";",
"if",
"(",
"(",
"flags",
"&",
"IModifierConstants",
".",
"ACC_SYNTHETIC",
")",
"!=",
"0",
")",
"{",
"this",
".",
"isSynthetic",
"=",
"true",
";",
"}",
"this",
".",
"nameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"nameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"name",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"this",
".",
"descriptorIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"4",
",",
"offset",
")",
";",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"descriptorIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"descriptor",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"this",
".",
"attributesCount",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"attributes",
"=",
"ClassFileAttribute",
".",
"NO_ATTRIBUTES",
";",
"if",
"(",
"this",
".",
"attributesCount",
"!=",
"0",
")",
"{",
"if",
"(",
"no_code_attribute",
"&&",
"!",
"isAbstract",
"(",
")",
"&&",
"!",
"isNative",
"(",
")",
")",
"{",
"if",
"(",
"this",
".",
"attributesCount",
"!=",
"1",
")",
"{",
"this",
".",
"attributes",
"=",
"new",
"IClassFileAttribute",
"[",
"this",
".",
"attributesCount",
"-",
"1",
"]",
";",
"}",
"}",
"else",
"{",
"this",
".",
"attributes",
"=",
"new",
"IClassFileAttribute",
"[",
"this",
".",
"attributesCount",
"]",
";",
"}",
"}",
"int",
"attributesIndex",
"=",
"0",
";",
"int",
"readOffset",
"=",
"8",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"attributesCount",
";",
"i",
"++",
")",
"{",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"offset",
")",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"char",
"[",
"]",
"attributeName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"DEPRECATED",
")",
")",
"{",
"this",
".",
"isDeprecated",
"=",
"true",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"ClassFileAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"SYNTHETIC",
")",
")",
"{",
"this",
".",
"isSynthetic",
"=",
"true",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"ClassFileAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"CODE",
")",
")",
"{",
"if",
"(",
"!",
"no_code_attribute",
")",
"{",
"this",
".",
"codeAttribute",
"=",
"new",
"CodeAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"this",
".",
"codeAttribute",
";",
"}",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"EXCEPTIONS",
")",
")",
"{",
"this",
".",
"exceptionAttribute",
"=",
"new",
"ExceptionAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"this",
".",
"exceptionAttribute",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"SIGNATURE",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"SignatureAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_ANNOTATIONS",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"RuntimeVisibleAnnotationsAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_ANNOTATIONS",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"RuntimeInvisibleAnnotationsAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"RuntimeVisibleParameterAnnotationsAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"RuntimeInvisibleParameterAnnotationsAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"ANNOTATION_DEFAULT",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"AnnotationDefaultAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"ClassFileAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"classFileBytes",
",",
"readOffset",
"+",
"2",
",",
"offset",
")",
")",
";",
"}",
"this",
".",
"attributeBytes",
"=",
"readOffset",
";",
"}",
"public",
"int",
"getAccessFlags",
"(",
")",
"{",
"return",
"this",
".",
"accessFlags",
";",
"}",
"public",
"int",
"getAttributeCount",
"(",
")",
"{",
"return",
"this",
".",
"attributesCount",
";",
"}",
"public",
"IClassFileAttribute",
"[",
"]",
"getAttributes",
"(",
")",
"{",
"return",
"this",
".",
"attributes",
";",
"}",
"public",
"ICodeAttribute",
"getCodeAttribute",
"(",
")",
"{",
"return",
"this",
".",
"codeAttribute",
";",
"}",
"public",
"char",
"[",
"]",
"getDescriptor",
"(",
")",
"{",
"return",
"this",
".",
"descriptor",
";",
"}",
"public",
"int",
"getDescriptorIndex",
"(",
")",
"{",
"return",
"this",
".",
"descriptorIndex",
";",
"}",
"public",
"IExceptionAttribute",
"getExceptionAttribute",
"(",
")",
"{",
"return",
"this",
".",
"exceptionAttribute",
";",
"}",
"public",
"char",
"[",
"]",
"getName",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"int",
"getNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"nameIndex",
";",
"}",
"private",
"boolean",
"isAbstract",
"(",
")",
"{",
"return",
"(",
"this",
".",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_ABSTRACT",
")",
"!=",
"0",
";",
"}",
"public",
"boolean",
"isClinit",
"(",
")",
"{",
"return",
"this",
".",
"name",
"[",
"0",
"]",
"==",
"'<'",
"&&",
"this",
".",
"name",
".",
"length",
"==",
"8",
";",
"}",
"public",
"boolean",
"isConstructor",
"(",
")",
"{",
"return",
"this",
".",
"name",
"[",
"0",
"]",
"==",
"'<'",
"&&",
"this",
".",
"name",
".",
"length",
"==",
"6",
";",
"}",
"public",
"boolean",
"isDeprecated",
"(",
")",
"{",
"return",
"this",
".",
"isDeprecated",
";",
"}",
"private",
"boolean",
"isNative",
"(",
")",
"{",
"return",
"(",
"this",
".",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_NATIVE",
")",
"!=",
"0",
";",
"}",
"public",
"boolean",
"isSynthetic",
"(",
")",
"{",
"return",
"this",
".",
"isSynthetic",
";",
"}",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"attributeBytes",
";",
"}",
"}",
"</s>"
] |
2,871 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IStackMapFrame",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IVerificationTypeInfo",
";",
"public",
"class",
"DefaultStackMapFrame",
"extends",
"ClassFileStruct",
"implements",
"IStackMapFrame",
"{",
"private",
"static",
"final",
"IVerificationTypeInfo",
"[",
"]",
"EMPTY_LOCALS_OR_STACK_ITEMS",
"=",
"new",
"IVerificationTypeInfo",
"[",
"0",
"]",
";",
"private",
"int",
"readOffset",
";",
"private",
"int",
"numberOfLocals",
";",
"private",
"int",
"numberOfStackItems",
";",
"private",
"IVerificationTypeInfo",
"[",
"]",
"locals",
";",
"private",
"IVerificationTypeInfo",
"[",
"]",
"stackItems",
";",
"private",
"int",
"offsetDelta",
";",
"public",
"DefaultStackMapFrame",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"this",
".",
"offsetDelta",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"int",
"tempLocals",
"=",
"u2At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"this",
".",
"numberOfLocals",
"=",
"tempLocals",
";",
"this",
".",
"readOffset",
"=",
"4",
";",
"if",
"(",
"tempLocals",
"!=",
"0",
")",
"{",
"this",
".",
"locals",
"=",
"new",
"IVerificationTypeInfo",
"[",
"tempLocals",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tempLocals",
";",
"i",
"++",
")",
"{",
"VerificationInfo",
"verificationInfo",
"=",
"new",
"VerificationInfo",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"locals",
"[",
"i",
"]",
"=",
"verificationInfo",
";",
"this",
".",
"readOffset",
"+=",
"verificationInfo",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"locals",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"}",
"int",
"tempStackItems",
"=",
"u2At",
"(",
"classFileBytes",
",",
"this",
".",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"this",
".",
"numberOfStackItems",
"=",
"tempStackItems",
";",
"if",
"(",
"tempStackItems",
"!=",
"0",
")",
"{",
"this",
".",
"stackItems",
"=",
"new",
"IVerificationTypeInfo",
"[",
"tempStackItems",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tempStackItems",
";",
"i",
"++",
")",
"{",
"VerificationInfo",
"verificationInfo",
"=",
"new",
"VerificationInfo",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"stackItems",
"[",
"i",
"]",
"=",
"verificationInfo",
";",
"this",
".",
"readOffset",
"+=",
"verificationInfo",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"stackItems",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"}",
"}",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"readOffset",
";",
"}",
"public",
"int",
"getFrameType",
"(",
")",
"{",
"return",
"255",
";",
"}",
"public",
"IVerificationTypeInfo",
"[",
"]",
"getLocals",
"(",
")",
"{",
"return",
"this",
".",
"locals",
";",
"}",
"public",
"int",
"getNumberOfLocals",
"(",
")",
"{",
"return",
"this",
".",
"numberOfLocals",
";",
"}",
"public",
"int",
"getNumberOfStackItems",
"(",
")",
"{",
"return",
"this",
".",
"numberOfStackItems",
";",
"}",
"public",
"int",
"getOffsetDelta",
"(",
")",
"{",
"return",
"this",
".",
"offsetDelta",
";",
"}",
"public",
"IVerificationTypeInfo",
"[",
"]",
"getStackItems",
"(",
")",
"{",
"return",
"this",
".",
"stackItems",
";",
"}",
"}",
"</s>"
] |
2,872 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CategorizedProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"CompilationResult",
";",
"public",
"class",
"RecordedParsingInformation",
"{",
"public",
"CategorizedProblem",
"[",
"]",
"problems",
";",
"public",
"int",
"problemsCount",
";",
"public",
"int",
"[",
"]",
"lineEnds",
";",
"public",
"int",
"[",
"]",
"[",
"]",
"commentPositions",
";",
"public",
"RecordedParsingInformation",
"(",
"CategorizedProblem",
"[",
"]",
"problems",
",",
"int",
"[",
"]",
"lineEnds",
",",
"int",
"[",
"]",
"[",
"]",
"commentPositions",
")",
"{",
"this",
".",
"problems",
"=",
"problems",
";",
"this",
".",
"lineEnds",
"=",
"lineEnds",
";",
"this",
".",
"commentPositions",
"=",
"commentPositions",
";",
"this",
".",
"problemsCount",
"=",
"problems",
"!=",
"null",
"?",
"problems",
".",
"length",
":",
"0",
";",
"}",
"void",
"updateRecordedParsingInformation",
"(",
"CompilationResult",
"compilationResult",
")",
"{",
"if",
"(",
"compilationResult",
".",
"problems",
"!=",
"null",
")",
"{",
"this",
".",
"problems",
"=",
"compilationResult",
".",
"problems",
";",
"this",
".",
"problemsCount",
"=",
"this",
".",
"problems",
".",
"length",
";",
"}",
"}",
"}",
"</s>"
] |
2,873 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IStackMapFrame",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IStackMapTableAttribute",
";",
"public",
"class",
"StackMapTableAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IStackMapTableAttribute",
"{",
"private",
"static",
"final",
"IStackMapFrame",
"[",
"]",
"NO_FRAMES",
"=",
"new",
"IStackMapFrame",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"byte",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"byte",
"[",
"0",
"]",
";",
"private",
"int",
"numberOfEntries",
";",
"private",
"IStackMapFrame",
"[",
"]",
"frames",
";",
"private",
"byte",
"[",
"]",
"bytes",
";",
"public",
"StackMapTableAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"numberOfEntries",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"frames",
"=",
"new",
"IStackMapFrame",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"StackMapFrame",
"frame",
"=",
"new",
"StackMapFrame",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"frames",
"[",
"i",
"]",
"=",
"frame",
";",
"readOffset",
"+=",
"frame",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"frames",
"=",
"NO_FRAMES",
";",
"}",
"final",
"int",
"byteLength",
"=",
"(",
"int",
")",
"u4At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"System",
".",
"arraycopy",
"(",
"classFileBytes",
",",
"offset",
"+",
"6",
",",
"this",
".",
"bytes",
"=",
"new",
"byte",
"[",
"byteLength",
"]",
",",
"0",
",",
"byteLength",
")",
";",
"}",
"else",
"{",
"this",
".",
"bytes",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"int",
"getNumberOfEntries",
"(",
")",
"{",
"return",
"this",
".",
"numberOfEntries",
";",
"}",
"public",
"IStackMapFrame",
"[",
"]",
"getStackMapFrame",
"(",
")",
"{",
"return",
"this",
".",
"frames",
";",
"}",
"public",
"byte",
"[",
"]",
"getBytes",
"(",
")",
"{",
"return",
"this",
".",
"bytes",
";",
"}",
"}",
"</s>"
] |
2,874 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"CompilationUnitDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"Parser",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"Scanner",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"ProblemReporter",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"ProblemSeverities",
";",
"public",
"class",
"CommentRecorderParser",
"extends",
"Parser",
"{",
"int",
"[",
"]",
"commentStops",
"=",
"new",
"int",
"[",
"10",
"]",
";",
"int",
"[",
"]",
"commentStarts",
"=",
"new",
"int",
"[",
"10",
"]",
";",
"int",
"commentPtr",
"=",
"-",
"1",
";",
"protected",
"final",
"static",
"int",
"CommentIncrement",
"=",
"100",
";",
"public",
"CommentRecorderParser",
"(",
"ProblemReporter",
"problemReporter",
",",
"boolean",
"optimizeStringLiterals",
")",
"{",
"super",
"(",
"problemReporter",
",",
"optimizeStringLiterals",
")",
";",
"}",
"public",
"void",
"checkComment",
"(",
")",
"{",
"if",
"(",
"!",
"(",
"this",
".",
"diet",
"&&",
"this",
".",
"dietInt",
"==",
"0",
")",
"&&",
"this",
".",
"scanner",
".",
"commentPtr",
">=",
"0",
")",
"{",
"flushCommentsDefinedPriorTo",
"(",
"this",
".",
"endStatementPosition",
")",
";",
"}",
"boolean",
"deprecated",
"=",
"false",
";",
"boolean",
"checkDeprecated",
"=",
"false",
";",
"int",
"lastCommentIndex",
"=",
"-",
"1",
";",
"nextComment",
":",
"for",
"(",
"lastCommentIndex",
"=",
"this",
".",
"scanner",
".",
"commentPtr",
";",
"lastCommentIndex",
">=",
"0",
";",
"lastCommentIndex",
"--",
")",
"{",
"int",
"commentSourceStart",
"=",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"lastCommentIndex",
"]",
";",
"if",
"(",
"(",
"commentSourceStart",
"<",
"0",
")",
"||",
"(",
"this",
".",
"modifiersSourceStart",
"!=",
"-",
"1",
"&&",
"this",
".",
"modifiersSourceStart",
"<",
"commentSourceStart",
")",
"||",
"(",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"lastCommentIndex",
"]",
"<",
"0",
")",
")",
"{",
"continue",
"nextComment",
";",
"}",
"checkDeprecated",
"=",
"true",
";",
"int",
"commentSourceEnd",
"=",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"lastCommentIndex",
"]",
"-",
"1",
";",
"if",
"(",
"this",
".",
"javadocParser",
".",
"shouldReportProblems",
")",
"{",
"this",
".",
"javadocParser",
".",
"reportProblems",
"=",
"this",
".",
"currentElement",
"==",
"null",
"||",
"commentSourceEnd",
">",
"this",
".",
"lastJavadocEnd",
";",
"}",
"else",
"{",
"this",
".",
"javadocParser",
".",
"reportProblems",
"=",
"false",
";",
"}",
"deprecated",
"=",
"this",
".",
"javadocParser",
".",
"checkDeprecation",
"(",
"lastCommentIndex",
")",
";",
"this",
".",
"javadoc",
"=",
"this",
".",
"javadocParser",
".",
"docComment",
";",
"if",
"(",
"this",
".",
"currentElement",
"==",
"null",
")",
"this",
".",
"lastJavadocEnd",
"=",
"commentSourceEnd",
";",
"break",
"nextComment",
";",
"}",
"if",
"(",
"deprecated",
")",
"{",
"checkAndSetModifiers",
"(",
"ClassFileConstants",
".",
"AccDeprecated",
")",
";",
"}",
"if",
"(",
"lastCommentIndex",
">=",
"0",
"&&",
"checkDeprecated",
")",
"{",
"this",
".",
"modifiersSourceStart",
"=",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"lastCommentIndex",
"]",
";",
"if",
"(",
"this",
".",
"modifiersSourceStart",
"<",
"0",
")",
"{",
"this",
".",
"modifiersSourceStart",
"=",
"-",
"this",
".",
"modifiersSourceStart",
";",
"}",
"}",
"}",
"protected",
"void",
"consumeClassHeader",
"(",
")",
"{",
"pushOnCommentsStack",
"(",
"0",
",",
"this",
".",
"scanner",
".",
"commentPtr",
")",
";",
"super",
".",
"consumeClassHeader",
"(",
")",
";",
"}",
"protected",
"void",
"consumeEmptyTypeDeclaration",
"(",
")",
"{",
"pushOnCommentsStack",
"(",
"0",
",",
"this",
".",
"scanner",
".",
"commentPtr",
")",
";",
"super",
".",
"consumeEmptyTypeDeclaration",
"(",
")",
";",
"}",
"protected",
"void",
"consumeInterfaceHeader",
"(",
")",
"{",
"pushOnCommentsStack",
"(",
"0",
",",
"this",
".",
"scanner",
".",
"commentPtr",
")",
";",
"super",
".",
"consumeInterfaceHeader",
"(",
")",
";",
"}",
"protected",
"CompilationUnitDeclaration",
"endParse",
"(",
"int",
"act",
")",
"{",
"CompilationUnitDeclaration",
"unit",
"=",
"super",
".",
"endParse",
"(",
"act",
")",
";",
"if",
"(",
"unit",
".",
"comments",
"==",
"null",
")",
"{",
"pushOnCommentsStack",
"(",
"0",
",",
"this",
".",
"scanner",
".",
"commentPtr",
")",
";",
"unit",
".",
"comments",
"=",
"getCommentsPositions",
"(",
")",
";",
"}",
"return",
"unit",
";",
"}",
"public",
"int",
"flushCommentsDefinedPriorTo",
"(",
"int",
"position",
")",
"{",
"int",
"lastCommentIndex",
"=",
"this",
".",
"scanner",
".",
"commentPtr",
";",
"if",
"(",
"lastCommentIndex",
"<",
"0",
")",
"return",
"position",
";",
"int",
"index",
"=",
"lastCommentIndex",
";",
"int",
"validCount",
"=",
"0",
";",
"while",
"(",
"index",
">=",
"0",
")",
"{",
"int",
"commentEnd",
"=",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"index",
"]",
";",
"if",
"(",
"commentEnd",
"<",
"0",
")",
"commentEnd",
"=",
"-",
"commentEnd",
";",
"if",
"(",
"commentEnd",
"<=",
"position",
")",
"{",
"break",
";",
"}",
"index",
"--",
";",
"validCount",
"++",
";",
"}",
"if",
"(",
"validCount",
">",
"0",
")",
"{",
"int",
"immediateCommentEnd",
"=",
"0",
";",
"while",
"(",
"index",
"<",
"lastCommentIndex",
"&&",
"(",
"immediateCommentEnd",
"=",
"-",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"index",
"+",
"1",
"]",
")",
">",
"0",
")",
"{",
"immediateCommentEnd",
"--",
";",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"getLineNumber",
"(",
"position",
",",
"this",
".",
"scanner",
".",
"lineEnds",
",",
"0",
",",
"this",
".",
"scanner",
".",
"linePtr",
")",
"!=",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"getLineNumber",
"(",
"immediateCommentEnd",
",",
"this",
".",
"scanner",
".",
"lineEnds",
",",
"0",
",",
"this",
".",
"scanner",
".",
"linePtr",
")",
")",
"break",
";",
"position",
"=",
"immediateCommentEnd",
";",
"validCount",
"--",
";",
"index",
"++",
";",
"}",
"}",
"if",
"(",
"index",
"<",
"0",
")",
"return",
"position",
";",
"pushOnCommentsStack",
"(",
"0",
",",
"index",
")",
";",
"switch",
"(",
"validCount",
")",
"{",
"case",
"0",
":",
"break",
";",
"case",
"2",
":",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"0",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"index",
"+",
"1",
"]",
";",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"0",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"index",
"+",
"1",
"]",
";",
"this",
".",
"scanner",
".",
"commentTagStarts",
"[",
"0",
"]",
"=",
"this",
".",
"scanner",
".",
"commentTagStarts",
"[",
"index",
"+",
"1",
"]",
";",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"1",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"index",
"+",
"2",
"]",
";",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"1",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"index",
"+",
"2",
"]",
";",
"this",
".",
"scanner",
".",
"commentTagStarts",
"[",
"1",
"]",
"=",
"this",
".",
"scanner",
".",
"commentTagStarts",
"[",
"index",
"+",
"2",
"]",
";",
"break",
";",
"case",
"1",
":",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"0",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"index",
"+",
"1",
"]",
";",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"0",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"index",
"+",
"1",
"]",
";",
"this",
".",
"scanner",
".",
"commentTagStarts",
"[",
"0",
"]",
"=",
"this",
".",
"scanner",
".",
"commentTagStarts",
"[",
"index",
"+",
"1",
"]",
";",
"break",
";",
"default",
":",
"System",
".",
"arraycopy",
"(",
"this",
".",
"scanner",
".",
"commentStarts",
",",
"index",
"+",
"1",
",",
"this",
".",
"scanner",
".",
"commentStarts",
",",
"0",
",",
"validCount",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"scanner",
".",
"commentStops",
",",
"index",
"+",
"1",
",",
"this",
".",
"scanner",
".",
"commentStops",
",",
"0",
",",
"validCount",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"scanner",
".",
"commentTagStarts",
",",
"index",
"+",
"1",
",",
"this",
".",
"scanner",
".",
"commentTagStarts",
",",
"0",
",",
"validCount",
")",
";",
"}",
"this",
".",
"scanner",
".",
"commentPtr",
"=",
"validCount",
"-",
"1",
";",
"return",
"position",
";",
"}",
"public",
"int",
"[",
"]",
"[",
"]",
"getCommentsPositions",
"(",
")",
"{",
"int",
"[",
"]",
"[",
"]",
"positions",
"=",
"new",
"int",
"[",
"this",
".",
"commentPtr",
"+",
"1",
"]",
"[",
"2",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"commentPtr",
";",
"i",
"<=",
"max",
";",
"i",
"++",
")",
"{",
"positions",
"[",
"i",
"]",
"[",
"0",
"]",
"=",
"this",
".",
"commentStarts",
"[",
"i",
"]",
";",
"positions",
"[",
"i",
"]",
"[",
"1",
"]",
"=",
"this",
".",
"commentStops",
"[",
"i",
"]",
";",
"}",
"return",
"positions",
";",
"}",
"public",
"void",
"initialize",
"(",
"boolean",
"initializeNLS",
")",
"{",
"super",
".",
"initialize",
"(",
"initializeNLS",
")",
";",
"this",
".",
"commentPtr",
"=",
"-",
"1",
";",
"}",
"public",
"void",
"initialize",
"(",
")",
"{",
"super",
".",
"initialize",
"(",
")",
";",
"this",
".",
"commentPtr",
"=",
"-",
"1",
";",
"}",
"public",
"void",
"initializeScanner",
"(",
")",
"{",
"this",
".",
"scanner",
"=",
"new",
"Scanner",
"(",
"false",
",",
"false",
",",
"this",
".",
"options",
".",
"getSeverity",
"(",
"CompilerOptions",
".",
"NonExternalizedString",
")",
"!=",
"ProblemSeverities",
".",
"Ignore",
",",
"this",
".",
"options",
".",
"sourceLevel",
",",
"this",
".",
"options",
".",
"taskTags",
",",
"this",
".",
"options",
".",
"taskPriorities",
",",
"this",
".",
"options",
".",
"isTaskCaseSensitive",
")",
";",
"this",
".",
"options",
".",
"taskPriorities",
"=",
"this",
".",
"scanner",
".",
"taskPriorities",
";",
"}",
"private",
"void",
"pushOnCommentsStack",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<=",
"end",
";",
"i",
"++",
")",
"{",
"int",
"scannerStart",
"=",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"i",
"]",
"<",
"0",
"?",
"-",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"i",
"]",
":",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"i",
"]",
";",
"int",
"commentStart",
"=",
"this",
".",
"commentPtr",
"==",
"-",
"1",
"?",
"-",
"1",
":",
"(",
"this",
".",
"commentStarts",
"[",
"this",
".",
"commentPtr",
"]",
"<",
"0",
"?",
"-",
"this",
".",
"commentStarts",
"[",
"this",
".",
"commentPtr",
"]",
":",
"this",
".",
"commentStarts",
"[",
"this",
".",
"commentPtr",
"]",
")",
";",
"if",
"(",
"commentStart",
"==",
"-",
"1",
"||",
"scannerStart",
">",
"commentStart",
")",
"{",
"int",
"stackLength",
"=",
"this",
".",
"commentStarts",
".",
"length",
";",
"if",
"(",
"++",
"this",
".",
"commentPtr",
">=",
"stackLength",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"commentStarts",
",",
"0",
",",
"this",
".",
"commentStarts",
"=",
"new",
"int",
"[",
"stackLength",
"+",
"CommentIncrement",
"]",
",",
"0",
",",
"stackLength",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"commentStops",
",",
"0",
",",
"this",
".",
"commentStops",
"=",
"new",
"int",
"[",
"stackLength",
"+",
"CommentIncrement",
"]",
",",
"0",
",",
"stackLength",
")",
";",
"}",
"this",
".",
"commentStarts",
"[",
"this",
".",
"commentPtr",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStarts",
"[",
"i",
"]",
";",
"this",
".",
"commentStops",
"[",
"this",
".",
"commentPtr",
"]",
"=",
"this",
".",
"scanner",
".",
"commentStops",
"[",
"i",
"]",
";",
"}",
"}",
"}",
"protected",
"void",
"resetModifiers",
"(",
")",
"{",
"pushOnCommentsStack",
"(",
"0",
",",
"this",
".",
"scanner",
".",
"commentPtr",
")",
";",
"super",
".",
"resetModifiers",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,875 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IInnerClassesAttributeEntry",
";",
"public",
"class",
"InnerClassesAttributeEntry",
"extends",
"ClassFileStruct",
"implements",
"IInnerClassesAttributeEntry",
"{",
"private",
"int",
"innerClassNameIndex",
";",
"private",
"int",
"outerClassNameIndex",
";",
"private",
"int",
"innerNameIndex",
";",
"private",
"char",
"[",
"]",
"innerClassName",
";",
"private",
"char",
"[",
"]",
"outerClassName",
";",
"private",
"char",
"[",
"]",
"innerName",
";",
"private",
"int",
"accessFlags",
";",
"public",
"InnerClassesAttributeEntry",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"this",
".",
"innerClassNameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"outerClassNameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"this",
".",
"innerNameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"4",
",",
"offset",
")",
";",
"this",
".",
"accessFlags",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"IConstantPoolEntry",
"constantPoolEntry",
";",
"if",
"(",
"this",
".",
"innerClassNameIndex",
"!=",
"0",
")",
"{",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"innerClassNameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"innerClassName",
"=",
"constantPoolEntry",
".",
"getClassInfoName",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"outerClassNameIndex",
"!=",
"0",
")",
"{",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"outerClassNameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"outerClassName",
"=",
"constantPoolEntry",
".",
"getClassInfoName",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"innerNameIndex",
"!=",
"0",
")",
"{",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"innerNameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"innerName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"}",
"public",
"int",
"getAccessFlags",
"(",
")",
"{",
"return",
"this",
".",
"accessFlags",
";",
"}",
"public",
"char",
"[",
"]",
"getInnerClassName",
"(",
")",
"{",
"return",
"this",
".",
"innerClassName",
";",
"}",
"public",
"int",
"getInnerClassNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"innerClassNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getInnerName",
"(",
")",
"{",
"return",
"this",
".",
"innerName",
";",
"}",
"public",
"int",
"getInnerNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"innerNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getOuterClassName",
"(",
")",
"{",
"return",
"this",
".",
"outerClassName",
";",
"}",
"public",
"int",
"getOuterClassNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"outerClassNameIndex",
";",
"}",
"}",
"</s>"
] |
2,876 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IRuntimeVisibleAnnotationsAttribute",
";",
"public",
"class",
"RuntimeVisibleAnnotationsAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IRuntimeVisibleAnnotationsAttribute",
"{",
"private",
"static",
"final",
"IAnnotation",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"IAnnotation",
"[",
"0",
"]",
";",
"private",
"int",
"annotationsNumber",
";",
"private",
"IAnnotation",
"[",
"]",
"annotations",
";",
"public",
"RuntimeVisibleAnnotationsAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"annotationsNumber",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"annotations",
"=",
"new",
"IAnnotation",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"Annotation",
"annotation",
"=",
"new",
"Annotation",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"annotations",
"[",
"i",
"]",
"=",
"annotation",
";",
"readOffset",
"+=",
"annotation",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"annotations",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"IAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"return",
"this",
".",
"annotations",
";",
"}",
"public",
"int",
"getAnnotationsNumber",
"(",
")",
"{",
"return",
"this",
".",
"annotationsNumber",
";",
"}",
"}",
"</s>"
] |
2,877 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IEnclosingMethodAttribute",
";",
"public",
"class",
"EnclosingMethodAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IEnclosingMethodAttribute",
"{",
"private",
"int",
"enclosingClassIndex",
";",
"private",
"char",
"[",
"]",
"enclosingClassName",
";",
"private",
"int",
"methodDescriptorIndex",
";",
"private",
"char",
"[",
"]",
"methodDescriptor",
";",
"private",
"int",
"methodNameIndex",
";",
"private",
"char",
"[",
"]",
"methodName",
";",
"private",
"int",
"methodNameAndTypeIndex",
";",
"EnclosingMethodAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"int",
"index",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"enclosingClassIndex",
"=",
"index",
";",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"enclosingClassName",
"=",
"constantPoolEntry",
".",
"getClassInfoName",
"(",
")",
";",
"this",
".",
"methodNameAndTypeIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"8",
",",
"offset",
")",
";",
"if",
"(",
"this",
".",
"methodNameAndTypeIndex",
"!=",
"0",
")",
"{",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"methodNameAndTypeIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_NameAndType",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"methodDescriptorIndex",
"=",
"constantPoolEntry",
".",
"getNameAndTypeInfoDescriptorIndex",
"(",
")",
";",
"this",
".",
"methodNameIndex",
"=",
"constantPoolEntry",
".",
"getNameAndTypeInfoNameIndex",
"(",
")",
";",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"methodDescriptorIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"methodDescriptor",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"methodNameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"methodName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"}",
"public",
"char",
"[",
"]",
"getEnclosingClass",
"(",
")",
"{",
"return",
"this",
".",
"enclosingClassName",
";",
"}",
"public",
"int",
"getEnclosingClassIndex",
"(",
")",
"{",
"return",
"this",
".",
"enclosingClassIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getMethodDescriptor",
"(",
")",
"{",
"return",
"this",
".",
"methodDescriptor",
";",
"}",
"public",
"int",
"getMethodDescriptorIndex",
"(",
")",
"{",
"return",
"this",
".",
"methodDescriptorIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getMethodName",
"(",
")",
"{",
"return",
"this",
".",
"methodName",
";",
"}",
"public",
"int",
"getMethodNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"methodNameIndex",
";",
"}",
"public",
"int",
"getMethodNameAndTypeIndex",
"(",
")",
"{",
"return",
"this",
".",
"methodNameAndTypeIndex",
";",
"}",
"}",
"</s>"
] |
2,878 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IClassFileAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IClassFileReader",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IFieldInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IInnerClassesAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IMethodInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IModifierConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ISourceAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"ClassFileReader",
"extends",
"ClassFileStruct",
"implements",
"IClassFileReader",
"{",
"private",
"static",
"final",
"IFieldInfo",
"[",
"]",
"NO_FIELD_INFOS",
"=",
"new",
"IFieldInfo",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"NO_INTERFACES_NAMES",
"=",
"CharOperation",
".",
"NO_CHAR_CHAR",
";",
"private",
"static",
"final",
"IMethodInfo",
"[",
"]",
"NO_METHOD_INFOS",
"=",
"new",
"IMethodInfo",
"[",
"0",
"]",
";",
"private",
"int",
"accessFlags",
";",
"private",
"IClassFileAttribute",
"[",
"]",
"attributes",
";",
"private",
"int",
"attributesCount",
";",
"private",
"char",
"[",
"]",
"className",
";",
"private",
"int",
"classNameIndex",
";",
"private",
"IConstantPool",
"constantPool",
";",
"private",
"IFieldInfo",
"[",
"]",
"fields",
";",
"private",
"int",
"fieldsCount",
";",
"private",
"IInnerClassesAttribute",
"innerClassesAttribute",
";",
"private",
"int",
"[",
"]",
"interfaceIndexes",
";",
"private",
"char",
"[",
"]",
"[",
"]",
"interfaceNames",
";",
"private",
"int",
"interfacesCount",
";",
"private",
"int",
"magicNumber",
";",
"private",
"int",
"majorVersion",
";",
"private",
"IMethodInfo",
"[",
"]",
"methods",
";",
"private",
"int",
"methodsCount",
";",
"private",
"int",
"minorVersion",
";",
"private",
"ISourceAttribute",
"sourceFileAttribute",
";",
"private",
"char",
"[",
"]",
"superclassName",
";",
"private",
"int",
"superclassNameIndex",
";",
"public",
"ClassFileReader",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"int",
"decodingFlags",
")",
"throws",
"ClassFormatException",
"{",
"int",
"constantPoolCount",
";",
"int",
"[",
"]",
"constantPoolOffsets",
";",
"try",
"{",
"this",
".",
"magicNumber",
"=",
"(",
"int",
")",
"u4At",
"(",
"classFileBytes",
",",
"0",
",",
"0",
")",
";",
"if",
"(",
"this",
".",
"magicNumber",
"!=",
"0xCAFEBABE",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_MAGIC_NUMBER",
")",
";",
"}",
"int",
"readOffset",
"=",
"10",
";",
"this",
".",
"minorVersion",
"=",
"u2At",
"(",
"classFileBytes",
",",
"4",
",",
"0",
")",
";",
"this",
".",
"majorVersion",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"0",
")",
";",
"if",
"(",
"(",
"decodingFlags",
"&",
"IClassFileReader",
".",
"CONSTANT_POOL",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"constantPoolCount",
"=",
"u2At",
"(",
"classFileBytes",
",",
"8",
",",
"0",
")",
";",
"constantPoolOffsets",
"=",
"new",
"int",
"[",
"constantPoolCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"constantPoolCount",
";",
"i",
"++",
")",
"{",
"int",
"tag",
"=",
"u1At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
"+",
"1",
",",
"0",
")",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Integer_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Float_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Long_SIZE",
";",
"i",
"++",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Double_SIZE",
";",
"i",
"++",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Class_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_String",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_String_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Methodref",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_Methodref_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_InterfaceMethodref",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_InterfaceMethodref_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_NameAndType",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_NameAndType_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_MethodHandle",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_MethodHandle_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_MethodType",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_MethodType_SIZE",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_InvokeDynamic",
":",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"IConstantPoolConstant",
".",
"CONSTANT_InvokeDynamic_SIZE",
";",
"break",
";",
"default",
":",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_TAG_CONSTANT",
")",
";",
"}",
"}",
"this",
".",
"constantPool",
"=",
"new",
"ConstantPool",
"(",
"classFileBytes",
",",
"constantPoolOffsets",
")",
";",
"this",
".",
"accessFlags",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"readOffset",
"+=",
"2",
";",
"this",
".",
"classNameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"this",
".",
"className",
"=",
"getConstantClassNameAt",
"(",
"classFileBytes",
",",
"constantPoolOffsets",
",",
"this",
".",
"classNameIndex",
")",
";",
"readOffset",
"+=",
"2",
";",
"this",
".",
"superclassNameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"this",
".",
"superclassNameIndex",
"!=",
"0",
")",
"{",
"this",
".",
"superclassName",
"=",
"getConstantClassNameAt",
"(",
"classFileBytes",
",",
"constantPoolOffsets",
",",
"this",
".",
"superclassNameIndex",
")",
";",
"}",
"this",
".",
"interfacesCount",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"readOffset",
"+=",
"2",
";",
"this",
".",
"interfaceNames",
"=",
"NO_INTERFACES_NAMES",
";",
"this",
".",
"interfaceIndexes",
"=",
"Util",
".",
"EMPTY_INT_ARRAY",
";",
"if",
"(",
"this",
".",
"interfacesCount",
"!=",
"0",
")",
"{",
"if",
"(",
"(",
"decodingFlags",
"&",
"IClassFileReader",
".",
"SUPER_INTERFACES",
")",
"!=",
"IClassFileReader",
".",
"CONSTANT_POOL",
")",
"{",
"this",
".",
"interfaceNames",
"=",
"new",
"char",
"[",
"this",
".",
"interfacesCount",
"]",
"[",
"]",
";",
"this",
".",
"interfaceIndexes",
"=",
"new",
"int",
"[",
"this",
".",
"interfacesCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"interfacesCount",
";",
"i",
"++",
")",
"{",
"this",
".",
"interfaceIndexes",
"[",
"i",
"]",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"this",
".",
"interfaceNames",
"[",
"i",
"]",
"=",
"getConstantClassNameAt",
"(",
"classFileBytes",
",",
"constantPoolOffsets",
",",
"this",
".",
"interfaceIndexes",
"[",
"i",
"]",
")",
";",
"readOffset",
"+=",
"2",
";",
"}",
"}",
"else",
"{",
"readOffset",
"+=",
"(",
"2",
"*",
"this",
".",
"interfacesCount",
")",
";",
"}",
"}",
"this",
".",
"fieldsCount",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"readOffset",
"+=",
"2",
";",
"this",
".",
"fields",
"=",
"NO_FIELD_INFOS",
";",
"if",
"(",
"this",
".",
"fieldsCount",
"!=",
"0",
")",
"{",
"if",
"(",
"(",
"decodingFlags",
"&",
"IClassFileReader",
".",
"FIELD_INFOS",
")",
"!=",
"IClassFileReader",
".",
"CONSTANT_POOL",
")",
"{",
"FieldInfo",
"field",
";",
"this",
".",
"fields",
"=",
"new",
"FieldInfo",
"[",
"this",
".",
"fieldsCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"fieldsCount",
";",
"i",
"++",
")",
"{",
"field",
"=",
"new",
"FieldInfo",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"this",
".",
"fields",
"[",
"i",
"]",
"=",
"field",
";",
"readOffset",
"+=",
"field",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"fieldsCount",
";",
"i",
"++",
")",
"{",
"int",
"attributeCountForField",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"readOffset",
")",
";",
"readOffset",
"+=",
"8",
";",
"if",
"(",
"attributeCountForField",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"attributeCountForField",
";",
"j",
"++",
")",
"{",
"int",
"attributeLength",
"=",
"(",
"int",
")",
"u4At",
"(",
"classFileBytes",
",",
"2",
",",
"readOffset",
")",
";",
"readOffset",
"+=",
"(",
"6",
"+",
"attributeLength",
")",
";",
"}",
"}",
"}",
"}",
"}",
"this",
".",
"methodsCount",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"readOffset",
"+=",
"2",
";",
"this",
".",
"methods",
"=",
"NO_METHOD_INFOS",
";",
"if",
"(",
"this",
".",
"methodsCount",
"!=",
"0",
")",
"{",
"if",
"(",
"(",
"decodingFlags",
"&",
"IClassFileReader",
".",
"METHOD_INFOS",
")",
"!=",
"IClassFileReader",
".",
"CONSTANT_POOL",
")",
"{",
"this",
".",
"methods",
"=",
"new",
"MethodInfo",
"[",
"this",
".",
"methodsCount",
"]",
";",
"MethodInfo",
"method",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"methodsCount",
";",
"i",
"++",
")",
"{",
"method",
"=",
"new",
"MethodInfo",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
",",
"decodingFlags",
")",
";",
"this",
".",
"methods",
"[",
"i",
"]",
"=",
"method",
";",
"readOffset",
"+=",
"method",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"methodsCount",
";",
"i",
"++",
")",
"{",
"int",
"attributeCountForMethod",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"readOffset",
")",
";",
"readOffset",
"+=",
"8",
";",
"if",
"(",
"attributeCountForMethod",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"attributeCountForMethod",
";",
"j",
"++",
")",
"{",
"int",
"attributeLength",
"=",
"(",
"int",
")",
"u4At",
"(",
"classFileBytes",
",",
"2",
",",
"readOffset",
")",
";",
"readOffset",
"+=",
"(",
"6",
"+",
"attributeLength",
")",
";",
"}",
"}",
"}",
"}",
"}",
"this",
".",
"attributesCount",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
";",
"readOffset",
"+=",
"2",
";",
"int",
"attributesIndex",
"=",
"0",
";",
"this",
".",
"attributes",
"=",
"ClassFileAttribute",
".",
"NO_ATTRIBUTES",
";",
"if",
"(",
"this",
".",
"attributesCount",
"!=",
"0",
")",
"{",
"if",
"(",
"(",
"decodingFlags",
"&",
"IClassFileReader",
".",
"CLASSFILE_ATTRIBUTES",
")",
"!=",
"IClassFileReader",
".",
"CONSTANT_POOL",
")",
"{",
"this",
".",
"attributes",
"=",
"new",
"IClassFileAttribute",
"[",
"this",
".",
"attributesCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"constantPoolOffsets",
"[",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"0",
")",
"]",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"classFileBytes",
",",
"utf8Offset",
"+",
"3",
",",
"0",
",",
"u2At",
"(",
"classFileBytes",
",",
"utf8Offset",
"+",
"1",
",",
"0",
")",
")",
";",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"INNER_CLASSES",
")",
")",
"{",
"this",
".",
"innerClassesAttribute",
"=",
"new",
"InnerClassesAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"this",
".",
"innerClassesAttribute",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"SOURCE",
")",
")",
"{",
"this",
".",
"sourceFileAttribute",
"=",
"new",
"SourceFileAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"this",
".",
"sourceFileAttribute",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"ENCLOSING_METHOD",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"EnclosingMethodAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"SIGNATURE",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"SignatureAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_ANNOTATIONS",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"RuntimeVisibleAnnotationsAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_ANNOTATIONS",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"RuntimeInvisibleAnnotationsAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"BOOTSTRAP_METHODS",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"BootstrapMethodsAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"}",
"else",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"ClassFileAttribute",
"(",
"classFileBytes",
",",
"this",
".",
"constantPool",
",",
"readOffset",
")",
";",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"classFileBytes",
",",
"readOffset",
"+",
"2",
",",
"0",
")",
")",
";",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"attributesCount",
";",
"i",
"++",
")",
"{",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"classFileBytes",
",",
"readOffset",
"+",
"2",
",",
"0",
")",
")",
";",
"}",
"}",
"}",
"if",
"(",
"readOffset",
"!=",
"classFileBytes",
".",
"length",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"TOO_MANY_BYTES",
")",
";",
"}",
"}",
"catch",
"(",
"ClassFormatException",
"e",
")",
"{",
"throw",
"e",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"ERROR_TRUNCATED_INPUT",
")",
";",
"}",
"}",
"public",
"int",
"getAccessFlags",
"(",
")",
"{",
"return",
"this",
".",
"accessFlags",
";",
"}",
"public",
"int",
"getAttributeCount",
"(",
")",
"{",
"return",
"this",
".",
"attributesCount",
";",
"}",
"public",
"IClassFileAttribute",
"[",
"]",
"getAttributes",
"(",
")",
"{",
"return",
"this",
".",
"attributes",
";",
"}",
"public",
"int",
"getClassIndex",
"(",
")",
"{",
"return",
"this",
".",
"classNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getClassName",
"(",
")",
"{",
"return",
"this",
".",
"className",
";",
"}",
"private",
"char",
"[",
"]",
"getConstantClassNameAt",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"int",
"[",
"]",
"constantPoolOffsets",
",",
"int",
"constantPoolIndex",
")",
"{",
"int",
"utf8Offset",
"=",
"constantPoolOffsets",
"[",
"u2At",
"(",
"classFileBytes",
",",
"constantPoolOffsets",
"[",
"constantPoolIndex",
"]",
"+",
"1",
",",
"0",
")",
"]",
";",
"return",
"utf8At",
"(",
"classFileBytes",
",",
"utf8Offset",
"+",
"3",
",",
"0",
",",
"u2At",
"(",
"classFileBytes",
",",
"utf8Offset",
"+",
"1",
",",
"0",
")",
")",
";",
"}",
"public",
"IConstantPool",
"getConstantPool",
"(",
")",
"{",
"return",
"this",
".",
"constantPool",
";",
"}",
"public",
"IFieldInfo",
"[",
"]",
"getFieldInfos",
"(",
")",
"{",
"return",
"this",
".",
"fields",
";",
"}",
"public",
"int",
"getFieldsCount",
"(",
")",
"{",
"return",
"this",
".",
"fieldsCount",
";",
"}",
"public",
"IInnerClassesAttribute",
"getInnerClassesAttribute",
"(",
")",
"{",
"return",
"this",
".",
"innerClassesAttribute",
";",
"}",
"public",
"int",
"[",
"]",
"getInterfaceIndexes",
"(",
")",
"{",
"return",
"this",
".",
"interfaceIndexes",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"getInterfaceNames",
"(",
")",
"{",
"return",
"this",
".",
"interfaceNames",
";",
"}",
"public",
"int",
"getMagic",
"(",
")",
"{",
"return",
"this",
".",
"magicNumber",
";",
"}",
"public",
"int",
"getMajorVersion",
"(",
")",
"{",
"return",
"this",
".",
"majorVersion",
";",
"}",
"public",
"IMethodInfo",
"[",
"]",
"getMethodInfos",
"(",
")",
"{",
"return",
"this",
".",
"methods",
";",
"}",
"public",
"int",
"getMethodsCount",
"(",
")",
"{",
"return",
"this",
".",
"methodsCount",
";",
"}",
"public",
"int",
"getMinorVersion",
"(",
")",
"{",
"return",
"this",
".",
"minorVersion",
";",
"}",
"public",
"ISourceAttribute",
"getSourceFileAttribute",
"(",
")",
"{",
"return",
"this",
".",
"sourceFileAttribute",
";",
"}",
"public",
"int",
"getSuperclassIndex",
"(",
")",
"{",
"return",
"this",
".",
"superclassNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getSuperclassName",
"(",
")",
"{",
"return",
"this",
".",
"superclassName",
";",
"}",
"public",
"boolean",
"isClass",
"(",
")",
"{",
"return",
"!",
"isInterface",
"(",
")",
";",
"}",
"public",
"boolean",
"isInterface",
"(",
")",
"{",
"return",
"(",
"getAccessFlags",
"(",
")",
"&",
"IModifierConstants",
".",
"ACC_INTERFACE",
")",
"!=",
"0",
";",
"}",
"}",
"</s>"
] |
2,879 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"public",
"class",
"ConstantPool",
"extends",
"ClassFileStruct",
"implements",
"IConstantPool",
"{",
"private",
"int",
"constantPoolCount",
";",
"private",
"int",
"[",
"]",
"constantPoolOffset",
";",
"private",
"byte",
"[",
"]",
"classFileBytes",
";",
"ConstantPool",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"[",
"]",
"constantPoolOffset",
")",
"{",
"this",
".",
"constantPoolCount",
"=",
"constantPoolOffset",
".",
"length",
";",
"this",
".",
"constantPoolOffset",
"=",
"constantPoolOffset",
";",
"this",
".",
"classFileBytes",
"=",
"reference",
";",
"}",
"public",
"IConstantPoolEntry",
"decodeEntry",
"(",
"int",
"index",
")",
"{",
"ConstantPoolEntry",
"constantPoolEntry",
"=",
"null",
";",
"int",
"kind",
"=",
"getEntryKind",
"(",
"index",
")",
";",
"switch",
"(",
"kind",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setClassInfoNameIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"constantPoolEntry",
".",
"setClassInfoName",
"(",
"getUtf8ValueAt",
"(",
"constantPoolEntry",
".",
"getClassInfoNameIndex",
"(",
")",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setDoubleValue",
"(",
"doubleAt",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setClassIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"int",
"declaringClassIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"constantPoolEntry",
".",
"getClassIndex",
"(",
")",
"]",
")",
";",
"constantPoolEntry",
".",
"setClassName",
"(",
"getUtf8ValueAt",
"(",
"declaringClassIndex",
")",
")",
";",
"constantPoolEntry",
".",
"setNameAndTypeIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"int",
"fieldNameIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"constantPoolEntry",
".",
"getNameAndTypeIndex",
"(",
")",
"]",
")",
";",
"int",
"fieldDescriptorIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"this",
".",
"constantPoolOffset",
"[",
"constantPoolEntry",
".",
"getNameAndTypeIndex",
"(",
")",
"]",
")",
";",
"constantPoolEntry",
".",
"setFieldName",
"(",
"getUtf8ValueAt",
"(",
"fieldNameIndex",
")",
")",
";",
"constantPoolEntry",
".",
"setFieldDescriptor",
"(",
"getUtf8ValueAt",
"(",
"fieldDescriptorIndex",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Methodref",
":",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_InterfaceMethodref",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setClassIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"declaringClassIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"constantPoolEntry",
".",
"getClassIndex",
"(",
")",
"]",
")",
";",
"constantPoolEntry",
".",
"setClassName",
"(",
"getUtf8ValueAt",
"(",
"declaringClassIndex",
")",
")",
";",
"constantPoolEntry",
".",
"setNameAndTypeIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"int",
"methodNameIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"constantPoolEntry",
".",
"getNameAndTypeIndex",
"(",
")",
"]",
")",
";",
"int",
"methodDescriptorIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"this",
".",
"constantPoolOffset",
"[",
"constantPoolEntry",
".",
"getNameAndTypeIndex",
"(",
")",
"]",
")",
";",
"constantPoolEntry",
".",
"setMethodName",
"(",
"getUtf8ValueAt",
"(",
"methodNameIndex",
")",
")",
";",
"constantPoolEntry",
".",
"setMethodDescriptor",
"(",
"getUtf8ValueAt",
"(",
"methodDescriptorIndex",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setFloatValue",
"(",
"floatAt",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setIntegerValue",
"(",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setLongValue",
"(",
"i8At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_NameAndType",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setNameAndTypeNameIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"constantPoolEntry",
".",
"setNameAndTypeDescriptorIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_String",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setStringIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"constantPoolEntry",
".",
"setStringValue",
"(",
"getUtf8ValueAt",
"(",
"constantPoolEntry",
".",
"getStringIndex",
"(",
")",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
":",
"constantPoolEntry",
"=",
"new",
"ConstantPoolEntry",
"(",
")",
";",
"constantPoolEntry",
".",
"reset",
"(",
")",
";",
"constantPoolEntry",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry",
".",
"setUtf8Length",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"constantPoolEntry",
".",
"setUtf8Value",
"(",
"getUtf8ValueAt",
"(",
"index",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_MethodHandle",
":",
"ConstantPoolEntry2",
"constantPoolEntry2",
"=",
"new",
"ConstantPoolEntry2",
"(",
")",
";",
"constantPoolEntry2",
".",
"reset",
"(",
")",
";",
"constantPoolEntry2",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry2",
".",
"setReferenceKind",
"(",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"constantPoolEntry2",
".",
"setReferenceIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"2",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"constantPoolEntry",
"=",
"constantPoolEntry2",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_MethodType",
":",
"constantPoolEntry2",
"=",
"new",
"ConstantPoolEntry2",
"(",
")",
";",
"constantPoolEntry2",
".",
"reset",
"(",
")",
";",
"constantPoolEntry2",
".",
"setKind",
"(",
"kind",
")",
";",
"methodDescriptorIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
";",
"constantPoolEntry2",
".",
"setDescriptorIndex",
"(",
"methodDescriptorIndex",
")",
";",
"constantPoolEntry2",
".",
"setMethodDescriptor",
"(",
"getUtf8ValueAt",
"(",
"methodDescriptorIndex",
")",
")",
";",
"constantPoolEntry",
"=",
"constantPoolEntry2",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_InvokeDynamic",
":",
"constantPoolEntry2",
"=",
"new",
"ConstantPoolEntry2",
"(",
")",
";",
"constantPoolEntry2",
".",
"reset",
"(",
")",
";",
"constantPoolEntry2",
".",
"setKind",
"(",
"kind",
")",
";",
"constantPoolEntry2",
".",
"setBootstrapMethodAttributeIndex",
"(",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
")",
";",
"int",
"nameAndTypeIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
";",
"constantPoolEntry2",
".",
"setNameAndTypeIndex",
"(",
"nameAndTypeIndex",
")",
";",
"methodNameIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"this",
".",
"constantPoolOffset",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"methodDescriptorIndex",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"this",
".",
"constantPoolOffset",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"constantPoolEntry2",
".",
"setMethodName",
"(",
"getUtf8ValueAt",
"(",
"methodNameIndex",
")",
")",
";",
"constantPoolEntry2",
".",
"setMethodDescriptor",
"(",
"getUtf8ValueAt",
"(",
"methodDescriptorIndex",
")",
")",
";",
"constantPoolEntry",
"=",
"constantPoolEntry2",
";",
"break",
";",
"}",
"return",
"constantPoolEntry",
";",
"}",
"public",
"int",
"getConstantPoolCount",
"(",
")",
"{",
"return",
"this",
".",
"constantPoolCount",
";",
"}",
"public",
"int",
"getEntryKind",
"(",
"int",
"index",
")",
"{",
"return",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"this",
".",
"constantPoolOffset",
"[",
"index",
"]",
")",
";",
"}",
"private",
"char",
"[",
"]",
"getUtf8ValueAt",
"(",
"int",
"utf8Index",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffset",
"[",
"utf8Index",
"]",
";",
"return",
"utf8At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"}",
"</s>"
] |
2,880 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"public",
"abstract",
"class",
"ClassFileStruct",
"{",
"protected",
"double",
"doubleAt",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"return",
"(",
"Double",
".",
"longBitsToDouble",
"(",
"i8At",
"(",
"reference",
",",
"relativeOffset",
",",
"structOffset",
")",
")",
")",
";",
"}",
"protected",
"float",
"floatAt",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"return",
"(",
"Float",
".",
"intBitsToFloat",
"(",
"i4At",
"(",
"reference",
",",
"relativeOffset",
",",
"structOffset",
")",
")",
")",
";",
"}",
"protected",
"int",
"i1At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"return",
"reference",
"[",
"relativeOffset",
"+",
"structOffset",
"]",
";",
"}",
"protected",
"int",
"i2At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"structOffset",
";",
"return",
"(",
"reference",
"[",
"position",
"++",
"]",
"<<",
"8",
")",
"+",
"(",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
";",
"}",
"protected",
"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",
"long",
"i8At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"structOffset",
";",
"return",
"(",
"(",
"(",
"long",
")",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"56",
")",
"+",
"(",
"(",
"(",
"long",
")",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"48",
")",
"+",
"(",
"(",
"(",
"long",
")",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"40",
")",
"+",
"(",
"(",
"(",
"long",
")",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"32",
")",
"+",
"(",
"(",
"(",
"long",
")",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"24",
")",
"+",
"(",
"(",
"(",
"long",
")",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"16",
")",
"+",
"(",
"(",
"(",
"long",
")",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"8",
")",
"+",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
";",
"}",
"protected",
"int",
"u1At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"return",
"(",
"reference",
"[",
"relativeOffset",
"+",
"structOffset",
"]",
"&",
"0xFF",
")",
";",
"}",
"protected",
"int",
"u2At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"structOffset",
";",
"return",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"8",
")",
"+",
"(",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
";",
"}",
"protected",
"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",
")",
")",
";",
"}",
"protected",
"char",
"[",
"]",
"utf8At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
",",
"int",
"bytesAvailable",
")",
"{",
"int",
"length",
"=",
"bytesAvailable",
";",
"char",
"outputBuf",
"[",
"]",
"=",
"new",
"char",
"[",
"bytesAvailable",
"]",
";",
"int",
"outputPos",
"=",
"0",
";",
"int",
"readOffset",
"=",
"structOffset",
"+",
"relativeOffset",
";",
"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",
";",
"}",
"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",
";",
"}",
"}",
"</s>"
] |
2,881 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IStackMapFrame",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IVerificationTypeInfo",
";",
"public",
"class",
"StackMapFrame",
"extends",
"ClassFileStruct",
"implements",
"IStackMapFrame",
"{",
"private",
"static",
"final",
"IVerificationTypeInfo",
"[",
"]",
"EMPTY_LOCALS_OR_STACK_ITEMS",
"=",
"new",
"IVerificationTypeInfo",
"[",
"0",
"]",
";",
"private",
"int",
"readOffset",
";",
"private",
"int",
"frameType",
";",
"private",
"int",
"numberOfLocals",
";",
"private",
"int",
"numberOfStackItems",
";",
"private",
"IVerificationTypeInfo",
"[",
"]",
"locals",
";",
"private",
"IVerificationTypeInfo",
"[",
"]",
"stackItems",
";",
"private",
"int",
"offsetDelta",
";",
"public",
"StackMapFrame",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"final",
"int",
"type",
"=",
"u1At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"frameType",
"=",
"type",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"247",
":",
"this",
".",
"offsetDelta",
"=",
"u2At",
"(",
"classFileBytes",
",",
"1",
",",
"offset",
")",
";",
"this",
".",
"numberOfStackItems",
"=",
"1",
";",
"this",
".",
"stackItems",
"=",
"new",
"VerificationInfo",
"[",
"1",
"]",
";",
"this",
".",
"readOffset",
"=",
"3",
";",
"VerificationInfo",
"info",
"=",
"new",
"VerificationInfo",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"stackItems",
"[",
"0",
"]",
"=",
"info",
";",
"this",
".",
"readOffset",
"+=",
"info",
".",
"sizeInBytes",
"(",
")",
";",
"this",
".",
"locals",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"numberOfLocals",
"=",
"0",
";",
"break",
";",
"case",
"248",
":",
"case",
"249",
":",
"case",
"250",
":",
"this",
".",
"offsetDelta",
"=",
"u2At",
"(",
"classFileBytes",
",",
"1",
",",
"offset",
")",
";",
"this",
".",
"numberOfStackItems",
"=",
"0",
";",
"this",
".",
"stackItems",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"readOffset",
"=",
"3",
";",
"this",
".",
"locals",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"numberOfLocals",
"=",
"0",
";",
"break",
";",
"case",
"251",
":",
"this",
".",
"offsetDelta",
"=",
"u2At",
"(",
"classFileBytes",
",",
"1",
",",
"offset",
")",
";",
"this",
".",
"numberOfStackItems",
"=",
"0",
";",
"this",
".",
"stackItems",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"readOffset",
"=",
"3",
";",
"this",
".",
"locals",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"numberOfLocals",
"=",
"0",
";",
"break",
";",
"case",
"252",
":",
"case",
"253",
":",
"case",
"254",
":",
"this",
".",
"offsetDelta",
"=",
"u2At",
"(",
"classFileBytes",
",",
"1",
",",
"offset",
")",
";",
"this",
".",
"numberOfStackItems",
"=",
"0",
";",
"this",
".",
"stackItems",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"readOffset",
"=",
"3",
";",
"int",
"diffLocals",
"=",
"type",
"-",
"251",
";",
"this",
".",
"numberOfLocals",
"=",
"diffLocals",
";",
"this",
".",
"locals",
"=",
"new",
"IVerificationTypeInfo",
"[",
"diffLocals",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"diffLocals",
";",
"i",
"++",
")",
"{",
"VerificationInfo",
"verificationInfo",
"=",
"new",
"VerificationInfo",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"locals",
"[",
"i",
"]",
"=",
"verificationInfo",
";",
"this",
".",
"readOffset",
"+=",
"verificationInfo",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"break",
";",
"case",
"255",
":",
"this",
".",
"offsetDelta",
"=",
"u2At",
"(",
"classFileBytes",
",",
"1",
",",
"offset",
")",
";",
"int",
"tempLocals",
"=",
"u2At",
"(",
"classFileBytes",
",",
"3",
",",
"offset",
")",
";",
"this",
".",
"numberOfLocals",
"=",
"tempLocals",
";",
"this",
".",
"readOffset",
"=",
"5",
";",
"if",
"(",
"tempLocals",
"!=",
"0",
")",
"{",
"this",
".",
"locals",
"=",
"new",
"IVerificationTypeInfo",
"[",
"tempLocals",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tempLocals",
";",
"i",
"++",
")",
"{",
"VerificationInfo",
"verificationInfo",
"=",
"new",
"VerificationInfo",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"locals",
"[",
"i",
"]",
"=",
"verificationInfo",
";",
"this",
".",
"readOffset",
"+=",
"verificationInfo",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"locals",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"}",
"int",
"tempStackItems",
"=",
"u2At",
"(",
"classFileBytes",
",",
"this",
".",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"this",
".",
"numberOfStackItems",
"=",
"tempStackItems",
";",
"if",
"(",
"tempStackItems",
"!=",
"0",
")",
"{",
"this",
".",
"stackItems",
"=",
"new",
"IVerificationTypeInfo",
"[",
"tempStackItems",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tempStackItems",
";",
"i",
"++",
")",
"{",
"VerificationInfo",
"verificationInfo",
"=",
"new",
"VerificationInfo",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"stackItems",
"[",
"i",
"]",
"=",
"verificationInfo",
";",
"this",
".",
"readOffset",
"+=",
"verificationInfo",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"stackItems",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"}",
"break",
";",
"default",
":",
"if",
"(",
"type",
"<=",
"63",
")",
"{",
"this",
".",
"offsetDelta",
"=",
"type",
";",
"this",
".",
"numberOfStackItems",
"=",
"0",
";",
"this",
".",
"stackItems",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"locals",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"numberOfLocals",
"=",
"0",
";",
"this",
".",
"readOffset",
"=",
"1",
";",
"}",
"else",
"if",
"(",
"type",
"<=",
"127",
")",
"{",
"this",
".",
"offsetDelta",
"=",
"type",
"-",
"64",
";",
"this",
".",
"numberOfStackItems",
"=",
"1",
";",
"this",
".",
"stackItems",
"=",
"new",
"VerificationInfo",
"[",
"1",
"]",
";",
"this",
".",
"readOffset",
"=",
"1",
";",
"info",
"=",
"new",
"VerificationInfo",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"stackItems",
"[",
"0",
"]",
"=",
"info",
";",
"this",
".",
"readOffset",
"+=",
"info",
".",
"sizeInBytes",
"(",
")",
";",
"this",
".",
"locals",
"=",
"EMPTY_LOCALS_OR_STACK_ITEMS",
";",
"this",
".",
"numberOfLocals",
"=",
"0",
";",
"}",
"}",
"}",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"readOffset",
";",
"}",
"public",
"int",
"getFrameType",
"(",
")",
"{",
"return",
"this",
".",
"frameType",
";",
"}",
"public",
"IVerificationTypeInfo",
"[",
"]",
"getLocals",
"(",
")",
"{",
"return",
"this",
".",
"locals",
";",
"}",
"public",
"int",
"getNumberOfLocals",
"(",
")",
"{",
"return",
"this",
".",
"numberOfLocals",
";",
"}",
"public",
"int",
"getNumberOfStackItems",
"(",
")",
"{",
"return",
"this",
".",
"numberOfStackItems",
";",
"}",
"public",
"int",
"getOffsetDelta",
"(",
")",
"{",
"return",
"this",
".",
"offsetDelta",
";",
"}",
"public",
"IVerificationTypeInfo",
"[",
"]",
"getStackItems",
"(",
")",
"{",
"return",
"this",
".",
"stackItems",
";",
"}",
"}",
"</s>"
] |
2,882 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"IScanner",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"ITerminalSymbols",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"InvalidInputException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"CompilationResult",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"NLSTag",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"ScannerHelper",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"TerminalTokens",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"PublicScanner",
"implements",
"IScanner",
",",
"ITerminalSymbols",
"{",
"public",
"long",
"sourceLevel",
";",
"public",
"long",
"complianceLevel",
";",
"public",
"boolean",
"useAssertAsAnIndentifier",
"=",
"false",
";",
"public",
"boolean",
"containsAssertKeyword",
"=",
"false",
";",
"public",
"boolean",
"useEnumAsAnIndentifier",
"=",
"false",
";",
"public",
"boolean",
"recordLineSeparator",
"=",
"false",
";",
"public",
"char",
"currentCharacter",
";",
"public",
"int",
"startPosition",
";",
"public",
"int",
"currentPosition",
";",
"public",
"int",
"initialPosition",
",",
"eofPosition",
";",
"public",
"boolean",
"skipComments",
"=",
"false",
";",
"public",
"boolean",
"tokenizeComments",
"=",
"false",
";",
"public",
"boolean",
"tokenizeWhiteSpace",
"=",
"false",
";",
"public",
"char",
"source",
"[",
"]",
";",
"public",
"char",
"[",
"]",
"withoutUnicodeBuffer",
";",
"public",
"int",
"withoutUnicodePtr",
";",
"public",
"boolean",
"unicodeAsBackSlash",
"=",
"false",
";",
"public",
"boolean",
"scanningFloatLiteral",
"=",
"false",
";",
"public",
"final",
"static",
"int",
"COMMENT_ARRAYS_SIZE",
"=",
"30",
";",
"public",
"int",
"[",
"]",
"commentStops",
"=",
"new",
"int",
"[",
"COMMENT_ARRAYS_SIZE",
"]",
";",
"public",
"int",
"[",
"]",
"commentStarts",
"=",
"new",
"int",
"[",
"COMMENT_ARRAYS_SIZE",
"]",
";",
"public",
"int",
"[",
"]",
"commentTagStarts",
"=",
"new",
"int",
"[",
"COMMENT_ARRAYS_SIZE",
"]",
";",
"public",
"int",
"commentPtr",
"=",
"-",
"1",
";",
"protected",
"int",
"lastCommentLinePosition",
"=",
"-",
"1",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"foundTaskTags",
"=",
"null",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"foundTaskMessages",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"foundTaskPriorities",
"=",
"null",
";",
"public",
"int",
"[",
"]",
"[",
"]",
"foundTaskPositions",
";",
"public",
"int",
"foundTaskCount",
"=",
"0",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"taskTags",
"=",
"null",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"taskPriorities",
"=",
"null",
";",
"public",
"boolean",
"isTaskCaseSensitive",
"=",
"true",
";",
"public",
"boolean",
"diet",
"=",
"false",
";",
"public",
"int",
"[",
"]",
"lineEnds",
"=",
"new",
"int",
"[",
"250",
"]",
";",
"public",
"int",
"linePtr",
"=",
"-",
"1",
";",
"public",
"boolean",
"wasAcr",
"=",
"false",
";",
"public",
"static",
"final",
"String",
"END_OF_SOURCE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_HEXA",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_OCTAL",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_CHARACTER_CONSTANT",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_ESCAPE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_INPUT",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_UNICODE_ESCAPE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_FLOAT",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_LOW_SURROGATE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_HIGH_SURROGATE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"NULL_SOURCE_STRING",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"UNTERMINATED_STRING",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"UNTERMINATED_COMMENT",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_CHAR_IN_STRING",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_DIGIT",
"=",
"\"\"",
";",
"private",
"static",
"final",
"int",
"[",
"]",
"EMPTY_LINE_ENDS",
"=",
"Util",
".",
"EMPTY_INT_ARRAY",
";",
"public",
"static",
"final",
"String",
"INVALID_BINARY",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"BINARY_LITERAL_NOT_BELOW_17",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"ILLEGAL_HEXA_LITERAL",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"INVALID_UNDERSCORE",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"UNDERSCORES_IN_LITERALS_NOT_BELOW_17",
"=",
"\"\"",
";",
"static",
"final",
"char",
"[",
"]",
"charArray_a",
"=",
"new",
"char",
"[",
"]",
"{",
"'a'",
"}",
",",
"charArray_b",
"=",
"new",
"char",
"[",
"]",
"{",
"'b'",
"}",
",",
"charArray_c",
"=",
"new",
"char",
"[",
"]",
"{",
"'c'",
"}",
",",
"charArray_d",
"=",
"new",
"char",
"[",
"]",
"{",
"'d'",
"}",
",",
"charArray_e",
"=",
"new",
"char",
"[",
"]",
"{",
"'e'",
"}",
",",
"charArray_f",
"=",
"new",
"char",
"[",
"]",
"{",
"'f'",
"}",
",",
"charArray_g",
"=",
"new",
"char",
"[",
"]",
"{",
"'g'",
"}",
",",
"charArray_h",
"=",
"new",
"char",
"[",
"]",
"{",
"'h'",
"}",
",",
"charArray_i",
"=",
"new",
"char",
"[",
"]",
"{",
"'i'",
"}",
",",
"charArray_j",
"=",
"new",
"char",
"[",
"]",
"{",
"'j'",
"}",
",",
"charArray_k",
"=",
"new",
"char",
"[",
"]",
"{",
"'k'",
"}",
",",
"charArray_l",
"=",
"new",
"char",
"[",
"]",
"{",
"'l'",
"}",
",",
"charArray_m",
"=",
"new",
"char",
"[",
"]",
"{",
"'m'",
"}",
",",
"charArray_n",
"=",
"new",
"char",
"[",
"]",
"{",
"'n'",
"}",
",",
"charArray_o",
"=",
"new",
"char",
"[",
"]",
"{",
"'o'",
"}",
",",
"charArray_p",
"=",
"new",
"char",
"[",
"]",
"{",
"'p'",
"}",
",",
"charArray_q",
"=",
"new",
"char",
"[",
"]",
"{",
"'q'",
"}",
",",
"charArray_r",
"=",
"new",
"char",
"[",
"]",
"{",
"'r'",
"}",
",",
"charArray_s",
"=",
"new",
"char",
"[",
"]",
"{",
"'s'",
"}",
",",
"charArray_t",
"=",
"new",
"char",
"[",
"]",
"{",
"'t'",
"}",
",",
"charArray_u",
"=",
"new",
"char",
"[",
"]",
"{",
"'u'",
"}",
",",
"charArray_v",
"=",
"new",
"char",
"[",
"]",
"{",
"'v'",
"}",
",",
"charArray_w",
"=",
"new",
"char",
"[",
"]",
"{",
"'w'",
"}",
",",
"charArray_x",
"=",
"new",
"char",
"[",
"]",
"{",
"'x'",
"}",
",",
"charArray_y",
"=",
"new",
"char",
"[",
"]",
"{",
"'y'",
"}",
",",
"charArray_z",
"=",
"new",
"char",
"[",
"]",
"{",
"'z'",
"}",
";",
"static",
"final",
"char",
"[",
"]",
"initCharArray",
"=",
"new",
"char",
"[",
"]",
"{",
"'\u0000'",
",",
"'\u0000'",
",",
"'\u0000'",
",",
"'\u0000'",
",",
"'\u0000'",
",",
"'\u0000'",
"}",
";",
"static",
"final",
"int",
"TableSize",
"=",
"30",
",",
"InternalTableSize",
"=",
"6",
";",
"public",
"static",
"final",
"int",
"OptimizedLength",
"=",
"7",
";",
"public",
"final",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"[",
"]",
"charArray_length",
"=",
"new",
"char",
"[",
"OptimizedLength",
"]",
"[",
"TableSize",
"]",
"[",
"InternalTableSize",
"]",
"[",
"]",
";",
"public",
"static",
"final",
"char",
"[",
"]",
"TAG_PREFIX",
"=",
"\"//$NON-NLS-\"",
".",
"toCharArray",
"(",
")",
";",
"public",
"static",
"final",
"int",
"TAG_PREFIX_LENGTH",
"=",
"TAG_PREFIX",
".",
"length",
";",
"public",
"static",
"final",
"char",
"TAG_POSTFIX",
"=",
"'$'",
";",
"public",
"static",
"final",
"int",
"TAG_POSTFIX_LENGTH",
"=",
"1",
";",
"private",
"NLSTag",
"[",
"]",
"nlsTags",
"=",
"null",
";",
"protected",
"int",
"nlsTagsPtr",
";",
"public",
"boolean",
"checkNonExternalizedStringLiterals",
";",
"protected",
"int",
"lastPosition",
";",
"public",
"boolean",
"returnOnlyGreater",
"=",
"false",
";",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"6",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"TableSize",
";",
"j",
"++",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"InternalTableSize",
";",
"k",
"++",
")",
"{",
"this",
".",
"charArray_length",
"[",
"i",
"]",
"[",
"j",
"]",
"[",
"k",
"]",
"=",
"initCharArray",
";",
"}",
"}",
"}",
"}",
"int",
"newEntry2",
"=",
"0",
",",
"newEntry3",
"=",
"0",
",",
"newEntry4",
"=",
"0",
",",
"newEntry5",
"=",
"0",
",",
"newEntry6",
"=",
"0",
";",
"public",
"boolean",
"insideRecovery",
"=",
"false",
";",
"public",
"static",
"final",
"int",
"RoundBracket",
"=",
"0",
";",
"public",
"static",
"final",
"int",
"SquareBracket",
"=",
"1",
";",
"public",
"static",
"final",
"int",
"CurlyBracket",
"=",
"2",
";",
"public",
"static",
"final",
"int",
"BracketKinds",
"=",
"3",
";",
"public",
"static",
"final",
"int",
"LOW_SURROGATE_MIN_VALUE",
"=",
"0xDC00",
";",
"public",
"static",
"final",
"int",
"HIGH_SURROGATE_MIN_VALUE",
"=",
"0xD800",
";",
"public",
"static",
"final",
"int",
"HIGH_SURROGATE_MAX_VALUE",
"=",
"0xDBFF",
";",
"public",
"static",
"final",
"int",
"LOW_SURROGATE_MAX_VALUE",
"=",
"0xDFFF",
";",
"public",
"PublicScanner",
"(",
")",
"{",
"this",
"(",
"false",
",",
"false",
",",
"false",
",",
"ClassFileConstants",
".",
"JDK1_3",
",",
"null",
",",
"null",
",",
"true",
")",
";",
"}",
"public",
"PublicScanner",
"(",
"boolean",
"tokenizeComments",
",",
"boolean",
"tokenizeWhiteSpace",
",",
"boolean",
"checkNonExternalizedStringLiterals",
",",
"long",
"sourceLevel",
",",
"long",
"complianceLevel",
",",
"char",
"[",
"]",
"[",
"]",
"taskTags",
",",
"char",
"[",
"]",
"[",
"]",
"taskPriorities",
",",
"boolean",
"isTaskCaseSensitive",
")",
"{",
"this",
".",
"eofPosition",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"this",
".",
"tokenizeComments",
"=",
"tokenizeComments",
";",
"this",
".",
"tokenizeWhiteSpace",
"=",
"tokenizeWhiteSpace",
";",
"this",
".",
"sourceLevel",
"=",
"sourceLevel",
";",
"this",
".",
"complianceLevel",
"=",
"complianceLevel",
";",
"this",
".",
"checkNonExternalizedStringLiterals",
"=",
"checkNonExternalizedStringLiterals",
";",
"if",
"(",
"taskTags",
"!=",
"null",
")",
"{",
"int",
"taskTagsLength",
"=",
"taskTags",
".",
"length",
";",
"int",
"length",
"=",
"taskTagsLength",
";",
"if",
"(",
"taskPriorities",
"!=",
"null",
")",
"{",
"int",
"taskPrioritiesLength",
"=",
"taskPriorities",
".",
"length",
";",
"if",
"(",
"taskPrioritiesLength",
"!=",
"taskTagsLength",
")",
"{",
"if",
"(",
"taskPrioritiesLength",
">",
"taskTagsLength",
")",
"{",
"System",
".",
"arraycopy",
"(",
"taskPriorities",
",",
"0",
",",
"(",
"taskPriorities",
"=",
"new",
"char",
"[",
"taskTagsLength",
"]",
"[",
"]",
")",
",",
"0",
",",
"taskTagsLength",
")",
";",
"}",
"else",
"{",
"System",
".",
"arraycopy",
"(",
"taskTags",
",",
"0",
",",
"(",
"taskTags",
"=",
"new",
"char",
"[",
"taskPrioritiesLength",
"]",
"[",
"]",
")",
",",
"0",
",",
"taskPrioritiesLength",
")",
";",
"length",
"=",
"taskPrioritiesLength",
";",
"}",
"}",
"int",
"[",
"]",
"initialIndexes",
"=",
"new",
"int",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"initialIndexes",
"[",
"i",
"]",
"=",
"i",
";",
"}",
"Util",
".",
"reverseQuickSort",
"(",
"taskTags",
",",
"0",
",",
"length",
"-",
"1",
",",
"initialIndexes",
")",
";",
"char",
"[",
"]",
"[",
"]",
"temp",
"=",
"new",
"char",
"[",
"length",
"]",
"[",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"temp",
"[",
"i",
"]",
"=",
"taskPriorities",
"[",
"initialIndexes",
"[",
"i",
"]",
"]",
";",
"}",
"this",
".",
"taskPriorities",
"=",
"temp",
";",
"}",
"else",
"{",
"Util",
".",
"reverseQuickSort",
"(",
"taskTags",
",",
"0",
",",
"length",
"-",
"1",
")",
";",
"}",
"this",
".",
"taskTags",
"=",
"taskTags",
";",
"this",
".",
"isTaskCaseSensitive",
"=",
"isTaskCaseSensitive",
";",
"}",
"}",
"public",
"PublicScanner",
"(",
"boolean",
"tokenizeComments",
",",
"boolean",
"tokenizeWhiteSpace",
",",
"boolean",
"checkNonExternalizedStringLiterals",
",",
"long",
"sourceLevel",
",",
"char",
"[",
"]",
"[",
"]",
"taskTags",
",",
"char",
"[",
"]",
"[",
"]",
"taskPriorities",
",",
"boolean",
"isTaskCaseSensitive",
")",
"{",
"this",
"(",
"tokenizeComments",
",",
"tokenizeWhiteSpace",
",",
"checkNonExternalizedStringLiterals",
",",
"sourceLevel",
",",
"sourceLevel",
",",
"taskTags",
",",
"taskPriorities",
",",
"isTaskCaseSensitive",
")",
";",
"}",
"public",
"final",
"boolean",
"atEnd",
"(",
")",
"{",
"return",
"this",
".",
"eofPosition",
"<=",
"this",
".",
"currentPosition",
";",
"}",
"public",
"void",
"checkTaskTag",
"(",
"int",
"commentStart",
",",
"int",
"commentEnd",
")",
"throws",
"InvalidInputException",
"{",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"if",
"(",
"this",
".",
"foundTaskCount",
">",
"0",
"&&",
"this",
".",
"foundTaskPositions",
"[",
"this",
".",
"foundTaskCount",
"-",
"1",
"]",
"[",
"0",
"]",
">=",
"commentStart",
")",
"{",
"return",
";",
"}",
"int",
"foundTaskIndex",
"=",
"this",
".",
"foundTaskCount",
";",
"char",
"previous",
"=",
"src",
"[",
"commentStart",
"+",
"1",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"commentStart",
"+",
"2",
";",
"i",
"<",
"commentEnd",
"&&",
"i",
"<",
"this",
".",
"eofPosition",
";",
"i",
"++",
")",
"{",
"char",
"[",
"]",
"tag",
"=",
"null",
";",
"char",
"[",
"]",
"priority",
"=",
"null",
";",
"if",
"(",
"previous",
"!=",
"'@'",
")",
"{",
"nextTag",
":",
"for",
"(",
"int",
"itag",
"=",
"0",
";",
"itag",
"<",
"this",
".",
"taskTags",
".",
"length",
";",
"itag",
"++",
")",
"{",
"tag",
"=",
"this",
".",
"taskTags",
"[",
"itag",
"]",
";",
"int",
"tagLength",
"=",
"tag",
".",
"length",
";",
"if",
"(",
"tagLength",
"==",
"0",
")",
"continue",
"nextTag",
";",
"if",
"(",
"ScannerHelper",
".",
"isJavaIdentifierStart",
"(",
"this",
".",
"complianceLevel",
",",
"tag",
"[",
"0",
"]",
")",
")",
"{",
"if",
"(",
"ScannerHelper",
".",
"isJavaIdentifierPart",
"(",
"this",
".",
"complianceLevel",
",",
"previous",
")",
")",
"{",
"continue",
"nextTag",
";",
"}",
"}",
"for",
"(",
"int",
"t",
"=",
"0",
";",
"t",
"<",
"tagLength",
";",
"t",
"++",
")",
"{",
"char",
"sc",
",",
"tc",
";",
"int",
"x",
"=",
"i",
"+",
"t",
";",
"if",
"(",
"x",
">=",
"this",
".",
"eofPosition",
"||",
"x",
">=",
"commentEnd",
")",
"continue",
"nextTag",
";",
"if",
"(",
"(",
"sc",
"=",
"src",
"[",
"i",
"+",
"t",
"]",
")",
"!=",
"(",
"tc",
"=",
"tag",
"[",
"t",
"]",
")",
")",
"{",
"if",
"(",
"this",
".",
"isTaskCaseSensitive",
"||",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"sc",
")",
"!=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"tc",
")",
")",
")",
"{",
"continue",
"nextTag",
";",
"}",
"}",
"}",
"if",
"(",
"i",
"+",
"tagLength",
"<",
"commentEnd",
"&&",
"ScannerHelper",
".",
"isJavaIdentifierPart",
"(",
"this",
".",
"complianceLevel",
",",
"src",
"[",
"i",
"+",
"tagLength",
"-",
"1",
"]",
")",
")",
"{",
"if",
"(",
"ScannerHelper",
".",
"isJavaIdentifierPart",
"(",
"this",
".",
"complianceLevel",
",",
"src",
"[",
"i",
"+",
"tagLength",
"]",
")",
")",
"continue",
"nextTag",
";",
"}",
"if",
"(",
"this",
".",
"foundTaskTags",
"==",
"null",
")",
"{",
"this",
".",
"foundTaskTags",
"=",
"new",
"char",
"[",
"5",
"]",
"[",
"]",
";",
"this",
".",
"foundTaskMessages",
"=",
"new",
"char",
"[",
"5",
"]",
"[",
"]",
";",
"this",
".",
"foundTaskPriorities",
"=",
"new",
"char",
"[",
"5",
"]",
"[",
"]",
";",
"this",
".",
"foundTaskPositions",
"=",
"new",
"int",
"[",
"5",
"]",
"[",
"]",
";",
"}",
"else",
"if",
"(",
"this",
".",
"foundTaskCount",
"==",
"this",
".",
"foundTaskTags",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"foundTaskTags",
",",
"0",
",",
"this",
".",
"foundTaskTags",
"=",
"new",
"char",
"[",
"this",
".",
"foundTaskCount",
"*",
"2",
"]",
"[",
"]",
",",
"0",
",",
"this",
".",
"foundTaskCount",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"foundTaskMessages",
",",
"0",
",",
"this",
".",
"foundTaskMessages",
"=",
"new",
"char",
"[",
"this",
".",
"foundTaskCount",
"*",
"2",
"]",
"[",
"]",
",",
"0",
",",
"this",
".",
"foundTaskCount",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"foundTaskPriorities",
",",
"0",
",",
"this",
".",
"foundTaskPriorities",
"=",
"new",
"char",
"[",
"this",
".",
"foundTaskCount",
"*",
"2",
"]",
"[",
"]",
",",
"0",
",",
"this",
".",
"foundTaskCount",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"foundTaskPositions",
",",
"0",
",",
"this",
".",
"foundTaskPositions",
"=",
"new",
"int",
"[",
"this",
".",
"foundTaskCount",
"*",
"2",
"]",
"[",
"]",
",",
"0",
",",
"this",
".",
"foundTaskCount",
")",
";",
"}",
"priority",
"=",
"this",
".",
"taskPriorities",
"!=",
"null",
"&&",
"itag",
"<",
"this",
".",
"taskPriorities",
".",
"length",
"?",
"this",
".",
"taskPriorities",
"[",
"itag",
"]",
":",
"null",
";",
"this",
".",
"foundTaskTags",
"[",
"this",
".",
"foundTaskCount",
"]",
"=",
"tag",
";",
"this",
".",
"foundTaskPriorities",
"[",
"this",
".",
"foundTaskCount",
"]",
"=",
"priority",
";",
"this",
".",
"foundTaskPositions",
"[",
"this",
".",
"foundTaskCount",
"]",
"=",
"new",
"int",
"[",
"]",
"{",
"i",
",",
"i",
"+",
"tagLength",
"-",
"1",
"}",
";",
"this",
".",
"foundTaskMessages",
"[",
"this",
".",
"foundTaskCount",
"]",
"=",
"CharOperation",
".",
"NO_CHAR",
";",
"this",
".",
"foundTaskCount",
"++",
";",
"i",
"+=",
"tagLength",
"-",
"1",
";",
"break",
"nextTag",
";",
"}",
"}",
"previous",
"=",
"src",
"[",
"i",
"]",
";",
"}",
"boolean",
"containsEmptyTask",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"foundTaskIndex",
";",
"i",
"<",
"this",
".",
"foundTaskCount",
";",
"i",
"++",
")",
"{",
"int",
"msgStart",
"=",
"this",
".",
"foundTaskPositions",
"[",
"i",
"]",
"[",
"0",
"]",
"+",
"this",
".",
"foundTaskTags",
"[",
"i",
"]",
".",
"length",
";",
"int",
"max_value",
"=",
"i",
"+",
"1",
"<",
"this",
".",
"foundTaskCount",
"?",
"this",
".",
"foundTaskPositions",
"[",
"i",
"+",
"1",
"]",
"[",
"0",
"]",
"-",
"1",
":",
"commentEnd",
"-",
"1",
";",
"if",
"(",
"max_value",
"<",
"msgStart",
")",
"{",
"max_value",
"=",
"msgStart",
";",
"}",
"int",
"end",
"=",
"-",
"1",
";",
"char",
"c",
";",
"for",
"(",
"int",
"j",
"=",
"msgStart",
";",
"j",
"<",
"max_value",
";",
"j",
"++",
")",
"{",
"if",
"(",
"(",
"c",
"=",
"src",
"[",
"j",
"]",
")",
"==",
"'\\n'",
"||",
"c",
"==",
"'\\r'",
")",
"{",
"end",
"=",
"j",
"-",
"1",
";",
"break",
";",
"}",
"}",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"max_value",
";",
"j",
">",
"msgStart",
";",
"j",
"--",
")",
"{",
"if",
"(",
"(",
"c",
"=",
"src",
"[",
"j",
"]",
")",
"==",
"'*'",
")",
"{",
"end",
"=",
"j",
"-",
"1",
";",
"break",
";",
"}",
"}",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"end",
"=",
"max_value",
";",
"}",
"if",
"(",
"msgStart",
"==",
"end",
")",
"{",
"containsEmptyTask",
"=",
"true",
";",
"continue",
";",
"}",
"while",
"(",
"CharOperation",
".",
"isWhitespace",
"(",
"src",
"[",
"end",
"]",
")",
"&&",
"msgStart",
"<=",
"end",
")",
"end",
"--",
";",
"this",
".",
"foundTaskPositions",
"[",
"i",
"]",
"[",
"1",
"]",
"=",
"end",
";",
"final",
"int",
"messageLength",
"=",
"end",
"-",
"msgStart",
"+",
"1",
";",
"char",
"[",
"]",
"message",
"=",
"new",
"char",
"[",
"messageLength",
"]",
";",
"System",
".",
"arraycopy",
"(",
"src",
",",
"msgStart",
",",
"message",
",",
"0",
",",
"messageLength",
")",
";",
"this",
".",
"foundTaskMessages",
"[",
"i",
"]",
"=",
"message",
";",
"}",
"if",
"(",
"containsEmptyTask",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"foundTaskIndex",
",",
"max",
"=",
"this",
".",
"foundTaskCount",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"foundTaskMessages",
"[",
"i",
"]",
".",
"length",
"==",
"0",
")",
"{",
"loop",
":",
"for",
"(",
"int",
"j",
"=",
"i",
"+",
"1",
";",
"j",
"<",
"max",
";",
"j",
"++",
")",
"{",
"if",
"(",
"this",
".",
"foundTaskMessages",
"[",
"j",
"]",
".",
"length",
"!=",
"0",
")",
"{",
"this",
".",
"foundTaskMessages",
"[",
"i",
"]",
"=",
"this",
".",
"foundTaskMessages",
"[",
"j",
"]",
";",
"this",
".",
"foundTaskPositions",
"[",
"i",
"]",
"[",
"1",
"]",
"=",
"this",
".",
"foundTaskPositions",
"[",
"j",
"]",
"[",
"1",
"]",
";",
"break",
"loop",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"public",
"char",
"[",
"]",
"getCurrentIdentifierSource",
"(",
")",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"this",
".",
"withoutUnicodePtr",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"1",
",",
"result",
",",
"0",
",",
"this",
".",
"withoutUnicodePtr",
")",
";",
"return",
"result",
";",
"}",
"int",
"length",
"=",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
";",
"if",
"(",
"length",
"==",
"this",
".",
"eofPosition",
")",
"return",
"this",
".",
"source",
";",
"switch",
"(",
"length",
")",
"{",
"case",
"1",
":",
"return",
"optimizedCurrentTokenSource1",
"(",
")",
";",
"case",
"2",
":",
"return",
"optimizedCurrentTokenSource2",
"(",
")",
";",
"case",
"3",
":",
"return",
"optimizedCurrentTokenSource3",
"(",
")",
";",
"case",
"4",
":",
"return",
"optimizedCurrentTokenSource4",
"(",
")",
";",
"case",
"5",
":",
"return",
"optimizedCurrentTokenSource5",
"(",
")",
";",
"case",
"6",
":",
"return",
"optimizedCurrentTokenSource6",
"(",
")",
";",
"}",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
",",
"result",
",",
"0",
",",
"length",
")",
";",
"return",
"result",
";",
"}",
"public",
"int",
"getCurrentTokenEndPosition",
"(",
")",
"{",
"return",
"this",
".",
"currentPosition",
"-",
"1",
";",
"}",
"public",
"char",
"[",
"]",
"getCurrentTokenSource",
"(",
")",
"{",
"char",
"[",
"]",
"result",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"System",
".",
"arraycopy",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"1",
",",
"result",
"=",
"new",
"char",
"[",
"this",
".",
"withoutUnicodePtr",
"]",
",",
"0",
",",
"this",
".",
"withoutUnicodePtr",
")",
";",
"else",
"{",
"int",
"length",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
",",
"result",
"=",
"new",
"char",
"[",
"length",
"=",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"return",
"result",
";",
"}",
"public",
"final",
"String",
"getCurrentTokenString",
"(",
")",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"1",
",",
"this",
".",
"withoutUnicodePtr",
")",
";",
"}",
"return",
"new",
"String",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
",",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
")",
";",
"}",
"public",
"char",
"[",
"]",
"getCurrentTokenSourceString",
"(",
")",
"{",
"char",
"[",
"]",
"result",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"System",
".",
"arraycopy",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"2",
",",
"result",
"=",
"new",
"char",
"[",
"this",
".",
"withoutUnicodePtr",
"-",
"2",
"]",
",",
"0",
",",
"this",
".",
"withoutUnicodePtr",
"-",
"2",
")",
";",
"else",
"{",
"int",
"length",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
"+",
"1",
",",
"result",
"=",
"new",
"char",
"[",
"length",
"=",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
"-",
"2",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"return",
"result",
";",
"}",
"public",
"final",
"String",
"getCurrentStringLiteral",
"(",
")",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"return",
"new",
"String",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"2",
",",
"this",
".",
"withoutUnicodePtr",
"-",
"2",
")",
";",
"else",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
"+",
"1",
",",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
"-",
"2",
")",
";",
"}",
"}",
"public",
"final",
"char",
"[",
"]",
"getRawTokenSource",
"(",
")",
"{",
"int",
"length",
"=",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
";",
"char",
"[",
"]",
"tokenSource",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
",",
"tokenSource",
",",
"0",
",",
"length",
")",
";",
"return",
"tokenSource",
";",
"}",
"public",
"final",
"char",
"[",
"]",
"getRawTokenSourceEnd",
"(",
")",
"{",
"int",
"length",
"=",
"this",
".",
"eofPosition",
"-",
"this",
".",
"currentPosition",
"-",
"1",
";",
"char",
"[",
"]",
"sourceEnd",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"source",
",",
"this",
".",
"currentPosition",
",",
"sourceEnd",
",",
"0",
",",
"length",
")",
";",
"return",
"sourceEnd",
";",
"}",
"public",
"int",
"getCurrentTokenStartPosition",
"(",
")",
"{",
"return",
"this",
".",
"startPosition",
";",
"}",
"public",
"final",
"int",
"getLineEnd",
"(",
"int",
"lineNumber",
")",
"{",
"if",
"(",
"this",
".",
"lineEnds",
"==",
"null",
"||",
"this",
".",
"linePtr",
"==",
"-",
"1",
")",
"return",
"-",
"1",
";",
"if",
"(",
"lineNumber",
">",
"this",
".",
"lineEnds",
".",
"length",
"+",
"1",
")",
"return",
"-",
"1",
";",
"if",
"(",
"lineNumber",
"<=",
"0",
")",
"return",
"-",
"1",
";",
"if",
"(",
"lineNumber",
"==",
"this",
".",
"lineEnds",
".",
"length",
"+",
"1",
")",
"return",
"this",
".",
"eofPosition",
";",
"return",
"this",
".",
"lineEnds",
"[",
"lineNumber",
"-",
"1",
"]",
";",
"}",
"public",
"final",
"int",
"[",
"]",
"getLineEnds",
"(",
")",
"{",
"if",
"(",
"this",
".",
"linePtr",
"==",
"-",
"1",
")",
"{",
"return",
"EMPTY_LINE_ENDS",
";",
"}",
"int",
"[",
"]",
"copy",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"lineEnds",
",",
"0",
",",
"copy",
"=",
"new",
"int",
"[",
"this",
".",
"linePtr",
"+",
"1",
"]",
",",
"0",
",",
"this",
".",
"linePtr",
"+",
"1",
")",
";",
"return",
"copy",
";",
"}",
"public",
"final",
"int",
"getLineStart",
"(",
"int",
"lineNumber",
")",
"{",
"if",
"(",
"this",
".",
"lineEnds",
"==",
"null",
"||",
"this",
".",
"linePtr",
"==",
"-",
"1",
")",
"return",
"-",
"1",
";",
"if",
"(",
"lineNumber",
">",
"this",
".",
"lineEnds",
".",
"length",
"+",
"1",
")",
"return",
"-",
"1",
";",
"if",
"(",
"lineNumber",
"<=",
"0",
")",
"return",
"-",
"1",
";",
"if",
"(",
"lineNumber",
"==",
"1",
")",
"return",
"this",
".",
"initialPosition",
";",
"return",
"this",
".",
"lineEnds",
"[",
"lineNumber",
"-",
"2",
"]",
"+",
"1",
";",
"}",
"public",
"final",
"int",
"getNextChar",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"return",
"this",
".",
"currentCharacter",
";",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"return",
"-",
"1",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"public",
"final",
"int",
"getNextCharWithBoundChecks",
"(",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"return",
"-",
"1",
";",
"}",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
";",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"return",
"this",
".",
"currentCharacter",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
"&&",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
"{",
"try",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"else",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"return",
"this",
".",
"currentCharacter",
";",
"}",
"public",
"final",
"boolean",
"getNextChar",
"(",
"char",
"testedChar",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"return",
"false",
";",
"}",
"int",
"temp",
"=",
"this",
".",
"currentPosition",
";",
"try",
"{",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"if",
"(",
"this",
".",
"currentCharacter",
"!=",
"testedChar",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"this",
".",
"withoutUnicodePtr",
"--",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"!=",
"testedChar",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"unicodeStore",
"(",
")",
";",
"return",
"true",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"}",
"public",
"final",
"int",
"getNextChar",
"(",
"char",
"testedChar1",
",",
"char",
"testedChar2",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"return",
"-",
"1",
";",
"int",
"temp",
"=",
"this",
".",
"currentPosition",
";",
"try",
"{",
"int",
"result",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"testedChar1",
")",
"{",
"result",
"=",
"0",
";",
"}",
"else",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"testedChar2",
")",
"{",
"result",
"=",
"1",
";",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"this",
".",
"withoutUnicodePtr",
"--",
";",
"result",
"=",
"-",
"1",
";",
"}",
"return",
"result",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"testedChar1",
")",
"{",
"result",
"=",
"0",
";",
"}",
"else",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"testedChar2",
")",
"{",
"result",
"=",
"1",
";",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"-",
"1",
";",
"}",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"unicodeStore",
"(",
")",
";",
"return",
"result",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"-",
"1",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"-",
"1",
";",
"}",
"}",
"private",
"final",
"void",
"consumeDigits",
"(",
"int",
"radix",
")",
"throws",
"InvalidInputException",
"{",
"consumeDigits",
"(",
"radix",
",",
"false",
")",
";",
"}",
"private",
"final",
"void",
"consumeDigits",
"(",
"int",
"radix",
",",
"boolean",
"expectingDigitFirst",
")",
"throws",
"InvalidInputException",
"{",
"final",
"int",
"USING_UNDERSCORE",
"=",
"1",
";",
"final",
"int",
"INVALID_POSITION",
"=",
"2",
";",
"switch",
"(",
"consumeDigits0",
"(",
"radix",
",",
"USING_UNDERSCORE",
",",
"INVALID_POSITION",
",",
"expectingDigitFirst",
")",
")",
"{",
"case",
"USING_UNDERSCORE",
":",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_7",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"UNDERSCORES_IN_LITERALS_NOT_BELOW_17",
")",
";",
"}",
"break",
";",
"case",
"INVALID_POSITION",
":",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_7",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"UNDERSCORES_IN_LITERALS_NOT_BELOW_17",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNDERSCORE",
")",
";",
"}",
"}",
"private",
"final",
"int",
"consumeDigits0",
"(",
"int",
"radix",
",",
"int",
"usingUnderscore",
",",
"int",
"invalidPosition",
",",
"boolean",
"expectingDigitFirst",
")",
"throws",
"InvalidInputException",
"{",
"int",
"kind",
"=",
"0",
";",
"if",
"(",
"getNextChar",
"(",
"'_'",
")",
")",
"{",
"if",
"(",
"expectingDigitFirst",
")",
"{",
"return",
"invalidPosition",
";",
"}",
"kind",
"=",
"usingUnderscore",
";",
"while",
"(",
"getNextChar",
"(",
"'_'",
")",
")",
"{",
"}",
"}",
"if",
"(",
"getNextCharAsDigit",
"(",
"radix",
")",
")",
"{",
"while",
"(",
"getNextCharAsDigit",
"(",
"radix",
")",
")",
"{",
"}",
"int",
"kind2",
"=",
"consumeDigits0",
"(",
"radix",
",",
"usingUnderscore",
",",
"invalidPosition",
",",
"false",
")",
";",
"if",
"(",
"kind2",
"==",
"0",
")",
"{",
"return",
"kind",
";",
"}",
"return",
"kind2",
";",
"}",
"if",
"(",
"kind",
"==",
"usingUnderscore",
")",
"return",
"invalidPosition",
";",
"return",
"kind",
";",
"}",
"public",
"final",
"boolean",
"getNextCharAsDigit",
"(",
")",
"throws",
"InvalidInputException",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"return",
"false",
";",
"int",
"temp",
"=",
"this",
".",
"currentPosition",
";",
"try",
"{",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"if",
"(",
"!",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
")",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"this",
".",
"withoutUnicodePtr",
"--",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"!",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
")",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"unicodeStore",
"(",
")",
";",
"return",
"true",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"}",
"public",
"final",
"boolean",
"getNextCharAsDigit",
"(",
"int",
"radix",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"return",
"false",
";",
"int",
"temp",
"=",
"this",
".",
"currentPosition",
";",
"try",
"{",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"if",
"(",
"ScannerHelper",
".",
"digit",
"(",
"this",
".",
"currentCharacter",
",",
"radix",
")",
"==",
"-",
"1",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"this",
".",
"withoutUnicodePtr",
"--",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"ScannerHelper",
".",
"digit",
"(",
"this",
".",
"currentCharacter",
",",
"radix",
")",
"==",
"-",
"1",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"unicodeStore",
"(",
")",
";",
"return",
"true",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"false",
";",
"}",
"}",
"public",
"boolean",
"getNextCharAsJavaIdentifierPartWithBoundCheck",
"(",
")",
"{",
"int",
"pos",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"pos",
">=",
"this",
".",
"eofPosition",
")",
"return",
"false",
";",
"int",
"temp2",
"=",
"this",
".",
"withoutUnicodePtr",
";",
"try",
"{",
"boolean",
"unicode",
"=",
"false",
";",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
";",
"if",
"(",
"this",
".",
"currentPosition",
"<",
"this",
".",
"eofPosition",
")",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
"&&",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"unicode",
"=",
"true",
";",
"}",
"}",
"char",
"c",
"=",
"this",
".",
"currentCharacter",
";",
"boolean",
"isJavaIdentifierPart",
"=",
"false",
";",
"if",
"(",
"c",
">=",
"HIGH_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"HIGH_SURROGATE_MAX_VALUE",
")",
"{",
"if",
"(",
"this",
".",
"complianceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"char",
"low",
"=",
"(",
"char",
")",
"getNextCharWithBoundChecks",
"(",
")",
";",
"if",
"(",
"low",
"<",
"LOW_SURROGATE_MIN_VALUE",
"||",
"low",
">",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"isJavaIdentifierPart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierPart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
",",
"low",
")",
";",
"}",
"else",
"if",
"(",
"c",
">=",
"LOW_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"else",
"{",
"isJavaIdentifierPart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierPart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
")",
";",
"}",
"if",
"(",
"unicode",
")",
"{",
"if",
"(",
"!",
"isJavaIdentifierPart",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"!",
"isJavaIdentifierPart",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"return",
"false",
";",
"}",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"unicodeStore",
"(",
")",
";",
"return",
"true",
";",
"}",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"}",
"public",
"boolean",
"getNextCharAsJavaIdentifierPart",
"(",
")",
"{",
"int",
"pos",
";",
"if",
"(",
"(",
"pos",
"=",
"this",
".",
"currentPosition",
")",
">=",
"this",
".",
"eofPosition",
")",
"return",
"false",
";",
"int",
"temp2",
"=",
"this",
".",
"withoutUnicodePtr",
";",
"try",
"{",
"boolean",
"unicode",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"unicode",
"=",
"true",
";",
"}",
"char",
"c",
"=",
"this",
".",
"currentCharacter",
";",
"boolean",
"isJavaIdentifierPart",
"=",
"false",
";",
"if",
"(",
"c",
">=",
"HIGH_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"HIGH_SURROGATE_MAX_VALUE",
")",
"{",
"if",
"(",
"this",
".",
"complianceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"char",
"low",
"=",
"(",
"char",
")",
"getNextChar",
"(",
")",
";",
"if",
"(",
"low",
"<",
"LOW_SURROGATE_MIN_VALUE",
"||",
"low",
">",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"isJavaIdentifierPart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierPart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
",",
"low",
")",
";",
"}",
"else",
"if",
"(",
"c",
">=",
"LOW_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"else",
"{",
"isJavaIdentifierPart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierPart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
")",
";",
"}",
"if",
"(",
"unicode",
")",
"{",
"if",
"(",
"!",
"isJavaIdentifierPart",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"!",
"isJavaIdentifierPart",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"return",
"false",
";",
"}",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"unicodeStore",
"(",
")",
";",
"return",
"true",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"=",
"pos",
";",
"this",
".",
"withoutUnicodePtr",
"=",
"temp2",
";",
"return",
"false",
";",
"}",
"}",
"public",
"int",
"scanIdentifier",
"(",
")",
"throws",
"InvalidInputException",
"{",
"int",
"whiteStart",
"=",
"0",
";",
"while",
"(",
"true",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"0",
";",
"whiteStart",
"=",
"this",
".",
"currentPosition",
";",
"boolean",
"isWhiteSpace",
",",
"hasWhiteSpaces",
"=",
"false",
";",
"int",
"offset",
";",
"int",
"unicodePtr",
";",
"boolean",
"checkIfUnicode",
"=",
"false",
";",
"do",
"{",
"unicodePtr",
"=",
"this",
".",
"withoutUnicodePtr",
";",
"offset",
"=",
"this",
".",
"currentPosition",
";",
"this",
".",
"startPosition",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"this",
".",
"currentPosition",
"<",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
";",
"checkIfUnicode",
"=",
"this",
".",
"currentPosition",
"<",
"this",
".",
"eofPosition",
"&&",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
"&&",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
";",
"}",
"else",
"if",
"(",
"this",
".",
"tokenizeWhiteSpace",
"&&",
"(",
"whiteStart",
"!=",
"this",
".",
"currentPosition",
"-",
"1",
")",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"this",
".",
"startPosition",
"=",
"whiteStart",
";",
"return",
"TokenNameWHITESPACE",
";",
"}",
"else",
"{",
"return",
"TokenNameEOF",
";",
"}",
"if",
"(",
"checkIfUnicode",
")",
"{",
"isWhiteSpace",
"=",
"jumpOverUnicodeWhiteSpace",
"(",
")",
";",
"offset",
"=",
"this",
".",
"currentPosition",
"-",
"offset",
";",
"}",
"else",
"{",
"offset",
"=",
"this",
".",
"currentPosition",
"-",
"offset",
";",
"switch",
"(",
"this",
".",
"currentCharacter",
")",
"{",
"case",
"10",
":",
"case",
"12",
":",
"case",
"13",
":",
"case",
"32",
":",
"case",
"9",
":",
"isWhiteSpace",
"=",
"true",
";",
"break",
";",
"default",
":",
"isWhiteSpace",
"=",
"false",
";",
"}",
"}",
"if",
"(",
"isWhiteSpace",
")",
"{",
"hasWhiteSpaces",
"=",
"true",
";",
"}",
"}",
"while",
"(",
"isWhiteSpace",
")",
";",
"if",
"(",
"hasWhiteSpaces",
")",
"{",
"if",
"(",
"this",
".",
"tokenizeWhiteSpace",
")",
"{",
"this",
".",
"currentPosition",
"-=",
"offset",
";",
"this",
".",
"startPosition",
"=",
"whiteStart",
";",
"if",
"(",
"checkIfUnicode",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"unicodePtr",
";",
"}",
"return",
"TokenNameWHITESPACE",
";",
"}",
"else",
"if",
"(",
"checkIfUnicode",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"0",
";",
"unicodeStore",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"0",
";",
"}",
"}",
"char",
"c",
"=",
"this",
".",
"currentCharacter",
";",
"if",
"(",
"c",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"ScannerHelper",
".",
"C_IDENT_START",
")",
"!=",
"0",
")",
"{",
"return",
"scanIdentifierOrKeywordWithBoundCheck",
"(",
")",
";",
"}",
"return",
"TokenNameERROR",
";",
"}",
"boolean",
"isJavaIdStart",
";",
"if",
"(",
"c",
">=",
"HIGH_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"HIGH_SURROGATE_MAX_VALUE",
")",
"{",
"if",
"(",
"this",
".",
"complianceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"char",
"low",
"=",
"(",
"char",
")",
"getNextCharWithBoundChecks",
"(",
")",
";",
"if",
"(",
"low",
"<",
"LOW_SURROGATE_MIN_VALUE",
"||",
"low",
">",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_LOW_SURROGATE",
")",
";",
"}",
"isJavaIdStart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierStart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
",",
"low",
")",
";",
"}",
"else",
"if",
"(",
"c",
">=",
"LOW_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"if",
"(",
"this",
".",
"complianceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HIGH_SURROGATE",
")",
";",
"}",
"else",
"{",
"isJavaIdStart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierStart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
")",
";",
"}",
"if",
"(",
"isJavaIdStart",
")",
"return",
"scanIdentifierOrKeywordWithBoundCheck",
"(",
")",
";",
"return",
"TokenNameERROR",
";",
"}",
"}",
"public",
"int",
"getNextToken",
"(",
")",
"throws",
"InvalidInputException",
"{",
"this",
".",
"wasAcr",
"=",
"false",
";",
"if",
"(",
"this",
".",
"diet",
")",
"{",
"jumpOverMethodBody",
"(",
")",
";",
"this",
".",
"diet",
"=",
"false",
";",
"return",
"this",
".",
"currentPosition",
">",
"this",
".",
"eofPosition",
"?",
"TokenNameEOF",
":",
"TokenNameRBRACE",
";",
"}",
"int",
"whiteStart",
"=",
"0",
";",
"try",
"{",
"while",
"(",
"true",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"0",
";",
"whiteStart",
"=",
"this",
".",
"currentPosition",
";",
"boolean",
"isWhiteSpace",
",",
"hasWhiteSpaces",
"=",
"false",
";",
"int",
"offset",
";",
"int",
"unicodePtr",
";",
"boolean",
"checkIfUnicode",
"=",
"false",
";",
"do",
"{",
"unicodePtr",
"=",
"this",
".",
"withoutUnicodePtr",
";",
"offset",
"=",
"this",
".",
"currentPosition",
";",
"this",
".",
"startPosition",
"=",
"this",
".",
"currentPosition",
";",
"try",
"{",
"checkIfUnicode",
"=",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
";",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"if",
"(",
"this",
".",
"tokenizeWhiteSpace",
"&&",
"(",
"whiteStart",
"!=",
"this",
".",
"currentPosition",
"-",
"1",
")",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"this",
".",
"startPosition",
"=",
"whiteStart",
";",
"return",
"TokenNameWHITESPACE",
";",
"}",
"if",
"(",
"this",
".",
"currentPosition",
">",
"this",
".",
"eofPosition",
")",
"return",
"TokenNameEOF",
";",
"}",
"if",
"(",
"this",
".",
"currentPosition",
">",
"this",
".",
"eofPosition",
")",
"{",
"if",
"(",
"this",
".",
"tokenizeWhiteSpace",
"&&",
"(",
"whiteStart",
"!=",
"this",
".",
"currentPosition",
"-",
"1",
")",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"this",
".",
"startPosition",
"=",
"whiteStart",
";",
"return",
"TokenNameWHITESPACE",
";",
"}",
"return",
"TokenNameEOF",
";",
"}",
"if",
"(",
"checkIfUnicode",
")",
"{",
"isWhiteSpace",
"=",
"jumpOverUnicodeWhiteSpace",
"(",
")",
";",
"offset",
"=",
"this",
".",
"currentPosition",
"-",
"offset",
";",
"}",
"else",
"{",
"offset",
"=",
"this",
".",
"currentPosition",
"-",
"offset",
";",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
"{",
"if",
"(",
"this",
".",
"recordLineSeparator",
")",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"}",
"switch",
"(",
"this",
".",
"currentCharacter",
")",
"{",
"case",
"10",
":",
"case",
"12",
":",
"case",
"13",
":",
"case",
"32",
":",
"case",
"9",
":",
"isWhiteSpace",
"=",
"true",
";",
"break",
";",
"default",
":",
"isWhiteSpace",
"=",
"false",
";",
"}",
"}",
"if",
"(",
"isWhiteSpace",
")",
"{",
"hasWhiteSpaces",
"=",
"true",
";",
"}",
"}",
"while",
"(",
"isWhiteSpace",
")",
";",
"if",
"(",
"hasWhiteSpaces",
")",
"{",
"if",
"(",
"this",
".",
"tokenizeWhiteSpace",
")",
"{",
"this",
".",
"currentPosition",
"-=",
"offset",
";",
"this",
".",
"startPosition",
"=",
"whiteStart",
";",
"if",
"(",
"checkIfUnicode",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"unicodePtr",
";",
"}",
"return",
"TokenNameWHITESPACE",
";",
"}",
"else",
"if",
"(",
"checkIfUnicode",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"0",
";",
"unicodeStore",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"0",
";",
"}",
"}",
"switch",
"(",
"this",
".",
"currentCharacter",
")",
"{",
"case",
"'@'",
":",
"return",
"TokenNameAT",
";",
"case",
"'('",
":",
"return",
"TokenNameLPAREN",
";",
"case",
"')'",
":",
"return",
"TokenNameRPAREN",
";",
"case",
"'{'",
":",
"return",
"TokenNameLBRACE",
";",
"case",
"'}'",
":",
"return",
"TokenNameRBRACE",
";",
"case",
"'['",
":",
"return",
"TokenNameLBRACKET",
";",
"case",
"']'",
":",
"return",
"TokenNameRBRACKET",
";",
"case",
"';'",
":",
"return",
"TokenNameSEMICOLON",
";",
"case",
"','",
":",
"return",
"TokenNameCOMMA",
";",
"case",
"'.'",
":",
"if",
"(",
"getNextCharAsDigit",
"(",
")",
")",
"{",
"return",
"scanNumber",
"(",
"true",
")",
";",
"}",
"int",
"temp",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"getNextChar",
"(",
"'.'",
")",
")",
"{",
"if",
"(",
"getNextChar",
"(",
"'.'",
")",
")",
"{",
"return",
"TokenNameELLIPSIS",
";",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"TokenNameDOT",
";",
"}",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"=",
"temp",
";",
"return",
"TokenNameDOT",
";",
"}",
"case",
"'+'",
":",
"{",
"int",
"test",
";",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'+'",
",",
"'='",
")",
")",
"==",
"0",
")",
"return",
"TokenNamePLUS_PLUS",
";",
"if",
"(",
"test",
">",
"0",
")",
"return",
"TokenNamePLUS_EQUAL",
";",
"return",
"TokenNamePLUS",
";",
"}",
"case",
"'-'",
":",
"{",
"int",
"test",
";",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'-'",
",",
"'='",
")",
")",
"==",
"0",
")",
"return",
"TokenNameMINUS_MINUS",
";",
"if",
"(",
"test",
">",
"0",
")",
"return",
"TokenNameMINUS_EQUAL",
";",
"return",
"TokenNameMINUS",
";",
"}",
"case",
"'~'",
":",
"return",
"TokenNameTWIDDLE",
";",
"case",
"'!'",
":",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameNOT_EQUAL",
";",
"return",
"TokenNameNOT",
";",
"case",
"'*'",
":",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameMULTIPLY_EQUAL",
";",
"return",
"TokenNameMULTIPLY",
";",
"case",
"'%'",
":",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameREMAINDER_EQUAL",
";",
"return",
"TokenNameREMAINDER",
";",
"case",
"'<'",
":",
"{",
"int",
"test",
";",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'='",
",",
"'<'",
")",
")",
"==",
"0",
")",
"return",
"TokenNameLESS_EQUAL",
";",
"if",
"(",
"test",
">",
"0",
")",
"{",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameLEFT_SHIFT_EQUAL",
";",
"return",
"TokenNameLEFT_SHIFT",
";",
"}",
"return",
"TokenNameLESS",
";",
"}",
"case",
"'>'",
":",
"{",
"int",
"test",
";",
"if",
"(",
"this",
".",
"returnOnlyGreater",
")",
"{",
"return",
"TokenNameGREATER",
";",
"}",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'='",
",",
"'>'",
")",
")",
"==",
"0",
")",
"return",
"TokenNameGREATER_EQUAL",
";",
"if",
"(",
"test",
">",
"0",
")",
"{",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'='",
",",
"'>'",
")",
")",
"==",
"0",
")",
"return",
"TokenNameRIGHT_SHIFT_EQUAL",
";",
"if",
"(",
"test",
">",
"0",
")",
"{",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL",
";",
"return",
"TokenNameUNSIGNED_RIGHT_SHIFT",
";",
"}",
"return",
"TokenNameRIGHT_SHIFT",
";",
"}",
"return",
"TokenNameGREATER",
";",
"}",
"case",
"'='",
":",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameEQUAL_EQUAL",
";",
"return",
"TokenNameEQUAL",
";",
"case",
"'&'",
":",
"{",
"int",
"test",
";",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'&'",
",",
"'='",
")",
")",
"==",
"0",
")",
"return",
"TokenNameAND_AND",
";",
"if",
"(",
"test",
">",
"0",
")",
"return",
"TokenNameAND_EQUAL",
";",
"return",
"TokenNameAND",
";",
"}",
"case",
"'|'",
":",
"{",
"int",
"test",
";",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'|'",
",",
"'='",
")",
")",
"==",
"0",
")",
"return",
"TokenNameOR_OR",
";",
"if",
"(",
"test",
">",
"0",
")",
"return",
"TokenNameOR_EQUAL",
";",
"return",
"TokenNameOR",
";",
"}",
"case",
"'^'",
":",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameXOR_EQUAL",
";",
"return",
"TokenNameXOR",
";",
"case",
"'?'",
":",
"return",
"TokenNameQUESTION",
";",
"case",
"':'",
":",
"return",
"TokenNameCOLON",
";",
"case",
"'\\''",
":",
"{",
"int",
"test",
";",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'\\n'",
",",
"'\\r'",
")",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_CHARACTER_CONSTANT",
")",
";",
"}",
"if",
"(",
"test",
">",
"0",
")",
"{",
"for",
"(",
"int",
"lookAhead",
"=",
"0",
";",
"lookAhead",
"<",
"3",
";",
"lookAhead",
"++",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"==",
"this",
".",
"eofPosition",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\n'",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\''",
")",
"{",
"this",
".",
"currentPosition",
"+=",
"lookAhead",
"+",
"1",
";",
"break",
";",
"}",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_CHARACTER_CONSTANT",
")",
";",
"}",
"}",
"if",
"(",
"getNextChar",
"(",
"'\\''",
")",
")",
"{",
"for",
"(",
"int",
"lookAhead",
"=",
"0",
";",
"lookAhead",
"<",
"3",
";",
"lookAhead",
"++",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"==",
"this",
".",
"eofPosition",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\n'",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\''",
")",
"{",
"this",
".",
"currentPosition",
"+=",
"lookAhead",
"+",
"1",
";",
"break",
";",
"}",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_CHARACTER_CONSTANT",
")",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'\\\\'",
")",
")",
"{",
"if",
"(",
"this",
".",
"unicodeAsBackSlash",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
";",
"}",
"scanEscapeCharacter",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"checkIfUnicode",
"=",
"false",
";",
"try",
"{",
"checkIfUnicode",
"=",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
";",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_CHARACTER_CONSTANT",
")",
";",
"}",
"if",
"(",
"checkIfUnicode",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"getNextChar",
"(",
"'\\''",
")",
")",
"return",
"TokenNameCharacterLiteral",
";",
"for",
"(",
"int",
"lookAhead",
"=",
"0",
";",
"lookAhead",
"<",
"20",
";",
"lookAhead",
"++",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"==",
"this",
".",
"eofPosition",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\n'",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\''",
")",
"{",
"this",
".",
"currentPosition",
"+=",
"lookAhead",
"+",
"1",
";",
"break",
";",
"}",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_CHARACTER_CONSTANT",
")",
";",
"case",
"'\"'",
":",
"try",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"boolean",
"isUnicode",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"while",
"(",
"this",
".",
"currentCharacter",
"!=",
"'\"'",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"UNTERMINATED_STRING",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
")",
"{",
"if",
"(",
"isUnicode",
")",
"{",
"int",
"start",
"=",
"this",
".",
"currentPosition",
";",
"for",
"(",
"int",
"lookAhead",
"=",
"0",
";",
"lookAhead",
"<",
"50",
";",
"lookAhead",
"++",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"currentPosition",
"=",
"start",
";",
"break",
";",
"}",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"isUnicode",
"=",
"true",
";",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"}",
"if",
"(",
"!",
"isUnicode",
"&&",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"break",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\"'",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_CHAR_IN_STRING",
")",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"--",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_CHAR_IN_STRING",
")",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"unicodeAsBackSlash",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"--",
";",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"this",
".",
"withoutUnicodePtr",
"--",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"==",
"0",
")",
"{",
"unicodeInitializeBuffer",
"(",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
")",
";",
"}",
"this",
".",
"withoutUnicodePtr",
"--",
";",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
";",
"}",
"scanEscapeCharacter",
"(",
")",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"throw",
"new",
"InvalidInputException",
"(",
"UNTERMINATED_STRING",
")",
";",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"if",
"(",
"e",
".",
"getMessage",
"(",
")",
".",
"equals",
"(",
"INVALID_ESCAPE",
")",
")",
"{",
"for",
"(",
"int",
"lookAhead",
"=",
"0",
";",
"lookAhead",
"<",
"50",
";",
"lookAhead",
"++",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"==",
"this",
".",
"eofPosition",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\n'",
")",
"break",
";",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"lookAhead",
"]",
"==",
"'\\\"'",
")",
"{",
"this",
".",
"currentPosition",
"+=",
"lookAhead",
"+",
"1",
";",
"break",
";",
"}",
"}",
"}",
"throw",
"e",
";",
"}",
"return",
"TokenNameStringLiteral",
";",
"case",
"'/'",
":",
"if",
"(",
"!",
"this",
".",
"skipComments",
")",
"{",
"int",
"test",
"=",
"getNextChar",
"(",
"'/'",
",",
"'*'",
")",
";",
"if",
"(",
"test",
"==",
"0",
")",
"{",
"this",
".",
"lastCommentLinePosition",
"=",
"this",
".",
"currentPosition",
";",
"try",
"{",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"boolean",
"isUnicode",
"=",
"false",
";",
"while",
"(",
"this",
".",
"currentCharacter",
"!=",
"'\\r'",
"&&",
"this",
".",
"currentCharacter",
"!=",
"'\\n'",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"lastCommentLinePosition",
"=",
"this",
".",
"currentPosition",
";",
"this",
".",
"currentPosition",
"++",
";",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"this",
".",
"lastCommentLinePosition",
"=",
"this",
".",
"currentPosition",
";",
"isUnicode",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
"&&",
"this",
".",
"eofPosition",
">",
"this",
".",
"currentPosition",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\n'",
")",
"{",
"this",
".",
"currentPosition",
"++",
";",
"this",
".",
"currentCharacter",
"=",
"'\\n'",
";",
"}",
"else",
"if",
"(",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"1",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"}",
"recordComment",
"(",
"TokenNameCOMMENT_LINE",
")",
";",
"if",
"(",
"this",
".",
"taskTags",
"!=",
"null",
")",
"checkTaskTag",
"(",
"this",
".",
"startPosition",
",",
"this",
".",
"currentPosition",
")",
";",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
"{",
"if",
"(",
"this",
".",
"checkNonExternalizedStringLiterals",
"&&",
"this",
".",
"lastPosition",
"<",
"this",
".",
"currentPosition",
")",
"{",
"parseTags",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"recordLineSeparator",
")",
"{",
"if",
"(",
"isUnicode",
")",
"{",
"pushUnicodeLineSeparator",
"(",
")",
";",
"}",
"else",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"this",
".",
"tokenizeComments",
")",
"{",
"return",
"TokenNameCOMMENT_LINE",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"recordComment",
"(",
"TokenNameCOMMENT_LINE",
")",
";",
"if",
"(",
"this",
".",
"taskTags",
"!=",
"null",
")",
"checkTaskTag",
"(",
"this",
".",
"startPosition",
",",
"this",
".",
"currentPosition",
")",
";",
"if",
"(",
"this",
".",
"checkNonExternalizedStringLiterals",
"&&",
"this",
".",
"lastPosition",
"<",
"this",
".",
"currentPosition",
")",
"{",
"parseTags",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"tokenizeComments",
")",
"{",
"return",
"TokenNameCOMMENT_LINE",
";",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"++",
";",
"}",
"}",
"break",
";",
"}",
"if",
"(",
"test",
">",
"0",
")",
"{",
"try",
"{",
"boolean",
"isJavadoc",
"=",
"false",
",",
"star",
"=",
"false",
";",
"boolean",
"isUnicode",
"=",
"false",
";",
"int",
"previous",
";",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'*'",
")",
"{",
"isJavadoc",
"=",
"true",
";",
"star",
"=",
"true",
";",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
"{",
"if",
"(",
"this",
".",
"recordLineSeparator",
")",
"{",
"if",
"(",
"isUnicode",
")",
"{",
"pushUnicodeLineSeparator",
"(",
")",
";",
"}",
"else",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"}",
"}",
"isUnicode",
"=",
"false",
";",
"previous",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'/'",
")",
"{",
"isJavadoc",
"=",
"false",
";",
"}",
"int",
"firstTag",
"=",
"0",
";",
"while",
"(",
"(",
"this",
".",
"currentCharacter",
"!=",
"'/'",
")",
"||",
"(",
"!",
"star",
")",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"UNTERMINATED_COMMENT",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
"{",
"if",
"(",
"this",
".",
"recordLineSeparator",
")",
"{",
"if",
"(",
"isUnicode",
")",
"{",
"pushUnicodeLineSeparator",
"(",
")",
";",
"}",
"else",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"}",
"}",
"switch",
"(",
"this",
".",
"currentCharacter",
")",
"{",
"case",
"'*'",
":",
"star",
"=",
"true",
";",
"break",
";",
"case",
"'@'",
":",
"if",
"(",
"firstTag",
"==",
"0",
"&&",
"this",
".",
"isFirstTag",
"(",
")",
")",
"{",
"firstTag",
"=",
"previous",
";",
"}",
"default",
":",
"star",
"=",
"false",
";",
"}",
"previous",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"}",
"int",
"token",
"=",
"isJavadoc",
"?",
"TokenNameCOMMENT_JAVADOC",
":",
"TokenNameCOMMENT_BLOCK",
";",
"recordComment",
"(",
"token",
")",
";",
"this",
".",
"commentTagStarts",
"[",
"this",
".",
"commentPtr",
"]",
"=",
"firstTag",
";",
"if",
"(",
"this",
".",
"taskTags",
"!=",
"null",
")",
"checkTaskTag",
"(",
"this",
".",
"startPosition",
",",
"this",
".",
"currentPosition",
")",
";",
"if",
"(",
"this",
".",
"tokenizeComments",
")",
"{",
"return",
"token",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"throw",
"new",
"InvalidInputException",
"(",
"UNTERMINATED_COMMENT",
")",
";",
"}",
"break",
";",
"}",
"}",
"if",
"(",
"getNextChar",
"(",
"'='",
")",
")",
"return",
"TokenNameDIVIDE_EQUAL",
";",
"return",
"TokenNameDIVIDE",
";",
"case",
"'\u001a'",
":",
"if",
"(",
"atEnd",
"(",
")",
")",
"return",
"TokenNameEOF",
";",
"throw",
"new",
"InvalidInputException",
"(",
"\"Ctrl-Z\"",
")",
";",
"default",
":",
"char",
"c",
"=",
"this",
".",
"currentCharacter",
";",
"if",
"(",
"c",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"ScannerHelper",
".",
"C_IDENT_START",
")",
"!=",
"0",
")",
"{",
"return",
"scanIdentifierOrKeyword",
"(",
")",
";",
"}",
"else",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"ScannerHelper",
".",
"C_DIGIT",
")",
"!=",
"0",
")",
"{",
"return",
"scanNumber",
"(",
"false",
")",
";",
"}",
"else",
"{",
"return",
"TokenNameERROR",
";",
"}",
"}",
"boolean",
"isJavaIdStart",
";",
"if",
"(",
"c",
">=",
"HIGH_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"HIGH_SURROGATE_MAX_VALUE",
")",
"{",
"if",
"(",
"this",
".",
"complianceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"char",
"low",
"=",
"(",
"char",
")",
"getNextChar",
"(",
")",
";",
"if",
"(",
"low",
"<",
"LOW_SURROGATE_MIN_VALUE",
"||",
"low",
">",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_LOW_SURROGATE",
")",
";",
"}",
"isJavaIdStart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierStart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
",",
"low",
")",
";",
"}",
"else",
"if",
"(",
"c",
">=",
"LOW_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"if",
"(",
"this",
".",
"complianceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HIGH_SURROGATE",
")",
";",
"}",
"else",
"{",
"isJavaIdStart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierStart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
")",
";",
"}",
"if",
"(",
"isJavaIdStart",
")",
"return",
"scanIdentifierOrKeyword",
"(",
")",
";",
"if",
"(",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
")",
")",
"{",
"return",
"scanNumber",
"(",
"false",
")",
";",
"}",
"return",
"TokenNameERROR",
";",
"}",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"if",
"(",
"this",
".",
"tokenizeWhiteSpace",
"&&",
"(",
"whiteStart",
"!=",
"this",
".",
"currentPosition",
"-",
"1",
")",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"this",
".",
"startPosition",
"=",
"whiteStart",
";",
"return",
"TokenNameWHITESPACE",
";",
"}",
"}",
"return",
"TokenNameEOF",
";",
"}",
"public",
"void",
"getNextUnicodeChar",
"(",
")",
"throws",
"InvalidInputException",
"{",
"int",
"c1",
"=",
"0",
",",
"c2",
"=",
"0",
",",
"c3",
"=",
"0",
",",
"c4",
"=",
"0",
",",
"unicodeSize",
"=",
"6",
";",
"this",
".",
"currentPosition",
"++",
";",
"if",
"(",
"this",
".",
"currentPosition",
"<",
"this",
".",
"eofPosition",
")",
"{",
"while",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
"{",
"this",
".",
"currentPosition",
"++",
";",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"unicodeSize",
"++",
";",
"}",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"--",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"currentPosition",
"+",
"4",
")",
">",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"currentPosition",
"+=",
"(",
"this",
".",
"eofPosition",
"-",
"this",
".",
"currentPosition",
")",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"if",
"(",
"(",
"c1",
"=",
"ScannerHelper",
".",
"getHexadecimalValue",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
")",
">",
"15",
"||",
"c1",
"<",
"0",
"||",
"(",
"c2",
"=",
"ScannerHelper",
".",
"getHexadecimalValue",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
")",
">",
"15",
"||",
"c2",
"<",
"0",
"||",
"(",
"c3",
"=",
"ScannerHelper",
".",
"getHexadecimalValue",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
")",
">",
"15",
"||",
"c3",
"<",
"0",
"||",
"(",
"c4",
"=",
"ScannerHelper",
".",
"getHexadecimalValue",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
")",
">",
"15",
"||",
"c4",
"<",
"0",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"this",
".",
"currentCharacter",
"=",
"(",
"char",
")",
"(",
"(",
"(",
"c1",
"*",
"16",
"+",
"c2",
")",
"*",
"16",
"+",
"c3",
")",
"*",
"16",
"+",
"c4",
")",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"==",
"0",
")",
"{",
"unicodeInitializeBuffer",
"(",
"this",
".",
"currentPosition",
"-",
"unicodeSize",
"-",
"this",
".",
"startPosition",
")",
";",
"}",
"unicodeStore",
"(",
")",
";",
"this",
".",
"unicodeAsBackSlash",
"=",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
";",
"}",
"public",
"NLSTag",
"[",
"]",
"getNLSTags",
"(",
")",
"{",
"final",
"int",
"length",
"=",
"this",
".",
"nlsTagsPtr",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"NLSTag",
"[",
"]",
"result",
"=",
"new",
"NLSTag",
"[",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"nlsTags",
",",
"0",
",",
"result",
",",
"0",
",",
"length",
")",
";",
"this",
".",
"nlsTagsPtr",
"=",
"0",
";",
"return",
"result",
";",
"}",
"return",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"getSource",
"(",
")",
"{",
"return",
"this",
".",
"source",
";",
"}",
"protected",
"boolean",
"isFirstTag",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"final",
"void",
"jumpOverMethodBody",
"(",
")",
"{",
"this",
".",
"wasAcr",
"=",
"false",
";",
"int",
"found",
"=",
"1",
";",
"try",
"{",
"while",
"(",
"true",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"0",
";",
"boolean",
"isWhiteSpace",
";",
"do",
"{",
"this",
".",
"startPosition",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"isWhiteSpace",
"=",
"jumpOverUnicodeWhiteSpace",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"recordLineSeparator",
"&&",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
")",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"isWhiteSpace",
"=",
"CharOperation",
".",
"isWhitespace",
"(",
"this",
".",
"currentCharacter",
")",
";",
"}",
"}",
"while",
"(",
"isWhiteSpace",
")",
";",
"NextToken",
":",
"switch",
"(",
"this",
".",
"currentCharacter",
")",
"{",
"case",
"'{'",
":",
"found",
"++",
";",
"break",
"NextToken",
";",
"case",
"'}'",
":",
"found",
"--",
";",
"if",
"(",
"found",
"==",
"0",
")",
"return",
";",
"break",
"NextToken",
";",
"case",
"'\\''",
":",
"{",
"boolean",
"test",
";",
"test",
"=",
"getNextChar",
"(",
"'\\\\'",
")",
";",
"if",
"(",
"test",
")",
"{",
"try",
"{",
"if",
"(",
"this",
".",
"unicodeAsBackSlash",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
";",
"}",
"scanEscapeCharacter",
"(",
")",
";",
"}",
"catch",
"(",
"InvalidInputException",
"ex",
")",
"{",
"}",
"}",
"else",
"{",
"try",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"InvalidInputException",
"ex",
")",
"{",
"}",
"}",
"getNextChar",
"(",
"'\\''",
")",
";",
"break",
"NextToken",
";",
"}",
"case",
"'\"'",
":",
"try",
"{",
"try",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"InvalidInputException",
"ex",
")",
"{",
"}",
"while",
"(",
"this",
".",
"currentCharacter",
"!=",
"'\"'",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"return",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\n'",
")",
"this",
".",
"currentPosition",
"++",
";",
"break",
"NextToken",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
"{",
"break",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"try",
"{",
"if",
"(",
"this",
".",
"unicodeAsBackSlash",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
";",
"}",
"scanEscapeCharacter",
"(",
")",
";",
"}",
"catch",
"(",
"InvalidInputException",
"ex",
")",
"{",
"}",
"}",
"try",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"InvalidInputException",
"ex",
")",
"{",
"}",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"return",
";",
"}",
"break",
"NextToken",
";",
"case",
"'/'",
":",
"{",
"int",
"test",
";",
"if",
"(",
"(",
"test",
"=",
"getNextChar",
"(",
"'/'",
",",
"'*'",
")",
")",
"==",
"0",
")",
"{",
"try",
"{",
"this",
".",
"lastCommentLinePosition",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"boolean",
"isUnicode",
"=",
"false",
";",
"while",
"(",
"this",
".",
"currentCharacter",
"!=",
"'\\r'",
"&&",
"this",
".",
"currentCharacter",
"!=",
"'\\n'",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"this",
".",
"lastCommentLinePosition",
"=",
"this",
".",
"currentPosition",
";",
"this",
".",
"currentPosition",
"++",
";",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"this",
".",
"lastCommentLinePosition",
"=",
"this",
".",
"currentPosition",
";",
"isUnicode",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"isUnicode",
"=",
"true",
";",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
"&&",
"this",
".",
"eofPosition",
">",
"this",
".",
"currentPosition",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\n'",
")",
"{",
"this",
".",
"currentPosition",
"++",
";",
"this",
".",
"currentCharacter",
"=",
"'\\n'",
";",
"}",
"else",
"if",
"(",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"+",
"1",
"]",
"==",
"'u'",
")",
")",
"{",
"isUnicode",
"=",
"true",
";",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"}",
"recordComment",
"(",
"TokenNameCOMMENT_LINE",
")",
";",
"if",
"(",
"this",
".",
"recordLineSeparator",
"&&",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
")",
"{",
"if",
"(",
"this",
".",
"checkNonExternalizedStringLiterals",
"&&",
"this",
".",
"lastPosition",
"<",
"this",
".",
"currentPosition",
")",
"{",
"parseTags",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"recordLineSeparator",
")",
"{",
"if",
"(",
"isUnicode",
")",
"{",
"pushUnicodeLineSeparator",
"(",
")",
";",
"}",
"else",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"recordComment",
"(",
"TokenNameCOMMENT_LINE",
")",
";",
"if",
"(",
"this",
".",
"checkNonExternalizedStringLiterals",
"&&",
"this",
".",
"lastPosition",
"<",
"this",
".",
"currentPosition",
")",
"{",
"parseTags",
"(",
")",
";",
"}",
"if",
"(",
"!",
"this",
".",
"tokenizeComments",
")",
"{",
"this",
".",
"currentPosition",
"++",
";",
"}",
"}",
"break",
"NextToken",
";",
"}",
"if",
"(",
"test",
">",
"0",
")",
"{",
"boolean",
"isJavadoc",
"=",
"false",
";",
"try",
"{",
"boolean",
"star",
"=",
"false",
";",
"int",
"previous",
";",
"boolean",
"isUnicode",
"=",
"false",
";",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'*'",
")",
"{",
"isJavadoc",
"=",
"true",
";",
"star",
"=",
"true",
";",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
"{",
"if",
"(",
"this",
".",
"recordLineSeparator",
")",
"{",
"if",
"(",
"isUnicode",
")",
"{",
"pushUnicodeLineSeparator",
"(",
")",
";",
"}",
"else",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"}",
"}",
"isUnicode",
"=",
"false",
";",
"previous",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'/'",
")",
"{",
"isJavadoc",
"=",
"false",
";",
"}",
"int",
"firstTag",
"=",
"0",
";",
"while",
"(",
"(",
"this",
".",
"currentCharacter",
"!=",
"'/'",
")",
"||",
"(",
"!",
"star",
")",
")",
"{",
"if",
"(",
"this",
".",
"currentPosition",
">=",
"this",
".",
"eofPosition",
")",
"{",
"return",
";",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
")",
"{",
"if",
"(",
"this",
".",
"recordLineSeparator",
")",
"{",
"if",
"(",
"isUnicode",
")",
"{",
"pushUnicodeLineSeparator",
"(",
")",
";",
"}",
"else",
"{",
"pushLineSeparator",
"(",
")",
";",
"}",
"}",
"}",
"switch",
"(",
"this",
".",
"currentCharacter",
")",
"{",
"case",
"'*'",
":",
"star",
"=",
"true",
";",
"break",
";",
"case",
"'@'",
":",
"if",
"(",
"firstTag",
"==",
"0",
"&&",
"this",
".",
"isFirstTag",
"(",
")",
")",
"{",
"firstTag",
"=",
"previous",
";",
"}",
"default",
":",
"star",
"=",
"false",
";",
"}",
"previous",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"isUnicode",
"=",
"true",
";",
"}",
"else",
"{",
"isUnicode",
"=",
"false",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\\\'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\\\'",
")",
"this",
".",
"currentPosition",
"++",
";",
"}",
"}",
"recordComment",
"(",
"isJavadoc",
"?",
"TokenNameCOMMENT_JAVADOC",
":",
"TokenNameCOMMENT_BLOCK",
")",
";",
"this",
".",
"commentTagStarts",
"[",
"this",
".",
"commentPtr",
"]",
"=",
"firstTag",
";",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"return",
";",
"}",
"break",
"NextToken",
";",
"}",
"break",
"NextToken",
";",
"}",
"default",
":",
"try",
"{",
"char",
"c",
"=",
"this",
".",
"currentCharacter",
";",
"if",
"(",
"c",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"ScannerHelper",
".",
"C_IDENT_START",
")",
"!=",
"0",
")",
"{",
"scanIdentifierOrKeyword",
"(",
")",
";",
"break",
"NextToken",
";",
"}",
"else",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"ScannerHelper",
".",
"C_DIGIT",
")",
"!=",
"0",
")",
"{",
"scanNumber",
"(",
"false",
")",
";",
"break",
"NextToken",
";",
"}",
"else",
"{",
"break",
"NextToken",
";",
"}",
"}",
"boolean",
"isJavaIdStart",
";",
"if",
"(",
"c",
">=",
"HIGH_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"HIGH_SURROGATE_MAX_VALUE",
")",
"{",
"if",
"(",
"this",
".",
"complianceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNICODE_ESCAPE",
")",
";",
"}",
"char",
"low",
"=",
"(",
"char",
")",
"getNextChar",
"(",
")",
";",
"if",
"(",
"low",
"<",
"LOW_SURROGATE_MIN_VALUE",
"||",
"low",
">",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"break",
"NextToken",
";",
"}",
"isJavaIdStart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierStart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
",",
"low",
")",
";",
"}",
"else",
"if",
"(",
"c",
">=",
"LOW_SURROGATE_MIN_VALUE",
"&&",
"c",
"<=",
"LOW_SURROGATE_MAX_VALUE",
")",
"{",
"break",
"NextToken",
";",
"}",
"else",
"{",
"isJavaIdStart",
"=",
"ScannerHelper",
".",
"isJavaIdentifierStart",
"(",
"this",
".",
"complianceLevel",
",",
"c",
")",
";",
"}",
"if",
"(",
"isJavaIdStart",
")",
"{",
"scanIdentifierOrKeyword",
"(",
")",
";",
"break",
"NextToken",
";",
"}",
"}",
"catch",
"(",
"InvalidInputException",
"ex",
")",
"{",
"}",
"}",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"}",
"return",
";",
"}",
"public",
"final",
"boolean",
"jumpOverUnicodeWhiteSpace",
"(",
")",
"throws",
"InvalidInputException",
"{",
"this",
".",
"wasAcr",
"=",
"false",
";",
"getNextUnicodeChar",
"(",
")",
";",
"return",
"CharOperation",
".",
"isWhitespace",
"(",
"this",
".",
"currentCharacter",
")",
";",
"}",
"final",
"char",
"[",
"]",
"optimizedCurrentTokenSource1",
"(",
")",
"{",
"char",
"charOne",
"=",
"this",
".",
"source",
"[",
"this",
".",
"startPosition",
"]",
";",
"switch",
"(",
"charOne",
")",
"{",
"case",
"'a'",
":",
"return",
"charArray_a",
";",
"case",
"'b'",
":",
"return",
"charArray_b",
";",
"case",
"'c'",
":",
"return",
"charArray_c",
";",
"case",
"'d'",
":",
"return",
"charArray_d",
";",
"case",
"'e'",
":",
"return",
"charArray_e",
";",
"case",
"'f'",
":",
"return",
"charArray_f",
";",
"case",
"'g'",
":",
"return",
"charArray_g",
";",
"case",
"'h'",
":",
"return",
"charArray_h",
";",
"case",
"'i'",
":",
"return",
"charArray_i",
";",
"case",
"'j'",
":",
"return",
"charArray_j",
";",
"case",
"'k'",
":",
"return",
"charArray_k",
";",
"case",
"'l'",
":",
"return",
"charArray_l",
";",
"case",
"'m'",
":",
"return",
"charArray_m",
";",
"case",
"'n'",
":",
"return",
"charArray_n",
";",
"case",
"'o'",
":",
"return",
"charArray_o",
";",
"case",
"'p'",
":",
"return",
"charArray_p",
";",
"case",
"'q'",
":",
"return",
"charArray_q",
";",
"case",
"'r'",
":",
"return",
"charArray_r",
";",
"case",
"'s'",
":",
"return",
"charArray_s",
";",
"case",
"'t'",
":",
"return",
"charArray_t",
";",
"case",
"'u'",
":",
"return",
"charArray_u",
";",
"case",
"'v'",
":",
"return",
"charArray_v",
";",
"case",
"'w'",
":",
"return",
"charArray_w",
";",
"case",
"'x'",
":",
"return",
"charArray_x",
";",
"case",
"'y'",
":",
"return",
"charArray_y",
";",
"case",
"'z'",
":",
"return",
"charArray_z",
";",
"default",
":",
"return",
"new",
"char",
"[",
"]",
"{",
"charOne",
"}",
";",
"}",
"}",
"final",
"char",
"[",
"]",
"optimizedCurrentTokenSource2",
"(",
")",
"{",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"int",
"start",
"=",
"this",
".",
"startPosition",
";",
"char",
"c0",
",",
"c1",
";",
"int",
"hash",
"=",
"(",
"(",
"(",
"c0",
"=",
"src",
"[",
"start",
"]",
")",
"<<",
"6",
")",
"+",
"(",
"c1",
"=",
"src",
"[",
"start",
"+",
"1",
"]",
")",
")",
"%",
"TableSize",
";",
"char",
"[",
"]",
"[",
"]",
"table",
"=",
"this",
".",
"charArray_length",
"[",
"0",
"]",
"[",
"hash",
"]",
";",
"int",
"i",
"=",
"this",
".",
"newEntry2",
";",
"while",
"(",
"++",
"i",
"<",
"InternalTableSize",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"i",
"=",
"-",
"1",
";",
"int",
"max",
"=",
"this",
".",
"newEntry2",
";",
"while",
"(",
"++",
"i",
"<=",
"max",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"if",
"(",
"++",
"max",
">=",
"InternalTableSize",
")",
"max",
"=",
"0",
";",
"char",
"[",
"]",
"r",
";",
"System",
".",
"arraycopy",
"(",
"src",
",",
"start",
",",
"r",
"=",
"new",
"char",
"[",
"2",
"]",
",",
"0",
",",
"2",
")",
";",
"return",
"table",
"[",
"this",
".",
"newEntry2",
"=",
"max",
"]",
"=",
"r",
";",
"}",
"final",
"char",
"[",
"]",
"optimizedCurrentTokenSource3",
"(",
")",
"{",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"int",
"start",
"=",
"this",
".",
"startPosition",
";",
"char",
"c0",
",",
"c1",
"=",
"src",
"[",
"start",
"+",
"1",
"]",
",",
"c2",
";",
"int",
"hash",
"=",
"(",
"(",
"(",
"c0",
"=",
"src",
"[",
"start",
"]",
")",
"<<",
"6",
")",
"+",
"(",
"c2",
"=",
"src",
"[",
"start",
"+",
"2",
"]",
")",
")",
"%",
"TableSize",
";",
"char",
"[",
"]",
"[",
"]",
"table",
"=",
"this",
".",
"charArray_length",
"[",
"1",
"]",
"[",
"hash",
"]",
";",
"int",
"i",
"=",
"this",
".",
"newEntry3",
";",
"while",
"(",
"++",
"i",
"<",
"InternalTableSize",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"i",
"=",
"-",
"1",
";",
"int",
"max",
"=",
"this",
".",
"newEntry3",
";",
"while",
"(",
"++",
"i",
"<=",
"max",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"if",
"(",
"++",
"max",
">=",
"InternalTableSize",
")",
"max",
"=",
"0",
";",
"char",
"[",
"]",
"r",
";",
"System",
".",
"arraycopy",
"(",
"src",
",",
"start",
",",
"r",
"=",
"new",
"char",
"[",
"3",
"]",
",",
"0",
",",
"3",
")",
";",
"return",
"table",
"[",
"this",
".",
"newEntry3",
"=",
"max",
"]",
"=",
"r",
";",
"}",
"final",
"char",
"[",
"]",
"optimizedCurrentTokenSource4",
"(",
")",
"{",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"int",
"start",
"=",
"this",
".",
"startPosition",
";",
"char",
"c0",
",",
"c1",
"=",
"src",
"[",
"start",
"+",
"1",
"]",
",",
"c2",
",",
"c3",
"=",
"src",
"[",
"start",
"+",
"3",
"]",
";",
"int",
"hash",
"=",
"(",
"(",
"(",
"c0",
"=",
"src",
"[",
"start",
"]",
")",
"<<",
"6",
")",
"+",
"(",
"c2",
"=",
"src",
"[",
"start",
"+",
"2",
"]",
")",
")",
"%",
"TableSize",
";",
"char",
"[",
"]",
"[",
"]",
"table",
"=",
"this",
".",
"charArray_length",
"[",
"2",
"]",
"[",
"hash",
"]",
";",
"int",
"i",
"=",
"this",
".",
"newEntry4",
";",
"while",
"(",
"++",
"i",
"<",
"InternalTableSize",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
"&&",
"(",
"c3",
"==",
"charArray",
"[",
"3",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"i",
"=",
"-",
"1",
";",
"int",
"max",
"=",
"this",
".",
"newEntry4",
";",
"while",
"(",
"++",
"i",
"<=",
"max",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
"&&",
"(",
"c3",
"==",
"charArray",
"[",
"3",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"if",
"(",
"++",
"max",
">=",
"InternalTableSize",
")",
"max",
"=",
"0",
";",
"char",
"[",
"]",
"r",
";",
"System",
".",
"arraycopy",
"(",
"src",
",",
"start",
",",
"r",
"=",
"new",
"char",
"[",
"4",
"]",
",",
"0",
",",
"4",
")",
";",
"return",
"table",
"[",
"this",
".",
"newEntry4",
"=",
"max",
"]",
"=",
"r",
";",
"}",
"final",
"char",
"[",
"]",
"optimizedCurrentTokenSource5",
"(",
")",
"{",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"int",
"start",
"=",
"this",
".",
"startPosition",
";",
"char",
"c0",
",",
"c1",
"=",
"src",
"[",
"start",
"+",
"1",
"]",
",",
"c2",
",",
"c3",
"=",
"src",
"[",
"start",
"+",
"3",
"]",
",",
"c4",
";",
"int",
"hash",
"=",
"(",
"(",
"(",
"c0",
"=",
"src",
"[",
"start",
"]",
")",
"<<",
"12",
")",
"+",
"(",
"(",
"c2",
"=",
"src",
"[",
"start",
"+",
"2",
"]",
")",
"<<",
"6",
")",
"+",
"(",
"c4",
"=",
"src",
"[",
"start",
"+",
"4",
"]",
")",
")",
"%",
"TableSize",
";",
"char",
"[",
"]",
"[",
"]",
"table",
"=",
"this",
".",
"charArray_length",
"[",
"3",
"]",
"[",
"hash",
"]",
";",
"int",
"i",
"=",
"this",
".",
"newEntry5",
";",
"while",
"(",
"++",
"i",
"<",
"InternalTableSize",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
"&&",
"(",
"c3",
"==",
"charArray",
"[",
"3",
"]",
")",
"&&",
"(",
"c4",
"==",
"charArray",
"[",
"4",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"i",
"=",
"-",
"1",
";",
"int",
"max",
"=",
"this",
".",
"newEntry5",
";",
"while",
"(",
"++",
"i",
"<=",
"max",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
"&&",
"(",
"c3",
"==",
"charArray",
"[",
"3",
"]",
")",
"&&",
"(",
"c4",
"==",
"charArray",
"[",
"4",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"if",
"(",
"++",
"max",
">=",
"InternalTableSize",
")",
"max",
"=",
"0",
";",
"char",
"[",
"]",
"r",
";",
"System",
".",
"arraycopy",
"(",
"src",
",",
"start",
",",
"r",
"=",
"new",
"char",
"[",
"5",
"]",
",",
"0",
",",
"5",
")",
";",
"return",
"table",
"[",
"this",
".",
"newEntry5",
"=",
"max",
"]",
"=",
"r",
";",
"}",
"final",
"char",
"[",
"]",
"optimizedCurrentTokenSource6",
"(",
")",
"{",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"int",
"start",
"=",
"this",
".",
"startPosition",
";",
"char",
"c0",
",",
"c1",
"=",
"src",
"[",
"start",
"+",
"1",
"]",
",",
"c2",
",",
"c3",
"=",
"src",
"[",
"start",
"+",
"3",
"]",
",",
"c4",
",",
"c5",
"=",
"src",
"[",
"start",
"+",
"5",
"]",
";",
"int",
"hash",
"=",
"(",
"(",
"(",
"c0",
"=",
"src",
"[",
"start",
"]",
")",
"<<",
"12",
")",
"+",
"(",
"(",
"c2",
"=",
"src",
"[",
"start",
"+",
"2",
"]",
")",
"<<",
"6",
")",
"+",
"(",
"c4",
"=",
"src",
"[",
"start",
"+",
"4",
"]",
")",
")",
"%",
"TableSize",
";",
"char",
"[",
"]",
"[",
"]",
"table",
"=",
"this",
".",
"charArray_length",
"[",
"4",
"]",
"[",
"hash",
"]",
";",
"int",
"i",
"=",
"this",
".",
"newEntry6",
";",
"while",
"(",
"++",
"i",
"<",
"InternalTableSize",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
"&&",
"(",
"c3",
"==",
"charArray",
"[",
"3",
"]",
")",
"&&",
"(",
"c4",
"==",
"charArray",
"[",
"4",
"]",
")",
"&&",
"(",
"c5",
"==",
"charArray",
"[",
"5",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"i",
"=",
"-",
"1",
";",
"int",
"max",
"=",
"this",
".",
"newEntry6",
";",
"while",
"(",
"++",
"i",
"<=",
"max",
")",
"{",
"char",
"[",
"]",
"charArray",
"=",
"table",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"c0",
"==",
"charArray",
"[",
"0",
"]",
")",
"&&",
"(",
"c1",
"==",
"charArray",
"[",
"1",
"]",
")",
"&&",
"(",
"c2",
"==",
"charArray",
"[",
"2",
"]",
")",
"&&",
"(",
"c3",
"==",
"charArray",
"[",
"3",
"]",
")",
"&&",
"(",
"c4",
"==",
"charArray",
"[",
"4",
"]",
")",
"&&",
"(",
"c5",
"==",
"charArray",
"[",
"5",
"]",
")",
")",
"return",
"charArray",
";",
"}",
"if",
"(",
"++",
"max",
">=",
"InternalTableSize",
")",
"max",
"=",
"0",
";",
"char",
"[",
"]",
"r",
";",
"System",
".",
"arraycopy",
"(",
"src",
",",
"start",
",",
"r",
"=",
"new",
"char",
"[",
"6",
"]",
",",
"0",
",",
"6",
")",
";",
"return",
"table",
"[",
"this",
".",
"newEntry6",
"=",
"max",
"]",
"=",
"r",
";",
"}",
"private",
"void",
"parseTags",
"(",
")",
"{",
"int",
"position",
"=",
"0",
";",
"final",
"int",
"currentStartPosition",
"=",
"this",
".",
"startPosition",
";",
"final",
"int",
"currentLinePtr",
"=",
"this",
".",
"linePtr",
";",
"if",
"(",
"currentLinePtr",
">=",
"0",
")",
"{",
"position",
"=",
"this",
".",
"lineEnds",
"[",
"currentLinePtr",
"]",
"+",
"1",
";",
"}",
"while",
"(",
"ScannerHelper",
".",
"isWhitespace",
"(",
"this",
".",
"source",
"[",
"position",
"]",
")",
")",
"{",
"position",
"++",
";",
"}",
"if",
"(",
"currentStartPosition",
"==",
"position",
")",
"{",
"return",
";",
"}",
"char",
"[",
"]",
"s",
"=",
"null",
";",
"int",
"sourceEnd",
"=",
"this",
".",
"currentPosition",
";",
"int",
"sourceStart",
"=",
"currentStartPosition",
";",
"int",
"sourceDelta",
"=",
"0",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"1",
",",
"s",
"=",
"new",
"char",
"[",
"this",
".",
"withoutUnicodePtr",
"]",
",",
"0",
",",
"this",
".",
"withoutUnicodePtr",
")",
";",
"sourceEnd",
"=",
"this",
".",
"withoutUnicodePtr",
";",
"sourceStart",
"=",
"1",
";",
"sourceDelta",
"=",
"currentStartPosition",
";",
"}",
"else",
"{",
"s",
"=",
"this",
".",
"source",
";",
"}",
"int",
"pos",
"=",
"CharOperation",
".",
"indexOf",
"(",
"TAG_PREFIX",
",",
"s",
",",
"true",
",",
"sourceStart",
",",
"sourceEnd",
")",
";",
"if",
"(",
"pos",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"this",
".",
"nlsTags",
"==",
"null",
")",
"{",
"this",
".",
"nlsTags",
"=",
"new",
"NLSTag",
"[",
"10",
"]",
";",
"this",
".",
"nlsTagsPtr",
"=",
"0",
";",
"}",
"while",
"(",
"pos",
"!=",
"-",
"1",
")",
"{",
"int",
"start",
"=",
"pos",
"+",
"TAG_PREFIX_LENGTH",
";",
"int",
"end",
"=",
"CharOperation",
".",
"indexOf",
"(",
"TAG_POSTFIX",
",",
"s",
",",
"start",
",",
"sourceEnd",
")",
";",
"if",
"(",
"end",
"!=",
"-",
"1",
")",
"{",
"NLSTag",
"currentTag",
"=",
"null",
";",
"final",
"int",
"currentLine",
"=",
"currentLinePtr",
"+",
"1",
";",
"try",
"{",
"currentTag",
"=",
"new",
"NLSTag",
"(",
"pos",
"+",
"sourceDelta",
",",
"end",
"+",
"sourceDelta",
",",
"currentLine",
",",
"extractInt",
"(",
"s",
",",
"start",
",",
"end",
")",
")",
";",
"}",
"catch",
"(",
"NumberFormatException",
"e",
")",
"{",
"currentTag",
"=",
"new",
"NLSTag",
"(",
"pos",
"+",
"sourceDelta",
",",
"end",
"+",
"sourceDelta",
",",
"currentLine",
",",
"-",
"1",
")",
";",
"}",
"if",
"(",
"this",
".",
"nlsTagsPtr",
"==",
"this",
".",
"nlsTags",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"nlsTags",
",",
"0",
",",
"(",
"this",
".",
"nlsTags",
"=",
"new",
"NLSTag",
"[",
"this",
".",
"nlsTagsPtr",
"+",
"10",
"]",
")",
",",
"0",
",",
"this",
".",
"nlsTagsPtr",
")",
";",
"}",
"this",
".",
"nlsTags",
"[",
"this",
".",
"nlsTagsPtr",
"++",
"]",
"=",
"currentTag",
";",
"}",
"else",
"{",
"end",
"=",
"start",
";",
"}",
"pos",
"=",
"CharOperation",
".",
"indexOf",
"(",
"TAG_PREFIX",
",",
"s",
",",
"true",
",",
"end",
",",
"sourceEnd",
")",
";",
"}",
"}",
"}",
"private",
"int",
"extractInt",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"int",
"value",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"end",
";",
"i",
"++",
")",
"{",
"final",
"char",
"currentChar",
"=",
"array",
"[",
"i",
"]",
";",
"int",
"digit",
"=",
"0",
";",
"switch",
"(",
"currentChar",
")",
"{",
"case",
"'0'",
":",
"digit",
"=",
"0",
";",
"break",
";",
"case",
"'1'",
":",
"digit",
"=",
"1",
";",
"break",
";",
"case",
"'2'",
":",
"digit",
"=",
"2",
";",
"break",
";",
"case",
"'3'",
":",
"digit",
"=",
"3",
";",
"break",
";",
"case",
"'4'",
":",
"digit",
"=",
"4",
";",
"break",
";",
"case",
"'5'",
":",
"digit",
"=",
"5",
";",
"break",
";",
"case",
"'6'",
":",
"digit",
"=",
"6",
";",
"break",
";",
"case",
"'7'",
":",
"digit",
"=",
"7",
";",
"break",
";",
"case",
"'8'",
":",
"digit",
"=",
"8",
";",
"break",
";",
"case",
"'9'",
":",
"digit",
"=",
"9",
";",
"break",
";",
"default",
":",
"throw",
"new",
"NumberFormatException",
"(",
")",
";",
"}",
"value",
"*=",
"10",
";",
"if",
"(",
"digit",
"<",
"0",
")",
"throw",
"new",
"NumberFormatException",
"(",
")",
";",
"value",
"+=",
"digit",
";",
"}",
"return",
"value",
";",
"}",
"public",
"final",
"void",
"pushLineSeparator",
"(",
")",
"{",
"final",
"int",
"INCREMENT",
"=",
"250",
";",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"{",
"int",
"separatorPos",
"=",
"this",
".",
"currentPosition",
"-",
"1",
";",
"if",
"(",
"(",
"this",
".",
"linePtr",
">=",
"0",
")",
"&&",
"(",
"this",
".",
"lineEnds",
"[",
"this",
".",
"linePtr",
"]",
">=",
"separatorPos",
")",
")",
"return",
";",
"int",
"length",
"=",
"this",
".",
"lineEnds",
".",
"length",
";",
"if",
"(",
"++",
"this",
".",
"linePtr",
">=",
"length",
")",
"System",
".",
"arraycopy",
"(",
"this",
".",
"lineEnds",
",",
"0",
",",
"this",
".",
"lineEnds",
"=",
"new",
"int",
"[",
"length",
"+",
"INCREMENT",
"]",
",",
"0",
",",
"length",
")",
";",
"this",
".",
"lineEnds",
"[",
"this",
".",
"linePtr",
"]",
"=",
"separatorPos",
";",
"try",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\n'",
")",
"{",
"this",
".",
"lineEnds",
"[",
"this",
".",
"linePtr",
"]",
"=",
"this",
".",
"currentPosition",
";",
"this",
".",
"currentPosition",
"++",
";",
"this",
".",
"wasAcr",
"=",
"false",
";",
"}",
"else",
"{",
"this",
".",
"wasAcr",
"=",
"true",
";",
"}",
"}",
"catch",
"(",
"IndexOutOfBoundsException",
"e",
")",
"{",
"this",
".",
"wasAcr",
"=",
"true",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
"{",
"if",
"(",
"this",
".",
"wasAcr",
"&&",
"(",
"this",
".",
"lineEnds",
"[",
"this",
".",
"linePtr",
"]",
"==",
"(",
"this",
".",
"currentPosition",
"-",
"2",
")",
")",
")",
"{",
"this",
".",
"lineEnds",
"[",
"this",
".",
"linePtr",
"]",
"=",
"this",
".",
"currentPosition",
"-",
"1",
";",
"}",
"else",
"{",
"int",
"separatorPos",
"=",
"this",
".",
"currentPosition",
"-",
"1",
";",
"if",
"(",
"(",
"this",
".",
"linePtr",
">=",
"0",
")",
"&&",
"(",
"this",
".",
"lineEnds",
"[",
"this",
".",
"linePtr",
"]",
">=",
"separatorPos",
")",
")",
"return",
";",
"int",
"length",
"=",
"this",
".",
"lineEnds",
".",
"length",
";",
"if",
"(",
"++",
"this",
".",
"linePtr",
">=",
"length",
")",
"System",
".",
"arraycopy",
"(",
"this",
".",
"lineEnds",
",",
"0",
",",
"this",
".",
"lineEnds",
"=",
"new",
"int",
"[",
"length",
"+",
"INCREMENT",
"]",
",",
"0",
",",
"length",
")",
";",
"this",
".",
"lineEnds",
"[",
"this",
".",
"linePtr",
"]",
"=",
"separatorPos",
";",
"}",
"this",
".",
"wasAcr",
"=",
"false",
";",
"}",
"}",
"}",
"public",
"final",
"void",
"pushUnicodeLineSeparator",
"(",
")",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\r'",
")",
"{",
"if",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'\\n'",
")",
"{",
"this",
".",
"wasAcr",
"=",
"false",
";",
"}",
"else",
"{",
"this",
".",
"wasAcr",
"=",
"true",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'\\n'",
")",
"{",
"this",
".",
"wasAcr",
"=",
"false",
";",
"}",
"}",
"}",
"public",
"void",
"recordComment",
"(",
"int",
"token",
")",
"{",
"int",
"commentStart",
"=",
"this",
".",
"startPosition",
";",
"int",
"stopPosition",
"=",
"this",
".",
"currentPosition",
";",
"switch",
"(",
"token",
")",
"{",
"case",
"TokenNameCOMMENT_LINE",
":",
"commentStart",
"=",
"-",
"this",
".",
"startPosition",
";",
"stopPosition",
"=",
"-",
"this",
".",
"lastCommentLinePosition",
";",
"break",
";",
"case",
"TokenNameCOMMENT_BLOCK",
":",
"stopPosition",
"=",
"-",
"this",
".",
"currentPosition",
";",
"break",
";",
"}",
"int",
"length",
"=",
"this",
".",
"commentStops",
".",
"length",
";",
"if",
"(",
"++",
"this",
".",
"commentPtr",
">=",
"length",
")",
"{",
"int",
"newLength",
"=",
"length",
"+",
"COMMENT_ARRAYS_SIZE",
"*",
"10",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"commentStops",
",",
"0",
",",
"this",
".",
"commentStops",
"=",
"new",
"int",
"[",
"newLength",
"]",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"commentStarts",
",",
"0",
",",
"this",
".",
"commentStarts",
"=",
"new",
"int",
"[",
"newLength",
"]",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"commentTagStarts",
",",
"0",
",",
"this",
".",
"commentTagStarts",
"=",
"new",
"int",
"[",
"newLength",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"this",
".",
"commentStops",
"[",
"this",
".",
"commentPtr",
"]",
"=",
"stopPosition",
";",
"this",
".",
"commentStarts",
"[",
"this",
".",
"commentPtr",
"]",
"=",
"commentStart",
";",
"}",
"public",
"void",
"resetTo",
"(",
"int",
"begin",
",",
"int",
"end",
")",
"{",
"this",
".",
"diet",
"=",
"false",
";",
"this",
".",
"initialPosition",
"=",
"this",
".",
"startPosition",
"=",
"this",
".",
"currentPosition",
"=",
"begin",
";",
"if",
"(",
"this",
".",
"source",
"!=",
"null",
"&&",
"this",
".",
"source",
".",
"length",
"<",
"end",
")",
"{",
"this",
".",
"eofPosition",
"=",
"this",
".",
"source",
".",
"length",
";",
"}",
"else",
"{",
"this",
".",
"eofPosition",
"=",
"end",
"<",
"Integer",
".",
"MAX_VALUE",
"?",
"end",
"+",
"1",
":",
"end",
";",
"}",
"this",
".",
"commentPtr",
"=",
"-",
"1",
";",
"this",
".",
"foundTaskCount",
"=",
"0",
";",
"}",
"protected",
"final",
"void",
"scanEscapeCharacter",
"(",
")",
"throws",
"InvalidInputException",
"{",
"switch",
"(",
"this",
".",
"currentCharacter",
")",
"{",
"case",
"'b'",
":",
"this",
".",
"currentCharacter",
"=",
"'\\b'",
";",
"break",
";",
"case",
"'t'",
":",
"this",
".",
"currentCharacter",
"=",
"'\\t'",
";",
"break",
";",
"case",
"'n'",
":",
"this",
".",
"currentCharacter",
"=",
"'\\n'",
";",
"break",
";",
"case",
"'f'",
":",
"this",
".",
"currentCharacter",
"=",
"'\\f'",
";",
"break",
";",
"case",
"'r'",
":",
"this",
".",
"currentCharacter",
"=",
"'\\r'",
";",
"break",
";",
"case",
"'\\\"'",
":",
"this",
".",
"currentCharacter",
"=",
"'\\\"'",
";",
"break",
";",
"case",
"'\\''",
":",
"this",
".",
"currentCharacter",
"=",
"'\\''",
";",
"break",
";",
"case",
"'\\\\'",
":",
"this",
".",
"currentCharacter",
"=",
"'\\\\'",
";",
"break",
";",
"default",
":",
"int",
"number",
"=",
"ScannerHelper",
".",
"getHexadecimalValue",
"(",
"this",
".",
"currentCharacter",
")",
";",
"if",
"(",
"number",
">=",
"0",
"&&",
"number",
"<=",
"7",
")",
"{",
"boolean",
"zeroToThreeNot",
"=",
"number",
">",
"3",
";",
"if",
"(",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
")",
"{",
"int",
"digit",
"=",
"ScannerHelper",
".",
"getHexadecimalValue",
"(",
"this",
".",
"currentCharacter",
")",
";",
"if",
"(",
"digit",
">=",
"0",
"&&",
"digit",
"<=",
"7",
")",
"{",
"number",
"=",
"(",
"number",
"*",
"8",
")",
"+",
"digit",
";",
"if",
"(",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
")",
"{",
"if",
"(",
"zeroToThreeNot",
")",
"{",
"this",
".",
"currentPosition",
"--",
";",
"}",
"else",
"{",
"digit",
"=",
"ScannerHelper",
".",
"getHexadecimalValue",
"(",
"this",
".",
"currentCharacter",
")",
";",
"if",
"(",
"digit",
">=",
"0",
"&&",
"digit",
"<=",
"7",
")",
"{",
"number",
"=",
"(",
"number",
"*",
"8",
")",
"+",
"digit",
";",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"--",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"--",
";",
"}",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"--",
";",
"}",
"}",
"else",
"{",
"this",
".",
"currentPosition",
"--",
";",
"}",
"if",
"(",
"number",
">",
"255",
")",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_ESCAPE",
")",
";",
"this",
".",
"currentCharacter",
"=",
"(",
"char",
")",
"number",
";",
"}",
"else",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_ESCAPE",
")",
";",
"}",
"}",
"public",
"int",
"scanIdentifierOrKeywordWithBoundCheck",
"(",
")",
"{",
"this",
".",
"useAssertAsAnIndentifier",
"=",
"false",
";",
"this",
".",
"useEnumAsAnIndentifier",
"=",
"false",
";",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"identLoop",
":",
"{",
"int",
"pos",
";",
"int",
"srcLength",
"=",
"this",
".",
"eofPosition",
";",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"(",
"pos",
"=",
"this",
".",
"currentPosition",
")",
">=",
"srcLength",
")",
"break",
"identLoop",
";",
"char",
"c",
"=",
"src",
"[",
"pos",
"]",
";",
"if",
"(",
"c",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"(",
"ScannerHelper",
".",
"C_UPPER_LETTER",
"|",
"ScannerHelper",
".",
"C_LOWER_LETTER",
"|",
"ScannerHelper",
".",
"C_IDENT_PART",
"|",
"ScannerHelper",
".",
"C_DIGIT",
")",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"this",
".",
"currentCharacter",
"=",
"c",
";",
"unicodeStore",
"(",
")",
";",
"}",
"this",
".",
"currentPosition",
"++",
";",
"}",
"else",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"(",
"ScannerHelper",
".",
"C_SEPARATOR",
"|",
"ScannerHelper",
".",
"C_JLS_SPACE",
")",
")",
"!=",
"0",
")",
"{",
"this",
".",
"currentCharacter",
"=",
"c",
";",
"break",
"identLoop",
";",
"}",
"else",
"{",
"while",
"(",
"getNextCharAsJavaIdentifierPartWithBoundCheck",
"(",
")",
")",
"{",
"}",
"break",
"identLoop",
";",
"}",
"}",
"else",
"{",
"while",
"(",
"getNextCharAsJavaIdentifierPartWithBoundCheck",
"(",
")",
")",
"{",
"}",
"break",
"identLoop",
";",
"}",
"}",
"}",
"int",
"index",
",",
"length",
";",
"char",
"[",
"]",
"data",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"==",
"0",
")",
"{",
"if",
"(",
"(",
"length",
"=",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
")",
"==",
"1",
")",
"{",
"return",
"TokenNameIdentifier",
";",
"}",
"data",
"=",
"this",
".",
"source",
";",
"index",
"=",
"this",
".",
"startPosition",
";",
"}",
"else",
"{",
"if",
"(",
"(",
"length",
"=",
"this",
".",
"withoutUnicodePtr",
")",
"==",
"1",
")",
"return",
"TokenNameIdentifier",
";",
"data",
"=",
"this",
".",
"withoutUnicodeBuffer",
";",
"index",
"=",
"1",
";",
"}",
"return",
"internalScanIdentifierOrKeyword",
"(",
"index",
",",
"length",
",",
"data",
")",
";",
"}",
"public",
"int",
"scanIdentifierOrKeyword",
"(",
")",
"{",
"this",
".",
"useAssertAsAnIndentifier",
"=",
"false",
";",
"this",
".",
"useEnumAsAnIndentifier",
"=",
"false",
";",
"char",
"[",
"]",
"src",
"=",
"this",
".",
"source",
";",
"identLoop",
":",
"{",
"int",
"pos",
";",
"int",
"srcLength",
"=",
"this",
".",
"eofPosition",
";",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"(",
"pos",
"=",
"this",
".",
"currentPosition",
")",
">=",
"srcLength",
")",
"break",
"identLoop",
";",
"char",
"c",
"=",
"src",
"[",
"pos",
"]",
";",
"if",
"(",
"c",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"(",
"ScannerHelper",
".",
"C_UPPER_LETTER",
"|",
"ScannerHelper",
".",
"C_LOWER_LETTER",
"|",
"ScannerHelper",
".",
"C_IDENT_PART",
"|",
"ScannerHelper",
".",
"C_DIGIT",
")",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"this",
".",
"currentCharacter",
"=",
"c",
";",
"unicodeStore",
"(",
")",
";",
"}",
"this",
".",
"currentPosition",
"++",
";",
"}",
"else",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"(",
"ScannerHelper",
".",
"C_SEPARATOR",
"|",
"ScannerHelper",
".",
"C_JLS_SPACE",
")",
")",
"!=",
"0",
")",
"{",
"this",
".",
"currentCharacter",
"=",
"c",
";",
"break",
"identLoop",
";",
"}",
"else",
"{",
"while",
"(",
"getNextCharAsJavaIdentifierPart",
"(",
")",
")",
"{",
"}",
"break",
"identLoop",
";",
"}",
"}",
"else",
"{",
"while",
"(",
"getNextCharAsJavaIdentifierPart",
"(",
")",
")",
"{",
"}",
"break",
"identLoop",
";",
"}",
"}",
"}",
"int",
"index",
",",
"length",
";",
"char",
"[",
"]",
"data",
";",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"==",
"0",
")",
"{",
"if",
"(",
"(",
"length",
"=",
"this",
".",
"currentPosition",
"-",
"this",
".",
"startPosition",
")",
"==",
"1",
")",
"{",
"return",
"TokenNameIdentifier",
";",
"}",
"data",
"=",
"this",
".",
"source",
";",
"index",
"=",
"this",
".",
"startPosition",
";",
"}",
"else",
"{",
"if",
"(",
"(",
"length",
"=",
"this",
".",
"withoutUnicodePtr",
")",
"==",
"1",
")",
"return",
"TokenNameIdentifier",
";",
"data",
"=",
"this",
".",
"withoutUnicodeBuffer",
";",
"index",
"=",
"1",
";",
"}",
"return",
"internalScanIdentifierOrKeyword",
"(",
"index",
",",
"length",
",",
"data",
")",
";",
"}",
"private",
"int",
"internalScanIdentifierOrKeyword",
"(",
"int",
"index",
",",
"int",
"length",
",",
"char",
"[",
"]",
"data",
")",
"{",
"switch",
"(",
"data",
"[",
"index",
"]",
")",
"{",
"case",
"'a'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"8",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'b'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"{",
"return",
"TokenNameabstract",
";",
"}",
"else",
"{",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"6",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
">=",
"ClassFileConstants",
".",
"JDK1_4",
")",
"{",
"this",
".",
"containsAssertKeyword",
"=",
"true",
";",
"return",
"TokenNameassert",
";",
"}",
"else",
"{",
"this",
".",
"useAssertAsAnIndentifier",
"=",
"true",
";",
"return",
"TokenNameIdentifier",
";",
"}",
"}",
"else",
"{",
"return",
"TokenNameIdentifier",
";",
"}",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'b'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"4",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'y'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNamebyte",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"5",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'k'",
")",
")",
"return",
"TokenNamebreak",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"7",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
")",
"return",
"TokenNameboolean",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'c'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"4",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNamecase",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'h'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
")",
"return",
"TokenNamechar",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"5",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
")",
"return",
"TokenNamecatch",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"data",
"[",
"index",
"]",
"==",
"'l'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
")",
"return",
"TokenNameclass",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"return",
"TokenNameconst",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"8",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNamecontinue",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'d'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"2",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
")",
"return",
"TokenNamedo",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"6",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'b'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNamedouble",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"7",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'f'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"return",
"TokenNamedefault",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'e'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"4",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"{",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"{",
"return",
"TokenNameelse",
";",
"}",
"else",
"{",
"return",
"TokenNameIdentifier",
";",
"}",
"}",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'m'",
")",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
">=",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"return",
"TokenNameenum",
";",
"}",
"else",
"{",
"this",
".",
"useEnumAsAnIndentifier",
"=",
"true",
";",
"return",
"TokenNameIdentifier",
";",
"}",
"}",
"return",
"TokenNameIdentifier",
";",
"case",
"7",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'x'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'d'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
")",
"return",
"TokenNameextends",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'f'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"3",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
")",
"return",
"TokenNamefor",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"5",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
")",
"{",
"return",
"TokenNamefinal",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"data",
"[",
"index",
"]",
"==",
"'l'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"return",
"TokenNamefloat",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNamefalse",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"7",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'y'",
")",
")",
"return",
"TokenNamefinally",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'g'",
":",
"if",
"(",
"length",
"==",
"4",
")",
"{",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
")",
"{",
"return",
"TokenNamegoto",
";",
"}",
"}",
"return",
"TokenNameIdentifier",
";",
"case",
"'i'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"2",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'f'",
")",
"return",
"TokenNameif",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"3",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"return",
"TokenNameint",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"6",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'m'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'p'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"return",
"TokenNameimport",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"9",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'f'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNameinterface",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"10",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'m'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'p'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'m'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
")",
"return",
"TokenNameimplements",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'f'",
")",
")",
"return",
"TokenNameinstanceof",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'l'",
":",
"if",
"(",
"length",
"==",
"4",
")",
"{",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'g'",
")",
")",
"{",
"return",
"TokenNamelong",
";",
"}",
"}",
"return",
"TokenNameIdentifier",
";",
"case",
"'n'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"3",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'w'",
")",
")",
"return",
"TokenNamenew",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"4",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
")",
"return",
"TokenNamenull",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"6",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'v'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"{",
"return",
"TokenNamenative",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'p'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"6",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'b'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
")",
"{",
"return",
"TokenNamepublic",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"7",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'k'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'g'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNamepackage",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'v'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"{",
"return",
"TokenNameprivate",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"9",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'d'",
")",
")",
"{",
"return",
"TokenNameprotected",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'r'",
":",
"if",
"(",
"length",
"==",
"6",
")",
"{",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
")",
"{",
"return",
"TokenNamereturn",
";",
"}",
"}",
"return",
"TokenNameIdentifier",
";",
"case",
"'s'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"5",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"return",
"TokenNameshort",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'p'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
")",
"return",
"TokenNamesuper",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"6",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
")",
"{",
"return",
"TokenNamestatic",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'w'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
")",
"return",
"TokenNameswitch",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"8",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'f'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'p'",
")",
")",
"return",
"TokenNamestrictfp",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"12",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'y'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'c'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'z'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'d'",
")",
")",
"{",
"return",
"TokenNamesynchronized",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'t'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"3",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'y'",
")",
")",
"return",
"TokenNametry",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"4",
":",
"if",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
")",
"return",
"TokenNamethis",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"else",
"if",
"(",
"(",
"data",
"[",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'u'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNametrue",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"5",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'w'",
")",
")",
"return",
"TokenNamethrow",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"6",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'w'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
")",
"return",
"TokenNamethrows",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"9",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'r'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'s'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'n'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
")",
"{",
"return",
"TokenNametransient",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'v'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"4",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'d'",
")",
")",
"return",
"TokenNamevoid",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"case",
"8",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'o'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'a'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'t'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"{",
"return",
"TokenNamevolatile",
";",
"}",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"case",
"'w'",
":",
"switch",
"(",
"length",
")",
"{",
"case",
"5",
":",
"if",
"(",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'h'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'i'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'l'",
")",
"&&",
"(",
"data",
"[",
"++",
"index",
"]",
"==",
"'e'",
")",
")",
"return",
"TokenNamewhile",
";",
"else",
"return",
"TokenNameIdentifier",
";",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"default",
":",
"return",
"TokenNameIdentifier",
";",
"}",
"}",
"public",
"int",
"scanNumber",
"(",
"boolean",
"dotPrefix",
")",
"throws",
"InvalidInputException",
"{",
"boolean",
"floating",
"=",
"dotPrefix",
";",
"if",
"(",
"!",
"dotPrefix",
"&&",
"(",
"this",
".",
"currentCharacter",
"==",
"'0'",
")",
")",
"{",
"if",
"(",
"getNextChar",
"(",
"'x'",
",",
"'X'",
")",
">=",
"0",
")",
"{",
"int",
"start",
"=",
"this",
".",
"currentPosition",
";",
"consumeDigits",
"(",
"16",
",",
"true",
")",
";",
"int",
"end",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"getNextChar",
"(",
"'l'",
",",
"'L'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"end",
"==",
"start",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HEXA",
")",
";",
"}",
"return",
"TokenNameLongLiteral",
";",
"}",
"else",
"if",
"(",
"getNextChar",
"(",
"'.'",
")",
")",
"{",
"boolean",
"hasNoDigitsBeforeDot",
"=",
"end",
"==",
"start",
";",
"start",
"=",
"this",
".",
"currentPosition",
";",
"consumeDigits",
"(",
"16",
",",
"true",
")",
";",
"end",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"hasNoDigitsBeforeDot",
"&&",
"end",
"==",
"start",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HEXA",
")",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'p'",
",",
"'P'",
")",
">=",
"0",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'-'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'+'",
")",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
")",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'_'",
")",
"{",
"consumeDigits",
"(",
"10",
")",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNDERSCORE",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HEXA",
")",
";",
"}",
"consumeDigits",
"(",
"10",
")",
";",
"if",
"(",
"getNextChar",
"(",
"'f'",
",",
"'F'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"return",
"TokenNameFloatingPointLiteral",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'d'",
",",
"'D'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"return",
"TokenNameDoubleLiteral",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'l'",
",",
"'L'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HEXA",
")",
";",
"}",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"return",
"TokenNameDoubleLiteral",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HEXA",
")",
";",
"}",
"}",
"else",
"if",
"(",
"getNextChar",
"(",
"'p'",
",",
"'P'",
")",
">=",
"0",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'-'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'+'",
")",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
")",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'_'",
")",
"{",
"consumeDigits",
"(",
"10",
")",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNDERSCORE",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_FLOAT",
")",
";",
"}",
"consumeDigits",
"(",
"10",
")",
";",
"if",
"(",
"getNextChar",
"(",
"'f'",
",",
"'F'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"return",
"TokenNameFloatingPointLiteral",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'d'",
",",
"'D'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"return",
"TokenNameDoubleLiteral",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'l'",
",",
"'L'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HEXA",
")",
";",
"}",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"ILLEGAL_HEXA_LITERAL",
")",
";",
"}",
"return",
"TokenNameDoubleLiteral",
";",
"}",
"else",
"{",
"if",
"(",
"end",
"==",
"start",
")",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_HEXA",
")",
";",
"return",
"TokenNameIntegerLiteral",
";",
"}",
"}",
"else",
"if",
"(",
"getNextChar",
"(",
"'b'",
",",
"'B'",
")",
">=",
"0",
")",
"{",
"int",
"start",
"=",
"this",
".",
"currentPosition",
";",
"consumeDigits",
"(",
"2",
",",
"true",
")",
";",
"int",
"end",
"=",
"this",
".",
"currentPosition",
";",
"if",
"(",
"end",
"==",
"start",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_7",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"BINARY_LITERAL_NOT_BELOW_17",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_BINARY",
")",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'l'",
",",
"'L'",
")",
">=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_7",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"BINARY_LITERAL_NOT_BELOW_17",
")",
";",
"}",
"return",
"TokenNameLongLiteral",
";",
"}",
"if",
"(",
"this",
".",
"sourceLevel",
"<",
"ClassFileConstants",
".",
"JDK1_7",
")",
"{",
"throw",
"new",
"InvalidInputException",
"(",
"BINARY_LITERAL_NOT_BELOW_17",
")",
";",
"}",
"return",
"TokenNameIntegerLiteral",
";",
"}",
"if",
"(",
"getNextCharAsDigit",
"(",
")",
")",
"{",
"consumeDigits",
"(",
"10",
")",
";",
"if",
"(",
"getNextChar",
"(",
"'l'",
",",
"'L'",
")",
">=",
"0",
")",
"{",
"return",
"TokenNameLongLiteral",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'f'",
",",
"'F'",
")",
">=",
"0",
")",
"{",
"return",
"TokenNameFloatingPointLiteral",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'d'",
",",
"'D'",
")",
">=",
"0",
")",
"{",
"return",
"TokenNameDoubleLiteral",
";",
"}",
"else",
"{",
"boolean",
"isInteger",
"=",
"true",
";",
"if",
"(",
"getNextChar",
"(",
"'.'",
")",
")",
"{",
"isInteger",
"=",
"false",
";",
"consumeDigits",
"(",
"10",
")",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'e'",
",",
"'E'",
")",
">=",
"0",
")",
"{",
"isInteger",
"=",
"false",
";",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'-'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'+'",
")",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
")",
")",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'_'",
")",
"{",
"consumeDigits",
"(",
"10",
")",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNDERSCORE",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_FLOAT",
")",
";",
"}",
"consumeDigits",
"(",
"10",
")",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'f'",
",",
"'F'",
")",
">=",
"0",
")",
"return",
"TokenNameFloatingPointLiteral",
";",
"if",
"(",
"getNextChar",
"(",
"'d'",
",",
"'D'",
")",
">=",
"0",
"||",
"!",
"isInteger",
")",
"return",
"TokenNameDoubleLiteral",
";",
"return",
"TokenNameIntegerLiteral",
";",
"}",
"}",
"else",
"{",
"}",
"}",
"consumeDigits",
"(",
"10",
")",
";",
"if",
"(",
"(",
"!",
"dotPrefix",
")",
"&&",
"(",
"getNextChar",
"(",
"'l'",
",",
"'L'",
")",
">=",
"0",
")",
")",
"return",
"TokenNameLongLiteral",
";",
"if",
"(",
"(",
"!",
"dotPrefix",
")",
"&&",
"(",
"getNextChar",
"(",
"'.'",
")",
")",
")",
"{",
"consumeDigits",
"(",
"10",
",",
"true",
")",
";",
"floating",
"=",
"true",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'e'",
",",
"'E'",
")",
">=",
"0",
")",
"{",
"floating",
"=",
"true",
";",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"if",
"(",
"(",
"this",
".",
"currentCharacter",
"==",
"'-'",
")",
"||",
"(",
"this",
".",
"currentCharacter",
"==",
"'+'",
")",
")",
"{",
"this",
".",
"unicodeAsBackSlash",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"this",
".",
"currentCharacter",
"=",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"++",
"]",
")",
"==",
"'\\\\'",
")",
"&&",
"(",
"this",
".",
"source",
"[",
"this",
".",
"currentPosition",
"]",
"==",
"'u'",
")",
")",
"{",
"getNextUnicodeChar",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"withoutUnicodePtr",
"!=",
"0",
")",
"{",
"unicodeStore",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"ScannerHelper",
".",
"isDigit",
"(",
"this",
".",
"currentCharacter",
")",
")",
"{",
"if",
"(",
"this",
".",
"currentCharacter",
"==",
"'_'",
")",
"{",
"consumeDigits",
"(",
"10",
")",
";",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_UNDERSCORE",
")",
";",
"}",
"throw",
"new",
"InvalidInputException",
"(",
"INVALID_FLOAT",
")",
";",
"}",
"consumeDigits",
"(",
"10",
")",
";",
"}",
"if",
"(",
"getNextChar",
"(",
"'d'",
",",
"'D'",
")",
">=",
"0",
")",
"return",
"TokenNameDoubleLiteral",
";",
"if",
"(",
"getNextChar",
"(",
"'f'",
",",
"'F'",
")",
">=",
"0",
")",
"return",
"TokenNameFloatingPointLiteral",
";",
"return",
"floating",
"?",
"TokenNameDoubleLiteral",
":",
"TokenNameIntegerLiteral",
";",
"}",
"public",
"final",
"int",
"getLineNumber",
"(",
"int",
"position",
")",
"{",
"return",
"Util",
".",
"getLineNumber",
"(",
"position",
",",
"this",
".",
"lineEnds",
",",
"0",
",",
"this",
".",
"linePtr",
")",
";",
"}",
"public",
"final",
"void",
"setSource",
"(",
"char",
"[",
"]",
"sourceString",
")",
"{",
"int",
"sourceLength",
";",
"if",
"(",
"sourceString",
"==",
"null",
")",
"{",
"this",
".",
"source",
"=",
"CharOperation",
".",
"NO_CHAR",
";",
"sourceLength",
"=",
"0",
";",
"}",
"else",
"{",
"this",
".",
"source",
"=",
"sourceString",
";",
"sourceLength",
"=",
"sourceString",
".",
"length",
";",
"}",
"this",
".",
"startPosition",
"=",
"-",
"1",
";",
"this",
".",
"eofPosition",
"=",
"sourceLength",
";",
"this",
".",
"initialPosition",
"=",
"this",
".",
"currentPosition",
"=",
"0",
";",
"this",
".",
"containsAssertKeyword",
"=",
"false",
";",
"this",
".",
"linePtr",
"=",
"-",
"1",
";",
"}",
"public",
"final",
"void",
"setSource",
"(",
"char",
"[",
"]",
"contents",
",",
"CompilationResult",
"compilationResult",
")",
"{",
"if",
"(",
"contents",
"==",
"null",
")",
"{",
"char",
"[",
"]",
"cuContents",
"=",
"compilationResult",
".",
"compilationUnit",
".",
"getContents",
"(",
")",
";",
"setSource",
"(",
"cuContents",
")",
";",
"}",
"else",
"{",
"setSource",
"(",
"contents",
")",
";",
"}",
"int",
"[",
"]",
"lineSeparatorPositions",
"=",
"compilationResult",
".",
"lineSeparatorPositions",
";",
"if",
"(",
"lineSeparatorPositions",
"!=",
"null",
")",
"{",
"this",
".",
"lineEnds",
"=",
"lineSeparatorPositions",
";",
"this",
".",
"linePtr",
"=",
"lineSeparatorPositions",
".",
"length",
"-",
"1",
";",
"}",
"}",
"public",
"final",
"void",
"setSource",
"(",
"CompilationResult",
"compilationResult",
")",
"{",
"setSource",
"(",
"null",
",",
"compilationResult",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"if",
"(",
"this",
".",
"startPosition",
"==",
"this",
".",
"eofPosition",
")",
"return",
"\"EOFnn\"",
"+",
"new",
"String",
"(",
"this",
".",
"source",
")",
";",
"if",
"(",
"this",
".",
"currentPosition",
">",
"this",
".",
"eofPosition",
")",
"return",
"\"\"",
"+",
"new",
"String",
"(",
"this",
".",
"source",
")",
";",
"if",
"(",
"this",
".",
"currentPosition",
"<=",
"0",
")",
"return",
"\"\"",
"+",
"new",
"String",
"(",
"this",
".",
"source",
")",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"this",
".",
"startPosition",
"<",
"1000",
")",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"source",
",",
"0",
",",
"this",
".",
"startPosition",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"int",
"line",
"=",
"Util",
".",
"getLineNumber",
"(",
"this",
".",
"startPosition",
"-",
"1000",
",",
"this",
".",
"lineEnds",
",",
"0",
",",
"this",
".",
"linePtr",
")",
";",
"int",
"lineStart",
"=",
"getLineStart",
"(",
"line",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"source",
",",
"lineStart",
",",
"this",
".",
"startPosition",
"-",
"lineStart",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"int",
"middleLength",
"=",
"(",
"this",
".",
"currentPosition",
"-",
"1",
")",
"-",
"this",
".",
"startPosition",
"+",
"1",
";",
"if",
"(",
"middleLength",
">",
"-",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
",",
"middleLength",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"source",
",",
"(",
"this",
".",
"currentPosition",
"-",
"1",
")",
"+",
"1",
",",
"this",
".",
"eofPosition",
"-",
"(",
"this",
".",
"currentPosition",
"-",
"1",
")",
"-",
"1",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"public",
"String",
"toStringAction",
"(",
"int",
"act",
")",
"{",
"switch",
"(",
"act",
")",
"{",
"case",
"TokenNameIdentifier",
":",
"return",
"\"Identifier(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"case",
"TokenNameabstract",
":",
"return",
"\"abstract\"",
";",
"case",
"TokenNameboolean",
":",
"return",
"\"boolean\"",
";",
"case",
"TokenNamebreak",
":",
"return",
"\"break\"",
";",
"case",
"TokenNamebyte",
":",
"return",
"\"byte\"",
";",
"case",
"TokenNamecase",
":",
"return",
"\"case\"",
";",
"case",
"TokenNamecatch",
":",
"return",
"\"catch\"",
";",
"case",
"TokenNamechar",
":",
"return",
"\"char\"",
";",
"case",
"TokenNameclass",
":",
"return",
"\"class\"",
";",
"case",
"TokenNamecontinue",
":",
"return",
"\"continue\"",
";",
"case",
"TokenNamedefault",
":",
"return",
"\"default\"",
";",
"case",
"TokenNamedo",
":",
"return",
"\"do\"",
";",
"case",
"TokenNamedouble",
":",
"return",
"\"double\"",
";",
"case",
"TokenNameelse",
":",
"return",
"\"else\"",
";",
"case",
"TokenNameextends",
":",
"return",
"\"extends\"",
";",
"case",
"TokenNamefalse",
":",
"return",
"\"false\"",
";",
"case",
"TokenNamefinal",
":",
"return",
"\"final\"",
";",
"case",
"TokenNamefinally",
":",
"return",
"\"finally\"",
";",
"case",
"TokenNamefloat",
":",
"return",
"\"float\"",
";",
"case",
"TokenNamefor",
":",
"return",
"\"for\"",
";",
"case",
"TokenNameif",
":",
"return",
"\"if\"",
";",
"case",
"TokenNameimplements",
":",
"return",
"\"implements\"",
";",
"case",
"TokenNameimport",
":",
"return",
"\"import\"",
";",
"case",
"TokenNameinstanceof",
":",
"return",
"\"instanceof\"",
";",
"case",
"TokenNameint",
":",
"return",
"\"int\"",
";",
"case",
"TokenNameinterface",
":",
"return",
"\"interface\"",
";",
"case",
"TokenNamelong",
":",
"return",
"\"long\"",
";",
"case",
"TokenNamenative",
":",
"return",
"\"native\"",
";",
"case",
"TokenNamenew",
":",
"return",
"\"new\"",
";",
"case",
"TokenNamenull",
":",
"return",
"\"null\"",
";",
"case",
"TokenNamepackage",
":",
"return",
"\"package\"",
";",
"case",
"TokenNameprivate",
":",
"return",
"\"private\"",
";",
"case",
"TokenNameprotected",
":",
"return",
"\"protected\"",
";",
"case",
"TokenNamepublic",
":",
"return",
"\"public\"",
";",
"case",
"TokenNamereturn",
":",
"return",
"\"return\"",
";",
"case",
"TokenNameshort",
":",
"return",
"\"short\"",
";",
"case",
"TokenNamestatic",
":",
"return",
"\"static\"",
";",
"case",
"TokenNamesuper",
":",
"return",
"\"super\"",
";",
"case",
"TokenNameswitch",
":",
"return",
"\"switch\"",
";",
"case",
"TokenNamesynchronized",
":",
"return",
"\"synchronized\"",
";",
"case",
"TokenNamethis",
":",
"return",
"\"this\"",
";",
"case",
"TokenNamethrow",
":",
"return",
"\"throw\"",
";",
"case",
"TokenNamethrows",
":",
"return",
"\"throws\"",
";",
"case",
"TokenNametransient",
":",
"return",
"\"transient\"",
";",
"case",
"TokenNametrue",
":",
"return",
"\"true\"",
";",
"case",
"TokenNametry",
":",
"return",
"\"try\"",
";",
"case",
"TokenNamevoid",
":",
"return",
"\"void\"",
";",
"case",
"TokenNamevolatile",
":",
"return",
"\"volatile\"",
";",
"case",
"TokenNamewhile",
":",
"return",
"\"while\"",
";",
"case",
"TokenNameIntegerLiteral",
":",
"return",
"\"Integer(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"case",
"TokenNameLongLiteral",
":",
"return",
"\"Long(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"case",
"TokenNameFloatingPointLiteral",
":",
"return",
"\"Float(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"case",
"TokenNameDoubleLiteral",
":",
"return",
"\"Double(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"case",
"TokenNameCharacterLiteral",
":",
"return",
"\"Char(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"case",
"TokenNameStringLiteral",
":",
"return",
"\"String(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"case",
"TokenNamePLUS_PLUS",
":",
"return",
"\"++\"",
";",
"case",
"TokenNameMINUS_MINUS",
":",
"return",
"\"--\"",
";",
"case",
"TokenNameEQUAL_EQUAL",
":",
"return",
"\"==\"",
";",
"case",
"TokenNameLESS_EQUAL",
":",
"return",
"\"<=\"",
";",
"case",
"TokenNameGREATER_EQUAL",
":",
"return",
"\">=\"",
";",
"case",
"TokenNameNOT_EQUAL",
":",
"return",
"\"!=\"",
";",
"case",
"TokenNameLEFT_SHIFT",
":",
"return",
"\"<<\"",
";",
"case",
"TokenNameRIGHT_SHIFT",
":",
"return",
"\">>\"",
";",
"case",
"TokenNameUNSIGNED_RIGHT_SHIFT",
":",
"return",
"\">>>\"",
";",
"case",
"TokenNamePLUS_EQUAL",
":",
"return",
"\"+=\"",
";",
"case",
"TokenNameMINUS_EQUAL",
":",
"return",
"\"-=\"",
";",
"case",
"TokenNameMULTIPLY_EQUAL",
":",
"return",
"\"*=\"",
";",
"case",
"TokenNameDIVIDE_EQUAL",
":",
"return",
"\"/=\"",
";",
"case",
"TokenNameAND_EQUAL",
":",
"return",
"\"&=\"",
";",
"case",
"TokenNameOR_EQUAL",
":",
"return",
"\"|=\"",
";",
"case",
"TokenNameXOR_EQUAL",
":",
"return",
"\"^=\"",
";",
"case",
"TokenNameREMAINDER_EQUAL",
":",
"return",
"\"%=\"",
";",
"case",
"TokenNameLEFT_SHIFT_EQUAL",
":",
"return",
"\"<<=\"",
";",
"case",
"TokenNameRIGHT_SHIFT_EQUAL",
":",
"return",
"\">>=\"",
";",
"case",
"TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL",
":",
"return",
"\">>>=\"",
";",
"case",
"TokenNameOR_OR",
":",
"return",
"\"||\"",
";",
"case",
"TokenNameAND_AND",
":",
"return",
"\"&&\"",
";",
"case",
"TokenNamePLUS",
":",
"return",
"\"+\"",
";",
"case",
"TokenNameMINUS",
":",
"return",
"\"-\"",
";",
"case",
"TokenNameNOT",
":",
"return",
"\"!\"",
";",
"case",
"TokenNameREMAINDER",
":",
"return",
"\"%\"",
";",
"case",
"TokenNameXOR",
":",
"return",
"\"^\"",
";",
"case",
"TokenNameAND",
":",
"return",
"\"&\"",
";",
"case",
"TokenNameMULTIPLY",
":",
"return",
"\"*\"",
";",
"case",
"TokenNameOR",
":",
"return",
"\"|\"",
";",
"case",
"TokenNameTWIDDLE",
":",
"return",
"\"~\"",
";",
"case",
"TokenNameDIVIDE",
":",
"return",
"\"/\"",
";",
"case",
"TokenNameGREATER",
":",
"return",
"\">\"",
";",
"case",
"TokenNameLESS",
":",
"return",
"\"<\"",
";",
"case",
"TokenNameLPAREN",
":",
"return",
"\"(\"",
";",
"case",
"TokenNameRPAREN",
":",
"return",
"\")\"",
";",
"case",
"TokenNameLBRACE",
":",
"return",
"\"{\"",
";",
"case",
"TokenNameRBRACE",
":",
"return",
"\"}\"",
";",
"case",
"TokenNameLBRACKET",
":",
"return",
"\"[\"",
";",
"case",
"TokenNameRBRACKET",
":",
"return",
"\"]\"",
";",
"case",
"TokenNameSEMICOLON",
":",
"return",
"\";\"",
";",
"case",
"TokenNameQUESTION",
":",
"return",
"\"?\"",
";",
"case",
"TokenNameCOLON",
":",
"return",
"\":\"",
";",
"case",
"TokenNameCOMMA",
":",
"return",
"\",\"",
";",
"case",
"TokenNameDOT",
":",
"return",
"\".\"",
";",
"case",
"TokenNameEQUAL",
":",
"return",
"\"=\"",
";",
"case",
"TokenNameEOF",
":",
"return",
"\"EOF\"",
";",
"case",
"TokenNameWHITESPACE",
":",
"return",
"\"white_space(\"",
"+",
"new",
"String",
"(",
"getCurrentTokenSource",
"(",
")",
")",
"+",
"\")\"",
";",
"default",
":",
"return",
"\"not-a-token\"",
";",
"}",
"}",
"public",
"void",
"unicodeInitializeBuffer",
"(",
"int",
"length",
")",
"{",
"this",
".",
"withoutUnicodePtr",
"=",
"length",
";",
"if",
"(",
"this",
".",
"withoutUnicodeBuffer",
"==",
"null",
")",
"this",
".",
"withoutUnicodeBuffer",
"=",
"new",
"char",
"[",
"length",
"+",
"(",
"1",
"+",
"10",
")",
"]",
";",
"int",
"bLength",
"=",
"this",
".",
"withoutUnicodeBuffer",
".",
"length",
";",
"if",
"(",
"1",
"+",
"length",
">=",
"bLength",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"0",
",",
"this",
".",
"withoutUnicodeBuffer",
"=",
"new",
"char",
"[",
"length",
"+",
"(",
"1",
"+",
"10",
")",
"]",
",",
"0",
",",
"bLength",
")",
";",
"}",
"System",
".",
"arraycopy",
"(",
"this",
".",
"source",
",",
"this",
".",
"startPosition",
",",
"this",
".",
"withoutUnicodeBuffer",
",",
"1",
",",
"length",
")",
";",
"}",
"public",
"void",
"unicodeStore",
"(",
")",
"{",
"int",
"pos",
"=",
"++",
"this",
".",
"withoutUnicodePtr",
";",
"if",
"(",
"this",
".",
"withoutUnicodeBuffer",
"==",
"null",
")",
"this",
".",
"withoutUnicodeBuffer",
"=",
"new",
"char",
"[",
"10",
"]",
";",
"int",
"length",
"=",
"this",
".",
"withoutUnicodeBuffer",
".",
"length",
";",
"if",
"(",
"pos",
"==",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"0",
",",
"this",
".",
"withoutUnicodeBuffer",
"=",
"new",
"char",
"[",
"length",
"*",
"2",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"this",
".",
"withoutUnicodeBuffer",
"[",
"pos",
"]",
"=",
"this",
".",
"currentCharacter",
";",
"}",
"public",
"void",
"unicodeStore",
"(",
"char",
"character",
")",
"{",
"int",
"pos",
"=",
"++",
"this",
".",
"withoutUnicodePtr",
";",
"if",
"(",
"this",
".",
"withoutUnicodeBuffer",
"==",
"null",
")",
"this",
".",
"withoutUnicodeBuffer",
"=",
"new",
"char",
"[",
"10",
"]",
";",
"int",
"length",
"=",
"this",
".",
"withoutUnicodeBuffer",
".",
"length",
";",
"if",
"(",
"pos",
"==",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"withoutUnicodeBuffer",
",",
"0",
",",
"this",
".",
"withoutUnicodeBuffer",
"=",
"new",
"char",
"[",
"length",
"*",
"2",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"this",
".",
"withoutUnicodeBuffer",
"[",
"pos",
"]",
"=",
"character",
";",
"}",
"public",
"static",
"boolean",
"isIdentifier",
"(",
"int",
"token",
")",
"{",
"return",
"token",
"==",
"TerminalTokens",
".",
"TokenNameIdentifier",
";",
"}",
"public",
"static",
"boolean",
"isLiteral",
"(",
"int",
"token",
")",
"{",
"switch",
"(",
"token",
")",
"{",
"case",
"TerminalTokens",
".",
"TokenNameIntegerLiteral",
":",
"case",
"TerminalTokens",
".",
"TokenNameLongLiteral",
":",
"case",
"TerminalTokens",
".",
"TokenNameFloatingPointLiteral",
":",
"case",
"TerminalTokens",
".",
"TokenNameDoubleLiteral",
":",
"case",
"TerminalTokens",
".",
"TokenNameStringLiteral",
":",
"case",
"TerminalTokens",
".",
"TokenNameCharacterLiteral",
":",
"return",
"true",
";",
"default",
":",
"return",
"false",
";",
"}",
"}",
"public",
"static",
"boolean",
"isKeyword",
"(",
"int",
"token",
")",
"{",
"switch",
"(",
"token",
")",
"{",
"case",
"TerminalTokens",
".",
"TokenNameabstract",
":",
"case",
"TerminalTokens",
".",
"TokenNameassert",
":",
"case",
"TerminalTokens",
".",
"TokenNamebyte",
":",
"case",
"TerminalTokens",
".",
"TokenNamebreak",
":",
"case",
"TerminalTokens",
".",
"TokenNameboolean",
":",
"case",
"TerminalTokens",
".",
"TokenNamecase",
":",
"case",
"TerminalTokens",
".",
"TokenNamechar",
":",
"case",
"TerminalTokens",
".",
"TokenNamecatch",
":",
"case",
"TerminalTokens",
".",
"TokenNameclass",
":",
"case",
"TerminalTokens",
".",
"TokenNamecontinue",
":",
"case",
"TerminalTokens",
".",
"TokenNamedo",
":",
"case",
"TerminalTokens",
".",
"TokenNamedouble",
":",
"case",
"TerminalTokens",
".",
"TokenNamedefault",
":",
"case",
"TerminalTokens",
".",
"TokenNameelse",
":",
"case",
"TerminalTokens",
".",
"TokenNameextends",
":",
"case",
"TerminalTokens",
".",
"TokenNamefor",
":",
"case",
"TerminalTokens",
".",
"TokenNamefinal",
":",
"case",
"TerminalTokens",
".",
"TokenNamefloat",
":",
"case",
"TerminalTokens",
".",
"TokenNamefalse",
":",
"case",
"TerminalTokens",
".",
"TokenNamefinally",
":",
"case",
"TerminalTokens",
".",
"TokenNameif",
":",
"case",
"TerminalTokens",
".",
"TokenNameint",
":",
"case",
"TerminalTokens",
".",
"TokenNameimport",
":",
"case",
"TerminalTokens",
".",
"TokenNameinterface",
":",
"case",
"TerminalTokens",
".",
"TokenNameimplements",
":",
"case",
"TerminalTokens",
".",
"TokenNameinstanceof",
":",
"case",
"TerminalTokens",
".",
"TokenNamelong",
":",
"case",
"TerminalTokens",
".",
"TokenNamenew",
":",
"case",
"TerminalTokens",
".",
"TokenNamenull",
":",
"case",
"TerminalTokens",
".",
"TokenNamenative",
":",
"case",
"TerminalTokens",
".",
"TokenNamepublic",
":",
"case",
"TerminalTokens",
".",
"TokenNamepackage",
":",
"case",
"TerminalTokens",
".",
"TokenNameprivate",
":",
"case",
"TerminalTokens",
".",
"TokenNameprotected",
":",
"case",
"TerminalTokens",
".",
"TokenNamereturn",
":",
"case",
"TerminalTokens",
".",
"TokenNameshort",
":",
"case",
"TerminalTokens",
".",
"TokenNamesuper",
":",
"case",
"TerminalTokens",
".",
"TokenNamestatic",
":",
"case",
"TerminalTokens",
".",
"TokenNameswitch",
":",
"case",
"TerminalTokens",
".",
"TokenNamestrictfp",
":",
"case",
"TerminalTokens",
".",
"TokenNamesynchronized",
":",
"case",
"TerminalTokens",
".",
"TokenNametry",
":",
"case",
"TerminalTokens",
".",
"TokenNamethis",
":",
"case",
"TerminalTokens",
".",
"TokenNametrue",
":",
"case",
"TerminalTokens",
".",
"TokenNamethrow",
":",
"case",
"TerminalTokens",
".",
"TokenNamethrows",
":",
"case",
"TerminalTokens",
".",
"TokenNametransient",
":",
"case",
"TerminalTokens",
".",
"TokenNamevoid",
":",
"case",
"TerminalTokens",
".",
"TokenNamevolatile",
":",
"case",
"TerminalTokens",
".",
"TokenNamewhile",
":",
"return",
"true",
";",
"default",
":",
"return",
"false",
";",
"}",
"}",
"}",
"</s>"
] |
2,883 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Signature",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"AttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeConstants",
";",
"public",
"class",
"Disassembler",
"extends",
"ClassFileBytesDisassembler",
"{",
"private",
"static",
"final",
"char",
"[",
"]",
"ANY_EXCEPTION",
"=",
"Messages",
".",
"classfileformat_anyexceptionhandler",
".",
"toCharArray",
"(",
")",
";",
"private",
"static",
"final",
"String",
"VERSION_UNKNOWN",
"=",
"Messages",
".",
"classfileformat_versionUnknown",
";",
"private",
"boolean",
"appendModifier",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
",",
"int",
"modifierConstant",
",",
"String",
"modifier",
",",
"boolean",
"firstModifier",
")",
"{",
"if",
"(",
"(",
"accessFlags",
"&",
"modifierConstant",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"!",
"firstModifier",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"if",
"(",
"firstModifier",
")",
"{",
"firstModifier",
"=",
"false",
";",
"}",
"buffer",
".",
"append",
"(",
"modifier",
")",
";",
"}",
"return",
"firstModifier",
";",
"}",
"private",
"void",
"decodeModifiers",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
",",
"int",
"[",
"]",
"checkBits",
")",
"{",
"decodeModifiers",
"(",
"buffer",
",",
"accessFlags",
",",
"false",
",",
"false",
",",
"checkBits",
")",
";",
"}",
"private",
"void",
"decodeModifiers",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
",",
"boolean",
"printDefault",
",",
"boolean",
"asBridge",
",",
"int",
"[",
"]",
"checkBits",
")",
"{",
"if",
"(",
"checkBits",
"==",
"null",
")",
"return",
";",
"boolean",
"firstModifier",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"checkBits",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"switch",
"(",
"checkBits",
"[",
"i",
"]",
")",
"{",
"case",
"IModifierConstants",
".",
"ACC_PUBLIC",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_PUBLIC",
",",
"\"public\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_PROTECTED",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_PROTECTED",
",",
"\"protected\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_PRIVATE",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_PRIVATE",
",",
"\"private\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_ABSTRACT",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_ABSTRACT",
",",
"\"abstract\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_STATIC",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_STATIC",
",",
"\"static\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_FINAL",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_FINAL",
",",
"\"final\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_SYNCHRONIZED",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_SYNCHRONIZED",
",",
"\"synchronized\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_NATIVE",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_NATIVE",
",",
"\"native\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_STRICT",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_STRICT",
",",
"\"strictfp\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_TRANSIENT",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_TRANSIENT",
",",
"\"transient\"",
",",
"firstModifier",
")",
";",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_VOLATILE",
":",
"if",
"(",
"asBridge",
")",
"{",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_BRIDGE",
",",
"\"bridge\"",
",",
"firstModifier",
")",
";",
"}",
"else",
"{",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_VOLATILE",
",",
"\"volatile\"",
",",
"firstModifier",
")",
";",
"}",
"break",
";",
"case",
"IModifierConstants",
".",
"ACC_ENUM",
":",
"firstModifier",
"=",
"appendModifier",
"(",
"buffer",
",",
"accessFlags",
",",
"IModifierConstants",
".",
"ACC_ENUM",
",",
"\"enum\"",
",",
"firstModifier",
")",
";",
"break",
";",
"}",
"}",
"if",
"(",
"!",
"firstModifier",
")",
"{",
"if",
"(",
"!",
"printDefault",
")",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"else",
"if",
"(",
"printDefault",
")",
"{",
"buffer",
".",
"append",
"(",
"\"default\"",
")",
";",
"}",
"}",
"private",
"void",
"decodeModifiersForField",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
")",
"{",
"decodeModifiers",
"(",
"buffer",
",",
"accessFlags",
",",
"new",
"int",
"[",
"]",
"{",
"IModifierConstants",
".",
"ACC_PUBLIC",
",",
"IModifierConstants",
".",
"ACC_PROTECTED",
",",
"IModifierConstants",
".",
"ACC_PRIVATE",
",",
"IModifierConstants",
".",
"ACC_STATIC",
",",
"IModifierConstants",
".",
"ACC_FINAL",
",",
"IModifierConstants",
".",
"ACC_TRANSIENT",
",",
"IModifierConstants",
".",
"ACC_VOLATILE",
",",
"IModifierConstants",
".",
"ACC_ENUM",
"}",
")",
";",
"}",
"private",
"void",
"decodeModifiersForFieldForWorkingCopy",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
")",
"{",
"decodeModifiers",
"(",
"buffer",
",",
"accessFlags",
",",
"new",
"int",
"[",
"]",
"{",
"IModifierConstants",
".",
"ACC_PUBLIC",
",",
"IModifierConstants",
".",
"ACC_PROTECTED",
",",
"IModifierConstants",
".",
"ACC_PRIVATE",
",",
"IModifierConstants",
".",
"ACC_STATIC",
",",
"IModifierConstants",
".",
"ACC_FINAL",
",",
"IModifierConstants",
".",
"ACC_TRANSIENT",
",",
"IModifierConstants",
".",
"ACC_VOLATILE",
",",
"}",
")",
";",
"}",
"private",
"final",
"void",
"decodeModifiersForInnerClasses",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
",",
"boolean",
"printDefault",
")",
"{",
"decodeModifiers",
"(",
"buffer",
",",
"accessFlags",
",",
"printDefault",
",",
"false",
",",
"new",
"int",
"[",
"]",
"{",
"IModifierConstants",
".",
"ACC_PUBLIC",
",",
"IModifierConstants",
".",
"ACC_PROTECTED",
",",
"IModifierConstants",
".",
"ACC_PRIVATE",
",",
"IModifierConstants",
".",
"ACC_ABSTRACT",
",",
"IModifierConstants",
".",
"ACC_STATIC",
",",
"IModifierConstants",
".",
"ACC_FINAL",
",",
"}",
")",
";",
"}",
"private",
"final",
"void",
"decodeModifiersForMethod",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
")",
"{",
"decodeModifiers",
"(",
"buffer",
",",
"accessFlags",
",",
"false",
",",
"true",
",",
"new",
"int",
"[",
"]",
"{",
"IModifierConstants",
".",
"ACC_PUBLIC",
",",
"IModifierConstants",
".",
"ACC_PROTECTED",
",",
"IModifierConstants",
".",
"ACC_PRIVATE",
",",
"IModifierConstants",
".",
"ACC_ABSTRACT",
",",
"IModifierConstants",
".",
"ACC_STATIC",
",",
"IModifierConstants",
".",
"ACC_FINAL",
",",
"IModifierConstants",
".",
"ACC_SYNCHRONIZED",
",",
"IModifierConstants",
".",
"ACC_NATIVE",
",",
"IModifierConstants",
".",
"ACC_STRICT",
",",
"IModifierConstants",
".",
"ACC_BRIDGE",
",",
"}",
")",
";",
"}",
"private",
"final",
"void",
"decodeModifiersForType",
"(",
"StringBuffer",
"buffer",
",",
"int",
"accessFlags",
")",
"{",
"decodeModifiers",
"(",
"buffer",
",",
"accessFlags",
",",
"new",
"int",
"[",
"]",
"{",
"IModifierConstants",
".",
"ACC_PUBLIC",
",",
"IModifierConstants",
".",
"ACC_ABSTRACT",
",",
"IModifierConstants",
".",
"ACC_FINAL",
",",
"}",
")",
";",
"}",
"public",
"static",
"String",
"escapeString",
"(",
"String",
"s",
")",
"{",
"return",
"decodeStringValue",
"(",
"s",
")",
";",
"}",
"static",
"String",
"decodeStringValue",
"(",
"char",
"[",
"]",
"chars",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"chars",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"char",
"c",
"=",
"chars",
"[",
"i",
"]",
";",
"escapeChar",
"(",
"buffer",
",",
"c",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"private",
"static",
"void",
"escapeChar",
"(",
"StringBuffer",
"buffer",
",",
"char",
"c",
")",
"{",
"switch",
"(",
"c",
")",
"{",
"case",
"'\\b'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\b\"",
")",
";",
"break",
";",
"case",
"'\\t'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\t\"",
")",
";",
"break",
";",
"case",
"'\\n'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\n\"",
")",
";",
"break",
";",
"case",
"'\\f'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\f\"",
")",
";",
"break",
";",
"case",
"'\\r'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\r\"",
")",
";",
"break",
";",
"case",
"'\\0'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\0\"",
")",
";",
"break",
";",
"case",
"'\\1'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\1\"",
")",
";",
"break",
";",
"case",
"'\\2'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\2\"",
")",
";",
"break",
";",
"case",
"'\\3'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\3\"",
")",
";",
"break",
";",
"case",
"'\\4'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\4\"",
")",
";",
"break",
";",
"case",
"'\\5'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\5\"",
")",
";",
"break",
";",
"case",
"'\\6'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\6\"",
")",
";",
"break",
";",
"case",
"'\\7'",
":",
"buffer",
".",
"append",
"(",
"\"\\\\7\"",
")",
";",
"break",
";",
"default",
":",
"buffer",
".",
"append",
"(",
"c",
")",
";",
"}",
"}",
"static",
"String",
"decodeStringValue",
"(",
"String",
"s",
")",
"{",
"return",
"decodeStringValue",
"(",
"s",
".",
"toCharArray",
"(",
")",
")",
";",
"}",
"public",
"String",
"disassemble",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"String",
"lineSeparator",
")",
"throws",
"ClassFormatException",
"{",
"try",
"{",
"return",
"disassemble",
"(",
"new",
"ClassFileReader",
"(",
"classFileBytes",
",",
"IClassFileReader",
".",
"ALL",
")",
",",
"lineSeparator",
",",
"ClassFileBytesDisassembler",
".",
"DEFAULT",
")",
";",
"}",
"catch",
"(",
"ArrayIndexOutOfBoundsException",
"e",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"}",
"public",
"String",
"disassemble",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"String",
"lineSeparator",
",",
"int",
"mode",
")",
"throws",
"ClassFormatException",
"{",
"try",
"{",
"return",
"disassemble",
"(",
"new",
"ClassFileReader",
"(",
"classFileBytes",
",",
"IClassFileReader",
".",
"ALL",
")",
",",
"lineSeparator",
",",
"mode",
")",
";",
"}",
"catch",
"(",
"ArrayIndexOutOfBoundsException",
"e",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IAnnotation",
"annotation",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"final",
"int",
"typeIndex",
"=",
"annotation",
".",
"getTypeIndex",
"(",
")",
";",
"final",
"char",
"[",
"]",
"typeName",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"annotation",
".",
"getTypeName",
"(",
")",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_annotationentrystart",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"typeIndex",
")",
",",
"new",
"String",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"typeName",
")",
",",
"'.'",
",",
"mode",
")",
")",
"}",
")",
")",
";",
"final",
"IAnnotationComponent",
"[",
"]",
"components",
"=",
"annotation",
".",
"getComponents",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"components",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"disassemble",
"(",
"components",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_annotationentryend",
")",
";",
"}",
"private",
"void",
"disassemble",
"(",
"IAnnotationComponent",
"annotationComponent",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_annotationcomponent",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"annotationComponent",
".",
"getComponentNameIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"annotationComponent",
".",
"getComponentName",
"(",
")",
")",
"}",
")",
")",
";",
"disassemble",
"(",
"annotationComponent",
".",
"getComponentValue",
"(",
")",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"private",
"void",
"disassemble",
"(",
"IAnnotationComponentValue",
"annotationComponentValue",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"switch",
"(",
"annotationComponentValue",
".",
"getTag",
"(",
")",
")",
"{",
"case",
"IAnnotationComponentValue",
".",
"BYTE_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"CHAR_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"DOUBLE_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"FLOAT_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"INTEGER_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"LONG_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"SHORT_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"BOOLEAN_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"STRING_TAG",
":",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"annotationComponentValue",
".",
"getConstantValue",
"(",
")",
";",
"String",
"value",
"=",
"null",
";",
"switch",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"value",
"=",
"constantPoolEntry",
".",
"getLongValue",
"(",
")",
"+",
"\"L\"",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"value",
"=",
"constantPoolEntry",
".",
"getFloatValue",
"(",
")",
"+",
"\"f\"",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"value",
"=",
"Double",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getDoubleValue",
"(",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"StringBuffer",
"temp",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"switch",
"(",
"annotationComponentValue",
".",
"getTag",
"(",
")",
")",
"{",
"case",
"IAnnotationComponentValue",
".",
"CHAR_TAG",
":",
"temp",
".",
"append",
"(",
"'\\''",
")",
";",
"escapeChar",
"(",
"temp",
",",
"(",
"char",
")",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"temp",
".",
"append",
"(",
"'\\''",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"BOOLEAN_TAG",
":",
"temp",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
"==",
"1",
"?",
"\"true\"",
":",
"\"false\"",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"BYTE_TAG",
":",
"temp",
".",
"append",
"(",
"\"(byte)",
"\"",
")",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"SHORT_TAG",
":",
"temp",
".",
"append",
"(",
"\"(short)",
"\"",
")",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"INTEGER_TAG",
":",
"temp",
".",
"append",
"(",
"\"(int)",
"\"",
")",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"}",
"value",
"=",
"String",
".",
"valueOf",
"(",
"temp",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
":",
"value",
"=",
"\"\\\"\"",
"+",
"decodeStringValue",
"(",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
")",
"+",
"\"\\\"\"",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_annotationdefaultvalue",
",",
"value",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"ENUM_TAG",
":",
"final",
"int",
"enumConstantTypeNameIndex",
"=",
"annotationComponentValue",
".",
"getEnumConstantTypeNameIndex",
"(",
")",
";",
"final",
"char",
"[",
"]",
"typeName",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"annotationComponentValue",
".",
"getEnumConstantTypeName",
"(",
")",
",",
"'/'",
",",
"'.'",
")",
";",
"final",
"int",
"enumConstantNameIndex",
"=",
"annotationComponentValue",
".",
"getEnumConstantNameIndex",
"(",
")",
";",
"final",
"char",
"[",
"]",
"constantName",
"=",
"annotationComponentValue",
".",
"getEnumConstantName",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_annotationenumvalue",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"enumConstantTypeNameIndex",
")",
",",
"Integer",
".",
"toString",
"(",
"enumConstantNameIndex",
")",
",",
"new",
"String",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"typeName",
")",
",",
"'.'",
",",
"mode",
")",
")",
",",
"new",
"String",
"(",
"constantName",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"CLASS_TAG",
":",
"final",
"int",
"classIndex",
"=",
"annotationComponentValue",
".",
"getClassInfoIndex",
"(",
")",
";",
"constantPoolEntry",
"=",
"annotationComponentValue",
".",
"getClassInfo",
"(",
")",
";",
"final",
"char",
"[",
"]",
"className",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_annotationclassvalue",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"classIndex",
")",
",",
"new",
"String",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"className",
")",
",",
"'.'",
",",
"mode",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"ANNOTATION_TAG",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_annotationannotationvalue",
")",
";",
"IAnnotation",
"annotation",
"=",
"annotationComponentValue",
".",
"getAnnotationValue",
"(",
")",
";",
"disassemble",
"(",
"annotation",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"ARRAY_TAG",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_annotationarrayvaluestart",
")",
";",
"final",
"IAnnotationComponentValue",
"[",
"]",
"annotationComponentValues",
"=",
"annotationComponentValue",
".",
"getAnnotationComponentValues",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotationComponentValues",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"disassemble",
"(",
"annotationComponentValues",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_annotationarrayvalueend",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IAnnotationDefaultAttribute",
"annotationDefaultAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_annotationdefaultheader",
")",
";",
"IAnnotationComponentValue",
"componentValue",
"=",
"annotationDefaultAttribute",
".",
"getMemberValue",
"(",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"2",
")",
";",
"disassemble",
"(",
"componentValue",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"private",
"void",
"disassemble",
"(",
"IClassFileAttribute",
"classFileAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_genericattributeheader",
",",
"new",
"String",
"[",
"]",
"{",
"new",
"String",
"(",
"classFileAttribute",
".",
"getAttributeName",
"(",
")",
")",
",",
"Long",
".",
"toString",
"(",
"classFileAttribute",
".",
"getAttributeLength",
"(",
")",
")",
"}",
")",
")",
";",
"}",
"private",
"void",
"disassembleEnumConstructor",
"(",
"IClassFileReader",
"classFileReader",
",",
"char",
"[",
"]",
"className",
",",
"IMethodInfo",
"methodInfo",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"final",
"ICodeAttribute",
"codeAttribute",
"=",
"methodInfo",
".",
"getCodeAttribute",
"(",
")",
";",
"char",
"[",
"]",
"methodDescriptor",
"=",
"methodInfo",
".",
"getDescriptor",
"(",
")",
";",
"final",
"IClassFileAttribute",
"runtimeVisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_ANNOTATIONS",
")",
";",
"final",
"IClassFileAttribute",
"runtimeInvisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_ANNOTATIONS",
")",
";",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"final",
"int",
"accessFlags",
"=",
"methodInfo",
".",
"getAccessFlags",
"(",
")",
";",
"decodeModifiersForMethod",
"(",
"buffer",
",",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_PRIVATE",
")",
";",
"CharOperation",
".",
"replace",
"(",
"methodDescriptor",
",",
"'/'",
",",
"'.'",
")",
";",
"final",
"boolean",
"isVarArgs",
"=",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_VARARGS",
")",
"!=",
"0",
";",
"final",
"char",
"[",
"]",
"signature",
"=",
"Signature",
".",
"toCharArray",
"(",
"methodDescriptor",
",",
"returnClassName",
"(",
"className",
",",
"'.'",
",",
"COMPACT",
")",
",",
"getParameterNames",
"(",
"methodDescriptor",
",",
"codeAttribute",
",",
"accessFlags",
")",
",",
"!",
"checkMode",
"(",
"mode",
",",
"COMPACT",
")",
",",
"false",
",",
"isVarArgs",
")",
";",
"int",
"index",
"=",
"CharOperation",
".",
"indexOf",
"(",
"','",
",",
"signature",
")",
";",
"index",
"=",
"CharOperation",
".",
"indexOf",
"(",
"','",
",",
"signature",
",",
"index",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"signature",
",",
"0",
",",
"CharOperation",
".",
"indexOf",
"(",
"'('",
",",
"signature",
")",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"signature",
",",
"index",
"+",
"2",
",",
"signature",
".",
"length",
"-",
"index",
"-",
"2",
")",
";",
"IExceptionAttribute",
"exceptionAttribute",
"=",
"methodInfo",
".",
"getExceptionAttribute",
"(",
")",
";",
"if",
"(",
"exceptionAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"throws",
"\"",
")",
";",
"char",
"[",
"]",
"[",
"]",
"exceptionNames",
"=",
"exceptionAttribute",
".",
"getExceptionNames",
"(",
")",
";",
"int",
"length",
"=",
"exceptionNames",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"char",
"[",
"]",
"exceptionName",
"=",
"exceptionNames",
"[",
"i",
"]",
";",
"CharOperation",
".",
"replace",
"(",
"exceptionName",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"exceptionName",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"}",
"if",
"(",
"(",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_NATIVE",
")",
"==",
"0",
")",
"&&",
"(",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_ABSTRACT",
")",
"==",
"0",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"{\"",
")",
";",
"final",
"char",
"[",
"]",
"returnType",
"=",
"Signature",
".",
"getReturnType",
"(",
"methodDescriptor",
")",
";",
"if",
"(",
"returnType",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"returnType",
"[",
"0",
"]",
")",
"{",
"case",
"'V'",
":",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"break",
";",
"case",
"'I'",
":",
"case",
"'B'",
":",
"case",
"'J'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'S'",
":",
"case",
"'C'",
":",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"\"return",
"0;\"",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"break",
";",
"default",
":",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"}",
"else",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"\"return",
"null;\"",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'}'",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"';'",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IClassFileReader",
"classFileReader",
",",
"char",
"[",
"]",
"className",
",",
"IMethodInfo",
"methodInfo",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"final",
"ICodeAttribute",
"codeAttribute",
"=",
"methodInfo",
".",
"getCodeAttribute",
"(",
")",
";",
"final",
"char",
"[",
"]",
"methodDescriptor",
"=",
"methodInfo",
".",
"getDescriptor",
"(",
")",
";",
"final",
"ISignatureAttribute",
"signatureAttribute",
"=",
"(",
"ISignatureAttribute",
")",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"SIGNATURE",
")",
";",
"final",
"IClassFileAttribute",
"runtimeVisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_ANNOTATIONS",
")",
";",
"final",
"IClassFileAttribute",
"runtimeInvisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_ANNOTATIONS",
")",
";",
"final",
"IClassFileAttribute",
"runtimeVisibleParameterAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS",
")",
";",
"final",
"IClassFileAttribute",
"runtimeInvisibleParameterAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS",
")",
";",
"final",
"IClassFileAttribute",
"annotationDefaultAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"IAttributeNamesConstants",
".",
"ANNOTATION_DEFAULT",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
"|",
"DETAILED",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_methoddescriptor",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"methodInfo",
".",
"getDescriptorIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"methodDescriptor",
")",
"}",
")",
")",
";",
"if",
"(",
"methodInfo",
".",
"isDeprecated",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_deprecated",
")",
";",
"}",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"if",
"(",
"signatureAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_signatureattributeheader",
",",
"new",
"String",
"(",
"signatureAttribute",
".",
"getSignature",
"(",
")",
")",
")",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"if",
"(",
"codeAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_stacksAndLocals",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"codeAttribute",
".",
"getMaxStack",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"codeAttribute",
".",
"getMaxLocals",
"(",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"DETAILED",
")",
")",
"{",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"}",
"final",
"int",
"accessFlags",
"=",
"methodInfo",
".",
"getAccessFlags",
"(",
")",
";",
"decodeModifiersForMethod",
"(",
"buffer",
",",
"accessFlags",
")",
";",
"if",
"(",
"methodInfo",
".",
"isSynthetic",
"(",
")",
"&&",
"!",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"synthetic\"",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"CharOperation",
".",
"replace",
"(",
"methodDescriptor",
",",
"'/'",
",",
"'.'",
")",
";",
"final",
"boolean",
"isVarArgs",
"=",
"isVarArgs",
"(",
"methodInfo",
")",
";",
"char",
"[",
"]",
"methodHeader",
"=",
"null",
";",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
"=",
"null",
";",
"if",
"(",
"!",
"methodInfo",
".",
"isClinit",
"(",
")",
")",
"{",
"parameterNames",
"=",
"getParameterNames",
"(",
"methodDescriptor",
",",
"codeAttribute",
",",
"accessFlags",
")",
";",
"}",
"if",
"(",
"methodInfo",
".",
"isConstructor",
"(",
")",
")",
"{",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
"&&",
"signatureAttribute",
"!=",
"null",
")",
"{",
"final",
"char",
"[",
"]",
"signature",
"=",
"signatureAttribute",
".",
"getSignature",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"signature",
",",
"'/'",
",",
"'.'",
")",
";",
"disassembleGenericSignature",
"(",
"mode",
",",
"buffer",
",",
"signature",
")",
";",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"methodHeader",
"=",
"Signature",
".",
"toCharArray",
"(",
"signature",
",",
"returnClassName",
"(",
"className",
",",
"'.'",
",",
"COMPACT",
")",
",",
"parameterNames",
",",
"!",
"checkMode",
"(",
"mode",
",",
"COMPACT",
")",
",",
"false",
",",
"isVarArgs",
")",
";",
"}",
"else",
"{",
"methodHeader",
"=",
"Signature",
".",
"toCharArray",
"(",
"methodDescriptor",
",",
"returnClassName",
"(",
"className",
",",
"'.'",
",",
"COMPACT",
")",
",",
"parameterNames",
",",
"!",
"checkMode",
"(",
"mode",
",",
"COMPACT",
")",
",",
"false",
",",
"isVarArgs",
")",
";",
"}",
"}",
"else",
"if",
"(",
"methodInfo",
".",
"isClinit",
"(",
")",
")",
"{",
"methodHeader",
"=",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_clinitname",
")",
".",
"toCharArray",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
"&&",
"signatureAttribute",
"!=",
"null",
")",
"{",
"final",
"char",
"[",
"]",
"signature",
"=",
"signatureAttribute",
".",
"getSignature",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"signature",
",",
"'/'",
",",
"'.'",
")",
";",
"disassembleGenericSignature",
"(",
"mode",
",",
"buffer",
",",
"signature",
")",
";",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"methodHeader",
"=",
"Signature",
".",
"toCharArray",
"(",
"signature",
",",
"methodInfo",
".",
"getName",
"(",
")",
",",
"parameterNames",
",",
"!",
"checkMode",
"(",
"mode",
",",
"COMPACT",
")",
",",
"true",
",",
"isVarArgs",
")",
";",
"}",
"else",
"{",
"methodHeader",
"=",
"Signature",
".",
"toCharArray",
"(",
"methodDescriptor",
",",
"methodInfo",
".",
"getName",
"(",
")",
",",
"parameterNames",
",",
"!",
"checkMode",
"(",
"mode",
",",
"COMPACT",
")",
",",
"true",
",",
"isVarArgs",
")",
";",
"}",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"DETAILED",
")",
"&&",
"(",
"runtimeInvisibleParameterAnnotationsAttribute",
"!=",
"null",
"||",
"runtimeVisibleParameterAnnotationsAttribute",
"!=",
"null",
")",
")",
"{",
"IParameterAnnotation",
"[",
"]",
"invisibleParameterAnnotations",
"=",
"null",
";",
"IParameterAnnotation",
"[",
"]",
"visibleParameterAnnotations",
"=",
"null",
";",
"int",
"length",
"=",
"-",
"1",
";",
"if",
"(",
"runtimeInvisibleParameterAnnotationsAttribute",
"!=",
"null",
")",
"{",
"IRuntimeInvisibleParameterAnnotationsAttribute",
"attribute",
"=",
"(",
"IRuntimeInvisibleParameterAnnotationsAttribute",
")",
"runtimeInvisibleParameterAnnotationsAttribute",
";",
"invisibleParameterAnnotations",
"=",
"attribute",
".",
"getParameterAnnotations",
"(",
")",
";",
"length",
"=",
"invisibleParameterAnnotations",
".",
"length",
";",
"if",
"(",
"length",
">",
"0",
")",
"{",
"int",
"parameterNamesLength",
"=",
"parameterNames",
".",
"length",
";",
"if",
"(",
"length",
"<",
"parameterNamesLength",
")",
"{",
"System",
".",
"arraycopy",
"(",
"invisibleParameterAnnotations",
",",
"0",
",",
"(",
"invisibleParameterAnnotations",
"=",
"new",
"IParameterAnnotation",
"[",
"parameterNamesLength",
"]",
")",
",",
"1",
",",
"length",
")",
";",
"length",
"=",
"parameterNamesLength",
";",
"}",
"}",
"}",
"if",
"(",
"runtimeVisibleParameterAnnotationsAttribute",
"!=",
"null",
")",
"{",
"IRuntimeVisibleParameterAnnotationsAttribute",
"attribute",
"=",
"(",
"IRuntimeVisibleParameterAnnotationsAttribute",
")",
"runtimeVisibleParameterAnnotationsAttribute",
";",
"visibleParameterAnnotations",
"=",
"attribute",
".",
"getParameterAnnotations",
"(",
")",
";",
"length",
"=",
"visibleParameterAnnotations",
".",
"length",
";",
"if",
"(",
"length",
">",
"0",
")",
"{",
"int",
"parameterNamesLength",
"=",
"parameterNames",
".",
"length",
";",
"if",
"(",
"length",
"<",
"parameterNamesLength",
")",
"{",
"System",
".",
"arraycopy",
"(",
"visibleParameterAnnotations",
",",
"0",
",",
"(",
"visibleParameterAnnotations",
"=",
"new",
"IParameterAnnotation",
"[",
"parameterNamesLength",
"]",
")",
",",
"1",
",",
"length",
")",
";",
"length",
"=",
"parameterNamesLength",
";",
"}",
"}",
"}",
"int",
"insertionPosition",
"=",
"CharOperation",
".",
"indexOf",
"(",
"'('",
",",
"methodHeader",
")",
"+",
"1",
";",
"int",
"start",
"=",
"0",
";",
"StringBuffer",
"stringBuffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"stringBuffer",
".",
"append",
"(",
"methodHeader",
",",
"0",
",",
"insertionPosition",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"{",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"int",
"stringBufferSize",
"=",
"stringBuffer",
".",
"length",
"(",
")",
";",
"if",
"(",
"visibleParameterAnnotations",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"visibleParameterAnnotations",
",",
"stringBuffer",
",",
"i",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"invisibleParameterAnnotations",
"!=",
"null",
")",
"{",
"if",
"(",
"stringBuffer",
".",
"length",
"(",
")",
"!=",
"stringBufferSize",
")",
"{",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"stringBufferSize",
"=",
"stringBuffer",
".",
"length",
"(",
")",
";",
"}",
"disassembleAsModifier",
"(",
"invisibleParameterAnnotations",
",",
"stringBuffer",
",",
"i",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"i",
"==",
"0",
"&&",
"stringBuffer",
".",
"length",
"(",
")",
"!=",
"stringBufferSize",
")",
"{",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"start",
"=",
"insertionPosition",
";",
"insertionPosition",
"=",
"CharOperation",
".",
"indexOf",
"(",
"','",
",",
"methodHeader",
",",
"start",
"+",
"1",
")",
"+",
"1",
";",
"if",
"(",
"insertionPosition",
"==",
"0",
")",
"{",
"stringBuffer",
".",
"append",
"(",
"methodHeader",
",",
"start",
",",
"methodHeader",
".",
"length",
"-",
"start",
")",
";",
"}",
"else",
"{",
"stringBuffer",
".",
"append",
"(",
"methodHeader",
",",
"start",
",",
"insertionPosition",
"-",
"start",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"stringBuffer",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"methodHeader",
")",
";",
"}",
"IExceptionAttribute",
"exceptionAttribute",
"=",
"methodInfo",
".",
"getExceptionAttribute",
"(",
")",
";",
"if",
"(",
"exceptionAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"throws",
"\"",
")",
";",
"char",
"[",
"]",
"[",
"]",
"exceptionNames",
"=",
"exceptionAttribute",
".",
"getExceptionNames",
"(",
")",
";",
"int",
"length",
"=",
"exceptionNames",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"char",
"[",
"]",
"exceptionName",
"=",
"exceptionNames",
"[",
"i",
"]",
";",
"CharOperation",
".",
"replace",
"(",
"exceptionName",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"exceptionName",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"DETAILED",
")",
")",
"{",
"if",
"(",
"annotationDefaultAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"default",
"\"",
")",
";",
"disassembleAsModifier",
"(",
"(",
"IAnnotationDefaultAttribute",
")",
"annotationDefaultAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
")",
"{",
"if",
"(",
"annotationDefaultAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"default",
"\"",
")",
";",
"disassembleAsModifier",
"(",
"(",
"IAnnotationDefaultAttribute",
")",
"annotationDefaultAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"(",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_NATIVE",
")",
"==",
"0",
")",
"&&",
"(",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_ABSTRACT",
")",
"==",
"0",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"{\"",
")",
";",
"final",
"char",
"[",
"]",
"returnType",
"=",
"Signature",
".",
"getReturnType",
"(",
"methodDescriptor",
")",
";",
"if",
"(",
"returnType",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"returnType",
"[",
"0",
"]",
")",
"{",
"case",
"'V'",
":",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"break",
";",
"case",
"'I'",
":",
"case",
"'B'",
":",
"case",
"'J'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'S'",
":",
"case",
"'C'",
":",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"\"return",
"0;\"",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"break",
";",
"default",
":",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"}",
"else",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"\"return",
"null;\"",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'}'",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"';'",
")",
";",
"}",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_endofmethodheader",
")",
";",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
"|",
"DETAILED",
")",
")",
"{",
"if",
"(",
"codeAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"codeAttribute",
",",
"parameterNames",
",",
"methodDescriptor",
",",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_STATIC",
")",
"!=",
"0",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
")",
")",
"{",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"methodInfo",
".",
"getAttributes",
"(",
")",
";",
"int",
"length",
"=",
"attributes",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClassFileAttribute",
"attribute",
"=",
"attributes",
"[",
"i",
"]",
";",
"if",
"(",
"attribute",
"!=",
"codeAttribute",
"&&",
"attribute",
"!=",
"exceptionAttribute",
"&&",
"attribute",
"!=",
"signatureAttribute",
"&&",
"attribute",
"!=",
"annotationDefaultAttribute",
"&&",
"attribute",
"!=",
"runtimeInvisibleAnnotationsAttribute",
"&&",
"attribute",
"!=",
"runtimeVisibleAnnotationsAttribute",
"&&",
"attribute",
"!=",
"runtimeInvisibleParameterAnnotationsAttribute",
"&&",
"attribute",
"!=",
"runtimeVisibleParameterAnnotationsAttribute",
"&&",
"!",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"DEPRECATED",
")",
"&&",
"!",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"SYNTHETIC",
")",
")",
"{",
"disassemble",
"(",
"attribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"}",
"}",
"if",
"(",
"annotationDefaultAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IAnnotationDefaultAttribute",
")",
"annotationDefaultAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"runtimeVisibleParameterAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeVisibleParameterAnnotationsAttribute",
")",
"runtimeVisibleParameterAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"runtimeInvisibleParameterAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeInvisibleParameterAnnotationsAttribute",
")",
"runtimeInvisibleParameterAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"}",
"public",
"String",
"disassemble",
"(",
"IClassFileReader",
"classFileReader",
",",
"String",
"lineSeparator",
")",
"{",
"return",
"disassemble",
"(",
"classFileReader",
",",
"lineSeparator",
",",
"ClassFileBytesDisassembler",
".",
"DEFAULT",
")",
";",
"}",
"public",
"String",
"disassemble",
"(",
"IClassFileReader",
"classFileReader",
",",
"String",
"lineSeparator",
",",
"int",
"mode",
")",
"{",
"if",
"(",
"classFileReader",
"==",
"null",
")",
"return",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"EMPTY_STRING",
";",
"char",
"[",
"]",
"className",
"=",
"classFileReader",
".",
"getClassName",
"(",
")",
";",
"if",
"(",
"className",
"==",
"null",
")",
"{",
"return",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"EMPTY_STRING",
";",
"}",
"className",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"className",
",",
"'/'",
",",
"'.'",
")",
";",
"final",
"int",
"classNameLength",
"=",
"className",
".",
"length",
";",
"final",
"int",
"accessFlags",
"=",
"classFileReader",
".",
"getAccessFlags",
"(",
")",
";",
"final",
"boolean",
"isEnum",
"=",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_ENUM",
")",
"!=",
"0",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"ISourceAttribute",
"sourceAttribute",
"=",
"classFileReader",
".",
"getSourceFileAttribute",
"(",
")",
";",
"IClassFileAttribute",
"classFileAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"classFileReader",
",",
"IAttributeNamesConstants",
".",
"SIGNATURE",
")",
";",
"ISignatureAttribute",
"signatureAttribute",
"=",
"(",
"ISignatureAttribute",
")",
"classFileAttribute",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
"|",
"DETAILED",
")",
")",
"{",
"int",
"minorVersion",
"=",
"classFileReader",
".",
"getMinorVersion",
"(",
")",
";",
"int",
"majorVersion",
"=",
"classFileReader",
".",
"getMajorVersion",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_begincommentline",
")",
";",
"if",
"(",
"sourceAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_sourceattributeheader",
")",
";",
"buffer",
".",
"append",
"(",
"sourceAttribute",
".",
"getSourceFileName",
"(",
")",
")",
";",
"}",
"String",
"versionNumber",
"=",
"VERSION_UNKNOWN",
";",
"if",
"(",
"minorVersion",
"==",
"3",
"&&",
"majorVersion",
"==",
"45",
")",
"{",
"versionNumber",
"=",
"JavaCore",
".",
"VERSION_1_1",
";",
"}",
"else",
"if",
"(",
"minorVersion",
"==",
"0",
"&&",
"majorVersion",
"==",
"46",
")",
"{",
"versionNumber",
"=",
"JavaCore",
".",
"VERSION_1_2",
";",
"}",
"else",
"if",
"(",
"minorVersion",
"==",
"0",
"&&",
"majorVersion",
"==",
"47",
")",
"{",
"versionNumber",
"=",
"JavaCore",
".",
"VERSION_1_3",
";",
"}",
"else",
"if",
"(",
"minorVersion",
"==",
"0",
"&&",
"majorVersion",
"==",
"48",
")",
"{",
"versionNumber",
"=",
"JavaCore",
".",
"VERSION_1_4",
";",
"}",
"else",
"if",
"(",
"minorVersion",
"==",
"0",
"&&",
"majorVersion",
"==",
"49",
")",
"{",
"versionNumber",
"=",
"JavaCore",
".",
"VERSION_1_5",
";",
"}",
"else",
"if",
"(",
"minorVersion",
"==",
"0",
"&&",
"majorVersion",
"==",
"50",
")",
"{",
"versionNumber",
"=",
"JavaCore",
".",
"VERSION_1_6",
";",
"}",
"else",
"if",
"(",
"minorVersion",
"==",
"0",
"&&",
"majorVersion",
"==",
"51",
")",
"{",
"versionNumber",
"=",
"JavaCore",
".",
"VERSION_1_7",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_versiondetails",
",",
"new",
"String",
"[",
"]",
"{",
"versionNumber",
",",
"Integer",
".",
"toString",
"(",
"majorVersion",
")",
",",
"Integer",
".",
"toString",
"(",
"minorVersion",
")",
",",
"(",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_SUPER",
")",
"!=",
"0",
"?",
"Messages",
".",
"classfileformat_superflagisset",
":",
"Messages",
".",
"classfileformat_superflagisnotset",
")",
"+",
"(",
"isDeprecated",
"(",
"classFileReader",
")",
"?",
"\",",
"deprecated\"",
":",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"EMPTY_STRING",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"if",
"(",
"signatureAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_signatureattributeheader",
",",
"new",
"String",
"(",
"signatureAttribute",
".",
"getSignature",
"(",
")",
")",
")",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"}",
"}",
"final",
"int",
"lastDotIndexInClassName",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"'.'",
",",
"className",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
"&&",
"lastDotIndexInClassName",
"!=",
"-",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"\"package",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"className",
",",
"0",
",",
"lastDotIndexInClassName",
")",
";",
"buffer",
".",
"append",
"(",
"';'",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"}",
"IInnerClassesAttribute",
"innerClassesAttribute",
"=",
"classFileReader",
".",
"getInnerClassesAttribute",
"(",
")",
";",
"IClassFileAttribute",
"runtimeVisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"classFileReader",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_ANNOTATIONS",
")",
";",
"IClassFileAttribute",
"runtimeInvisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"classFileReader",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_ANNOTATIONS",
")",
";",
"IClassFileAttribute",
"bootstrapMethods",
"=",
"Util",
".",
"getAttribute",
"(",
"classFileReader",
",",
"IAttributeNamesConstants",
".",
"BOOTSTRAP_METHODS",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"DETAILED",
")",
")",
"{",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"0",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"}",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"0",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"}",
"}",
"boolean",
"decoded",
"=",
"false",
";",
"if",
"(",
"isEnum",
"&&",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
")",
"{",
"decodeModifiersForType",
"(",
"buffer",
",",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_PUBLIC",
")",
";",
"}",
"else",
"{",
"if",
"(",
"innerClassesAttribute",
"!=",
"null",
")",
"{",
"IInnerClassesAttributeEntry",
"[",
"]",
"entries",
"=",
"innerClassesAttribute",
".",
"getInnerClassAttributesEntries",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"entries",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"IInnerClassesAttributeEntry",
"entry",
"=",
"entries",
"[",
"i",
"]",
";",
"char",
"[",
"]",
"innerClassName",
"=",
"entry",
".",
"getInnerClassName",
"(",
")",
";",
"if",
"(",
"innerClassName",
"!=",
"null",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"classFileReader",
".",
"getClassName",
"(",
")",
",",
"innerClassName",
")",
")",
"{",
"decodeModifiersForInnerClasses",
"(",
"buffer",
",",
"entry",
".",
"getAccessFlags",
"(",
")",
",",
"false",
")",
";",
"decoded",
"=",
"true",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"!",
"decoded",
")",
"{",
"decodeModifiersForType",
"(",
"buffer",
",",
"accessFlags",
")",
";",
"if",
"(",
"isSynthetic",
"(",
"classFileReader",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"synthetic\"",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"}",
"}",
"final",
"boolean",
"isAnnotation",
"=",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_ANNOTATION",
")",
"!=",
"0",
";",
"boolean",
"isInterface",
"=",
"false",
";",
"if",
"(",
"isEnum",
")",
"{",
"buffer",
".",
"append",
"(",
"\"enum",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"classFileReader",
".",
"isClass",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"class",
"\"",
")",
";",
"}",
"else",
"{",
"if",
"(",
"isAnnotation",
")",
"{",
"buffer",
".",
"append",
"(",
"\"@\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"interface",
"\"",
")",
";",
"isInterface",
"=",
"true",
";",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
")",
"{",
"final",
"int",
"start",
"=",
"lastDotIndexInClassName",
"+",
"1",
";",
"buffer",
".",
"append",
"(",
"className",
",",
"start",
",",
"classNameLength",
"-",
"start",
")",
";",
"className",
"=",
"CharOperation",
".",
"subarray",
"(",
"className",
",",
"start",
",",
"classNameLength",
")",
";",
"if",
"(",
"signatureAttribute",
"!=",
"null",
")",
"{",
"disassembleGenericSignature",
"(",
"mode",
",",
"buffer",
",",
"signatureAttribute",
".",
"getSignature",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"className",
")",
";",
"}",
"char",
"[",
"]",
"superclassName",
"=",
"classFileReader",
".",
"getSuperclassName",
"(",
")",
";",
"if",
"(",
"superclassName",
"!=",
"null",
")",
"{",
"CharOperation",
".",
"replace",
"(",
"superclassName",
",",
"'/'",
",",
"'.'",
")",
";",
"if",
"(",
"!",
"isJavaLangObject",
"(",
"superclassName",
")",
"&&",
"!",
"isEnum",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"extends",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"superclassName",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"}",
"if",
"(",
"!",
"isAnnotation",
"||",
"!",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"superclassInterfaces",
"=",
"classFileReader",
".",
"getInterfaceNames",
"(",
")",
";",
"int",
"length",
"=",
"superclassInterfaces",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"if",
"(",
"isInterface",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"extends",
"\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"",
"implements",
"\"",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"char",
"[",
"]",
"superinterface",
"=",
"superclassInterfaces",
"[",
"i",
"]",
";",
"CharOperation",
".",
"replace",
"(",
"superinterface",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"superinterface",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_opentypedeclaration",
")",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
")",
")",
"{",
"disassemble",
"(",
"classFileReader",
".",
"getConstantPool",
"(",
")",
",",
"buffer",
",",
"lineSeparator",
",",
"1",
")",
";",
"}",
"disassembleTypeMembers",
"(",
"classFileReader",
",",
"className",
",",
"buffer",
",",
"lineSeparator",
",",
"1",
",",
"mode",
",",
"isEnum",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
"|",
"DETAILED",
")",
")",
"{",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"classFileReader",
".",
"getAttributes",
"(",
")",
";",
"int",
"length",
"=",
"attributes",
".",
"length",
";",
"IEnclosingMethodAttribute",
"enclosingMethodAttribute",
"=",
"getEnclosingMethodAttribute",
"(",
"classFileReader",
")",
";",
"int",
"remainingAttributesLength",
"=",
"length",
";",
"if",
"(",
"innerClassesAttribute",
"!=",
"null",
")",
"{",
"remainingAttributesLength",
"--",
";",
"}",
"if",
"(",
"enclosingMethodAttribute",
"!=",
"null",
")",
"{",
"remainingAttributesLength",
"--",
";",
"}",
"if",
"(",
"sourceAttribute",
"!=",
"null",
")",
"{",
"remainingAttributesLength",
"--",
";",
"}",
"if",
"(",
"signatureAttribute",
"!=",
"null",
")",
"{",
"remainingAttributesLength",
"--",
";",
"}",
"if",
"(",
"bootstrapMethods",
"!=",
"null",
")",
"{",
"remainingAttributesLength",
"--",
";",
"}",
"if",
"(",
"innerClassesAttribute",
"!=",
"null",
"||",
"enclosingMethodAttribute",
"!=",
"null",
"||",
"bootstrapMethods",
"!=",
"null",
"||",
"remainingAttributesLength",
"!=",
"0",
")",
"{",
"if",
"(",
"buffer",
".",
"lastIndexOf",
"(",
"lineSeparator",
")",
"!=",
"buffer",
".",
"length",
"(",
")",
"-",
"lineSeparator",
".",
"length",
"(",
")",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"}",
"}",
"if",
"(",
"innerClassesAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"innerClassesAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"1",
")",
";",
"}",
"if",
"(",
"enclosingMethodAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"enclosingMethodAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"}",
"if",
"(",
"bootstrapMethods",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IBootstrapMethodsAttribute",
")",
"bootstrapMethods",
",",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
")",
")",
"{",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"0",
",",
"mode",
")",
";",
"}",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"0",
",",
"mode",
")",
";",
"}",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClassFileAttribute",
"attribute",
"=",
"attributes",
"[",
"i",
"]",
";",
"if",
"(",
"attribute",
"!=",
"innerClassesAttribute",
"&&",
"attribute",
"!=",
"sourceAttribute",
"&&",
"attribute",
"!=",
"signatureAttribute",
"&&",
"attribute",
"!=",
"enclosingMethodAttribute",
"&&",
"attribute",
"!=",
"runtimeInvisibleAnnotationsAttribute",
"&&",
"attribute",
"!=",
"runtimeVisibleAnnotationsAttribute",
"&&",
"!",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"DEPRECATED",
")",
"&&",
"!",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"SYNTHETIC",
")",
"&&",
"attribute",
"!=",
"bootstrapMethods",
")",
"{",
"disassemble",
"(",
"attribute",
",",
"buffer",
",",
"lineSeparator",
",",
"0",
",",
"mode",
")",
";",
"}",
"}",
"}",
"}",
"}",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"0",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_closetypedeclaration",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"private",
"void",
"disassembleGenericSignature",
"(",
"int",
"mode",
",",
"StringBuffer",
"buffer",
",",
"final",
"char",
"[",
"]",
"signature",
")",
"{",
"CharOperation",
".",
"replace",
"(",
"signature",
",",
"'/'",
",",
"'.'",
")",
";",
"final",
"char",
"[",
"]",
"[",
"]",
"typeParameters",
"=",
"Signature",
".",
"getTypeParameters",
"(",
"signature",
")",
";",
"final",
"int",
"typeParametersLength",
"=",
"typeParameters",
".",
"length",
";",
"if",
"(",
"typeParametersLength",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"'<'",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"typeParametersLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"typeParameters",
"[",
"i",
"]",
",",
"0",
",",
"CharOperation",
".",
"indexOf",
"(",
"':'",
",",
"typeParameters",
"[",
"i",
"]",
")",
")",
";",
"final",
"char",
"[",
"]",
"[",
"]",
"bounds",
"=",
"Signature",
".",
"getTypeParameterBounds",
"(",
"typeParameters",
"[",
"i",
"]",
")",
";",
"final",
"int",
"boundsLength",
"=",
"bounds",
".",
"length",
";",
"if",
"(",
"boundsLength",
"!=",
"0",
")",
"{",
"if",
"(",
"boundsLength",
"==",
"1",
")",
"{",
"final",
"char",
"[",
"]",
"bound",
"=",
"bounds",
"[",
"0",
"]",
";",
"if",
"(",
"!",
"isJavaLangObject",
"(",
"Signature",
".",
"toCharArray",
"(",
"bound",
")",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"extends",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"bound",
")",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"",
"extends",
"\"",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"boundsLength",
";",
"j",
"++",
")",
"{",
"if",
"(",
"j",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"&",
"\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"bounds",
"[",
"j",
"]",
")",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"'>'",
")",
";",
"}",
"}",
"private",
"boolean",
"isJavaLangObject",
"(",
"final",
"char",
"[",
"]",
"className",
")",
"{",
"return",
"CharOperation",
".",
"equals",
"(",
"TypeConstants",
".",
"JAVA_LANG_OBJECT",
",",
"CharOperation",
".",
"splitOn",
"(",
"'.'",
",",
"className",
")",
")",
";",
"}",
"private",
"boolean",
"isVarArgs",
"(",
"IMethodInfo",
"methodInfo",
")",
"{",
"int",
"accessFlags",
"=",
"methodInfo",
".",
"getAccessFlags",
"(",
")",
";",
"if",
"(",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_VARARGS",
")",
"!=",
"0",
")",
"return",
"true",
";",
"return",
"Util",
".",
"getAttribute",
"(",
"methodInfo",
",",
"AttributeNamesConstants",
".",
"VarargsName",
")",
"!=",
"null",
";",
"}",
"private",
"void",
"disassemble",
"(",
"ICodeAttribute",
"codeAttribute",
",",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
",",
"char",
"[",
"]",
"methodDescriptor",
",",
"boolean",
"isStatic",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"-",
"1",
")",
";",
"DefaultBytecodeVisitor",
"visitor",
"=",
"new",
"DefaultBytecodeVisitor",
"(",
"codeAttribute",
",",
"parameterNames",
",",
"methodDescriptor",
",",
"isStatic",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"try",
"{",
"codeAttribute",
".",
"traverse",
"(",
"visitor",
")",
";",
"}",
"catch",
"(",
"ClassFormatException",
"e",
")",
"{",
"dumpTab",
"(",
"tabNumber",
"+",
"2",
",",
"buffer",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"classformat_classformatexception",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"}",
"final",
"int",
"exceptionTableLength",
"=",
"codeAttribute",
".",
"getExceptionTableLength",
"(",
")",
";",
"boolean",
"isFirstAttribute",
"=",
"true",
";",
"if",
"(",
"exceptionTableLength",
"!=",
"0",
")",
"{",
"final",
"int",
"tabNumberForExceptionAttribute",
"=",
"tabNumber",
"+",
"2",
";",
"isFirstAttribute",
"=",
"false",
";",
"dumpTab",
"(",
"tabNumberForExceptionAttribute",
",",
"buffer",
")",
";",
"final",
"IExceptionTableEntry",
"[",
"]",
"exceptionTableEntries",
"=",
"codeAttribute",
".",
"getExceptionTable",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_exceptiontableheader",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForExceptionAttribute",
"+",
"1",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"exceptionTableLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForExceptionAttribute",
"+",
"1",
")",
";",
"}",
"IExceptionTableEntry",
"exceptionTableEntry",
"=",
"exceptionTableEntries",
"[",
"i",
"]",
";",
"char",
"[",
"]",
"catchType",
";",
"if",
"(",
"exceptionTableEntry",
".",
"getCatchTypeIndex",
"(",
")",
"!=",
"0",
")",
"{",
"catchType",
"=",
"exceptionTableEntry",
".",
"getCatchType",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"catchType",
",",
"'/'",
",",
"'.'",
")",
";",
"catchType",
"=",
"returnClassName",
"(",
"catchType",
",",
"'.'",
",",
"mode",
")",
";",
"}",
"else",
"{",
"catchType",
"=",
"ANY_EXCEPTION",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_exceptiontableentry",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"exceptionTableEntry",
".",
"getStartPC",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"exceptionTableEntry",
".",
"getEndPC",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"exceptionTableEntry",
".",
"getHandlerPC",
"(",
")",
")",
",",
"new",
"String",
"(",
"catchType",
")",
",",
"}",
")",
")",
";",
"}",
"}",
"final",
"ILineNumberAttribute",
"lineNumberAttribute",
"=",
"codeAttribute",
".",
"getLineNumberAttribute",
"(",
")",
";",
"final",
"int",
"lineAttributeLength",
"=",
"lineNumberAttribute",
"==",
"null",
"?",
"0",
":",
"lineNumberAttribute",
".",
"getLineNumberTableLength",
"(",
")",
";",
"if",
"(",
"lineAttributeLength",
"!=",
"0",
")",
"{",
"int",
"tabNumberForLineAttribute",
"=",
"tabNumber",
"+",
"2",
";",
"if",
"(",
"!",
"isFirstAttribute",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLineAttribute",
")",
";",
"}",
"else",
"{",
"dumpTab",
"(",
"tabNumberForLineAttribute",
",",
"buffer",
")",
";",
"isFirstAttribute",
"=",
"false",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_linenumberattributeheader",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLineAttribute",
"+",
"1",
")",
";",
"int",
"[",
"]",
"[",
"]",
"lineattributesEntries",
"=",
"lineNumberAttribute",
".",
"getLineNumberTable",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"lineAttributeLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLineAttribute",
"+",
"1",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_linenumbertableentry",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"lineattributesEntries",
"[",
"i",
"]",
"[",
"0",
"]",
")",
",",
"Integer",
".",
"toString",
"(",
"lineattributesEntries",
"[",
"i",
"]",
"[",
"1",
"]",
")",
"}",
")",
")",
";",
"}",
"}",
"final",
"ILocalVariableAttribute",
"localVariableAttribute",
"=",
"codeAttribute",
".",
"getLocalVariableAttribute",
"(",
")",
";",
"final",
"int",
"localVariableAttributeLength",
"=",
"localVariableAttribute",
"==",
"null",
"?",
"0",
":",
"localVariableAttribute",
".",
"getLocalVariableTableLength",
"(",
")",
";",
"if",
"(",
"localVariableAttributeLength",
"!=",
"0",
")",
"{",
"int",
"tabNumberForLocalVariableAttribute",
"=",
"tabNumber",
"+",
"2",
";",
"if",
"(",
"!",
"isFirstAttribute",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLocalVariableAttribute",
")",
";",
"}",
"else",
"{",
"isFirstAttribute",
"=",
"false",
";",
"dumpTab",
"(",
"tabNumberForLocalVariableAttribute",
",",
"buffer",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_localvariabletableattributeheader",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLocalVariableAttribute",
"+",
"1",
")",
";",
"ILocalVariableTableEntry",
"[",
"]",
"localVariableTableEntries",
"=",
"localVariableAttribute",
".",
"getLocalVariableTable",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"localVariableAttributeLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLocalVariableAttribute",
"+",
"1",
")",
";",
"}",
"ILocalVariableTableEntry",
"localVariableTableEntry",
"=",
"localVariableTableEntries",
"[",
"i",
"]",
";",
"int",
"index",
"=",
"localVariableTableEntry",
".",
"getIndex",
"(",
")",
";",
"int",
"startPC",
"=",
"localVariableTableEntry",
".",
"getStartPC",
"(",
")",
";",
"int",
"length",
"=",
"localVariableTableEntry",
".",
"getLength",
"(",
")",
";",
"final",
"char",
"[",
"]",
"typeName",
"=",
"Signature",
".",
"toCharArray",
"(",
"localVariableTableEntry",
".",
"getDescriptor",
"(",
")",
")",
";",
"CharOperation",
".",
"replace",
"(",
"typeName",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_localvariabletableentry",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"startPC",
")",
",",
"Integer",
".",
"toString",
"(",
"startPC",
"+",
"length",
")",
",",
"new",
"String",
"(",
"localVariableTableEntry",
".",
"getName",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"new",
"String",
"(",
"returnClassName",
"(",
"typeName",
",",
"'.'",
",",
"mode",
")",
")",
"}",
")",
")",
";",
"}",
"}",
"final",
"ILocalVariableTypeTableAttribute",
"localVariableTypeAttribute",
"=",
"(",
"ILocalVariableTypeTableAttribute",
")",
"getAttribute",
"(",
"IAttributeNamesConstants",
".",
"LOCAL_VARIABLE_TYPE_TABLE",
",",
"codeAttribute",
")",
";",
"final",
"int",
"localVariableTypeTableLength",
"=",
"localVariableTypeAttribute",
"==",
"null",
"?",
"0",
":",
"localVariableTypeAttribute",
".",
"getLocalVariableTypeTableLength",
"(",
")",
";",
"if",
"(",
"localVariableTypeTableLength",
"!=",
"0",
")",
"{",
"int",
"tabNumberForLocalVariableAttribute",
"=",
"tabNumber",
"+",
"2",
";",
"if",
"(",
"!",
"isFirstAttribute",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLocalVariableAttribute",
")",
";",
"}",
"else",
"{",
"isFirstAttribute",
"=",
"false",
";",
"dumpTab",
"(",
"tabNumberForLocalVariableAttribute",
",",
"buffer",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_localvariabletypetableattributeheader",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLocalVariableAttribute",
"+",
"1",
")",
";",
"ILocalVariableTypeTableEntry",
"[",
"]",
"localVariableTypeTableEntries",
"=",
"localVariableTypeAttribute",
".",
"getLocalVariableTypeTable",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"localVariableTypeTableLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumberForLocalVariableAttribute",
"+",
"1",
")",
";",
"}",
"ILocalVariableTypeTableEntry",
"localVariableTypeTableEntry",
"=",
"localVariableTypeTableEntries",
"[",
"i",
"]",
";",
"int",
"index",
"=",
"localVariableTypeTableEntry",
".",
"getIndex",
"(",
")",
";",
"int",
"startPC",
"=",
"localVariableTypeTableEntry",
".",
"getStartPC",
"(",
")",
";",
"int",
"length",
"=",
"localVariableTypeTableEntry",
".",
"getLength",
"(",
")",
";",
"final",
"char",
"[",
"]",
"typeName",
"=",
"Signature",
".",
"toCharArray",
"(",
"localVariableTypeTableEntry",
".",
"getSignature",
"(",
")",
")",
";",
"CharOperation",
".",
"replace",
"(",
"typeName",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_localvariabletableentry",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"startPC",
")",
",",
"Integer",
".",
"toString",
"(",
"startPC",
"+",
"length",
")",
",",
"new",
"String",
"(",
"localVariableTypeTableEntry",
".",
"getName",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"new",
"String",
"(",
"returnClassName",
"(",
"typeName",
",",
"'.'",
",",
"mode",
")",
")",
"}",
")",
")",
";",
"}",
"}",
"final",
"int",
"length",
"=",
"codeAttribute",
".",
"getAttributesCount",
"(",
")",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"codeAttribute",
".",
"getAttributes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClassFileAttribute",
"attribute",
"=",
"attributes",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"STACK_MAP_TABLE",
")",
")",
"{",
"IStackMapTableAttribute",
"stackMapTableAttribute",
"=",
"(",
"IStackMapTableAttribute",
")",
"attribute",
";",
"if",
"(",
"!",
"isFirstAttribute",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"2",
")",
";",
"}",
"else",
"{",
"isFirstAttribute",
"=",
"false",
";",
"dumpTab",
"(",
"tabNumber",
"+",
"1",
",",
"buffer",
")",
";",
"}",
"int",
"numberOfEntries",
"=",
"stackMapTableAttribute",
".",
"getNumberOfEntries",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_stackmaptableattributeheader",
",",
"Integer",
".",
"toString",
"(",
"numberOfEntries",
")",
")",
")",
";",
"if",
"(",
"numberOfEntries",
"!=",
"0",
")",
"{",
"disassemble",
"(",
"stackMapTableAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"STACK_MAP",
")",
")",
"{",
"IStackMapAttribute",
"stackMapAttribute",
"=",
"(",
"IStackMapAttribute",
")",
"attribute",
";",
"if",
"(",
"!",
"isFirstAttribute",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"2",
")",
";",
"}",
"else",
"{",
"isFirstAttribute",
"=",
"false",
";",
"dumpTab",
"(",
"tabNumber",
"+",
"1",
",",
"buffer",
")",
";",
"}",
"int",
"numberOfEntries",
"=",
"stackMapAttribute",
".",
"getNumberOfEntries",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_stackmapattributeheader",
",",
"Integer",
".",
"toString",
"(",
"numberOfEntries",
")",
")",
")",
";",
"if",
"(",
"numberOfEntries",
"!=",
"0",
")",
"{",
"disassemble",
"(",
"stackMapAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"else",
"if",
"(",
"attribute",
"!=",
"lineNumberAttribute",
"&&",
"attribute",
"!=",
"localVariableAttribute",
"&&",
"attribute",
"!=",
"localVariableTypeAttribute",
")",
"{",
"if",
"(",
"!",
"isFirstAttribute",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"2",
")",
";",
"}",
"else",
"{",
"isFirstAttribute",
"=",
"false",
";",
"dumpTab",
"(",
"tabNumber",
"+",
"1",
",",
"buffer",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_genericattributeheader",
",",
"new",
"String",
"[",
"]",
"{",
"new",
"String",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
")",
",",
"Long",
".",
"toString",
"(",
"attribute",
".",
"getAttributeLength",
"(",
")",
")",
"}",
")",
")",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IStackMapTableAttribute",
"attribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"3",
")",
";",
"int",
"numberOfEntries",
"=",
"attribute",
".",
"getNumberOfEntries",
"(",
")",
";",
"final",
"IStackMapFrame",
"[",
"]",
"stackMapFrames",
"=",
"attribute",
".",
"getStackMapFrame",
"(",
")",
";",
"int",
"absolutePC",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"numberOfEntries",
";",
"j",
"++",
")",
"{",
"if",
"(",
"j",
">",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"3",
")",
";",
"}",
"final",
"IStackMapFrame",
"frame",
"=",
"stackMapFrames",
"[",
"j",
"]",
";",
"int",
"type",
"=",
"frame",
".",
"getFrameType",
"(",
")",
";",
"int",
"offsetDelta",
"=",
"frame",
".",
"getOffsetDelta",
"(",
")",
";",
"if",
"(",
"absolutePC",
"==",
"-",
"1",
")",
"{",
"absolutePC",
"=",
"offsetDelta",
";",
"}",
"else",
"{",
"absolutePC",
"+=",
"(",
"offsetDelta",
"+",
"1",
")",
";",
"}",
"switch",
"(",
"type",
")",
"{",
"case",
"247",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_same_locals_1_stack_item_extended",
",",
"Integer",
".",
"toString",
"(",
"absolutePC",
")",
",",
"disassemble",
"(",
"frame",
".",
"getStackItems",
"(",
")",
",",
"mode",
")",
")",
")",
";",
"break",
";",
"case",
"248",
":",
"case",
"249",
":",
"case",
"250",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_chop",
",",
"Integer",
".",
"toString",
"(",
"absolutePC",
")",
",",
"Integer",
".",
"toString",
"(",
"251",
"-",
"type",
")",
")",
")",
";",
"break",
";",
"case",
"251",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_same_frame_extended",
",",
"Integer",
".",
"toString",
"(",
"absolutePC",
")",
")",
")",
";",
"break",
";",
"case",
"252",
":",
"case",
"253",
":",
"case",
"254",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_append",
",",
"Integer",
".",
"toString",
"(",
"absolutePC",
")",
",",
"disassemble",
"(",
"frame",
".",
"getLocals",
"(",
")",
",",
"mode",
")",
")",
")",
";",
"break",
";",
"case",
"255",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_full_frame",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"absolutePC",
")",
",",
"Integer",
".",
"toString",
"(",
"frame",
".",
"getNumberOfLocals",
"(",
")",
")",
",",
"disassemble",
"(",
"frame",
".",
"getLocals",
"(",
")",
",",
"mode",
")",
",",
"Integer",
".",
"toString",
"(",
"frame",
".",
"getNumberOfStackItems",
"(",
")",
")",
",",
"disassemble",
"(",
"frame",
".",
"getStackItems",
"(",
")",
",",
"mode",
")",
",",
"dumpNewLineWithTabs",
"(",
"lineSeparator",
",",
"tabNumber",
"+",
"5",
")",
"}",
")",
")",
";",
"break",
";",
"default",
":",
"if",
"(",
"type",
"<=",
"63",
")",
"{",
"offsetDelta",
"=",
"type",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_same_frame",
",",
"Integer",
".",
"toString",
"(",
"absolutePC",
")",
")",
")",
";",
"}",
"else",
"if",
"(",
"type",
"<=",
"127",
")",
"{",
"offsetDelta",
"=",
"type",
"-",
"64",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_same_locals_1_stack_item",
",",
"Integer",
".",
"toString",
"(",
"absolutePC",
")",
",",
"disassemble",
"(",
"frame",
".",
"getStackItems",
"(",
")",
",",
"mode",
")",
")",
")",
";",
"}",
"}",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IStackMapAttribute",
"attribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"3",
")",
";",
"int",
"numberOfEntries",
"=",
"attribute",
".",
"getNumberOfEntries",
"(",
")",
";",
"final",
"IStackMapFrame",
"[",
"]",
"stackMapFrames",
"=",
"attribute",
".",
"getStackMapFrame",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"numberOfEntries",
";",
"j",
"++",
")",
"{",
"if",
"(",
"j",
">",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"3",
")",
";",
"}",
"final",
"IStackMapFrame",
"frame",
"=",
"stackMapFrames",
"[",
"j",
"]",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_frame_full_frame",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"frame",
".",
"getOffsetDelta",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"frame",
".",
"getNumberOfLocals",
"(",
")",
")",
",",
"disassemble",
"(",
"frame",
".",
"getLocals",
"(",
")",
",",
"mode",
")",
",",
"Integer",
".",
"toString",
"(",
"frame",
".",
"getNumberOfStackItems",
"(",
")",
")",
",",
"disassemble",
"(",
"frame",
".",
"getStackItems",
"(",
")",
",",
"mode",
")",
",",
"dumpNewLineWithTabs",
"(",
"lineSeparator",
",",
"tabNumber",
"+",
"5",
")",
"}",
")",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IConstantPool",
"constantPool",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"int",
"length",
"=",
"constantPool",
".",
"getConstantPoolCount",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_constantpoolheader",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"1",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"}",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"i",
")",
";",
"switch",
"(",
"constantPool",
".",
"getEntryKind",
"(",
"i",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_class",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getClassInfoNameIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getClassInfoName",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_double",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Double",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getDoubleValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_fieldref",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getClassIndex",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getNameAndTypeIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getClassName",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getFieldName",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getFieldDescriptor",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_float",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Float",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getFloatValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_integer",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_InterfaceMethodref",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_interfacemethodref",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getClassIndex",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getNameAndTypeIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getClassName",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getMethodName",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getMethodDescriptor",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_long",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Long",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getLongValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Methodref",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_methodref",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getClassIndex",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getNameAndTypeIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getClassName",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getMethodName",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getMethodDescriptor",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_NameAndType",
":",
"int",
"nameIndex",
"=",
"constantPoolEntry",
".",
"getNameAndTypeInfoNameIndex",
"(",
")",
";",
"int",
"typeIndex",
"=",
"constantPoolEntry",
".",
"getNameAndTypeInfoDescriptorIndex",
"(",
")",
";",
"IConstantPoolEntry",
"entry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"nameIndex",
")",
";",
"char",
"[",
"]",
"nameValue",
"=",
"entry",
".",
"getUtf8Value",
"(",
")",
";",
"entry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"typeIndex",
")",
";",
"char",
"[",
"]",
"typeValue",
"=",
"entry",
".",
"getUtf8Value",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_name_and_type",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"nameIndex",
")",
",",
"Integer",
".",
"toString",
"(",
"typeIndex",
")",
",",
"String",
".",
"valueOf",
"(",
"nameValue",
")",
",",
"String",
".",
"valueOf",
"(",
"typeValue",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_String",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_string",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getStringIndex",
"(",
")",
")",
",",
"decodeStringValue",
"(",
"constantPoolEntry",
".",
"getStringValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
":",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_utf8",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"decodeStringValue",
"(",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_MethodHandle",
":",
"IConstantPoolEntry2",
"entry2",
"=",
"(",
"IConstantPoolEntry2",
")",
"constantPoolEntry",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_methodhandle",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"getReferenceKind",
"(",
"entry2",
".",
"getReferenceKind",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"entry2",
".",
"getReferenceIndex",
"(",
")",
")",
",",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_MethodType",
":",
"entry2",
"=",
"(",
"IConstantPoolEntry2",
")",
"constantPoolEntry",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_methodtype",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"entry2",
".",
"getDescriptorIndex",
"(",
")",
")",
",",
"String",
".",
"valueOf",
"(",
"entry2",
".",
"getMethodDescriptor",
"(",
")",
")",
",",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_InvokeDynamic",
":",
"entry2",
"=",
"(",
"IConstantPoolEntry2",
")",
"constantPoolEntry",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_constantpool_invokedynamic",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"entry2",
".",
"getBootstrapMethodAttributeIndex",
"(",
")",
")",
",",
"Integer",
".",
"toString",
"(",
"entry2",
".",
"getNameAndTypeIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getMethodName",
"(",
")",
")",
",",
"new",
"String",
"(",
"constantPoolEntry",
".",
"getMethodDescriptor",
"(",
")",
")",
"}",
")",
")",
";",
"}",
"}",
"}",
"private",
"String",
"getReferenceKind",
"(",
"int",
"referenceKind",
")",
"{",
"String",
"message",
"=",
"null",
";",
"switch",
"(",
"referenceKind",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_GetField",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_getfield",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_GetStatic",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_getstatic",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_PutField",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_putfield",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_PutStatic",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_putstatic",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_InvokeInterface",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_invokeinterface",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_InvokeSpecial",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_invokespecial",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_InvokeStatic",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_invokestatic",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"METHOD_TYPE_REF_InvokeVirtual",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_invokevirtual",
";",
"break",
";",
"default",
":",
"message",
"=",
"Messages",
".",
"disassembler_method_type_ref_newinvokespecial",
";",
"}",
"return",
"Messages",
".",
"bind",
"(",
"message",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"referenceKind",
")",
"}",
")",
";",
"}",
"private",
"void",
"disassemble",
"(",
"IEnclosingMethodAttribute",
"enclosingMethodAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_enclosingmethodheader",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_constantpoolindex",
")",
".",
"append",
"(",
"enclosingMethodAttribute",
".",
"getEnclosingClassIndex",
"(",
")",
")",
".",
"append",
"(",
"\"",
"\"",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_constantpoolindex",
")",
".",
"append",
"(",
"enclosingMethodAttribute",
".",
"getMethodNameAndTypeIndex",
"(",
")",
")",
".",
"append",
"(",
"\"",
"\"",
")",
".",
"append",
"(",
"enclosingMethodAttribute",
".",
"getEnclosingClass",
"(",
")",
")",
";",
"if",
"(",
"enclosingMethodAttribute",
".",
"getMethodNameAndTypeIndex",
"(",
")",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"\".\"",
")",
".",
"append",
"(",
"enclosingMethodAttribute",
".",
"getMethodName",
"(",
")",
")",
".",
"append",
"(",
"enclosingMethodAttribute",
".",
"getMethodDescriptor",
"(",
")",
")",
";",
"}",
"}",
"private",
"void",
"disassembleEnumConstants",
"(",
"IFieldInfo",
"fieldInfo",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"char",
"[",
"]",
"[",
"]",
"argumentTypes",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"final",
"IClassFileAttribute",
"runtimeVisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"fieldInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_ANNOTATIONS",
")",
";",
"final",
"IClassFileAttribute",
"runtimeInvisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"fieldInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_ANNOTATIONS",
")",
";",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"new",
"String",
"(",
"fieldInfo",
".",
"getName",
"(",
")",
")",
")",
";",
"buffer",
".",
"append",
"(",
"'('",
")",
";",
"final",
"int",
"length",
"=",
"argumentTypes",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
";",
"}",
"final",
"char",
"[",
"]",
"type",
"=",
"argumentTypes",
"[",
"i",
"]",
";",
"switch",
"(",
"type",
".",
"length",
")",
"{",
"case",
"1",
":",
"switch",
"(",
"type",
"[",
"0",
"]",
")",
"{",
"case",
"'B'",
":",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'S'",
":",
"buffer",
".",
"append",
"(",
"'0'",
")",
";",
"break",
";",
"case",
"'Z'",
":",
"buffer",
".",
"append",
"(",
"\"false\"",
")",
";",
"break",
";",
"case",
"'C'",
":",
"buffer",
".",
"append",
"(",
"\"'",
"'\"",
")",
";",
"break",
";",
"}",
"break",
";",
"default",
":",
"buffer",
".",
"append",
"(",
"\"null\"",
")",
";",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"')'",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
";",
"}",
"private",
"void",
"disassemble",
"(",
"IFieldInfo",
"fieldInfo",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"final",
"char",
"[",
"]",
"fieldDescriptor",
"=",
"fieldInfo",
".",
"getDescriptor",
"(",
")",
";",
"final",
"ISignatureAttribute",
"signatureAttribute",
"=",
"(",
"ISignatureAttribute",
")",
"Util",
".",
"getAttribute",
"(",
"fieldInfo",
",",
"IAttributeNamesConstants",
".",
"SIGNATURE",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
"|",
"DETAILED",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classfileformat_fieldddescriptor",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"fieldInfo",
".",
"getDescriptorIndex",
"(",
")",
")",
",",
"new",
"String",
"(",
"fieldDescriptor",
")",
"}",
")",
")",
";",
"if",
"(",
"fieldInfo",
".",
"isDeprecated",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_deprecated",
")",
";",
"}",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"if",
"(",
"signatureAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_signatureattributeheader",
",",
"new",
"String",
"(",
"signatureAttribute",
".",
"getSignature",
"(",
")",
")",
")",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"}",
"final",
"IClassFileAttribute",
"runtimeVisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"fieldInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_VISIBLE_ANNOTATIONS",
")",
";",
"final",
"IClassFileAttribute",
"runtimeInvisibleAnnotationsAttribute",
"=",
"Util",
".",
"getAttribute",
"(",
"fieldInfo",
",",
"IAttributeNamesConstants",
".",
"RUNTIME_INVISIBLE_ANNOTATIONS",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"DETAILED",
")",
")",
"{",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassembleAsModifier",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"}",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
")",
"{",
"decodeModifiersForFieldForWorkingCopy",
"(",
"buffer",
",",
"fieldInfo",
".",
"getAccessFlags",
"(",
")",
")",
";",
"if",
"(",
"signatureAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"getSignatureForField",
"(",
"signatureAttribute",
".",
"getSignature",
"(",
")",
")",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"getSignatureForField",
"(",
"fieldDescriptor",
")",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"}",
"else",
"{",
"decodeModifiersForField",
"(",
"buffer",
",",
"fieldInfo",
".",
"getAccessFlags",
"(",
")",
")",
";",
"if",
"(",
"fieldInfo",
".",
"isSynthetic",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"synthetic\"",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"getSignatureForField",
"(",
"fieldDescriptor",
")",
",",
"'.'",
",",
"mode",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"buffer",
".",
"append",
"(",
"new",
"String",
"(",
"fieldInfo",
".",
"getName",
"(",
")",
")",
")",
";",
"IConstantValueAttribute",
"constantValueAttribute",
"=",
"fieldInfo",
".",
"getConstantValueAttribute",
"(",
")",
";",
"if",
"(",
"constantValueAttribute",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_fieldhasconstant",
")",
";",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantValueAttribute",
".",
"getConstantValue",
"(",
")",
";",
"switch",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getLongValue",
"(",
")",
"+",
"\"L\"",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getFloatValue",
"(",
")",
"+",
"\"f\"",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"final",
"double",
"doubleValue",
"=",
"constantPoolEntry",
".",
"getDoubleValue",
"(",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"ClassFileBytesDisassembler",
".",
"WORKING_COPY",
")",
")",
"{",
"if",
"(",
"doubleValue",
"==",
"Double",
".",
"POSITIVE_INFINITY",
")",
"{",
"buffer",
".",
"append",
"(",
"\"1.0",
"/",
"0.0\"",
")",
";",
"}",
"else",
"if",
"(",
"doubleValue",
"==",
"Double",
".",
"NEGATIVE_INFINITY",
")",
"{",
"buffer",
".",
"append",
"(",
"\"-1.0",
"/",
"0.0\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getDoubleValue",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getDoubleValue",
"(",
")",
")",
";",
"}",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"switch",
"(",
"fieldDescriptor",
"[",
"0",
"]",
")",
"{",
"case",
"'C'",
":",
"buffer",
".",
"append",
"(",
"\"'\"",
"+",
"(",
"char",
")",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
"+",
"\"'\"",
")",
";",
"break",
";",
"case",
"'Z'",
":",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
"==",
"1",
"?",
"\"true\"",
":",
"\"false\"",
")",
";",
"break",
";",
"case",
"'B'",
":",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"break",
";",
"case",
"'S'",
":",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"break",
";",
"case",
"'I'",
":",
"buffer",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"}",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_String",
":",
"buffer",
".",
"append",
"(",
"\"\\\"\"",
"+",
"decodeStringValue",
"(",
"constantPoolEntry",
".",
"getStringValue",
"(",
")",
")",
"+",
"\"\\\"\"",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_endoffieldheader",
")",
";",
"if",
"(",
"checkMode",
"(",
"mode",
",",
"SYSTEM",
")",
")",
"{",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"fieldInfo",
".",
"getAttributes",
"(",
")",
";",
"int",
"length",
"=",
"attributes",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"IClassFileAttribute",
"attribute",
"=",
"attributes",
"[",
"i",
"]",
";",
"if",
"(",
"attribute",
"!=",
"constantValueAttribute",
"&&",
"attribute",
"!=",
"signatureAttribute",
"&&",
"attribute",
"!=",
"runtimeInvisibleAnnotationsAttribute",
"&&",
"attribute",
"!=",
"runtimeVisibleAnnotationsAttribute",
"&&",
"!",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"DEPRECATED",
")",
"&&",
"!",
"CharOperation",
".",
"equals",
"(",
"attribute",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"SYNTHETIC",
")",
")",
"{",
"disassemble",
"(",
"attribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"}",
"if",
"(",
"runtimeVisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeVisibleAnnotationsAttribute",
")",
"runtimeVisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"if",
"(",
"runtimeInvisibleAnnotationsAttribute",
"!=",
"null",
")",
"{",
"disassemble",
"(",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
")",
"runtimeInvisibleAnnotationsAttribute",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IInnerClassesAttribute",
"innerClassesAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_innerattributesheader",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"IInnerClassesAttributeEntry",
"[",
"]",
"innerClassesAttributeEntries",
"=",
"innerClassesAttribute",
".",
"getInnerClassAttributesEntries",
"(",
")",
";",
"int",
"length",
"=",
"innerClassesAttributeEntries",
".",
"length",
";",
"int",
"innerClassNameIndex",
",",
"outerClassNameIndex",
",",
"innerNameIndex",
",",
"accessFlags",
";",
"IInnerClassesAttributeEntry",
"innerClassesAttributeEntry",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"}",
"innerClassesAttributeEntry",
"=",
"innerClassesAttributeEntries",
"[",
"i",
"]",
";",
"innerClassNameIndex",
"=",
"innerClassesAttributeEntry",
".",
"getInnerClassNameIndex",
"(",
")",
";",
"outerClassNameIndex",
"=",
"innerClassesAttributeEntry",
".",
"getOuterClassNameIndex",
"(",
")",
";",
"innerNameIndex",
"=",
"innerClassesAttributeEntry",
".",
"getInnerNameIndex",
"(",
")",
";",
"accessFlags",
"=",
"innerClassesAttributeEntry",
".",
"getAccessFlags",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_openinnerclassentry",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_inner_class_info_name",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_constantpoolindex",
")",
".",
"append",
"(",
"innerClassNameIndex",
")",
";",
"if",
"(",
"innerClassNameIndex",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"innerClassesAttributeEntry",
".",
"getInnerClassName",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_outer_class_info_name",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_constantpoolindex",
")",
".",
"append",
"(",
"outerClassNameIndex",
")",
";",
"if",
"(",
"outerClassNameIndex",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"innerClassesAttributeEntry",
".",
"getOuterClassName",
"(",
")",
")",
";",
"}",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"dumpTab",
"(",
"tabNumber",
",",
"buffer",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_inner_name",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_constantpoolindex",
")",
".",
"append",
"(",
"innerNameIndex",
")",
";",
"if",
"(",
"innerNameIndex",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"innerClassesAttributeEntry",
".",
"getInnerName",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_inner_accessflags",
")",
".",
"append",
"(",
"accessFlags",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"decodeModifiersForInnerClasses",
"(",
"buffer",
",",
"accessFlags",
",",
"true",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_closeinnerclassentry",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IBootstrapMethodsAttribute",
"bootstrapMethodsAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_bootstrapmethodattributesheader",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"IBootstrapMethodsEntry",
"[",
"]",
"entries",
"=",
"bootstrapMethodsAttribute",
".",
"getBootstrapMethods",
"(",
")",
";",
"int",
"length",
"=",
"entries",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"}",
"IBootstrapMethodsEntry",
"entry",
"=",
"entries",
"[",
"i",
"]",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_bootstrapmethodentry",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"i",
")",
",",
"Integer",
".",
"toString",
"(",
"entry",
".",
"getBootstrapMethodReference",
"(",
")",
")",
",",
"getArguments",
"(",
"entry",
".",
"getBootstrapArguments",
"(",
")",
")",
"}",
")",
")",
";",
"}",
"}",
"private",
"String",
"getArguments",
"(",
"int",
"[",
"]",
"arguments",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"'{'",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"arguments",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_bootstrapmethodentry_argument",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"arguments",
"[",
"i",
"]",
")",
",",
"}",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"}",
"private",
"void",
"disassemble",
"(",
"int",
"index",
",",
"IParameterAnnotation",
"parameterAnnotation",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"parameterAnnotation",
".",
"getAnnotations",
"(",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"disassembler_parameterannotationentrystart",
",",
"new",
"String",
"[",
"]",
"{",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Integer",
".",
"toString",
"(",
"annotations",
".",
"length",
")",
"}",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"disassemble",
"(",
"annotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
"runtimeInvisibleAnnotationsAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_runtimeinvisibleannotationsattributeheader",
")",
";",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"runtimeInvisibleAnnotationsAttribute",
".",
"getAnnotations",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"disassemble",
"(",
"annotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IRuntimeInvisibleParameterAnnotationsAttribute",
"runtimeInvisibleParameterAnnotationsAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_runtimeinvisibleparameterannotationsattributeheader",
")",
";",
"IParameterAnnotation",
"[",
"]",
"parameterAnnotations",
"=",
"runtimeInvisibleParameterAnnotationsAttribute",
".",
"getParameterAnnotations",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"parameterAnnotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"disassemble",
"(",
"i",
",",
"parameterAnnotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IRuntimeVisibleAnnotationsAttribute",
"runtimeVisibleAnnotationsAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_runtimevisibleannotationsattributeheader",
")",
";",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"runtimeVisibleAnnotationsAttribute",
".",
"getAnnotations",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"disassemble",
"(",
"annotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassemble",
"(",
"IRuntimeVisibleParameterAnnotationsAttribute",
"runtimeVisibleParameterAnnotationsAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
")",
";",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_runtimevisibleparameterannotationsattributeheader",
")",
";",
"IParameterAnnotation",
"[",
"]",
"parameterAnnotations",
"=",
"runtimeVisibleParameterAnnotationsAttribute",
".",
"getParameterAnnotations",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"parameterAnnotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"disassemble",
"(",
"i",
",",
"parameterAnnotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"String",
"disassemble",
"(",
"IVerificationTypeInfo",
"[",
"]",
"infos",
",",
"int",
"mode",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"'{'",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"infos",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_comma",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
";",
"}",
"switch",
"(",
"infos",
"[",
"i",
"]",
".",
"getTag",
"(",
")",
")",
"{",
"case",
"IVerificationTypeInfo",
".",
"ITEM_DOUBLE",
":",
"buffer",
".",
"append",
"(",
"\"double\"",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_FLOAT",
":",
"buffer",
".",
"append",
"(",
"\"float\"",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_INTEGER",
":",
"buffer",
".",
"append",
"(",
"\"int\"",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_LONG",
":",
"buffer",
".",
"append",
"(",
"\"long\"",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_NULL",
":",
"buffer",
".",
"append",
"(",
"\"null\"",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"char",
"[",
"]",
"classTypeName",
"=",
"infos",
"[",
"i",
"]",
".",
"getClassTypeName",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"classTypeName",
",",
"'/'",
",",
"'.'",
")",
";",
"if",
"(",
"classTypeName",
".",
"length",
">",
"0",
"&&",
"classTypeName",
"[",
"0",
"]",
"==",
"'['",
")",
"{",
"classTypeName",
"=",
"Signature",
".",
"toCharArray",
"(",
"classTypeName",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"classTypeName",
",",
"'.'",
",",
"mode",
")",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_TOP",
":",
"buffer",
".",
"append",
"(",
"\"_\"",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"infos",
"[",
"i",
"]",
".",
"getOffset",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_UNINITIALIZED_THIS",
":",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IAnnotation",
"annotation",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"final",
"char",
"[",
"]",
"typeName",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"annotation",
".",
"getTypeName",
"(",
")",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"'@'",
")",
".",
"append",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"typeName",
")",
",",
"'.'",
",",
"mode",
")",
")",
";",
"final",
"IAnnotationComponent",
"[",
"]",
"components",
"=",
"annotation",
".",
"getComponents",
"(",
")",
";",
"final",
"int",
"length",
"=",
"components",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"'('",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"','",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"disassembleAsModifier",
"(",
"components",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"}",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IAnnotationComponent",
"annotationComponent",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"buffer",
".",
"append",
"(",
"annotationComponent",
".",
"getComponentName",
"(",
")",
")",
".",
"append",
"(",
"'='",
")",
";",
"disassembleAsModifier",
"(",
"annotationComponent",
".",
"getComponentValue",
"(",
")",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IAnnotationComponentValue",
"annotationComponentValue",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"switch",
"(",
"annotationComponentValue",
".",
"getTag",
"(",
")",
")",
"{",
"case",
"IAnnotationComponentValue",
".",
"BYTE_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"CHAR_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"DOUBLE_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"FLOAT_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"INTEGER_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"LONG_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"SHORT_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"BOOLEAN_TAG",
":",
"case",
"IAnnotationComponentValue",
".",
"STRING_TAG",
":",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"annotationComponentValue",
".",
"getConstantValue",
"(",
")",
";",
"String",
"value",
"=",
"null",
";",
"switch",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"value",
"=",
"constantPoolEntry",
".",
"getLongValue",
"(",
")",
"+",
"\"L\"",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"value",
"=",
"constantPoolEntry",
".",
"getFloatValue",
"(",
")",
"+",
"\"f\"",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"value",
"=",
"Double",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getDoubleValue",
"(",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"StringBuffer",
"temp",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"switch",
"(",
"annotationComponentValue",
".",
"getTag",
"(",
")",
")",
"{",
"case",
"IAnnotationComponentValue",
".",
"CHAR_TAG",
":",
"temp",
".",
"append",
"(",
"'\\''",
")",
";",
"escapeChar",
"(",
"temp",
",",
"(",
"char",
")",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"temp",
".",
"append",
"(",
"'\\''",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"BOOLEAN_TAG",
":",
"temp",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
"==",
"1",
"?",
"\"true\"",
":",
"\"false\"",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"BYTE_TAG",
":",
"temp",
".",
"append",
"(",
"\"(byte)",
"\"",
")",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"SHORT_TAG",
":",
"temp",
".",
"append",
"(",
"\"(short)",
"\"",
")",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"INTEGER_TAG",
":",
"temp",
".",
"append",
"(",
"\"(int)",
"\"",
")",
".",
"append",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
";",
"}",
"value",
"=",
"String",
".",
"valueOf",
"(",
"temp",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
":",
"value",
"=",
"\"\\\"\"",
"+",
"decodeStringValue",
"(",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
")",
"+",
"\"\\\"\"",
";",
"}",
"buffer",
".",
"append",
"(",
"value",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"ENUM_TAG",
":",
"final",
"char",
"[",
"]",
"typeName",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"annotationComponentValue",
".",
"getEnumConstantTypeName",
"(",
")",
",",
"'/'",
",",
"'.'",
")",
";",
"final",
"char",
"[",
"]",
"constantName",
"=",
"annotationComponentValue",
".",
"getEnumConstantName",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"typeName",
")",
",",
"'.'",
",",
"mode",
")",
")",
".",
"append",
"(",
"'.'",
")",
".",
"append",
"(",
"constantName",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"CLASS_TAG",
":",
"constantPoolEntry",
"=",
"annotationComponentValue",
".",
"getClassInfo",
"(",
")",
";",
"final",
"char",
"[",
"]",
"className",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
",",
"'/'",
",",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"className",
")",
",",
"'.'",
",",
"mode",
")",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"ANNOTATION_TAG",
":",
"IAnnotation",
"annotation",
"=",
"annotationComponentValue",
".",
"getAnnotationValue",
"(",
")",
";",
"disassembleAsModifier",
"(",
"annotation",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"break",
";",
"case",
"IAnnotationComponentValue",
".",
"ARRAY_TAG",
":",
"final",
"IAnnotationComponentValue",
"[",
"]",
"annotationComponentValues",
"=",
"annotationComponentValue",
".",
"getAnnotationComponentValues",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"'{'",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotationComponentValues",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"','",
")",
";",
"}",
"disassembleAsModifier",
"(",
"annotationComponentValues",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'}'",
")",
";",
"}",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IAnnotationDefaultAttribute",
"annotationDefaultAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"IAnnotationComponentValue",
"componentValue",
"=",
"annotationDefaultAttribute",
".",
"getMemberValue",
"(",
")",
";",
"disassembleAsModifier",
"(",
"componentValue",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IRuntimeInvisibleAnnotationsAttribute",
"runtimeInvisibleAnnotationsAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"runtimeInvisibleAnnotationsAttribute",
".",
"getAnnotations",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"disassembleAsModifier",
"(",
"annotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IParameterAnnotation",
"[",
"]",
"parameterAnnotations",
",",
"StringBuffer",
"buffer",
",",
"int",
"index",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"if",
"(",
"parameterAnnotations",
".",
"length",
">",
"index",
")",
"{",
"disassembleAsModifier",
"(",
"parameterAnnotations",
"[",
"index",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IParameterAnnotation",
"parameterAnnotation",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"if",
"(",
"parameterAnnotation",
"==",
"null",
")",
"return",
";",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"parameterAnnotation",
".",
"getAnnotations",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"disassembleAsModifier",
"(",
"annotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassembleAsModifier",
"(",
"IRuntimeVisibleAnnotationsAttribute",
"runtimeVisibleAnnotationsAttribute",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"IAnnotation",
"[",
"]",
"annotations",
"=",
"runtimeVisibleAnnotationsAttribute",
".",
"getAnnotations",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"}",
"disassembleAsModifier",
"(",
"annotations",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
"+",
"1",
",",
"mode",
")",
";",
"}",
"}",
"private",
"void",
"disassembleTypeMembers",
"(",
"IClassFileReader",
"classFileReader",
",",
"char",
"[",
"]",
"className",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
",",
"boolean",
"isEnum",
")",
"{",
"IFieldInfo",
"[",
"]",
"fields",
"=",
"classFileReader",
".",
"getFieldInfos",
"(",
")",
";",
"if",
"(",
"isEnum",
"&&",
"checkMode",
"(",
"mode",
",",
"WORKING_COPY",
")",
")",
"{",
"int",
"index",
"=",
"0",
";",
"final",
"int",
"fieldsLength",
"=",
"fields",
".",
"length",
";",
"IMethodInfo",
"[",
"]",
"methods",
"=",
"classFileReader",
".",
"getMethodInfos",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"constructorArguments",
"=",
"getConstructorArgumentsForEnum",
"(",
"methods",
")",
";",
"enumConstantLoop",
":",
"for",
"(",
";",
"index",
"<",
"fieldsLength",
";",
"index",
"++",
")",
"{",
"final",
"IFieldInfo",
"fieldInfo",
"=",
"fields",
"[",
"index",
"]",
";",
"final",
"int",
"accessFlags",
"=",
"fieldInfo",
".",
"getAccessFlags",
"(",
")",
";",
"if",
"(",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_ENUM",
")",
"!=",
"0",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"disassembleEnumConstants",
"(",
"fields",
"[",
"index",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"constructorArguments",
",",
"mode",
")",
";",
"}",
"else",
"{",
"break",
"enumConstantLoop",
";",
"}",
"}",
"buffer",
".",
"append",
"(",
"';'",
")",
";",
"boolean",
"foundSyntheticField",
"=",
"false",
";",
"fieldLoop",
":",
"for",
"(",
";",
"index",
"<",
"fieldsLength",
";",
"index",
"++",
")",
"{",
"if",
"(",
"!",
"foundSyntheticField",
"&&",
"CharOperation",
".",
"equals",
"(",
"TypeConstants",
".",
"SYNTHETIC_ENUM_VALUES",
",",
"fields",
"[",
"index",
"]",
".",
"getName",
"(",
")",
")",
")",
"{",
"foundSyntheticField",
"=",
"true",
";",
"continue",
"fieldLoop",
";",
"}",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"disassemble",
"(",
"fields",
"[",
"index",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"methodLoop",
":",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"methods",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"final",
"IMethodInfo",
"methodInfo",
"=",
"methods",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"methodInfo",
".",
"getName",
"(",
")",
",",
"TypeConstants",
".",
"VALUES",
")",
")",
"{",
"final",
"char",
"[",
"]",
"descriptor",
"=",
"methodInfo",
".",
"getDescriptor",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"descriptor",
",",
"'/'",
",",
"'.'",
")",
";",
"if",
"(",
"Signature",
".",
"getParameterCount",
"(",
"descriptor",
")",
"==",
"0",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"returnClassName",
"(",
"Signature",
".",
"getReturnType",
"(",
"descriptor",
")",
",",
"'.'",
",",
"mode",
")",
",",
"CharOperation",
".",
"concat",
"(",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'L'",
"}",
",",
"className",
",",
"new",
"char",
"[",
"]",
"{",
"';'",
"}",
")",
")",
")",
"{",
"continue",
"methodLoop",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"methodInfo",
".",
"getName",
"(",
")",
",",
"TypeConstants",
".",
"VALUEOF",
")",
")",
"{",
"final",
"char",
"[",
"]",
"descriptor",
"=",
"methodInfo",
".",
"getDescriptor",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"descriptor",
",",
"'/'",
",",
"'.'",
")",
";",
"final",
"char",
"[",
"]",
"[",
"]",
"parameterTypes",
"=",
"Signature",
".",
"getParameterTypes",
"(",
"descriptor",
")",
";",
"if",
"(",
"parameterTypes",
".",
"length",
"==",
"1",
"&&",
"CharOperation",
".",
"equals",
"(",
"parameterTypes",
"[",
"0",
"]",
",",
"\"\"",
".",
"toCharArray",
"(",
")",
")",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"returnClassName",
"(",
"Signature",
".",
"getReturnType",
"(",
"descriptor",
")",
",",
"'.'",
",",
"mode",
")",
",",
"CharOperation",
".",
"concat",
"(",
"'L'",
",",
"className",
",",
"';'",
")",
")",
")",
"{",
"continue",
"methodLoop",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"methodInfo",
".",
"isClinit",
"(",
")",
"||",
"methodInfo",
".",
"isSynthetic",
"(",
")",
")",
"{",
"continue",
"methodLoop",
";",
"}",
"else",
"if",
"(",
"methodInfo",
".",
"isConstructor",
"(",
")",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"disassembleEnumConstructor",
"(",
"classFileReader",
",",
"className",
",",
"methodInfo",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"else",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"disassemble",
"(",
"classFileReader",
",",
"className",
",",
"methodInfo",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"fields",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"disassemble",
"(",
"fields",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"IMethodInfo",
"[",
"]",
"methods",
"=",
"classFileReader",
".",
"getMethodInfos",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"methods",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"disassemble",
"(",
"classFileReader",
",",
"className",
",",
"methods",
"[",
"i",
"]",
",",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
",",
"mode",
")",
";",
"}",
"}",
"}",
"private",
"char",
"[",
"]",
"[",
"]",
"getConstructorArgumentsForEnum",
"(",
"final",
"IMethodInfo",
"[",
"]",
"methods",
")",
"{",
"loop",
":",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"methods",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"IMethodInfo",
"methodInfo",
"=",
"methods",
"[",
"i",
"]",
";",
"if",
"(",
"methodInfo",
".",
"isConstructor",
"(",
")",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"parameterTypes",
"=",
"Signature",
".",
"getParameterTypes",
"(",
"methodInfo",
".",
"getDescriptor",
"(",
")",
")",
";",
"final",
"int",
"length",
"=",
"parameterTypes",
".",
"length",
";",
"if",
"(",
"length",
">=",
"2",
")",
"{",
"return",
"CharOperation",
".",
"subarray",
"(",
"parameterTypes",
",",
"2",
",",
"length",
")",
";",
"}",
"}",
"else",
"{",
"continue",
"loop",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"final",
"void",
"dumpTab",
"(",
"int",
"tabNumber",
",",
"StringBuffer",
"buffer",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tabNumber",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_indentation",
")",
";",
"}",
"}",
"private",
"final",
"String",
"dumpNewLineWithTabs",
"(",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"writeNewLine",
"(",
"buffer",
",",
"lineSeparator",
",",
"tabNumber",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"}",
"public",
"String",
"getDescription",
"(",
")",
"{",
"return",
"Messages",
".",
"disassembler_description",
";",
"}",
"private",
"IEnclosingMethodAttribute",
"getEnclosingMethodAttribute",
"(",
"IClassFileReader",
"classFileReader",
")",
"{",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"classFileReader",
".",
"getAttributes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"attributes",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributes",
"[",
"i",
"]",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"ENCLOSING_METHOD",
")",
")",
"{",
"return",
"(",
"IEnclosingMethodAttribute",
")",
"attributes",
"[",
"i",
"]",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"IClassFileAttribute",
"getAttribute",
"(",
"final",
"char",
"[",
"]",
"attributeName",
",",
"final",
"ICodeAttribute",
"codeAttribute",
")",
"{",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"codeAttribute",
".",
"getAttributes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"attributes",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributes",
"[",
"i",
"]",
".",
"getAttributeName",
"(",
")",
",",
"attributeName",
")",
")",
"{",
"return",
"attributes",
"[",
"i",
"]",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"char",
"[",
"]",
"[",
"]",
"getParameterNames",
"(",
"char",
"[",
"]",
"methodDescriptor",
",",
"ICodeAttribute",
"codeAttribute",
",",
"int",
"accessFlags",
")",
"{",
"int",
"paramCount",
"=",
"Signature",
".",
"getParameterCount",
"(",
"methodDescriptor",
")",
";",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
"=",
"new",
"char",
"[",
"paramCount",
"]",
"[",
"]",
";",
"if",
"(",
"codeAttribute",
"!=",
"null",
")",
"{",
"ILocalVariableAttribute",
"localVariableAttribute",
"=",
"codeAttribute",
".",
"getLocalVariableAttribute",
"(",
")",
";",
"if",
"(",
"localVariableAttribute",
"!=",
"null",
")",
"{",
"ILocalVariableTableEntry",
"[",
"]",
"entries",
"=",
"localVariableAttribute",
".",
"getLocalVariableTable",
"(",
")",
";",
"final",
"int",
"startingIndex",
"=",
"(",
"accessFlags",
"&",
"IModifierConstants",
".",
"ACC_STATIC",
")",
"!=",
"0",
"?",
"0",
":",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramCount",
";",
"i",
"++",
")",
"{",
"ILocalVariableTableEntry",
"searchedEntry",
"=",
"getEntryFor",
"(",
"getLocalIndex",
"(",
"startingIndex",
",",
"i",
",",
"methodDescriptor",
")",
",",
"entries",
")",
";",
"if",
"(",
"searchedEntry",
"!=",
"null",
")",
"{",
"parameterNames",
"[",
"i",
"]",
"=",
"searchedEntry",
".",
"getName",
"(",
")",
";",
"}",
"else",
"{",
"parameterNames",
"[",
"i",
"]",
"=",
"CharOperation",
".",
"concat",
"(",
"Messages",
".",
"disassembler_parametername",
".",
"toCharArray",
"(",
")",
",",
"Integer",
".",
"toString",
"(",
"i",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"}",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramCount",
";",
"i",
"++",
")",
"{",
"parameterNames",
"[",
"i",
"]",
"=",
"CharOperation",
".",
"concat",
"(",
"Messages",
".",
"disassembler_parametername",
".",
"toCharArray",
"(",
")",
",",
"Integer",
".",
"toString",
"(",
"i",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"}",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"paramCount",
";",
"i",
"++",
")",
"{",
"parameterNames",
"[",
"i",
"]",
"=",
"CharOperation",
".",
"concat",
"(",
"Messages",
".",
"disassembler_parametername",
".",
"toCharArray",
"(",
")",
",",
"Integer",
".",
"toString",
"(",
"i",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"}",
"}",
"return",
"parameterNames",
";",
"}",
"private",
"int",
"getLocalIndex",
"(",
"final",
"int",
"startingSlot",
",",
"final",
"int",
"index",
",",
"final",
"char",
"[",
"]",
"methodDescriptor",
")",
"{",
"int",
"slot",
"=",
"startingSlot",
";",
"final",
"char",
"[",
"]",
"[",
"]",
"types",
"=",
"Signature",
".",
"getParameterTypes",
"(",
"methodDescriptor",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"index",
";",
"i",
"++",
")",
"{",
"final",
"char",
"[",
"]",
"type",
"=",
"types",
"[",
"i",
"]",
";",
"switch",
"(",
"type",
".",
"length",
")",
"{",
"case",
"1",
":",
"switch",
"(",
"type",
"[",
"0",
"]",
")",
"{",
"case",
"'D'",
":",
"case",
"'J'",
":",
"slot",
"+=",
"2",
";",
"break",
";",
"default",
":",
"slot",
"++",
";",
"}",
"break",
";",
"default",
":",
"slot",
"++",
";",
"}",
"}",
"return",
"slot",
";",
"}",
"private",
"ILocalVariableTableEntry",
"getEntryFor",
"(",
"final",
"int",
"index",
",",
"final",
"ILocalVariableTableEntry",
"[",
"]",
"entries",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"entries",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"ILocalVariableTableEntry",
"entry",
"=",
"entries",
"[",
"i",
"]",
";",
"if",
"(",
"index",
"==",
"entry",
".",
"getIndex",
"(",
")",
")",
"{",
"return",
"entry",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"char",
"[",
"]",
"getSignatureForField",
"(",
"char",
"[",
"]",
"fieldDescriptor",
")",
"{",
"char",
"[",
"]",
"newFieldDescriptor",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"fieldDescriptor",
",",
"'/'",
",",
"'.'",
")",
";",
"newFieldDescriptor",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"newFieldDescriptor",
",",
"'$'",
",",
"'%'",
")",
";",
"char",
"[",
"]",
"fieldDescriptorSignature",
"=",
"Signature",
".",
"toCharArray",
"(",
"newFieldDescriptor",
")",
";",
"CharOperation",
".",
"replace",
"(",
"fieldDescriptorSignature",
",",
"'%'",
",",
"'$'",
")",
";",
"return",
"fieldDescriptorSignature",
";",
"}",
"private",
"boolean",
"isDeprecated",
"(",
"IClassFileReader",
"classFileReader",
")",
"{",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"classFileReader",
".",
"getAttributes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"attributes",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributes",
"[",
"i",
"]",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"DEPRECATED",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"isSynthetic",
"(",
"IClassFileReader",
"classFileReader",
")",
"{",
"int",
"flags",
"=",
"classFileReader",
".",
"getAccessFlags",
"(",
")",
";",
"if",
"(",
"(",
"flags",
"&",
"IModifierConstants",
".",
"ACC_SYNTHETIC",
")",
"!=",
"0",
")",
"{",
"return",
"true",
";",
"}",
"IClassFileAttribute",
"[",
"]",
"attributes",
"=",
"classFileReader",
".",
"getAttributes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"attributes",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributes",
"[",
"i",
"]",
".",
"getAttributeName",
"(",
")",
",",
"IAttributeNamesConstants",
".",
"SYNTHETIC",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"checkMode",
"(",
"int",
"mode",
",",
"int",
"flag",
")",
"{",
"return",
"(",
"mode",
"&",
"flag",
")",
"!=",
"0",
";",
"}",
"private",
"boolean",
"isCompact",
"(",
"int",
"mode",
")",
"{",
"return",
"(",
"mode",
"&",
"ClassFileBytesDisassembler",
".",
"COMPACT",
")",
"!=",
"0",
";",
"}",
"private",
"char",
"[",
"]",
"returnClassName",
"(",
"char",
"[",
"]",
"classInfoName",
",",
"char",
"separator",
",",
"int",
"mode",
")",
"{",
"if",
"(",
"classInfoName",
".",
"length",
"==",
"0",
")",
"{",
"return",
"CharOperation",
".",
"NO_CHAR",
";",
"}",
"else",
"if",
"(",
"isCompact",
"(",
"mode",
")",
")",
"{",
"int",
"lastIndexOfSlash",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"separator",
",",
"classInfoName",
")",
";",
"if",
"(",
"lastIndexOfSlash",
"!=",
"-",
"1",
")",
"{",
"return",
"CharOperation",
".",
"subarray",
"(",
"classInfoName",
",",
"lastIndexOfSlash",
"+",
"1",
",",
"classInfoName",
".",
"length",
")",
";",
"}",
"}",
"return",
"classInfoName",
";",
"}",
"private",
"void",
"writeNewLine",
"(",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
")",
"{",
"buffer",
".",
"append",
"(",
"lineSeparator",
")",
";",
"dumpTab",
"(",
"tabNumber",
",",
"buffer",
")",
";",
"}",
"}",
"</s>"
] |
2,884 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IVerificationTypeInfo",
";",
"public",
"class",
"VerificationInfo",
"extends",
"ClassFileStruct",
"implements",
"IVerificationTypeInfo",
"{",
"private",
"int",
"tag",
";",
"private",
"int",
"offset",
";",
"private",
"int",
"constantPoolIndex",
";",
"private",
"char",
"[",
"]",
"classTypeName",
";",
"private",
"int",
"readOffset",
";",
"public",
"VerificationInfo",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"final",
"int",
"t",
"=",
"u1At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"tag",
"=",
"t",
";",
"this",
".",
"readOffset",
"=",
"1",
";",
"switch",
"(",
"t",
")",
"{",
"case",
"IVerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"final",
"int",
"constantIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"1",
",",
"offset",
")",
";",
"this",
".",
"constantPoolIndex",
"=",
"constantIndex",
";",
"if",
"(",
"constantIndex",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"constantIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"classTypeName",
"=",
"constantPoolEntry",
".",
"getClassInfoName",
"(",
")",
";",
"}",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"IVerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"this",
".",
"offset",
"=",
"u2At",
"(",
"classFileBytes",
",",
"1",
",",
"offset",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"}",
"}",
"public",
"int",
"getTag",
"(",
")",
"{",
"return",
"this",
".",
"tag",
";",
"}",
"public",
"int",
"getOffset",
"(",
")",
"{",
"return",
"this",
".",
"offset",
";",
"}",
"public",
"int",
"getConstantPoolIndex",
"(",
")",
"{",
"return",
"this",
".",
"constantPoolIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getClassTypeName",
"(",
")",
"{",
"return",
"this",
".",
"classTypeName",
";",
"}",
"public",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"readOffset",
";",
"}",
"}",
"</s>"
] |
2,885 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IBytecodeVisitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IClassFileAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ICodeAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IExceptionTableEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILineNumberAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IOpcodeMnemonics",
";",
"public",
"class",
"CodeAttribute",
"extends",
"ClassFileAttribute",
"implements",
"ICodeAttribute",
"{",
"private",
"static",
"final",
"IExceptionTableEntry",
"[",
"]",
"NO_EXCEPTION_TABLE",
"=",
"new",
"IExceptionTableEntry",
"[",
"0",
"]",
";",
"private",
"IClassFileAttribute",
"[",
"]",
"attributes",
";",
"private",
"int",
"attributesCount",
";",
"private",
"byte",
"[",
"]",
"bytecodes",
";",
"private",
"byte",
"[",
"]",
"classFileBytes",
";",
"private",
"long",
"codeLength",
";",
"private",
"int",
"codeOffset",
";",
"private",
"IConstantPool",
"constantPool",
";",
"private",
"IExceptionTableEntry",
"[",
"]",
"exceptionTableEntries",
";",
"private",
"int",
"exceptionTableLength",
";",
"private",
"ILineNumberAttribute",
"lineNumberAttribute",
";",
"private",
"ILocalVariableAttribute",
"localVariableAttribute",
";",
"private",
"int",
"maxLocals",
";",
"private",
"int",
"maxStack",
";",
"CodeAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"this",
".",
"classFileBytes",
"=",
"classFileBytes",
";",
"this",
".",
"constantPool",
"=",
"constantPool",
";",
"this",
".",
"maxStack",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"maxLocals",
"=",
"u2At",
"(",
"classFileBytes",
",",
"8",
",",
"offset",
")",
";",
"this",
".",
"codeLength",
"=",
"u4At",
"(",
"classFileBytes",
",",
"10",
",",
"offset",
")",
";",
"this",
".",
"codeOffset",
"=",
"offset",
"+",
"14",
";",
"int",
"readOffset",
"=",
"(",
"int",
")",
"(",
"14",
"+",
"this",
".",
"codeLength",
")",
";",
"this",
".",
"exceptionTableLength",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"offset",
")",
";",
"readOffset",
"+=",
"2",
";",
"this",
".",
"exceptionTableEntries",
"=",
"NO_EXCEPTION_TABLE",
";",
"if",
"(",
"this",
".",
"exceptionTableLength",
"!=",
"0",
")",
"{",
"this",
".",
"exceptionTableEntries",
"=",
"new",
"ExceptionTableEntry",
"[",
"this",
".",
"exceptionTableLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"exceptionTableLength",
";",
"i",
"++",
")",
"{",
"this",
".",
"exceptionTableEntries",
"[",
"i",
"]",
"=",
"new",
"ExceptionTableEntry",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"readOffset",
"+=",
"8",
";",
"}",
"}",
"this",
".",
"attributesCount",
"=",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"offset",
")",
";",
"this",
".",
"attributes",
"=",
"ClassFileAttribute",
".",
"NO_ATTRIBUTES",
";",
"if",
"(",
"this",
".",
"attributesCount",
"!=",
"0",
")",
"{",
"this",
".",
"attributes",
"=",
"new",
"IClassFileAttribute",
"[",
"this",
".",
"attributesCount",
"]",
";",
"}",
"int",
"attributesIndex",
"=",
"0",
";",
"readOffset",
"+=",
"2",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"attributesCount",
";",
"i",
"++",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"u2At",
"(",
"classFileBytes",
",",
"readOffset",
",",
"offset",
")",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"char",
"[",
"]",
"attributeName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"LINE_NUMBER",
")",
")",
"{",
"this",
".",
"lineNumberAttribute",
"=",
"new",
"LineNumberAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"this",
".",
"lineNumberAttribute",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"LOCAL_VARIABLE",
")",
")",
"{",
"this",
".",
"localVariableAttribute",
"=",
"new",
"LocalVariableAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"this",
".",
"localVariableAttribute",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"LOCAL_VARIABLE_TYPE_TABLE",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"LocalVariableTypeAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"STACK_MAP_TABLE",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"StackMapTableAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"if",
"(",
"equals",
"(",
"attributeName",
",",
"IAttributeNamesConstants",
".",
"STACK_MAP",
")",
")",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"StackMapAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"else",
"{",
"this",
".",
"attributes",
"[",
"attributesIndex",
"++",
"]",
"=",
"new",
"ClassFileAttribute",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"classFileBytes",
",",
"readOffset",
"+",
"2",
",",
"offset",
")",
")",
";",
"}",
"}",
"public",
"IClassFileAttribute",
"[",
"]",
"getAttributes",
"(",
")",
"{",
"return",
"this",
".",
"attributes",
";",
"}",
"public",
"int",
"getAttributesCount",
"(",
")",
"{",
"return",
"this",
".",
"attributesCount",
";",
"}",
"public",
"byte",
"[",
"]",
"getBytecodes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"bytecodes",
"==",
"null",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"classFileBytes",
",",
"this",
".",
"codeOffset",
",",
"(",
"this",
".",
"bytecodes",
"=",
"new",
"byte",
"[",
"(",
"int",
")",
"this",
".",
"codeLength",
"]",
")",
",",
"0",
",",
"(",
"int",
")",
"this",
".",
"codeLength",
")",
";",
"}",
"return",
"this",
".",
"bytecodes",
";",
"}",
"public",
"long",
"getCodeLength",
"(",
")",
"{",
"return",
"this",
".",
"codeLength",
";",
"}",
"public",
"IExceptionTableEntry",
"[",
"]",
"getExceptionTable",
"(",
")",
"{",
"return",
"this",
".",
"exceptionTableEntries",
";",
"}",
"public",
"int",
"getExceptionTableLength",
"(",
")",
"{",
"return",
"this",
".",
"exceptionTableLength",
";",
"}",
"public",
"ILineNumberAttribute",
"getLineNumberAttribute",
"(",
")",
"{",
"return",
"this",
".",
"lineNumberAttribute",
";",
"}",
"public",
"ILocalVariableAttribute",
"getLocalVariableAttribute",
"(",
")",
"{",
"return",
"this",
".",
"localVariableAttribute",
";",
"}",
"public",
"int",
"getMaxLocals",
"(",
")",
"{",
"return",
"this",
".",
"maxLocals",
";",
"}",
"public",
"int",
"getMaxStack",
"(",
")",
"{",
"return",
"this",
".",
"maxStack",
";",
"}",
"public",
"void",
"traverse",
"(",
"IBytecodeVisitor",
"visitor",
")",
"throws",
"ClassFormatException",
"{",
"int",
"pc",
"=",
"this",
".",
"codeOffset",
";",
"int",
"opcode",
",",
"index",
",",
"_const",
",",
"branchOffset",
";",
"IConstantPoolEntry",
"constantPoolEntry",
";",
"while",
"(",
"true",
")",
"{",
"opcode",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"switch",
"(",
"opcode",
")",
"{",
"case",
"IOpcodeMnemonics",
".",
"NOP",
":",
"visitor",
".",
"_nop",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ACONST_NULL",
":",
"visitor",
".",
"_aconst_null",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ICONST_M1",
":",
"visitor",
".",
"_iconst_m1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ICONST_0",
":",
"visitor",
".",
"_iconst_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ICONST_1",
":",
"visitor",
".",
"_iconst_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ICONST_2",
":",
"visitor",
".",
"_iconst_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ICONST_3",
":",
"visitor",
".",
"_iconst_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ICONST_4",
":",
"visitor",
".",
"_iconst_4",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ICONST_5",
":",
"visitor",
".",
"_iconst_5",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LCONST_0",
":",
"visitor",
".",
"_lconst_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LCONST_1",
":",
"visitor",
".",
"_lconst_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FCONST_0",
":",
"visitor",
".",
"_fconst_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FCONST_1",
":",
"visitor",
".",
"_fconst_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FCONST_2",
":",
"visitor",
".",
"_fconst_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DCONST_0",
":",
"visitor",
".",
"_dconst_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DCONST_1",
":",
"visitor",
".",
"_dconst_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"BIPUSH",
":",
"visitor",
".",
"_bipush",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"(",
"byte",
")",
"i1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"SIPUSH",
":",
"visitor",
".",
"_sipush",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"(",
"short",
")",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LDC",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
"&&",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
"&&",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_String",
"&&",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_ldc",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LDC_W",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
"&&",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
"&&",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_String",
"&&",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_ldc_w",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LDC2_W",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
"&&",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_ldc2_w",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ILOAD",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_iload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LLOAD",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_lload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FLOAD",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_fload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DLOAD",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_dload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ALOAD",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_aload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ILOAD_0",
":",
"visitor",
".",
"_iload_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ILOAD_1",
":",
"visitor",
".",
"_iload_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ILOAD_2",
":",
"visitor",
".",
"_iload_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ILOAD_3",
":",
"visitor",
".",
"_iload_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LLOAD_0",
":",
"visitor",
".",
"_lload_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LLOAD_1",
":",
"visitor",
".",
"_lload_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LLOAD_2",
":",
"visitor",
".",
"_lload_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LLOAD_3",
":",
"visitor",
".",
"_lload_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FLOAD_0",
":",
"visitor",
".",
"_fload_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FLOAD_1",
":",
"visitor",
".",
"_fload_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FLOAD_2",
":",
"visitor",
".",
"_fload_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FLOAD_3",
":",
"visitor",
".",
"_fload_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DLOAD_0",
":",
"visitor",
".",
"_dload_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DLOAD_1",
":",
"visitor",
".",
"_dload_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DLOAD_2",
":",
"visitor",
".",
"_dload_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DLOAD_3",
":",
"visitor",
".",
"_dload_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ALOAD_0",
":",
"visitor",
".",
"_aload_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ALOAD_1",
":",
"visitor",
".",
"_aload_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ALOAD_2",
":",
"visitor",
".",
"_aload_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ALOAD_3",
":",
"visitor",
".",
"_aload_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IALOAD",
":",
"visitor",
".",
"_iaload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LALOAD",
":",
"visitor",
".",
"_laload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FALOAD",
":",
"visitor",
".",
"_faload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DALOAD",
":",
"visitor",
".",
"_daload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"AALOAD",
":",
"visitor",
".",
"_aaload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"BALOAD",
":",
"visitor",
".",
"_baload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"CALOAD",
":",
"visitor",
".",
"_caload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"SALOAD",
":",
"visitor",
".",
"_saload",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISTORE",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_istore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSTORE",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_lstore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FSTORE",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_fstore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DSTORE",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_dstore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ASTORE",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_astore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISTORE_0",
":",
"visitor",
".",
"_istore_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISTORE_1",
":",
"visitor",
".",
"_istore_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISTORE_2",
":",
"visitor",
".",
"_istore_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISTORE_3",
":",
"visitor",
".",
"_istore_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSTORE_0",
":",
"visitor",
".",
"_lstore_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSTORE_1",
":",
"visitor",
".",
"_lstore_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSTORE_2",
":",
"visitor",
".",
"_lstore_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSTORE_3",
":",
"visitor",
".",
"_lstore_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FSTORE_0",
":",
"visitor",
".",
"_fstore_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FSTORE_1",
":",
"visitor",
".",
"_fstore_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FSTORE_2",
":",
"visitor",
".",
"_fstore_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FSTORE_3",
":",
"visitor",
".",
"_fstore_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DSTORE_0",
":",
"visitor",
".",
"_dstore_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DSTORE_1",
":",
"visitor",
".",
"_dstore_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DSTORE_2",
":",
"visitor",
".",
"_dstore_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DSTORE_3",
":",
"visitor",
".",
"_dstore_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ASTORE_0",
":",
"visitor",
".",
"_astore_0",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ASTORE_1",
":",
"visitor",
".",
"_astore_1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ASTORE_2",
":",
"visitor",
".",
"_astore_2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ASTORE_3",
":",
"visitor",
".",
"_astore_3",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IASTORE",
":",
"visitor",
".",
"_iastore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LASTORE",
":",
"visitor",
".",
"_lastore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FASTORE",
":",
"visitor",
".",
"_fastore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DASTORE",
":",
"visitor",
".",
"_dastore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"AASTORE",
":",
"visitor",
".",
"_aastore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"BASTORE",
":",
"visitor",
".",
"_bastore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"CASTORE",
":",
"visitor",
".",
"_castore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"SASTORE",
":",
"visitor",
".",
"_sastore",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"POP",
":",
"visitor",
".",
"_pop",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"POP2",
":",
"visitor",
".",
"_pop2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DUP",
":",
"visitor",
".",
"_dup",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DUP_X1",
":",
"visitor",
".",
"_dup_x1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DUP_X2",
":",
"visitor",
".",
"_dup_x2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DUP2",
":",
"visitor",
".",
"_dup2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DUP2_X1",
":",
"visitor",
".",
"_dup2_x1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DUP2_X2",
":",
"visitor",
".",
"_dup2_x2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"SWAP",
":",
"visitor",
".",
"_swap",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IADD",
":",
"visitor",
".",
"_iadd",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LADD",
":",
"visitor",
".",
"_ladd",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FADD",
":",
"visitor",
".",
"_fadd",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DADD",
":",
"visitor",
".",
"_dadd",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISUB",
":",
"visitor",
".",
"_isub",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSUB",
":",
"visitor",
".",
"_lsub",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FSUB",
":",
"visitor",
".",
"_fsub",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DSUB",
":",
"visitor",
".",
"_dsub",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IMUL",
":",
"visitor",
".",
"_imul",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LMUL",
":",
"visitor",
".",
"_lmul",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FMUL",
":",
"visitor",
".",
"_fmul",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DMUL",
":",
"visitor",
".",
"_dmul",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IDIV",
":",
"visitor",
".",
"_idiv",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LDIV",
":",
"visitor",
".",
"_ldiv",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FDIV",
":",
"visitor",
".",
"_fdiv",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DDIV",
":",
"visitor",
".",
"_ddiv",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IREM",
":",
"visitor",
".",
"_irem",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LREM",
":",
"visitor",
".",
"_lrem",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FREM",
":",
"visitor",
".",
"_frem",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DREM",
":",
"visitor",
".",
"_drem",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"INEG",
":",
"visitor",
".",
"_ineg",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LNEG",
":",
"visitor",
".",
"_lneg",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FNEG",
":",
"visitor",
".",
"_fneg",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DNEG",
":",
"visitor",
".",
"_dneg",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISHL",
":",
"visitor",
".",
"_ishl",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSHL",
":",
"visitor",
".",
"_lshl",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISHR",
":",
"visitor",
".",
"_ishr",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSHR",
":",
"visitor",
".",
"_lshr",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IUSHR",
":",
"visitor",
".",
"_iushr",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LUSHR",
":",
"visitor",
".",
"_lushr",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IAND",
":",
"visitor",
".",
"_iand",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LAND",
":",
"visitor",
".",
"_land",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IOR",
":",
"visitor",
".",
"_ior",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LOR",
":",
"visitor",
".",
"_lor",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IXOR",
":",
"visitor",
".",
"_ixor",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LXOR",
":",
"visitor",
".",
"_lxor",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IINC",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"_const",
"=",
"i1At",
"(",
"this",
".",
"classFileBytes",
",",
"2",
",",
"pc",
")",
";",
"visitor",
".",
"_iinc",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"_const",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"I2L",
":",
"visitor",
".",
"_i2l",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"I2F",
":",
"visitor",
".",
"_i2f",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"I2D",
":",
"visitor",
".",
"_i2d",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"L2I",
":",
"visitor",
".",
"_l2i",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"L2F",
":",
"visitor",
".",
"_l2f",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"L2D",
":",
"visitor",
".",
"_l2d",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"F2I",
":",
"visitor",
".",
"_f2i",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"F2L",
":",
"visitor",
".",
"_f2l",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"F2D",
":",
"visitor",
".",
"_f2d",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"D2I",
":",
"visitor",
".",
"_d2i",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"D2L",
":",
"visitor",
".",
"_d2l",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"D2F",
":",
"visitor",
".",
"_d2f",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"I2B",
":",
"visitor",
".",
"_i2b",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"I2C",
":",
"visitor",
".",
"_i2c",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"I2S",
":",
"visitor",
".",
"_i2s",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LCMP",
":",
"visitor",
".",
"_lcmp",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FCMPL",
":",
"visitor",
".",
"_fcmpl",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FCMPG",
":",
"visitor",
".",
"_fcmpg",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DCMPL",
":",
"visitor",
".",
"_dcmpl",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DCMPG",
":",
"visitor",
".",
"_dcmpg",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFEQ",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ifeq",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFNE",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ifne",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFLT",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_iflt",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFGE",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ifge",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFGT",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ifgt",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFLE",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ifle",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ICMPEQ",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_icmpeq",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ICMPNE",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_icmpne",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ICMPLT",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_icmplt",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ICMPGE",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_icmpge",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ICMPGT",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_icmpgt",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ICMPLE",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_icmple",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ACMPEQ",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_acmpeq",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IF_ACMPNE",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_if_acmpne",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"GOTO",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_goto",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"JSR",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_jsr",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"RET",
":",
"index",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ret",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"TABLESWITCH",
":",
"int",
"startpc",
"=",
"pc",
";",
"pc",
"++",
";",
"while",
"(",
"(",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
"&",
"0x03",
")",
"!=",
"0",
")",
"{",
"pc",
"++",
";",
"}",
"int",
"defaultOffset",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"int",
"low",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"int",
"high",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"int",
"length",
"=",
"high",
"-",
"low",
"+",
"1",
";",
"int",
"[",
"]",
"jumpOffsets",
"=",
"new",
"int",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"jumpOffsets",
"[",
"i",
"]",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"}",
"visitor",
".",
"_tableswitch",
"(",
"startpc",
"-",
"this",
".",
"codeOffset",
",",
"defaultOffset",
",",
"low",
",",
"high",
",",
"jumpOffsets",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LOOKUPSWITCH",
":",
"startpc",
"=",
"pc",
";",
"pc",
"++",
";",
"while",
"(",
"(",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
"&",
"0x03",
")",
"!=",
"0",
")",
"{",
"pc",
"++",
";",
"}",
"defaultOffset",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"int",
"npairs",
"=",
"(",
"int",
")",
"u4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"int",
"[",
"]",
"[",
"]",
"offset_pairs",
"=",
"new",
"int",
"[",
"npairs",
"]",
"[",
"2",
"]",
";",
"pc",
"+=",
"4",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"npairs",
";",
"i",
"++",
")",
"{",
"offset_pairs",
"[",
"i",
"]",
"[",
"0",
"]",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"offset_pairs",
"[",
"i",
"]",
"[",
"1",
"]",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"}",
"visitor",
".",
"_lookupswitch",
"(",
"startpc",
"-",
"this",
".",
"codeOffset",
",",
"defaultOffset",
",",
"npairs",
",",
"offset_pairs",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IRETURN",
":",
"visitor",
".",
"_ireturn",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LRETURN",
":",
"visitor",
".",
"_lreturn",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FRETURN",
":",
"visitor",
".",
"_freturn",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DRETURN",
":",
"visitor",
".",
"_dreturn",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ARETURN",
":",
"visitor",
".",
"_areturn",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"RETURN",
":",
"visitor",
".",
"_return",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"GETSTATIC",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_getstatic",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"PUTSTATIC",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_putstatic",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"GETFIELD",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_getfield",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"PUTFIELD",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Fieldref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_putfield",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"INVOKEVIRTUAL",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Methodref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_invokevirtual",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"INVOKESPECIAL",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Methodref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_invokespecial",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"INVOKESTATIC",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Methodref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_invokestatic",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"INVOKEINTERFACE",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_InterfaceMethodref",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"byte",
"count",
"=",
"(",
"byte",
")",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"pc",
")",
";",
"int",
"extraArgs",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"4",
",",
"pc",
")",
";",
"if",
"(",
"extraArgs",
"!=",
"0",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_ARGUMENTS_FOR_INVOKEINTERFACE",
")",
";",
"}",
"visitor",
".",
"_invokeinterface",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"count",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"5",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"INVOKEDYNAMIC",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_InvokeDynamic",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_invokedynamic",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"5",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"NEW",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_new",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"NEWARRAY",
":",
"int",
"atype",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_newarray",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"atype",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ANEWARRAY",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_anewarray",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ARRAYLENGTH",
":",
"visitor",
".",
"_arraylength",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ATHROW",
":",
"visitor",
".",
"_athrow",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"CHECKCAST",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_checkcast",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"INSTANCEOF",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"visitor",
".",
"_instanceof",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"MONITORENTER",
":",
"visitor",
".",
"_monitorenter",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"MONITOREXIT",
":",
"visitor",
".",
"_monitorexit",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"WIDE",
":",
"opcode",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"if",
"(",
"opcode",
"==",
"IOpcodeMnemonics",
".",
"IINC",
")",
"{",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"2",
",",
"pc",
")",
";",
"_const",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"4",
",",
"pc",
")",
";",
"visitor",
".",
"_wide",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"opcode",
",",
"index",
",",
"_const",
")",
";",
"pc",
"+=",
"6",
";",
"}",
"else",
"{",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"2",
",",
"pc",
")",
";",
"visitor",
".",
"_wide",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"opcode",
",",
"index",
")",
";",
"pc",
"+=",
"4",
";",
"}",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"MULTIANEWARRAY",
":",
"index",
"=",
"u2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"constantPoolEntry",
"=",
"this",
".",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"int",
"dimensions",
"=",
"u1At",
"(",
"this",
".",
"classFileBytes",
",",
"3",
",",
"pc",
")",
";",
"visitor",
".",
"_multianewarray",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"index",
",",
"dimensions",
",",
"constantPoolEntry",
")",
";",
"pc",
"+=",
"4",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFNULL",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ifnull",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IFNONNULL",
":",
"branchOffset",
"=",
"i2At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_ifnonnull",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"GOTO_W",
":",
"branchOffset",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_goto_w",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"5",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"JSR_W",
":",
"branchOffset",
"=",
"i4At",
"(",
"this",
".",
"classFileBytes",
",",
"1",
",",
"pc",
")",
";",
"visitor",
".",
"_jsr_w",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
",",
"branchOffset",
")",
";",
"pc",
"+=",
"5",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"BREAKPOINT",
":",
"visitor",
".",
"_breakpoint",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IMPDEP1",
":",
"visitor",
".",
"_impdep1",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"IMPDEP2",
":",
"visitor",
".",
"_impdep2",
"(",
"pc",
"-",
"this",
".",
"codeOffset",
")",
";",
"pc",
"++",
";",
"break",
";",
"default",
":",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_BYTECODE",
")",
";",
"}",
"if",
"(",
"pc",
">=",
"(",
"this",
".",
"codeLength",
"+",
"this",
".",
"codeOffset",
")",
")",
"{",
"break",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
2,886 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Signature",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFileBytesDisassembler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IBytecodeVisitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ICodeAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry2",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ILocalVariableTableEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"OpcodeStringValues",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IOpcodeMnemonics",
";",
"public",
"class",
"DefaultBytecodeVisitor",
"implements",
"IBytecodeVisitor",
"{",
"private",
"static",
"final",
"String",
"EMPTY_CLASS_NAME",
"=",
"\"\\\"\\\"\"",
";",
"private",
"static",
"final",
"String",
"EMPTY_LOCAL_NAME",
"=",
"\"\"",
";",
"private",
"static",
"final",
"int",
"T_BOOLEAN",
"=",
"4",
";",
"private",
"static",
"final",
"int",
"T_CHAR",
"=",
"5",
";",
"private",
"static",
"final",
"int",
"T_FLOAT",
"=",
"6",
";",
"private",
"static",
"final",
"int",
"T_DOUBLE",
"=",
"7",
";",
"private",
"static",
"final",
"int",
"T_BYTE",
"=",
"8",
";",
"private",
"static",
"final",
"int",
"T_SHORT",
"=",
"9",
";",
"private",
"static",
"final",
"int",
"T_INT",
"=",
"10",
";",
"private",
"static",
"final",
"int",
"T_LONG",
"=",
"11",
";",
"private",
"StringBuffer",
"buffer",
";",
"private",
"String",
"lineSeparator",
";",
"private",
"int",
"tabNumber",
";",
"private",
"int",
"digitNumberForPC",
";",
"private",
"ILocalVariableTableEntry",
"[",
"]",
"localVariableTableEntries",
";",
"private",
"int",
"localVariableAttributeLength",
";",
"private",
"int",
"mode",
";",
"private",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
";",
"private",
"boolean",
"isStatic",
";",
"private",
"int",
"[",
"]",
"argumentSizes",
";",
"public",
"DefaultBytecodeVisitor",
"(",
"ICodeAttribute",
"codeAttribute",
",",
"char",
"[",
"]",
"[",
"]",
"parameterNames",
",",
"char",
"[",
"]",
"methodDescriptor",
",",
"boolean",
"isStatic",
",",
"StringBuffer",
"buffer",
",",
"String",
"lineSeparator",
",",
"int",
"tabNumber",
",",
"int",
"mode",
")",
"{",
"ILocalVariableAttribute",
"localVariableAttribute",
"=",
"codeAttribute",
".",
"getLocalVariableAttribute",
"(",
")",
";",
"this",
".",
"localVariableAttributeLength",
"=",
"localVariableAttribute",
"==",
"null",
"?",
"0",
":",
"localVariableAttribute",
".",
"getLocalVariableTableLength",
"(",
")",
";",
"if",
"(",
"this",
".",
"localVariableAttributeLength",
"!=",
"0",
")",
"{",
"this",
".",
"localVariableTableEntries",
"=",
"localVariableAttribute",
".",
"getLocalVariableTable",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"localVariableTableEntries",
"=",
"null",
";",
"}",
"this",
".",
"buffer",
"=",
"buffer",
";",
"this",
".",
"lineSeparator",
"=",
"lineSeparator",
";",
"this",
".",
"tabNumber",
"=",
"tabNumber",
"+",
"1",
";",
"long",
"codeLength",
"=",
"codeAttribute",
".",
"getCodeLength",
"(",
")",
";",
"this",
".",
"digitNumberForPC",
"=",
"Long",
".",
"toString",
"(",
"codeLength",
")",
".",
"length",
"(",
")",
";",
"this",
".",
"mode",
"=",
"mode",
";",
"this",
".",
"parameterNames",
"=",
"parameterNames",
";",
"this",
".",
"isStatic",
"=",
"isStatic",
";",
"if",
"(",
"parameterNames",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"parameterTypes",
"=",
"Signature",
".",
"getParameterTypes",
"(",
"methodDescriptor",
")",
";",
"int",
"length",
"=",
"parameterTypes",
".",
"length",
";",
"this",
".",
"argumentSizes",
"=",
"new",
"int",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"[",
"]",
"parameterType",
"=",
"parameterTypes",
"[",
"i",
"]",
";",
"this",
".",
"argumentSizes",
"[",
"i",
"]",
"=",
"parameterType",
".",
"length",
"==",
"1",
"&&",
"(",
"parameterType",
"[",
"0",
"]",
"==",
"'D'",
"||",
"parameterType",
"[",
"0",
"]",
"==",
"'J'",
")",
"?",
"2",
":",
"1",
";",
"}",
"}",
"}",
"public",
"void",
"_aaload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"AALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"private",
"void",
"dumpPcNumber",
"(",
"int",
"pc",
")",
"{",
"writeTabs",
"(",
")",
";",
"int",
"digitForPC",
"=",
"1",
";",
"if",
"(",
"pc",
"!=",
"0",
")",
"{",
"digitForPC",
"=",
"Integer",
".",
"toString",
"(",
"pc",
")",
".",
"length",
"(",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"digitNumberForPC",
"-",
"digitForPC",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_indentation",
")",
";",
"}",
"public",
"void",
"_aastore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"AASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_aconst_null",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ACONST_NULL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_aload_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ALOAD_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_aload_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ALOAD_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_aload_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ALOAD_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_aload_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ALOAD_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_aload",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ALOAD",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_anewarray",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantClass",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_anewarray",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ANEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnConstantClassName",
"(",
"constantClass",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_areturn",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ARETURN",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_arraylength",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ARRAYLENGTH",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_astore_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ASTORE_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_astore_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ASTORE_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"private",
"String",
"getLocalVariableName",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"return",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"false",
")",
";",
"}",
"private",
"String",
"getLocalVariableName",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"boolean",
"showIndex",
")",
"{",
"int",
"nextPC",
"=",
"pc",
"+",
"1",
";",
"switch",
"(",
"index",
")",
"{",
"case",
"0",
":",
"case",
"1",
":",
"case",
"2",
":",
"case",
"3",
":",
"break",
";",
"default",
":",
"nextPC",
"=",
"index",
"<=",
"255",
"?",
"pc",
"+",
"2",
":",
"pc",
"+",
"3",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"localVariableAttributeLength",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"final",
"ILocalVariableTableEntry",
"entry",
"=",
"this",
".",
"localVariableTableEntries",
"[",
"i",
"]",
";",
"final",
"int",
"startPC",
"=",
"entry",
".",
"getStartPC",
"(",
")",
";",
"if",
"(",
"entry",
".",
"getIndex",
"(",
")",
"==",
"index",
"&&",
"(",
"startPC",
"<=",
"nextPC",
")",
"&&",
"(",
"(",
"startPC",
"+",
"entry",
".",
"getLength",
"(",
")",
")",
">",
"nextPC",
")",
")",
"{",
"final",
"StringBuffer",
"stringBuffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"showIndex",
")",
"{",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"index",
")",
";",
"}",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"'['",
")",
".",
"append",
"(",
"entry",
".",
"getName",
"(",
")",
")",
".",
"append",
"(",
"']'",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"stringBuffer",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"parameterNames",
"!=",
"null",
")",
"{",
"if",
"(",
"index",
"==",
"0",
")",
"{",
"if",
"(",
"!",
"this",
".",
"isStatic",
")",
"{",
"final",
"StringBuffer",
"stringBuffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"'['",
")",
".",
"append",
"(",
"\"this\"",
")",
".",
"append",
"(",
"']'",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"stringBuffer",
")",
";",
"}",
"}",
"int",
"indexInParameterNames",
"=",
"index",
";",
"if",
"(",
"index",
"!=",
"0",
")",
"{",
"int",
"resolvedPosition",
"=",
"0",
";",
"if",
"(",
"!",
"this",
".",
"isStatic",
")",
"{",
"resolvedPosition",
"=",
"1",
";",
"}",
"int",
"i",
"=",
"0",
";",
"loop",
":",
"for",
"(",
"int",
"max",
"=",
"this",
".",
"argumentSizes",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"index",
"==",
"resolvedPosition",
")",
"{",
"break",
"loop",
";",
"}",
"resolvedPosition",
"+=",
"this",
".",
"argumentSizes",
"[",
"i",
"]",
";",
"}",
"indexInParameterNames",
"=",
"i",
";",
"}",
"if",
"(",
"indexInParameterNames",
"<",
"this",
".",
"parameterNames",
".",
"length",
"&&",
"this",
".",
"parameterNames",
"[",
"indexInParameterNames",
"]",
"!=",
"null",
")",
"{",
"final",
"StringBuffer",
"stringBuffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"showIndex",
")",
"{",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"index",
")",
";",
"}",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"'['",
")",
".",
"append",
"(",
"this",
".",
"parameterNames",
"[",
"indexInParameterNames",
"]",
")",
".",
"append",
"(",
"']'",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"stringBuffer",
")",
";",
"}",
"}",
"if",
"(",
"showIndex",
")",
"{",
"final",
"StringBuffer",
"stringBuffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"stringBuffer",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"index",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"stringBuffer",
")",
";",
"}",
"return",
"EMPTY_LOCAL_NAME",
";",
"}",
"public",
"void",
"_astore_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ASTORE_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_astore_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ASTORE_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_astore",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ASTORE",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_athrow",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ATHROW",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_baload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"BALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_bastore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"BASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_bipush",
"(",
"int",
"pc",
",",
"byte",
"_byte",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"BIPUSH",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"_byte",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_caload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"CALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_castore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"CASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_checkcast",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantClass",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_checkcast",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"CHECKCAST",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnConstantClassName",
"(",
"constantClass",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_d2f",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"D2F",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_d2i",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"D2I",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_d2l",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"D2L",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dadd",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DADD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_daload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dastore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dcmpg",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DCMPG",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dcmpl",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DCMPL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dconst_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DCONST_0",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dconst_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DCONST_1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ddiv",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DDIV",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dload_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DLOAD_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dload_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DLOAD_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dload_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DLOAD_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dload_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DLOAD_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dload",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DLOAD",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dmul",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DMUL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dneg",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DNEG",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_drem",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DREM",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dreturn",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DRETURN",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dstore_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DSTORE_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dstore_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DSTORE_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dstore_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DSTORE_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dstore_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DSTORE_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dstore",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DSTORE",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dsub",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DSUB",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dup_x1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DUP_X1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dup_x2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DUP_X2",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dup",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DUP",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dup2_x1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DUP2_X1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dup2_x2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DUP2_X2",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_dup2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"DUP2",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_f2d",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"F2D",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_f2i",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"F2I",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_f2l",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"F2L",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fadd",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FADD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_faload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fastore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fcmpg",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FCMPG",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fcmpl",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FCMPL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fconst_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FCONST_0",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fconst_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FCONST_1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fconst_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FCONST_2",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fdiv",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FDIV",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fload_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FLOAD_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fload_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FLOAD_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fload_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FLOAD_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fload_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FLOAD_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fload",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FLOAD",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fmul",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FMUL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fneg",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FNEG",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_frem",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FREM",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_freturn",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FRETURN",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fstore_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FSTORE_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fstore_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FSTORE_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fstore_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FSTORE_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fstore_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FSTORE_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fstore",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FSTORE",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_fsub",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"FSUB",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_getfield",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantFieldref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_getfield",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"GETFIELD",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnDeclaringClassName",
"(",
"constantFieldref",
")",
",",
"new",
"String",
"(",
"constantFieldref",
".",
"getFieldName",
"(",
")",
")",
",",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"constantFieldref",
".",
"getFieldDescriptor",
"(",
")",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_getstatic",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantFieldref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_getstatic",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"GETSTATIC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnDeclaringClassName",
"(",
"constantFieldref",
")",
",",
"new",
"String",
"(",
"constantFieldref",
".",
"getFieldName",
"(",
")",
")",
",",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"constantFieldref",
".",
"getFieldDescriptor",
"(",
")",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_goto_w",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"GOTO_W",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_goto",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"GOTO",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_i2b",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"I2B",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_i2c",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"I2C",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_i2d",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"I2D",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_i2f",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"I2F",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_i2l",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"I2L",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_i2s",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"I2S",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iadd",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IADD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iaload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iand",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IAND",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iastore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_acmpeq",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ACMPEQ",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_acmpne",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ACMPNE",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_icmpeq",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ICMPEQ",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_icmpge",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ICMPGE",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_icmpgt",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ICMPGT",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_icmple",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ICMPLE",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_icmplt",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ICMPLT",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_if_icmpne",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IF_ICMPNE",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iconst_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ICONST_0",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iconst_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ICONST_1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iconst_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ICONST_2",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iconst_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ICONST_3",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iconst_4",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ICONST_4",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iconst_5",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ICONST_5",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iconst_m1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ICONST_M1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_idiv",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IDIV",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ifeq",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFEQ",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ifge",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFGE",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ifgt",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFGT",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ifle",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFLE",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iflt",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFLT",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ifne",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFNE",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ifnonnull",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFNONNULL",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ifnull",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IFNULL",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iinc",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"int",
"_const",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_iinc",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IINC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Integer",
".",
"toString",
"(",
"_const",
")",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"false",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iload_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ILOAD_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iload_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ILOAD_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iload_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ILOAD_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iload_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ILOAD_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iload",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ILOAD",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_imul",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IMUL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ineg",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INEG",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_instanceof",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantClass",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_instanceof",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INSTANCEOF",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnConstantClassName",
"(",
"constantClass",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_invokedynamic",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"nameEntry",
",",
"IConstantPoolEntry",
"descriptorEntry",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_invokedynamic",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INVOKEDYNAMIC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Util",
".",
"toString",
"(",
"null",
",",
"nameEntry",
".",
"getUtf8Value",
"(",
")",
",",
"descriptorEntry",
".",
"getUtf8Value",
"(",
")",
",",
"true",
",",
"isCompact",
"(",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_invokedynamic",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"invokeDynamicEntry",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"IConstantPoolEntry2",
"entry",
"=",
"(",
"IConstantPoolEntry2",
")",
"invokeDynamicEntry",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_invokedynamic",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INVOKEDYNAMIC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Integer",
".",
"toString",
"(",
"entry",
".",
"getBootstrapMethodAttributeIndex",
"(",
")",
")",
",",
"Util",
".",
"toString",
"(",
"null",
",",
"entry",
".",
"getMethodName",
"(",
")",
",",
"entry",
".",
"getMethodDescriptor",
"(",
")",
",",
"true",
",",
"isCompact",
"(",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_invokeinterface",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"byte",
"nargs",
",",
"IConstantPoolEntry",
"constantInterfaceMethodref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_invokeinterface",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INVOKEINTERFACE",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Integer",
".",
"toString",
"(",
"nargs",
")",
",",
"Util",
".",
"toString",
"(",
"constantInterfaceMethodref",
".",
"getClassName",
"(",
")",
",",
"constantInterfaceMethodref",
".",
"getMethodName",
"(",
")",
",",
"constantInterfaceMethodref",
".",
"getMethodDescriptor",
"(",
")",
",",
"true",
",",
"isCompact",
"(",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_invokespecial",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantMethodref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"final",
"String",
"signature",
"=",
"returnMethodSignature",
"(",
"constantMethodref",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_invokespecial",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INVOKESPECIAL",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"signature",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_invokestatic",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantMethodref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"final",
"String",
"signature",
"=",
"returnMethodSignature",
"(",
"constantMethodref",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_invokestatic",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INVOKESTATIC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"signature",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_invokevirtual",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantMethodref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"final",
"String",
"signature",
"=",
"returnMethodSignature",
"(",
"constantMethodref",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_invokevirtual",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"INVOKEVIRTUAL",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"signature",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ior",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IOR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_irem",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IREM",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ireturn",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IRETURN",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ishl",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISHL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ishr",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISHR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_istore_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISTORE_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_istore_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISTORE_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_istore_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISTORE_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_istore_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISTORE_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_istore",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISTORE",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_isub",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"ISUB",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_iushr",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IUSHR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ixor",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IXOR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_jsr_w",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"JSR_W",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_jsr",
"(",
"int",
"pc",
",",
"int",
"branchOffset",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"JSR",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"branchOffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_l2d",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"L2D",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_l2f",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"L2F",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_l2i",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"L2I",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ladd",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LADD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_laload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_land",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LAND",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lastore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lcmp",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LCMP",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lconst_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LCONST_0",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lconst_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LCONST_1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ldc_w",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantPoolEntry",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"switch",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_float",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC_W",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Float",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getFloatValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_integer",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC_W",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_String",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_string",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC_W",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Disassembler",
".",
"escapeString",
"(",
"constantPoolEntry",
".",
"getStringValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_class",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC_W",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnConstantClassName",
"(",
"constantPoolEntry",
")",
"}",
")",
")",
";",
"}",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ldc",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantPoolEntry",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"switch",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Float",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_float",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Float",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getFloatValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Integer",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_integer",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Integer",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getIntegerValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_String",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_string",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Disassembler",
".",
"escapeString",
"(",
"constantPoolEntry",
".",
"getStringValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Class",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc_w_class",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnConstantClassName",
"(",
"constantPoolEntry",
")",
"}",
")",
")",
";",
"}",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ldc2_w",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantPoolEntry",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"switch",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Long",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc2_w_long",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC2_W",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Long",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getLongValue",
"(",
")",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"IConstantPoolConstant",
".",
"CONSTANT_Double",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_ldc2_w_double",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDC2_W",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"Double",
".",
"toString",
"(",
"constantPoolEntry",
".",
"getDoubleValue",
"(",
")",
")",
"}",
")",
")",
";",
"}",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ldiv",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LDIV",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lload_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LLOAD_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lload_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LLOAD_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lload_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LLOAD_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lload_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LLOAD_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lload",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_load",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LLOAD",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lmul",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LMUL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lneg",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LNEG",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lookupswitch",
"(",
"int",
"pc",
",",
"int",
"defaultoffset",
",",
"int",
"npairs",
",",
"int",
"[",
"]",
"[",
"]",
"offset_pairs",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LOOKUPSWITCH",
"]",
")",
".",
"append",
"(",
"\"",
"default:",
"\"",
")",
".",
"append",
"(",
"defaultoffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"npairs",
";",
"i",
"++",
")",
"{",
"writeExtraTabs",
"(",
"3",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"case",
"\"",
")",
".",
"append",
"(",
"offset_pairs",
"[",
"i",
"]",
"[",
"0",
"]",
")",
".",
"append",
"(",
"\":",
"\"",
")",
".",
"append",
"(",
"offset_pairs",
"[",
"i",
"]",
"[",
"1",
"]",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"}",
"public",
"void",
"_lor",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LOR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lrem",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LREM",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lreturn",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LRETURN",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lshl",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSHL",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lshr",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSHR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lstore_0",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSTORE_0",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"0",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lstore_1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSTORE_1",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"1",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lstore_2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSTORE_2",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"2",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lstore_3",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSTORE_3",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"3",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lstore",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_store",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSTORE",
"]",
",",
"getLocalVariableName",
"(",
"pc",
",",
"index",
",",
"true",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lsub",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LSUB",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lushr",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LUSHR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_lxor",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"LXOR",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_monitorenter",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"MONITORENTER",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_monitorexit",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"MONITOREXIT",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_multianewarray",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"int",
"dimensions",
",",
"IConstantPoolEntry",
"constantClass",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_multianewarray",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"MULTIANEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnConstantClassName",
"(",
"constantClass",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_new",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantClass",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_new",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEW",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnConstantClassName",
"(",
"constantClass",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_newarray",
"(",
"int",
"pc",
",",
"int",
"atype",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"switch",
"(",
"atype",
")",
"{",
"case",
"T_BOOLEAN",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_boolean",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"T_CHAR",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_char",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"T_FLOAT",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_float",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"T_DOUBLE",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_double",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"T_BYTE",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_byte",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"T_SHORT",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_short",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"T_INT",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_int",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"break",
";",
"case",
"T_LONG",
":",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_newarray_long",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NEWARRAY",
"]",
",",
"Integer",
".",
"toString",
"(",
"atype",
")",
"}",
")",
")",
";",
"}",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_nop",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"NOP",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_pop",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"POP",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_pop2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"POP2",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_putfield",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantFieldref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_putfield",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"PUTFIELD",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnDeclaringClassName",
"(",
"constantFieldref",
")",
",",
"new",
"String",
"(",
"constantFieldref",
".",
"getFieldName",
"(",
")",
")",
",",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"constantFieldref",
".",
"getFieldDescriptor",
"(",
")",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_putstatic",
"(",
"int",
"pc",
",",
"int",
"index",
",",
"IConstantPoolEntry",
"constantFieldref",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"classformat_putstatic",
",",
"new",
"String",
"[",
"]",
"{",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"PUTSTATIC",
"]",
",",
"Integer",
".",
"toString",
"(",
"index",
")",
",",
"returnDeclaringClassName",
"(",
"constantFieldref",
")",
",",
"new",
"String",
"(",
"constantFieldref",
".",
"getFieldName",
"(",
")",
")",
",",
"returnClassName",
"(",
"Signature",
".",
"toCharArray",
"(",
"constantFieldref",
".",
"getFieldDescriptor",
"(",
")",
")",
")",
"}",
")",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_ret",
"(",
"int",
"pc",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"RET",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"index",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_return",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"RETURN",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_saload",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"SALOAD",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_sastore",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"SASTORE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_sipush",
"(",
"int",
"pc",
",",
"short",
"value",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"SIPUSH",
"]",
")",
".",
"append",
"(",
"Messages",
".",
"disassembler_space",
")",
".",
"append",
"(",
"value",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_swap",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"SWAP",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_tableswitch",
"(",
"int",
"pc",
",",
"int",
"defaultoffset",
",",
"int",
"low",
",",
"int",
"high",
",",
"int",
"[",
"]",
"jump_offsets",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"TABLESWITCH",
"]",
")",
".",
"append",
"(",
"\"",
"default:",
"\"",
")",
".",
"append",
"(",
"defaultoffset",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"low",
";",
"i",
"<",
"high",
"+",
"1",
";",
"i",
"++",
")",
"{",
"writeExtraTabs",
"(",
"3",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"case",
"\"",
")",
".",
"append",
"(",
"i",
")",
".",
"append",
"(",
"\":",
"\"",
")",
".",
"append",
"(",
"jump_offsets",
"[",
"i",
"-",
"low",
"]",
"+",
"pc",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"}",
"public",
"void",
"_wide",
"(",
"int",
"pc",
",",
"int",
"iincopcode",
",",
"int",
"index",
",",
"int",
"_const",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"WIDE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"_iinc",
"(",
"pc",
"+",
"1",
",",
"index",
",",
"_const",
")",
";",
"}",
"public",
"void",
"_wide",
"(",
"int",
"pc",
",",
"int",
"opcode",
",",
"int",
"index",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"WIDE",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"switch",
"(",
"opcode",
")",
"{",
"case",
"IOpcodeMnemonics",
".",
"ILOAD",
":",
"_iload",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FLOAD",
":",
"_fload",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ALOAD",
":",
"_aload",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LLOAD",
":",
"_lload",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DLOAD",
":",
"_dload",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ISTORE",
":",
"_istore",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"FSTORE",
":",
"_fstore",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"ASTORE",
":",
"_astore",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"LSTORE",
":",
"_lstore",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"DSTORE",
":",
"_dstore",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"break",
";",
"case",
"IOpcodeMnemonics",
".",
"RET",
":",
"_ret",
"(",
"pc",
"+",
"1",
",",
"index",
")",
";",
"}",
"}",
"public",
"void",
"_breakpoint",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"BREAKPOINT",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_impdep1",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IMPDEP1",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"public",
"void",
"_impdep2",
"(",
"int",
"pc",
")",
"{",
"dumpPcNumber",
"(",
"pc",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"OpcodeStringValues",
".",
"BYTECODE_NAMES",
"[",
"IOpcodeMnemonics",
".",
"IMPDEP2",
"]",
")",
";",
"writeNewLine",
"(",
")",
";",
"}",
"private",
"boolean",
"isCompact",
"(",
")",
"{",
"return",
"(",
"this",
".",
"mode",
"&",
"ClassFileBytesDisassembler",
".",
"COMPACT",
")",
"!=",
"0",
";",
"}",
"private",
"String",
"returnConstantClassName",
"(",
"IConstantPoolEntry",
"constantClass",
")",
"{",
"char",
"[",
"]",
"className",
"=",
"constantClass",
".",
"getClassInfoName",
"(",
")",
";",
"if",
"(",
"className",
".",
"length",
"==",
"0",
")",
"{",
"return",
"EMPTY_CLASS_NAME",
";",
"}",
"switch",
"(",
"className",
"[",
"0",
"]",
")",
"{",
"case",
"'['",
":",
"StringBuffer",
"classNameBuffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"Util",
".",
"appendTypeSignature",
"(",
"className",
",",
"0",
",",
"classNameBuffer",
",",
"isCompact",
"(",
")",
")",
";",
"return",
"classNameBuffer",
".",
"toString",
"(",
")",
";",
"default",
":",
"return",
"returnClassName",
"(",
"className",
")",
";",
"}",
"}",
"private",
"String",
"returnClassName",
"(",
"char",
"[",
"]",
"classInfoName",
")",
"{",
"if",
"(",
"classInfoName",
".",
"length",
"==",
"0",
")",
"{",
"return",
"EMPTY_CLASS_NAME",
";",
"}",
"else",
"if",
"(",
"isCompact",
"(",
")",
")",
"{",
"int",
"lastIndexOfSlash",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"'/'",
",",
"classInfoName",
")",
";",
"if",
"(",
"lastIndexOfSlash",
"!=",
"-",
"1",
")",
"{",
"return",
"new",
"String",
"(",
"classInfoName",
",",
"lastIndexOfSlash",
"+",
"1",
",",
"classInfoName",
".",
"length",
"-",
"lastIndexOfSlash",
"-",
"1",
")",
";",
"}",
"}",
"CharOperation",
".",
"replace",
"(",
"classInfoName",
",",
"'/'",
",",
"'.'",
")",
";",
"return",
"new",
"String",
"(",
"classInfoName",
")",
";",
"}",
"private",
"String",
"returnDeclaringClassName",
"(",
"IConstantPoolEntry",
"constantRef",
")",
"{",
"final",
"char",
"[",
"]",
"className",
"=",
"constantRef",
".",
"getClassName",
"(",
")",
";",
"return",
"returnClassName",
"(",
"className",
")",
";",
"}",
"private",
"String",
"returnMethodSignature",
"(",
"IConstantPoolEntry",
"constantMethodref",
")",
"{",
"final",
"char",
"[",
"]",
"methodDescriptor",
"=",
"constantMethodref",
".",
"getMethodDescriptor",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"methodDescriptor",
",",
"'$'",
",",
"'#'",
")",
";",
"final",
"char",
"[",
"]",
"signature",
"=",
"Util",
".",
"toString",
"(",
"constantMethodref",
".",
"getClassName",
"(",
")",
",",
"constantMethodref",
".",
"getMethodName",
"(",
")",
",",
"methodDescriptor",
",",
"true",
",",
"isCompact",
"(",
")",
")",
".",
"toCharArray",
"(",
")",
";",
"CharOperation",
".",
"replace",
"(",
"signature",
",",
"'#'",
",",
"'$'",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"signature",
")",
";",
"}",
"private",
"void",
"writeNewLine",
"(",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"this",
".",
"lineSeparator",
")",
";",
"}",
"private",
"void",
"writeTabs",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"tabNumber",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_indentation",
")",
";",
"}",
"}",
"private",
"void",
"writeExtraTabs",
"(",
"int",
"extraTabs",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"tabNumber",
"+",
"extraTabs",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"Messages",
".",
"disassembler_indentation",
")",
";",
"}",
"}",
"}",
"</s>"
] |
2,887 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IRuntimeInvisibleAnnotationsAttribute",
";",
"public",
"class",
"RuntimeInvisibleAnnotationsAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IRuntimeInvisibleAnnotationsAttribute",
"{",
"private",
"static",
"final",
"IAnnotation",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"IAnnotation",
"[",
"0",
"]",
";",
"private",
"int",
"annotationsNumber",
";",
"private",
"IAnnotation",
"[",
"]",
"annotations",
";",
"public",
"RuntimeInvisibleAnnotationsAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"annotationsNumber",
"=",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"annotations",
"=",
"new",
"IAnnotation",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"Annotation",
"annotation",
"=",
"new",
"Annotation",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"this",
".",
"annotations",
"[",
"i",
"]",
"=",
"annotation",
";",
"readOffset",
"+=",
"annotation",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"annotations",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"IAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"return",
"this",
".",
"annotations",
";",
"}",
"public",
"int",
"getAnnotationsNumber",
"(",
")",
"{",
"return",
"this",
".",
"annotationsNumber",
";",
"}",
"}",
"</s>"
] |
2,888 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry2",
";",
"public",
"class",
"ConstantPoolEntry2",
"extends",
"ConstantPoolEntry",
"implements",
"IConstantPoolEntry2",
"{",
"private",
"int",
"descriptorIndex",
";",
"private",
"int",
"referenceKind",
";",
"private",
"int",
"referenceIndex",
";",
"private",
"int",
"bootstrapMethodAttributeIndex",
";",
"public",
"int",
"getDescriptorIndex",
"(",
")",
"{",
"return",
"this",
".",
"descriptorIndex",
";",
"}",
"public",
"int",
"getReferenceKind",
"(",
")",
"{",
"return",
"this",
".",
"referenceKind",
";",
"}",
"public",
"int",
"getReferenceIndex",
"(",
")",
"{",
"return",
"this",
".",
"referenceIndex",
";",
"}",
"public",
"int",
"getBootstrapMethodAttributeIndex",
"(",
")",
"{",
"return",
"this",
".",
"bootstrapMethodAttributeIndex",
";",
"}",
"public",
"void",
"setDescriptorIndex",
"(",
"int",
"descriptorIndex",
")",
"{",
"this",
".",
"descriptorIndex",
"=",
"descriptorIndex",
";",
"}",
"public",
"void",
"setReferenceKind",
"(",
"int",
"referenceKind",
")",
"{",
"this",
".",
"referenceKind",
"=",
"referenceKind",
";",
"}",
"public",
"void",
"setReferenceIndex",
"(",
"int",
"referenceIndex",
")",
"{",
"this",
".",
"referenceIndex",
"=",
"referenceIndex",
";",
"}",
"public",
"void",
"setBootstrapMethodAttributeIndex",
"(",
"int",
"bootstrapMethodAttributeIndex",
")",
"{",
"this",
".",
"bootstrapMethodAttributeIndex",
"=",
"bootstrapMethodAttributeIndex",
";",
"}",
"public",
"void",
"reset",
"(",
")",
"{",
"super",
".",
"reset",
"(",
")",
";",
"this",
".",
"descriptorIndex",
"=",
"0",
";",
"this",
".",
"referenceKind",
"=",
"0",
";",
"this",
".",
"referenceIndex",
"=",
"0",
";",
"this",
".",
"bootstrapMethodAttributeIndex",
"=",
"0",
";",
"}",
"}",
"</s>"
] |
2,889 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"java",
".",
"lang",
".",
"ref",
".",
"ReferenceQueue",
";",
"import",
"java",
".",
"lang",
".",
"ref",
".",
"WeakReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"public",
"class",
"WeakHashSetOfCharArray",
"{",
"public",
"static",
"class",
"HashableWeakReference",
"extends",
"WeakReference",
"{",
"public",
"int",
"hashCode",
";",
"public",
"HashableWeakReference",
"(",
"char",
"[",
"]",
"referent",
",",
"ReferenceQueue",
"queue",
")",
"{",
"super",
"(",
"referent",
",",
"queue",
")",
";",
"this",
".",
"hashCode",
"=",
"CharOperation",
".",
"hashCode",
"(",
"referent",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"!",
"(",
"obj",
"instanceof",
"HashableWeakReference",
")",
")",
"return",
"false",
";",
"char",
"[",
"]",
"referent",
"=",
"(",
"char",
"[",
"]",
")",
"get",
"(",
")",
";",
"char",
"[",
"]",
"other",
"=",
"(",
"char",
"[",
"]",
")",
"(",
"(",
"HashableWeakReference",
")",
"obj",
")",
".",
"get",
"(",
")",
";",
"if",
"(",
"referent",
"==",
"null",
")",
"return",
"other",
"==",
"null",
";",
"return",
"CharOperation",
".",
"equals",
"(",
"referent",
",",
"other",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"this",
".",
"hashCode",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"char",
"[",
"]",
"referent",
"=",
"(",
"char",
"[",
"]",
")",
"get",
"(",
")",
";",
"if",
"(",
"referent",
"==",
"null",
")",
"return",
"\"[hashCode=\"",
"+",
"this",
".",
"hashCode",
"+",
"\"\"",
";",
"return",
"\"[hashCode=\"",
"+",
"this",
".",
"hashCode",
"+",
"\"]",
"\\\"\"",
"+",
"new",
"String",
"(",
"referent",
")",
"+",
"'\\\"'",
";",
"}",
"}",
"HashableWeakReference",
"[",
"]",
"values",
";",
"public",
"int",
"elementSize",
";",
"int",
"threshold",
";",
"ReferenceQueue",
"referenceQueue",
"=",
"new",
"ReferenceQueue",
"(",
")",
";",
"public",
"WeakHashSetOfCharArray",
"(",
")",
"{",
"this",
"(",
"5",
")",
";",
"}",
"public",
"WeakHashSetOfCharArray",
"(",
"int",
"size",
")",
"{",
"this",
".",
"elementSize",
"=",
"0",
";",
"this",
".",
"threshold",
"=",
"size",
";",
"int",
"extraRoom",
"=",
"(",
"int",
")",
"(",
"size",
"*",
"1.75f",
")",
";",
"if",
"(",
"this",
".",
"threshold",
"==",
"extraRoom",
")",
"extraRoom",
"++",
";",
"this",
".",
"values",
"=",
"new",
"HashableWeakReference",
"[",
"extraRoom",
"]",
";",
"}",
"public",
"char",
"[",
"]",
"add",
"(",
"char",
"[",
"]",
"array",
")",
"{",
"cleanupGarbageCollectedValues",
"(",
")",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
",",
"index",
"=",
"(",
"CharOperation",
".",
"hashCode",
"(",
"array",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"referent",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"array",
",",
"referent",
"=",
"(",
"char",
"[",
"]",
")",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"return",
"referent",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"new",
"HashableWeakReference",
"(",
"array",
",",
"this",
".",
"referenceQueue",
")",
";",
"if",
"(",
"++",
"this",
".",
"elementSize",
">",
"this",
".",
"threshold",
")",
"rehash",
"(",
")",
";",
"return",
"array",
";",
"}",
"private",
"void",
"addValue",
"(",
"HashableWeakReference",
"value",
")",
"{",
"char",
"[",
"]",
"array",
"=",
"(",
"char",
"[",
"]",
")",
"value",
".",
"get",
"(",
")",
";",
"if",
"(",
"array",
"==",
"null",
")",
"return",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"value",
".",
"hashCode",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"array",
",",
"(",
"char",
"[",
"]",
")",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"value",
";",
"if",
"(",
"++",
"this",
".",
"elementSize",
">",
"this",
".",
"threshold",
")",
"rehash",
"(",
")",
";",
"}",
"private",
"void",
"cleanupGarbageCollectedValues",
"(",
")",
"{",
"HashableWeakReference",
"toBeRemoved",
";",
"while",
"(",
"(",
"toBeRemoved",
"=",
"(",
"HashableWeakReference",
")",
"this",
".",
"referenceQueue",
".",
"poll",
"(",
")",
")",
"!=",
"null",
")",
"{",
"int",
"hashCode",
"=",
"toBeRemoved",
".",
"hashCode",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"hashCode",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentValue",
"==",
"toBeRemoved",
")",
"{",
"int",
"sameHash",
"=",
"index",
";",
"int",
"current",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"current",
"=",
"(",
"sameHash",
"+",
"1",
")",
"%",
"valuesLength",
"]",
")",
"!=",
"null",
"&&",
"currentValue",
".",
"hashCode",
"==",
"hashCode",
")",
"sameHash",
"=",
"current",
";",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"this",
".",
"values",
"[",
"sameHash",
"]",
";",
"this",
".",
"values",
"[",
"sameHash",
"]",
"=",
"null",
";",
"this",
".",
"elementSize",
"--",
";",
"break",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"}",
"}",
"public",
"boolean",
"contains",
"(",
"char",
"[",
"]",
"array",
")",
"{",
"return",
"get",
"(",
"array",
")",
"!=",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"get",
"(",
"char",
"[",
"]",
"array",
")",
"{",
"cleanupGarbageCollectedValues",
"(",
")",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"CharOperation",
".",
"hashCode",
"(",
"array",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"referent",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"array",
",",
"referent",
"=",
"(",
"char",
"[",
"]",
")",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"return",
"referent",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"rehash",
"(",
")",
"{",
"WeakHashSetOfCharArray",
"newHashSet",
"=",
"new",
"WeakHashSetOfCharArray",
"(",
"this",
".",
"elementSize",
"*",
"2",
")",
";",
"newHashSet",
".",
"referenceQueue",
"=",
"this",
".",
"referenceQueue",
";",
"HashableWeakReference",
"currentValue",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"values",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"if",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"i",
"]",
")",
"!=",
"null",
")",
"newHashSet",
".",
"addValue",
"(",
"currentValue",
")",
";",
"this",
".",
"values",
"=",
"newHashSet",
".",
"values",
";",
"this",
".",
"threshold",
"=",
"newHashSet",
".",
"threshold",
";",
"this",
".",
"elementSize",
"=",
"newHashSet",
".",
"elementSize",
";",
"}",
"public",
"char",
"[",
"]",
"remove",
"(",
"char",
"[",
"]",
"array",
")",
"{",
"cleanupGarbageCollectedValues",
"(",
")",
";",
"int",
"valuesLength",
"=",
"this",
".",
"values",
".",
"length",
";",
"int",
"index",
"=",
"(",
"CharOperation",
".",
"hashCode",
"(",
"array",
")",
"&",
"0x7FFFFFFF",
")",
"%",
"valuesLength",
";",
"HashableWeakReference",
"currentValue",
";",
"while",
"(",
"(",
"currentValue",
"=",
"this",
".",
"values",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"referent",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"array",
",",
"referent",
"=",
"(",
"char",
"[",
"]",
")",
"currentValue",
".",
"get",
"(",
")",
")",
")",
"{",
"this",
".",
"elementSize",
"--",
";",
"this",
".",
"values",
"[",
"index",
"]",
"=",
"null",
";",
"rehash",
"(",
")",
";",
"return",
"referent",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"valuesLength",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"this",
".",
"elementSize",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"\"{\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"values",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"HashableWeakReference",
"value",
"=",
"this",
".",
"values",
"[",
"i",
"]",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"ref",
"=",
"(",
"char",
"[",
"]",
")",
"value",
".",
"get",
"(",
")",
";",
"if",
"(",
"ref",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"'\\\"'",
")",
";",
"buffer",
".",
"append",
"(",
"ref",
")",
";",
"buffer",
".",
"append",
"(",
"\"\\\",",
"\"",
")",
";",
"}",
"}",
"}",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,890 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ASTVisitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"CompilationUnitDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"BlockScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ClassScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"SourceRefElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"SourceType",
";",
"public",
"class",
"ASTNodeFinder",
"{",
"private",
"CompilationUnitDeclaration",
"unit",
";",
"public",
"ASTNodeFinder",
"(",
"CompilationUnitDeclaration",
"unit",
")",
"{",
"this",
".",
"unit",
"=",
"unit",
";",
"}",
"public",
"FieldDeclaration",
"findField",
"(",
"IField",
"fieldHandle",
")",
"{",
"TypeDeclaration",
"typeDecl",
"=",
"findType",
"(",
"(",
"IType",
")",
"fieldHandle",
".",
"getParent",
"(",
")",
")",
";",
"if",
"(",
"typeDecl",
"==",
"null",
")",
"return",
"null",
";",
"FieldDeclaration",
"[",
"]",
"fields",
"=",
"typeDecl",
".",
"fields",
";",
"if",
"(",
"fields",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"fieldName",
"=",
"fieldHandle",
".",
"getElementName",
"(",
")",
".",
"toCharArray",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"fields",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"FieldDeclaration",
"field",
"=",
"fields",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"fieldName",
",",
"field",
".",
"name",
")",
")",
"{",
"return",
"field",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"Initializer",
"findInitializer",
"(",
"IInitializer",
"initializerHandle",
")",
"{",
"TypeDeclaration",
"typeDecl",
"=",
"findType",
"(",
"(",
"IType",
")",
"initializerHandle",
".",
"getParent",
"(",
")",
")",
";",
"if",
"(",
"typeDecl",
"==",
"null",
")",
"return",
"null",
";",
"FieldDeclaration",
"[",
"]",
"fields",
"=",
"typeDecl",
".",
"fields",
";",
"if",
"(",
"fields",
"!=",
"null",
")",
"{",
"int",
"occurenceCount",
"=",
"(",
"(",
"SourceRefElement",
")",
"initializerHandle",
")",
".",
"occurrenceCount",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"fields",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"FieldDeclaration",
"field",
"=",
"fields",
"[",
"i",
"]",
";",
"if",
"(",
"field",
"instanceof",
"Initializer",
"&&",
"--",
"occurenceCount",
"==",
"0",
")",
"{",
"return",
"(",
"Initializer",
")",
"field",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"AbstractMethodDeclaration",
"findMethod",
"(",
"IMethod",
"methodHandle",
")",
"{",
"TypeDeclaration",
"typeDecl",
"=",
"findType",
"(",
"(",
"IType",
")",
"methodHandle",
".",
"getParent",
"(",
")",
")",
";",
"if",
"(",
"typeDecl",
"==",
"null",
")",
"return",
"null",
";",
"AbstractMethodDeclaration",
"[",
"]",
"methods",
"=",
"typeDecl",
".",
"methods",
";",
"if",
"(",
"methods",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"selector",
"=",
"methodHandle",
".",
"getElementName",
"(",
")",
".",
"toCharArray",
"(",
")",
";",
"String",
"[",
"]",
"parameterTypeSignatures",
"=",
"methodHandle",
".",
"getParameterTypes",
"(",
")",
";",
"int",
"parameterCount",
"=",
"parameterTypeSignatures",
".",
"length",
";",
"nextMethod",
":",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"methods",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"AbstractMethodDeclaration",
"method",
"=",
"methods",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"selector",
",",
"method",
".",
"selector",
")",
")",
"{",
"Argument",
"[",
"]",
"args",
"=",
"method",
".",
"arguments",
";",
"int",
"argsLength",
"=",
"args",
"==",
"null",
"?",
"0",
":",
"args",
".",
"length",
";",
"if",
"(",
"argsLength",
"==",
"parameterCount",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"parameterCount",
";",
"j",
"++",
")",
"{",
"TypeReference",
"type",
"=",
"args",
"[",
"j",
"]",
".",
"type",
";",
"String",
"signature",
"=",
"Util",
".",
"typeSignature",
"(",
"type",
")",
";",
"if",
"(",
"!",
"signature",
".",
"equals",
"(",
"parameterTypeSignatures",
"[",
"j",
"]",
")",
")",
"{",
"continue",
"nextMethod",
";",
"}",
"}",
"return",
"method",
";",
"}",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"TypeDeclaration",
"findType",
"(",
"IType",
"typeHandle",
")",
"{",
"IJavaElement",
"parent",
"=",
"typeHandle",
".",
"getParent",
"(",
")",
";",
"final",
"char",
"[",
"]",
"typeName",
"=",
"typeHandle",
".",
"getElementName",
"(",
")",
".",
"toCharArray",
"(",
")",
";",
"final",
"int",
"occurenceCount",
"=",
"(",
"(",
"SourceType",
")",
"typeHandle",
")",
".",
"occurrenceCount",
";",
"final",
"boolean",
"findAnonymous",
"=",
"typeName",
".",
"length",
"==",
"0",
";",
"class",
"Visitor",
"extends",
"ASTVisitor",
"{",
"TypeDeclaration",
"result",
";",
"int",
"count",
"=",
"0",
";",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"typeDeclaration",
",",
"BlockScope",
"scope",
")",
"{",
"if",
"(",
"this",
".",
"result",
"!=",
"null",
")",
"return",
"false",
";",
"if",
"(",
"(",
"typeDeclaration",
".",
"bits",
"&",
"ASTNode",
".",
"IsAnonymousType",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"findAnonymous",
"&&",
"++",
"this",
".",
"count",
"==",
"occurenceCount",
")",
"{",
"this",
".",
"result",
"=",
"typeDeclaration",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"!",
"findAnonymous",
"&&",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"typeDeclaration",
".",
"name",
")",
")",
"{",
"this",
".",
"result",
"=",
"typeDeclaration",
";",
"}",
"}",
"return",
"false",
";",
"}",
"}",
"switch",
"(",
"parent",
".",
"getElementType",
"(",
")",
")",
"{",
"case",
"IJavaElement",
".",
"COMPILATION_UNIT",
":",
"TypeDeclaration",
"[",
"]",
"types",
"=",
"this",
".",
"unit",
".",
"types",
";",
"if",
"(",
"types",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"types",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"TypeDeclaration",
"type",
"=",
"types",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"type",
".",
"name",
")",
")",
"{",
"return",
"type",
";",
"}",
"}",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"TYPE",
":",
"TypeDeclaration",
"parentDecl",
"=",
"findType",
"(",
"(",
"IType",
")",
"parent",
")",
";",
"if",
"(",
"parentDecl",
"==",
"null",
")",
"return",
"null",
";",
"types",
"=",
"parentDecl",
".",
"memberTypes",
";",
"if",
"(",
"types",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"types",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"TypeDeclaration",
"type",
"=",
"types",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"type",
".",
"name",
")",
")",
"{",
"return",
"type",
";",
"}",
"}",
"}",
"break",
";",
"case",
"IJavaElement",
".",
"FIELD",
":",
"FieldDeclaration",
"fieldDecl",
"=",
"findField",
"(",
"(",
"IField",
")",
"parent",
")",
";",
"if",
"(",
"fieldDecl",
"==",
"null",
")",
"return",
"null",
";",
"Visitor",
"visitor",
"=",
"new",
"Visitor",
"(",
")",
";",
"fieldDecl",
".",
"traverse",
"(",
"visitor",
",",
"null",
")",
";",
"return",
"visitor",
".",
"result",
";",
"case",
"IJavaElement",
".",
"INITIALIZER",
":",
"Initializer",
"initializer",
"=",
"findInitializer",
"(",
"(",
"IInitializer",
")",
"parent",
")",
";",
"if",
"(",
"initializer",
"==",
"null",
")",
"return",
"null",
";",
"visitor",
"=",
"new",
"Visitor",
"(",
")",
";",
"initializer",
".",
"traverse",
"(",
"visitor",
",",
"null",
")",
";",
"return",
"visitor",
".",
"result",
";",
"case",
"IJavaElement",
".",
"METHOD",
":",
"AbstractMethodDeclaration",
"methodDecl",
"=",
"findMethod",
"(",
"(",
"IMethod",
")",
"parent",
")",
";",
"if",
"(",
"methodDecl",
"==",
"null",
")",
"return",
"null",
";",
"visitor",
"=",
"new",
"Visitor",
"(",
")",
";",
"methodDecl",
".",
"traverse",
"(",
"visitor",
",",
"(",
"ClassScope",
")",
"null",
")",
";",
"return",
"visitor",
".",
"result",
";",
"}",
"return",
"null",
";",
"}",
"}",
"</s>"
] |
2,891 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaElement",
";",
"public",
"class",
"MementoTokenizer",
"{",
"public",
"static",
"final",
"String",
"COUNT",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_COUNT",
")",
";",
"public",
"static",
"final",
"String",
"JAVAPROJECT",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_JAVAPROJECT",
")",
";",
"public",
"static",
"final",
"String",
"PACKAGEFRAGMENTROOT",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_PACKAGEFRAGMENTROOT",
")",
";",
"public",
"static",
"final",
"String",
"PACKAGEFRAGMENT",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_PACKAGEFRAGMENT",
")",
";",
"public",
"static",
"final",
"String",
"FIELD",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_FIELD",
")",
";",
"public",
"static",
"final",
"String",
"METHOD",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_METHOD",
")",
";",
"public",
"static",
"final",
"String",
"INITIALIZER",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_INITIALIZER",
")",
";",
"public",
"static",
"final",
"String",
"COMPILATIONUNIT",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_COMPILATIONUNIT",
")",
";",
"public",
"static",
"final",
"String",
"CLASSFILE",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_CLASSFILE",
")",
";",
"public",
"static",
"final",
"String",
"TYPE",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_TYPE",
")",
";",
"public",
"static",
"final",
"String",
"PACKAGEDECLARATION",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_PACKAGEDECLARATION",
")",
";",
"public",
"static",
"final",
"String",
"IMPORTDECLARATION",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_IMPORTDECLARATION",
")",
";",
"public",
"static",
"final",
"String",
"LOCALVARIABLE",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_LOCALVARIABLE",
")",
";",
"public",
"static",
"final",
"String",
"TYPE_PARAMETER",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_TYPE_PARAMETER",
")",
";",
"public",
"static",
"final",
"String",
"ANNOTATION",
"=",
"Character",
".",
"toString",
"(",
"JavaElement",
".",
"JEM_ANNOTATION",
")",
";",
"private",
"final",
"char",
"[",
"]",
"memento",
";",
"private",
"final",
"int",
"length",
";",
"private",
"int",
"index",
"=",
"0",
";",
"public",
"MementoTokenizer",
"(",
"String",
"memento",
")",
"{",
"this",
".",
"memento",
"=",
"memento",
".",
"toCharArray",
"(",
")",
";",
"this",
".",
"length",
"=",
"this",
".",
"memento",
".",
"length",
";",
"}",
"public",
"boolean",
"hasMoreTokens",
"(",
")",
"{",
"return",
"this",
".",
"index",
"<",
"this",
".",
"length",
";",
"}",
"public",
"String",
"nextToken",
"(",
")",
"{",
"int",
"start",
"=",
"this",
".",
"index",
";",
"StringBuffer",
"buffer",
"=",
"null",
";",
"switch",
"(",
"this",
".",
"memento",
"[",
"this",
".",
"index",
"++",
"]",
")",
"{",
"case",
"JavaElement",
".",
"JEM_ESCAPE",
":",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"memento",
"[",
"this",
".",
"index",
"]",
")",
";",
"start",
"=",
"++",
"this",
".",
"index",
";",
"break",
";",
"case",
"JavaElement",
".",
"JEM_COUNT",
":",
"return",
"COUNT",
";",
"case",
"JavaElement",
".",
"JEM_JAVAPROJECT",
":",
"return",
"JAVAPROJECT",
";",
"case",
"JavaElement",
".",
"JEM_PACKAGEFRAGMENTROOT",
":",
"return",
"PACKAGEFRAGMENTROOT",
";",
"case",
"JavaElement",
".",
"JEM_PACKAGEFRAGMENT",
":",
"return",
"PACKAGEFRAGMENT",
";",
"case",
"JavaElement",
".",
"JEM_FIELD",
":",
"return",
"FIELD",
";",
"case",
"JavaElement",
".",
"JEM_METHOD",
":",
"return",
"METHOD",
";",
"case",
"JavaElement",
".",
"JEM_INITIALIZER",
":",
"return",
"INITIALIZER",
";",
"case",
"JavaElement",
".",
"JEM_COMPILATIONUNIT",
":",
"return",
"COMPILATIONUNIT",
";",
"case",
"JavaElement",
".",
"JEM_CLASSFILE",
":",
"return",
"CLASSFILE",
";",
"case",
"JavaElement",
".",
"JEM_TYPE",
":",
"return",
"TYPE",
";",
"case",
"JavaElement",
".",
"JEM_PACKAGEDECLARATION",
":",
"return",
"PACKAGEDECLARATION",
";",
"case",
"JavaElement",
".",
"JEM_IMPORTDECLARATION",
":",
"return",
"IMPORTDECLARATION",
";",
"case",
"JavaElement",
".",
"JEM_LOCALVARIABLE",
":",
"return",
"LOCALVARIABLE",
";",
"case",
"JavaElement",
".",
"JEM_TYPE_PARAMETER",
":",
"return",
"TYPE_PARAMETER",
";",
"case",
"JavaElement",
".",
"JEM_ANNOTATION",
":",
"return",
"ANNOTATION",
";",
"}",
"loop",
":",
"while",
"(",
"this",
".",
"index",
"<",
"this",
".",
"length",
")",
"{",
"switch",
"(",
"this",
".",
"memento",
"[",
"this",
".",
"index",
"]",
")",
"{",
"case",
"JavaElement",
".",
"JEM_ESCAPE",
":",
"if",
"(",
"buffer",
"==",
"null",
")",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"memento",
",",
"start",
",",
"this",
".",
"index",
"-",
"start",
")",
";",
"start",
"=",
"++",
"this",
".",
"index",
";",
"break",
";",
"case",
"JavaElement",
".",
"JEM_COUNT",
":",
"case",
"JavaElement",
".",
"JEM_JAVAPROJECT",
":",
"case",
"JavaElement",
".",
"JEM_PACKAGEFRAGMENTROOT",
":",
"case",
"JavaElement",
".",
"JEM_PACKAGEFRAGMENT",
":",
"case",
"JavaElement",
".",
"JEM_FIELD",
":",
"case",
"JavaElement",
".",
"JEM_METHOD",
":",
"case",
"JavaElement",
".",
"JEM_INITIALIZER",
":",
"case",
"JavaElement",
".",
"JEM_COMPILATIONUNIT",
":",
"case",
"JavaElement",
".",
"JEM_CLASSFILE",
":",
"case",
"JavaElement",
".",
"JEM_TYPE",
":",
"case",
"JavaElement",
".",
"JEM_PACKAGEDECLARATION",
":",
"case",
"JavaElement",
".",
"JEM_IMPORTDECLARATION",
":",
"case",
"JavaElement",
".",
"JEM_LOCALVARIABLE",
":",
"case",
"JavaElement",
".",
"JEM_TYPE_PARAMETER",
":",
"case",
"JavaElement",
".",
"JEM_ANNOTATION",
":",
"break",
"loop",
";",
"}",
"this",
".",
"index",
"++",
";",
"}",
"if",
"(",
"buffer",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"memento",
",",
"start",
",",
"this",
".",
"index",
"-",
"start",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"else",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"memento",
",",
"start",
",",
"this",
".",
"index",
"-",
"start",
")",
";",
"}",
"}",
"}",
"</s>"
] |
2,892 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IInnerClassesAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IInnerClassesAttributeEntry",
";",
"public",
"class",
"InnerClassesAttribute",
"extends",
"ClassFileAttribute",
"implements",
"IInnerClassesAttribute",
"{",
"private",
"static",
"final",
"IInnerClassesAttributeEntry",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"IInnerClassesAttributeEntry",
"[",
"0",
"]",
";",
"private",
"int",
"numberOfClasses",
";",
"private",
"IInnerClassesAttributeEntry",
"[",
"]",
"entries",
";",
"public",
"InnerClassesAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"this",
".",
"numberOfClasses",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"final",
"int",
"length",
"=",
"this",
".",
"numberOfClasses",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"readOffset",
"=",
"8",
";",
"this",
".",
"entries",
"=",
"new",
"IInnerClassesAttributeEntry",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"entries",
"[",
"i",
"]",
"=",
"new",
"InnerClassesAttributeEntry",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"readOffset",
")",
";",
"readOffset",
"+=",
"8",
";",
"}",
"}",
"else",
"{",
"this",
".",
"entries",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"IInnerClassesAttributeEntry",
"[",
"]",
"getInnerClassAttributesEntries",
"(",
")",
"{",
"return",
"this",
".",
"entries",
";",
"}",
"public",
"int",
"getNumberOfClasses",
"(",
")",
"{",
"return",
"this",
".",
"numberOfClasses",
";",
"}",
"}",
"</s>"
] |
2,893 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ISignatureAttribute",
";",
"public",
"class",
"SignatureAttribute",
"extends",
"ClassFileAttribute",
"implements",
"ISignatureAttribute",
"{",
"private",
"int",
"signatureIndex",
";",
"private",
"char",
"[",
"]",
"signature",
";",
"SignatureAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
")",
";",
"final",
"int",
"index",
"=",
"u2At",
"(",
"classFileBytes",
",",
"6",
",",
"offset",
")",
";",
"this",
".",
"signatureIndex",
"=",
"index",
";",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"signature",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"public",
"int",
"getSignatureIndex",
"(",
")",
"{",
"return",
"this",
".",
"signatureIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getSignature",
"(",
")",
"{",
"return",
"this",
".",
"signature",
";",
"}",
"}",
"</s>"
] |
2,894 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IInitializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IMember",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ISourceRange",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTVisitor",
";",
"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",
".",
"ClassInstanceCreation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"EnumConstantDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"EnumDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"IBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ImportDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Initializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MarkerAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"NormalAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PackageDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ParameterizedType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SingleMemberAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TypeParameter",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"VariableDeclarationFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"SourceRefElement",
";",
"public",
"class",
"DOMFinder",
"extends",
"ASTVisitor",
"{",
"public",
"ASTNode",
"foundNode",
"=",
"null",
";",
"public",
"IBinding",
"foundBinding",
"=",
"null",
";",
"private",
"CompilationUnit",
"ast",
";",
"private",
"SourceRefElement",
"element",
";",
"private",
"boolean",
"resolveBinding",
";",
"private",
"int",
"rangeStart",
"=",
"-",
"1",
",",
"rangeLength",
"=",
"0",
";",
"public",
"DOMFinder",
"(",
"CompilationUnit",
"ast",
",",
"SourceRefElement",
"element",
",",
"boolean",
"resolveBinding",
")",
"{",
"this",
".",
"ast",
"=",
"ast",
";",
"this",
".",
"element",
"=",
"element",
";",
"this",
".",
"resolveBinding",
"=",
"resolveBinding",
";",
"}",
"protected",
"boolean",
"found",
"(",
"ASTNode",
"node",
",",
"ASTNode",
"name",
")",
"{",
"if",
"(",
"name",
".",
"getStartPosition",
"(",
")",
"==",
"this",
".",
"rangeStart",
"&&",
"name",
".",
"getLength",
"(",
")",
"==",
"this",
".",
"rangeLength",
")",
"{",
"this",
".",
"foundNode",
"=",
"node",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"ASTNode",
"search",
"(",
")",
"throws",
"JavaModelException",
"{",
"ISourceRange",
"range",
"=",
"null",
";",
"if",
"(",
"this",
".",
"element",
"instanceof",
"IMember",
"&&",
"!",
"(",
"this",
".",
"element",
"instanceof",
"IInitializer",
")",
")",
"range",
"=",
"(",
"(",
"IMember",
")",
"this",
".",
"element",
")",
".",
"getNameRange",
"(",
")",
";",
"else",
"range",
"=",
"this",
".",
"element",
".",
"getSourceRange",
"(",
")",
";",
"this",
".",
"rangeStart",
"=",
"range",
".",
"getOffset",
"(",
")",
";",
"this",
".",
"rangeLength",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"this",
".",
"ast",
".",
"accept",
"(",
"this",
")",
";",
"return",
"this",
".",
"foundNode",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeMemberDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnonymousClassDeclaration",
"node",
")",
"{",
"ASTNode",
"name",
";",
"ASTNode",
"parent",
"=",
"node",
".",
"getParent",
"(",
")",
";",
"switch",
"(",
"parent",
".",
"getNodeType",
"(",
")",
")",
"{",
"case",
"ASTNode",
".",
"CLASS_INSTANCE_CREATION",
":",
"name",
"=",
"(",
"(",
"ClassInstanceCreation",
")",
"parent",
")",
".",
"getType",
"(",
")",
";",
"if",
"(",
"name",
".",
"getNodeType",
"(",
")",
"==",
"ASTNode",
".",
"PARAMETERIZED_TYPE",
")",
"{",
"name",
"=",
"(",
"(",
"ParameterizedType",
")",
"name",
")",
".",
"getType",
"(",
")",
";",
"}",
"break",
";",
"case",
"ASTNode",
".",
"ENUM_CONSTANT_DECLARATION",
":",
"name",
"=",
"(",
"(",
"EnumConstantDeclaration",
")",
"parent",
")",
".",
"getName",
"(",
")",
";",
"break",
";",
"default",
":",
"return",
"true",
";",
"}",
"if",
"(",
"found",
"(",
"node",
",",
"name",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumConstantDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveVariable",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ImportDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Initializer",
"node",
")",
"{",
"found",
"(",
"node",
",",
"node",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MarkerAnnotation",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveAnnotationBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NormalAnnotation",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveAnnotationBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PackageDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleMemberAnnotation",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveAnnotationBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeParameter",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationFragment",
"node",
")",
"{",
"if",
"(",
"found",
"(",
"node",
",",
"node",
".",
"getName",
"(",
")",
")",
"&&",
"this",
".",
"resolveBinding",
")",
"this",
".",
"foundBinding",
"=",
"node",
".",
"resolveBinding",
"(",
")",
";",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
2,895 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"public",
"class",
"ToStringSorter",
"{",
"Object",
"[",
"]",
"sortedObjects",
";",
"String",
"[",
"]",
"sortedStrings",
";",
"public",
"boolean",
"compare",
"(",
"String",
"stringOne",
",",
"String",
"stringTwo",
")",
"{",
"return",
"stringOne",
".",
"compareTo",
"(",
"stringTwo",
")",
"<",
"0",
";",
"}",
"private",
"void",
"quickSort",
"(",
"int",
"left",
",",
"int",
"right",
")",
"{",
"int",
"originalLeft",
"=",
"left",
";",
"int",
"originalRight",
"=",
"right",
";",
"int",
"midIndex",
"=",
"left",
"+",
"(",
"right",
"-",
"left",
")",
"/",
"2",
";",
"String",
"midToString",
"=",
"this",
".",
"sortedStrings",
"[",
"midIndex",
"]",
";",
"do",
"{",
"while",
"(",
"compare",
"(",
"this",
".",
"sortedStrings",
"[",
"left",
"]",
",",
"midToString",
")",
")",
"left",
"++",
";",
"while",
"(",
"compare",
"(",
"midToString",
",",
"this",
".",
"sortedStrings",
"[",
"right",
"]",
")",
")",
"right",
"--",
";",
"if",
"(",
"left",
"<=",
"right",
")",
"{",
"Object",
"tmp",
"=",
"this",
".",
"sortedObjects",
"[",
"left",
"]",
";",
"this",
".",
"sortedObjects",
"[",
"left",
"]",
"=",
"this",
".",
"sortedObjects",
"[",
"right",
"]",
";",
"this",
".",
"sortedObjects",
"[",
"right",
"]",
"=",
"tmp",
";",
"String",
"tmpToString",
"=",
"this",
".",
"sortedStrings",
"[",
"left",
"]",
";",
"this",
".",
"sortedStrings",
"[",
"left",
"]",
"=",
"this",
".",
"sortedStrings",
"[",
"right",
"]",
";",
"this",
".",
"sortedStrings",
"[",
"right",
"]",
"=",
"tmpToString",
";",
"left",
"++",
";",
"right",
"--",
";",
"}",
"}",
"while",
"(",
"left",
"<=",
"right",
")",
";",
"if",
"(",
"originalLeft",
"<",
"right",
")",
"quickSort",
"(",
"originalLeft",
",",
"right",
")",
";",
"if",
"(",
"left",
"<",
"originalRight",
")",
"quickSort",
"(",
"left",
",",
"originalRight",
")",
";",
"}",
"public",
"void",
"sort",
"(",
"Object",
"[",
"]",
"unSortedObjects",
",",
"String",
"[",
"]",
"unsortedStrings",
")",
"{",
"int",
"size",
"=",
"unSortedObjects",
".",
"length",
";",
"this",
".",
"sortedObjects",
"=",
"new",
"Object",
"[",
"size",
"]",
";",
"this",
".",
"sortedStrings",
"=",
"new",
"String",
"[",
"size",
"]",
";",
"System",
".",
"arraycopy",
"(",
"unSortedObjects",
",",
"0",
",",
"this",
".",
"sortedObjects",
",",
"0",
",",
"size",
")",
";",
"System",
".",
"arraycopy",
"(",
"unsortedStrings",
",",
"0",
",",
"this",
".",
"sortedStrings",
",",
"0",
",",
"size",
")",
";",
"if",
"(",
"size",
">",
"1",
")",
"quickSort",
"(",
"0",
",",
"size",
"-",
"1",
")",
";",
"}",
"}",
"</s>"
] |
2,896 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IAnnotationComponent",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"public",
"class",
"Annotation",
"extends",
"ClassFileStruct",
"implements",
"IAnnotation",
"{",
"private",
"static",
"final",
"IAnnotationComponent",
"[",
"]",
"NO_ENTRIES",
"=",
"new",
"IAnnotationComponent",
"[",
"0",
"]",
";",
"private",
"int",
"typeIndex",
";",
"private",
"char",
"[",
"]",
"typeName",
";",
"private",
"int",
"componentsNumber",
";",
"private",
"IAnnotationComponent",
"[",
"]",
"components",
";",
"private",
"int",
"readOffset",
";",
"public",
"Annotation",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"final",
"int",
"index",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"typeIndex",
"=",
"index",
";",
"if",
"(",
"index",
"!=",
"0",
")",
"{",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"index",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"typeName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"final",
"int",
"length",
"=",
"u2At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"this",
".",
"componentsNumber",
"=",
"length",
";",
"this",
".",
"readOffset",
"=",
"4",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"this",
".",
"components",
"=",
"new",
"IAnnotationComponent",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"AnnotationComponent",
"component",
"=",
"new",
"AnnotationComponent",
"(",
"classFileBytes",
",",
"constantPool",
",",
"offset",
"+",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"components",
"[",
"i",
"]",
"=",
"component",
";",
"this",
".",
"readOffset",
"+=",
"component",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"components",
"=",
"NO_ENTRIES",
";",
"}",
"}",
"public",
"int",
"getTypeIndex",
"(",
")",
"{",
"return",
"this",
".",
"typeIndex",
";",
"}",
"public",
"int",
"getComponentsNumber",
"(",
")",
"{",
"return",
"this",
".",
"componentsNumber",
";",
"}",
"public",
"IAnnotationComponent",
"[",
"]",
"getComponents",
"(",
")",
"{",
"return",
"this",
".",
"components",
";",
"}",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"readOffset",
";",
"}",
"public",
"char",
"[",
"]",
"getTypeName",
"(",
")",
"{",
"return",
"this",
".",
"typeName",
";",
"}",
"}",
"</s>"
] |
2,897 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"java",
".",
"text",
".",
"NumberFormat",
";",
"import",
"java",
".",
"util",
".",
"Enumeration",
";",
"import",
"java",
".",
"util",
".",
"Hashtable",
";",
"public",
"class",
"LRUCache",
"implements",
"Cloneable",
"{",
"protected",
"static",
"class",
"LRUCacheEntry",
"{",
"public",
"Object",
"key",
";",
"public",
"Object",
"value",
";",
"public",
"int",
"timestamp",
";",
"public",
"int",
"space",
";",
"public",
"LRUCacheEntry",
"previous",
";",
"public",
"LRUCacheEntry",
"next",
";",
"public",
"LRUCacheEntry",
"(",
"Object",
"key",
",",
"Object",
"value",
",",
"int",
"space",
")",
"{",
"this",
".",
"key",
"=",
"key",
";",
"this",
".",
"value",
"=",
"value",
";",
"this",
".",
"space",
"=",
"space",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
"+",
"this",
".",
"key",
"+",
"\"-->\"",
"+",
"this",
".",
"value",
"+",
"\"]\"",
";",
"}",
"}",
"public",
"class",
"Stats",
"{",
"private",
"int",
"[",
"]",
"counters",
"=",
"new",
"int",
"[",
"20",
"]",
";",
"private",
"long",
"[",
"]",
"timestamps",
"=",
"new",
"long",
"[",
"20",
"]",
";",
"private",
"int",
"counterIndex",
"=",
"-",
"1",
";",
"private",
"void",
"add",
"(",
"int",
"counter",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"this",
".",
"counterIndex",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"counters",
"[",
"i",
"]",
"==",
"counter",
")",
"return",
";",
"}",
"int",
"length",
"=",
"this",
".",
"counters",
".",
"length",
";",
"if",
"(",
"++",
"this",
".",
"counterIndex",
"==",
"length",
")",
"{",
"int",
"newLength",
"=",
"this",
".",
"counters",
".",
"length",
"*",
"2",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"counters",
",",
"0",
",",
"this",
".",
"counters",
"=",
"new",
"int",
"[",
"newLength",
"]",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"timestamps",
",",
"0",
",",
"this",
".",
"timestamps",
"=",
"new",
"long",
"[",
"newLength",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"this",
".",
"counters",
"[",
"this",
".",
"counterIndex",
"]",
"=",
"counter",
";",
"this",
".",
"timestamps",
"[",
"this",
".",
"counterIndex",
"]",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"}",
"private",
"String",
"getAverageAge",
"(",
"long",
"totalTime",
",",
"int",
"numberOfElements",
",",
"long",
"currentTime",
")",
"{",
"if",
"(",
"numberOfElements",
"==",
"0",
")",
"return",
"\"N/A\"",
";",
"long",
"time",
"=",
"totalTime",
"/",
"numberOfElements",
";",
"long",
"age",
"=",
"currentTime",
"-",
"time",
";",
"long",
"ageInSeconds",
"=",
"age",
"/",
"1000",
";",
"int",
"seconds",
"=",
"0",
";",
"int",
"minutes",
"=",
"0",
";",
"int",
"hours",
"=",
"0",
";",
"int",
"days",
"=",
"0",
";",
"if",
"(",
"ageInSeconds",
">",
"60",
")",
"{",
"long",
"ageInMin",
"=",
"ageInSeconds",
"/",
"60",
";",
"seconds",
"=",
"(",
"int",
")",
"(",
"ageInSeconds",
"-",
"(",
"60",
"*",
"ageInMin",
")",
")",
";",
"if",
"(",
"ageInMin",
">",
"60",
")",
"{",
"long",
"ageInHours",
"=",
"ageInMin",
"/",
"60",
";",
"minutes",
"=",
"(",
"int",
")",
"(",
"ageInMin",
"-",
"(",
"60",
"*",
"ageInHours",
")",
")",
";",
"if",
"(",
"ageInHours",
">",
"24",
")",
"{",
"long",
"ageInDays",
"=",
"ageInHours",
"/",
"24",
";",
"hours",
"=",
"(",
"int",
")",
"(",
"ageInHours",
"-",
"(",
"24",
"*",
"ageInDays",
")",
")",
";",
"days",
"=",
"(",
"int",
")",
"ageInDays",
";",
"}",
"else",
"{",
"hours",
"=",
"(",
"int",
")",
"ageInHours",
";",
"}",
"}",
"else",
"{",
"minutes",
"=",
"(",
"int",
")",
"ageInMin",
";",
"}",
"}",
"else",
"{",
"seconds",
"=",
"(",
"int",
")",
"ageInSeconds",
";",
"}",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"days",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"days",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"days",
"\"",
")",
";",
"}",
"if",
"(",
"hours",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"hours",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"hours",
"\"",
")",
";",
"}",
"if",
"(",
"minutes",
">",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"minutes",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"minutes",
"\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"seconds",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"seconds\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"private",
"long",
"getTimestamps",
"(",
"int",
"counter",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"this",
".",
"counterIndex",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"counters",
"[",
"i",
"]",
">=",
"counter",
")",
"return",
"this",
".",
"timestamps",
"[",
"i",
"]",
";",
"}",
"return",
"-",
"1",
";",
"}",
"public",
"synchronized",
"String",
"printStats",
"(",
")",
"{",
"int",
"numberOfElements",
"=",
"LRUCache",
".",
"this",
".",
"currentSpace",
";",
"if",
"(",
"numberOfElements",
"==",
"0",
")",
"{",
"return",
"\"\"",
";",
"}",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"numberOfElements",
")",
";",
"final",
"int",
"numberOfGroups",
"=",
"5",
";",
"int",
"numberOfElementsPerGroup",
"=",
"numberOfElements",
"/",
"numberOfGroups",
";",
"buffer",
".",
"append",
"(",
"\"n(\"",
")",
";",
"buffer",
".",
"append",
"(",
"numberOfGroups",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"groups",
"of",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"numberOfElementsPerGroup",
")",
";",
"buffer",
".",
"append",
"(",
"\"",
"elements)\"",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"int",
"groupNumber",
"=",
"1",
";",
"int",
"elementCounter",
"=",
"0",
";",
"LRUCacheEntry",
"entry",
"=",
"LRUCache",
".",
"this",
".",
"entryQueueTail",
";",
"long",
"currentTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"long",
"accumulatedTime",
"=",
"0",
";",
"while",
"(",
"entry",
"!=",
"null",
")",
"{",
"long",
"timeStamps",
"=",
"getTimestamps",
"(",
"entry",
".",
"timestamp",
")",
";",
"if",
"(",
"timeStamps",
">",
"0",
")",
"{",
"accumulatedTime",
"+=",
"timeStamps",
";",
"elementCounter",
"++",
";",
"}",
"if",
"(",
"elementCounter",
">=",
"numberOfElementsPerGroup",
"&&",
"(",
"groupNumber",
"<",
"numberOfGroups",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"nGroup",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"groupNumber",
")",
";",
"if",
"(",
"groupNumber",
"==",
"1",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"(oldest)t:",
"\"",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"tt:",
"\"",
")",
";",
"}",
"groupNumber",
"++",
";",
"buffer",
".",
"append",
"(",
"getAverageAge",
"(",
"accumulatedTime",
",",
"elementCounter",
",",
"currentTime",
")",
")",
";",
"elementCounter",
"=",
"0",
";",
"accumulatedTime",
"=",
"0",
";",
"}",
"entry",
"=",
"entry",
".",
"previous",
";",
"}",
"buffer",
".",
"append",
"(",
"\"nGroup",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"numberOfGroups",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"getAverageAge",
"(",
"accumulatedTime",
",",
"elementCounter",
",",
"currentTime",
")",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"private",
"void",
"removeCountersOlderThan",
"(",
"int",
"counter",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<=",
"this",
".",
"counterIndex",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"counters",
"[",
"i",
"]",
">=",
"counter",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"{",
"int",
"length",
"=",
"this",
".",
"counterIndex",
"-",
"i",
"+",
"1",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"counters",
",",
"i",
",",
"this",
".",
"counters",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"timestamps",
",",
"i",
",",
"this",
".",
"timestamps",
",",
"0",
",",
"length",
")",
";",
"this",
".",
"counterIndex",
"=",
"length",
";",
"}",
"return",
";",
"}",
"}",
"}",
"public",
"Object",
"getOldestElement",
"(",
")",
"{",
"return",
"LRUCache",
".",
"this",
".",
"getOldestElement",
"(",
")",
";",
"}",
"public",
"long",
"getOldestTimestamps",
"(",
")",
"{",
"return",
"getTimestamps",
"(",
"getOldestTimestampCounter",
"(",
")",
")",
";",
"}",
"public",
"synchronized",
"void",
"snapshot",
"(",
")",
"{",
"removeCountersOlderThan",
"(",
"getOldestTimestampCounter",
"(",
")",
")",
";",
"add",
"(",
"getNewestTimestampCounter",
"(",
")",
")",
";",
"}",
"}",
"protected",
"int",
"currentSpace",
";",
"protected",
"int",
"spaceLimit",
";",
"protected",
"int",
"timestampCounter",
";",
"protected",
"Hashtable",
"entryTable",
";",
"protected",
"LRUCacheEntry",
"entryQueue",
";",
"protected",
"LRUCacheEntry",
"entryQueueTail",
";",
"protected",
"static",
"final",
"int",
"DEFAULT_SPACELIMIT",
"=",
"100",
";",
"public",
"LRUCache",
"(",
")",
"{",
"this",
"(",
"DEFAULT_SPACELIMIT",
")",
";",
"}",
"public",
"LRUCache",
"(",
"int",
"size",
")",
"{",
"this",
".",
"timestampCounter",
"=",
"this",
".",
"currentSpace",
"=",
"0",
";",
"this",
".",
"entryQueue",
"=",
"this",
".",
"entryQueueTail",
"=",
"null",
";",
"this",
".",
"entryTable",
"=",
"new",
"Hashtable",
"(",
"size",
")",
";",
"this",
".",
"spaceLimit",
"=",
"size",
";",
"}",
"public",
"Object",
"clone",
"(",
")",
"{",
"LRUCache",
"newCache",
"=",
"newInstance",
"(",
"this",
".",
"spaceLimit",
")",
";",
"LRUCacheEntry",
"qEntry",
";",
"qEntry",
"=",
"this",
".",
"entryQueueTail",
";",
"while",
"(",
"qEntry",
"!=",
"null",
")",
"{",
"newCache",
".",
"privateAdd",
"(",
"qEntry",
".",
"key",
",",
"qEntry",
".",
"value",
",",
"qEntry",
".",
"space",
")",
";",
"qEntry",
"=",
"qEntry",
".",
"previous",
";",
"}",
"return",
"newCache",
";",
"}",
"public",
"double",
"fillingRatio",
"(",
")",
"{",
"return",
"(",
"this",
".",
"currentSpace",
")",
"*",
"100.0",
"/",
"this",
".",
"spaceLimit",
";",
"}",
"public",
"void",
"flush",
"(",
")",
"{",
"this",
".",
"currentSpace",
"=",
"0",
";",
"LRUCacheEntry",
"entry",
"=",
"this",
".",
"entryQueueTail",
";",
"this",
".",
"entryTable",
"=",
"new",
"Hashtable",
"(",
")",
";",
"this",
".",
"entryQueue",
"=",
"this",
".",
"entryQueueTail",
"=",
"null",
";",
"while",
"(",
"entry",
"!=",
"null",
")",
"{",
"entry",
"=",
"entry",
".",
"previous",
";",
"}",
"}",
"public",
"void",
"flush",
"(",
"Object",
"key",
")",
"{",
"LRUCacheEntry",
"entry",
";",
"entry",
"=",
"(",
"LRUCacheEntry",
")",
"this",
".",
"entryTable",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"entry",
"==",
"null",
")",
"return",
";",
"privateRemoveEntry",
"(",
"entry",
",",
"false",
")",
";",
"}",
"public",
"Object",
"getKey",
"(",
"Object",
"key",
")",
"{",
"LRUCacheEntry",
"entry",
"=",
"(",
"LRUCacheEntry",
")",
"this",
".",
"entryTable",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"entry",
"==",
"null",
")",
"{",
"return",
"key",
";",
"}",
"return",
"entry",
".",
"key",
";",
"}",
"public",
"Object",
"get",
"(",
"Object",
"key",
")",
"{",
"LRUCacheEntry",
"entry",
"=",
"(",
"LRUCacheEntry",
")",
"this",
".",
"entryTable",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"entry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"updateTimestamp",
"(",
"entry",
")",
";",
"return",
"entry",
".",
"value",
";",
"}",
"public",
"int",
"getCurrentSpace",
"(",
")",
"{",
"return",
"this",
".",
"currentSpace",
";",
"}",
"public",
"int",
"getNewestTimestampCounter",
"(",
")",
"{",
"return",
"this",
".",
"entryQueue",
"==",
"null",
"?",
"0",
":",
"this",
".",
"entryQueue",
".",
"timestamp",
";",
"}",
"public",
"int",
"getOldestTimestampCounter",
"(",
")",
"{",
"return",
"this",
".",
"entryQueueTail",
"==",
"null",
"?",
"0",
":",
"this",
".",
"entryQueueTail",
".",
"timestamp",
";",
"}",
"public",
"Object",
"getOldestElement",
"(",
")",
"{",
"return",
"this",
".",
"entryQueueTail",
"==",
"null",
"?",
"null",
":",
"this",
".",
"entryQueueTail",
".",
"key",
";",
"}",
"public",
"int",
"getSpaceLimit",
"(",
")",
"{",
"return",
"this",
".",
"spaceLimit",
";",
"}",
"public",
"Enumeration",
"keys",
"(",
")",
"{",
"return",
"this",
".",
"entryTable",
".",
"keys",
"(",
")",
";",
"}",
"public",
"ICacheEnumeration",
"keysAndValues",
"(",
")",
"{",
"return",
"new",
"ICacheEnumeration",
"(",
")",
"{",
"Enumeration",
"values",
"=",
"LRUCache",
".",
"this",
".",
"entryTable",
".",
"elements",
"(",
")",
";",
"LRUCacheEntry",
"entry",
";",
"public",
"boolean",
"hasMoreElements",
"(",
")",
"{",
"return",
"this",
".",
"values",
".",
"hasMoreElements",
"(",
")",
";",
"}",
"public",
"Object",
"nextElement",
"(",
")",
"{",
"this",
".",
"entry",
"=",
"(",
"LRUCacheEntry",
")",
"this",
".",
"values",
".",
"nextElement",
"(",
")",
";",
"return",
"this",
".",
"entry",
".",
"key",
";",
"}",
"public",
"Object",
"getValue",
"(",
")",
"{",
"if",
"(",
"this",
".",
"entry",
"==",
"null",
")",
"{",
"throw",
"new",
"java",
".",
"util",
".",
"NoSuchElementException",
"(",
")",
";",
"}",
"return",
"this",
".",
"entry",
".",
"value",
";",
"}",
"}",
";",
"}",
"protected",
"boolean",
"makeSpace",
"(",
"int",
"space",
")",
"{",
"int",
"limit",
";",
"limit",
"=",
"getSpaceLimit",
"(",
")",
";",
"if",
"(",
"this",
".",
"currentSpace",
"+",
"space",
"<=",
"limit",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"space",
">",
"limit",
")",
"{",
"return",
"false",
";",
"}",
"while",
"(",
"this",
".",
"currentSpace",
"+",
"space",
">",
"limit",
"&&",
"this",
".",
"entryQueueTail",
"!=",
"null",
")",
"{",
"privateRemoveEntry",
"(",
"this",
".",
"entryQueueTail",
",",
"false",
")",
";",
"}",
"return",
"true",
";",
"}",
"protected",
"LRUCache",
"newInstance",
"(",
"int",
"size",
")",
"{",
"return",
"new",
"LRUCache",
"(",
"size",
")",
";",
"}",
"public",
"Object",
"peek",
"(",
"Object",
"key",
")",
"{",
"LRUCacheEntry",
"entry",
"=",
"(",
"LRUCacheEntry",
")",
"this",
".",
"entryTable",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"entry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"entry",
".",
"value",
";",
"}",
"protected",
"void",
"privateAdd",
"(",
"Object",
"key",
",",
"Object",
"value",
",",
"int",
"space",
")",
"{",
"LRUCacheEntry",
"entry",
";",
"entry",
"=",
"new",
"LRUCacheEntry",
"(",
"key",
",",
"value",
",",
"space",
")",
";",
"privateAddEntry",
"(",
"entry",
",",
"false",
")",
";",
"}",
"protected",
"void",
"privateAddEntry",
"(",
"LRUCacheEntry",
"entry",
",",
"boolean",
"shuffle",
")",
"{",
"if",
"(",
"!",
"shuffle",
")",
"{",
"this",
".",
"entryTable",
".",
"put",
"(",
"entry",
".",
"key",
",",
"entry",
")",
";",
"this",
".",
"currentSpace",
"+=",
"entry",
".",
"space",
";",
"}",
"entry",
".",
"timestamp",
"=",
"this",
".",
"timestampCounter",
"++",
";",
"entry",
".",
"next",
"=",
"this",
".",
"entryQueue",
";",
"entry",
".",
"previous",
"=",
"null",
";",
"if",
"(",
"this",
".",
"entryQueue",
"==",
"null",
")",
"{",
"this",
".",
"entryQueueTail",
"=",
"entry",
";",
"}",
"else",
"{",
"this",
".",
"entryQueue",
".",
"previous",
"=",
"entry",
";",
"}",
"this",
".",
"entryQueue",
"=",
"entry",
";",
"}",
"protected",
"void",
"privateRemoveEntry",
"(",
"LRUCacheEntry",
"entry",
",",
"boolean",
"shuffle",
")",
"{",
"LRUCacheEntry",
"previous",
",",
"next",
";",
"previous",
"=",
"entry",
".",
"previous",
";",
"next",
"=",
"entry",
".",
"next",
";",
"if",
"(",
"!",
"shuffle",
")",
"{",
"this",
".",
"entryTable",
".",
"remove",
"(",
"entry",
".",
"key",
")",
";",
"this",
".",
"currentSpace",
"-=",
"entry",
".",
"space",
";",
"}",
"if",
"(",
"previous",
"==",
"null",
")",
"{",
"this",
".",
"entryQueue",
"=",
"next",
";",
"}",
"else",
"{",
"previous",
".",
"next",
"=",
"next",
";",
"}",
"if",
"(",
"next",
"==",
"null",
")",
"{",
"this",
".",
"entryQueueTail",
"=",
"previous",
";",
"}",
"else",
"{",
"next",
".",
"previous",
"=",
"previous",
";",
"}",
"}",
"public",
"Object",
"put",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"int",
"newSpace",
",",
"oldSpace",
",",
"newTotal",
";",
"LRUCacheEntry",
"entry",
";",
"newSpace",
"=",
"spaceFor",
"(",
"value",
")",
";",
"entry",
"=",
"(",
"LRUCacheEntry",
")",
"this",
".",
"entryTable",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"entry",
"!=",
"null",
")",
"{",
"oldSpace",
"=",
"entry",
".",
"space",
";",
"newTotal",
"=",
"getCurrentSpace",
"(",
")",
"-",
"oldSpace",
"+",
"newSpace",
";",
"if",
"(",
"newTotal",
"<=",
"getSpaceLimit",
"(",
")",
")",
"{",
"updateTimestamp",
"(",
"entry",
")",
";",
"entry",
".",
"value",
"=",
"value",
";",
"entry",
".",
"space",
"=",
"newSpace",
";",
"this",
".",
"currentSpace",
"=",
"newTotal",
";",
"return",
"value",
";",
"}",
"else",
"{",
"privateRemoveEntry",
"(",
"entry",
",",
"false",
")",
";",
"}",
"}",
"if",
"(",
"makeSpace",
"(",
"newSpace",
")",
")",
"{",
"privateAdd",
"(",
"key",
",",
"value",
",",
"newSpace",
")",
";",
"}",
"return",
"value",
";",
"}",
"public",
"Object",
"removeKey",
"(",
"Object",
"key",
")",
"{",
"LRUCacheEntry",
"entry",
"=",
"(",
"LRUCacheEntry",
")",
"this",
".",
"entryTable",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"entry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Object",
"value",
"=",
"entry",
".",
"value",
";",
"privateRemoveEntry",
"(",
"entry",
",",
"false",
")",
";",
"return",
"value",
";",
"}",
"public",
"void",
"setSpaceLimit",
"(",
"int",
"limit",
")",
"{",
"if",
"(",
"limit",
"<",
"this",
".",
"spaceLimit",
")",
"{",
"makeSpace",
"(",
"this",
".",
"spaceLimit",
"-",
"limit",
")",
";",
"}",
"this",
".",
"spaceLimit",
"=",
"limit",
";",
"}",
"protected",
"int",
"spaceFor",
"(",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"instanceof",
"ILRUCacheable",
")",
"{",
"return",
"(",
"(",
"ILRUCacheable",
")",
"value",
")",
".",
"getCacheFootprint",
"(",
")",
";",
"}",
"else",
"{",
"return",
"1",
";",
"}",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"toStringFillingRation",
"(",
"\"LRUCache\"",
")",
"+",
"toStringContents",
"(",
")",
";",
"}",
"protected",
"String",
"toStringContents",
"(",
")",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"int",
"length",
"=",
"this",
".",
"entryTable",
".",
"size",
"(",
")",
";",
"Object",
"[",
"]",
"unsortedKeys",
"=",
"new",
"Object",
"[",
"length",
"]",
";",
"String",
"[",
"]",
"unsortedToStrings",
"=",
"new",
"String",
"[",
"length",
"]",
";",
"Enumeration",
"e",
"=",
"keys",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"Object",
"key",
"=",
"e",
".",
"nextElement",
"(",
")",
";",
"unsortedKeys",
"[",
"i",
"]",
"=",
"key",
";",
"unsortedToStrings",
"[",
"i",
"]",
"=",
"(",
"key",
"instanceof",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaElement",
")",
"?",
"(",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaElement",
")",
"key",
")",
".",
"getElementName",
"(",
")",
":",
"key",
".",
"toString",
"(",
")",
";",
"}",
"ToStringSorter",
"sorter",
"=",
"new",
"ToStringSorter",
"(",
")",
";",
"sorter",
".",
"sort",
"(",
"unsortedKeys",
",",
"unsortedToStrings",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"String",
"toString",
"=",
"sorter",
".",
"sortedStrings",
"[",
"i",
"]",
";",
"Object",
"value",
"=",
"get",
"(",
"sorter",
".",
"sortedObjects",
"[",
"i",
"]",
")",
";",
"result",
".",
"append",
"(",
"toString",
")",
";",
"result",
".",
"append",
"(",
"\"",
"->",
"\"",
")",
";",
"result",
".",
"append",
"(",
"value",
")",
";",
"result",
".",
"append",
"(",
"\"n\"",
")",
";",
"}",
"return",
"result",
".",
"toString",
"(",
")",
";",
"}",
"public",
"String",
"toStringFillingRation",
"(",
"String",
"cacheName",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"cacheName",
")",
";",
"buffer",
".",
"append",
"(",
"'['",
")",
";",
"buffer",
".",
"append",
"(",
"getSpaceLimit",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"]:",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"NumberFormat",
".",
"getInstance",
"(",
")",
".",
"format",
"(",
"fillingRatio",
"(",
")",
")",
")",
";",
"buffer",
".",
"append",
"(",
"\"%",
"full\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"protected",
"void",
"updateTimestamp",
"(",
"LRUCacheEntry",
"entry",
")",
"{",
"entry",
".",
"timestamp",
"=",
"this",
".",
"timestampCounter",
"++",
";",
"if",
"(",
"this",
".",
"entryQueue",
"!=",
"entry",
")",
"{",
"privateRemoveEntry",
"(",
"entry",
",",
"true",
")",
";",
"privateAddEntry",
"(",
"entry",
",",
"true",
")",
";",
"}",
"return",
";",
"}",
"}",
"</s>"
] |
2,898 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"public",
"final",
"class",
"HashSetOfArray",
"implements",
"Cloneable",
"{",
"public",
"Object",
"[",
"]",
"[",
"]",
"set",
";",
"public",
"int",
"elementSize",
";",
"int",
"threshold",
";",
"public",
"HashSetOfArray",
"(",
")",
"{",
"this",
"(",
"13",
")",
";",
"}",
"public",
"HashSetOfArray",
"(",
"int",
"size",
")",
"{",
"this",
".",
"elementSize",
"=",
"0",
";",
"this",
".",
"threshold",
"=",
"size",
";",
"int",
"extraRoom",
"=",
"(",
"int",
")",
"(",
"size",
"*",
"1.75f",
")",
";",
"if",
"(",
"this",
".",
"threshold",
"==",
"extraRoom",
")",
"extraRoom",
"++",
";",
"this",
".",
"set",
"=",
"new",
"Object",
"[",
"extraRoom",
"]",
"[",
"]",
";",
"}",
"public",
"Object",
"clone",
"(",
")",
"throws",
"CloneNotSupportedException",
"{",
"HashSetOfArray",
"result",
"=",
"(",
"HashSetOfArray",
")",
"super",
".",
"clone",
"(",
")",
";",
"result",
".",
"elementSize",
"=",
"this",
".",
"elementSize",
";",
"result",
".",
"threshold",
"=",
"this",
".",
"threshold",
";",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"result",
".",
"set",
"=",
"new",
"Object",
"[",
"length",
"]",
"[",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"set",
",",
"0",
",",
"result",
".",
"set",
",",
"0",
",",
"length",
")",
";",
"return",
"result",
";",
"}",
"public",
"boolean",
"contains",
"(",
"Object",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"int",
"index",
"=",
"hashCode",
"(",
"array",
")",
"%",
"length",
";",
"int",
"arrayLength",
"=",
"array",
".",
"length",
";",
"Object",
"[",
"]",
"currentArray",
";",
"while",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentArray",
".",
"length",
"==",
"arrayLength",
"&&",
"Util",
".",
"equalArraysOrNull",
"(",
"currentArray",
",",
"array",
")",
")",
"return",
"true",
";",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"int",
"hashCode",
"(",
"Object",
"[",
"]",
"element",
")",
"{",
"return",
"hashCode",
"(",
"element",
",",
"element",
".",
"length",
")",
";",
"}",
"private",
"int",
"hashCode",
"(",
"Object",
"[",
"]",
"element",
",",
"int",
"length",
")",
"{",
"int",
"hash",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"hash",
"=",
"Util",
".",
"combineHashCodes",
"(",
"hash",
",",
"element",
"[",
"i",
"]",
".",
"hashCode",
"(",
")",
")",
";",
"return",
"hash",
"&",
"0x7FFFFFFF",
";",
"}",
"public",
"Object",
"add",
"(",
"Object",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"int",
"index",
"=",
"hashCode",
"(",
"array",
")",
"%",
"length",
";",
"int",
"arrayLength",
"=",
"array",
".",
"length",
";",
"Object",
"[",
"]",
"currentArray",
";",
"while",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentArray",
".",
"length",
"==",
"arrayLength",
"&&",
"Util",
".",
"equalArraysOrNull",
"(",
"currentArray",
",",
"array",
")",
")",
"return",
"this",
".",
"set",
"[",
"index",
"]",
"=",
"array",
";",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"this",
".",
"set",
"[",
"index",
"]",
"=",
"array",
";",
"if",
"(",
"++",
"this",
".",
"elementSize",
">",
"this",
".",
"threshold",
")",
"rehash",
"(",
")",
";",
"return",
"array",
";",
"}",
"public",
"Object",
"remove",
"(",
"Object",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"int",
"index",
"=",
"hashCode",
"(",
"array",
")",
"%",
"length",
";",
"int",
"arrayLength",
"=",
"array",
".",
"length",
";",
"Object",
"[",
"]",
"currentArray",
";",
"while",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"index",
"]",
")",
"!=",
"null",
")",
"{",
"if",
"(",
"currentArray",
".",
"length",
"==",
"arrayLength",
"&&",
"Util",
".",
"equalArraysOrNull",
"(",
"currentArray",
",",
"array",
")",
")",
"{",
"Object",
"existing",
"=",
"this",
".",
"set",
"[",
"index",
"]",
";",
"this",
".",
"elementSize",
"--",
";",
"this",
".",
"set",
"[",
"index",
"]",
"=",
"null",
";",
"rehash",
"(",
")",
";",
"return",
"existing",
";",
"}",
"if",
"(",
"++",
"index",
"==",
"length",
")",
"{",
"index",
"=",
"0",
";",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"rehash",
"(",
")",
"{",
"HashSetOfArray",
"newHashSet",
"=",
"new",
"HashSetOfArray",
"(",
"this",
".",
"elementSize",
"*",
"2",
")",
";",
"Object",
"[",
"]",
"currentArray",
";",
"for",
"(",
"int",
"i",
"=",
"this",
".",
"set",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"(",
"currentArray",
"=",
"this",
".",
"set",
"[",
"i",
"]",
")",
"!=",
"null",
")",
"newHashSet",
".",
"add",
"(",
"currentArray",
")",
";",
"this",
".",
"set",
"=",
"newHashSet",
".",
"set",
";",
"this",
".",
"threshold",
"=",
"newHashSet",
".",
"threshold",
";",
"}",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"this",
".",
"elementSize",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"Object",
"[",
"]",
"element",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"set",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"if",
"(",
"(",
"element",
"=",
"this",
".",
"set",
"[",
"i",
"]",
")",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"'{'",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"length2",
"=",
"element",
".",
"length",
";",
"j",
"<",
"length2",
";",
"j",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"element",
"[",
"j",
"]",
")",
";",
"if",
"(",
"j",
"!=",
"length2",
"-",
"1",
")",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"if",
"(",
"i",
"!=",
"length",
"-",
"1",
")",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
2,899 | [
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ClassFormatException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IClassFileAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IConstantPoolEntry",
";",
"public",
"class",
"ClassFileAttribute",
"extends",
"ClassFileStruct",
"implements",
"IClassFileAttribute",
"{",
"public",
"static",
"final",
"IClassFileAttribute",
"[",
"]",
"NO_ATTRIBUTES",
"=",
"new",
"IClassFileAttribute",
"[",
"0",
"]",
";",
"private",
"long",
"attributeLength",
";",
"private",
"int",
"attributeNameIndex",
";",
"private",
"char",
"[",
"]",
"attributeName",
";",
"public",
"ClassFileAttribute",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"IConstantPool",
"constantPool",
",",
"int",
"offset",
")",
"throws",
"ClassFormatException",
"{",
"this",
".",
"attributeNameIndex",
"=",
"u2At",
"(",
"classFileBytes",
",",
"0",
",",
"offset",
")",
";",
"this",
".",
"attributeLength",
"=",
"u4At",
"(",
"classFileBytes",
",",
"2",
",",
"offset",
")",
";",
"IConstantPoolEntry",
"constantPoolEntry",
"=",
"constantPool",
".",
"decodeEntry",
"(",
"this",
".",
"attributeNameIndex",
")",
";",
"if",
"(",
"constantPoolEntry",
".",
"getKind",
"(",
")",
"!=",
"IConstantPoolConstant",
".",
"CONSTANT_Utf8",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"INVALID_CONSTANT_POOL_ENTRY",
")",
";",
"}",
"this",
".",
"attributeName",
"=",
"constantPoolEntry",
".",
"getUtf8Value",
"(",
")",
";",
"}",
"public",
"int",
"getAttributeNameIndex",
"(",
")",
"{",
"return",
"this",
".",
"attributeNameIndex",
";",
"}",
"public",
"char",
"[",
"]",
"getAttributeName",
"(",
")",
"{",
"return",
"this",
".",
"attributeName",
";",
"}",
"public",
"long",
"getAttributeLength",
"(",
")",
"{",
"return",
"this",
".",
"attributeLength",
";",
"}",
"}",
"</s>"
] |
Subsets and Splits