id
int32
0
12.9k
code
sequencelengths
2
264k
5,100
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "public", "class", "VariablesInfo", "{", "GlobalVariable", "[", "]", "variables", ";", "int", "variableCount", ";", "char", "[", "]", "packageName", ";", "char", "[", "]", "className", ";", "ClassFile", "[", "]", "classFiles", ";", "public", "VariablesInfo", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "className", ",", "ClassFile", "[", "]", "classFiles", ",", "GlobalVariable", "[", "]", "variables", ",", "int", "variableCount", ")", "{", "this", ".", "packageName", "=", "packageName", ";", "this", ".", "className", "=", "className", ";", "this", ".", "classFiles", "=", "classFiles", ";", "this", ".", "variables", "=", "variables", ";", "this", ".", "variableCount", "=", "variableCount", ";", "}", "int", "indexOf", "(", "GlobalVariable", "var", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "variableCount", ";", "i", "++", ")", "{", "if", "(", "var", ".", "equals", "(", "this", ".", "variables", "[", "i", "]", ")", ")", "{", "return", "i", ";", "}", "}", "return", "-", "1", ";", "}", "GlobalVariable", "varNamed", "(", "char", "[", "]", "name", ")", "{", "GlobalVariable", "[", "]", "vars", "=", "this", ".", "variables", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "variableCount", ";", "i", "++", ")", "{", "GlobalVariable", "var", "=", "vars", "[", "i", "]", ";", "if", "(", "CharOperation", ".", "equals", "(", "name", ",", "var", ".", "name", ")", ")", "{", "return", "var", ";", "}", "}", "return", "null", ";", "}", "}", "</s>" ]
5,101
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "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", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "InvocationSite", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemFieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemMethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReasons", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Scope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", ";", "public", "class", "CodeSnippetScope", "extends", "BlockScope", "{", "protected", "CodeSnippetScope", "(", "int", "kind", ",", "Scope", "parent", ")", "{", "super", "(", "kind", ",", "parent", ")", ";", "}", "public", "CodeSnippetScope", "(", "BlockScope", "parent", ")", "{", "super", "(", "parent", ")", ";", "}", "public", "CodeSnippetScope", "(", "BlockScope", "parent", ",", "int", "variableCount", ")", "{", "super", "(", "parent", ",", "variableCount", ")", ";", "}", "public", "final", "boolean", "canBeSeenByForCodeSnippet", "(", "FieldBinding", "fieldBinding", ",", "TypeBinding", "receiverType", ",", "InvocationSite", "invocationSite", ",", "Scope", "scope", ")", "{", "if", "(", "fieldBinding", ".", "isPublic", "(", ")", ")", "return", "true", ";", "ReferenceBinding", "invocationType", "=", "(", "ReferenceBinding", ")", "receiverType", ";", "if", "(", "invocationType", "==", "fieldBinding", ".", "declaringClass", ")", "return", "true", ";", "if", "(", "fieldBinding", ".", "isProtected", "(", ")", ")", "{", "if", "(", "invocationType", "==", "fieldBinding", ".", "declaringClass", ")", "return", "true", ";", "if", "(", "invocationType", ".", "fPackage", "==", "fieldBinding", ".", "declaringClass", ".", "fPackage", ")", "return", "true", ";", "if", "(", "fieldBinding", ".", "declaringClass", ".", "isSuperclassOf", "(", "invocationType", ")", ")", "{", "if", "(", "invocationSite", ".", "isSuperAccess", "(", ")", ")", "return", "true", ";", "if", "(", "receiverType", "instanceof", "ArrayBinding", ")", "return", "false", ";", "if", "(", "invocationType", ".", "isSuperclassOf", "(", "(", "ReferenceBinding", ")", "receiverType", ")", ")", "return", "true", ";", "if", "(", "fieldBinding", ".", "isStatic", "(", ")", ")", "return", "true", ";", "}", "return", "false", ";", "}", "if", "(", "fieldBinding", ".", "isPrivate", "(", ")", ")", "{", "if", "(", "receiverType", "!=", "fieldBinding", ".", "declaringClass", ")", "return", "false", ";", "if", "(", "invocationType", "!=", "fieldBinding", ".", "declaringClass", ")", "{", "ReferenceBinding", "outerInvocationType", "=", "invocationType", ";", "ReferenceBinding", "temp", "=", "outerInvocationType", ".", "enclosingType", "(", ")", ";", "while", "(", "temp", "!=", "null", ")", "{", "outerInvocationType", "=", "temp", ";", "temp", "=", "temp", ".", "enclosingType", "(", ")", ";", "}", "ReferenceBinding", "outerDeclaringClass", "=", "fieldBinding", ".", "declaringClass", ";", "temp", "=", "outerDeclaringClass", ".", "enclosingType", "(", ")", ";", "while", "(", "temp", "!=", "null", ")", "{", "outerDeclaringClass", "=", "temp", ";", "temp", "=", "temp", ".", "enclosingType", "(", ")", ";", "}", "if", "(", "outerInvocationType", "!=", "outerDeclaringClass", ")", "return", "false", ";", "}", "return", "true", ";", "}", "if", "(", "invocationType", ".", "fPackage", "!=", "fieldBinding", ".", "declaringClass", ".", "fPackage", ")", "return", "false", ";", "if", "(", "receiverType", "instanceof", "ArrayBinding", ")", "return", "false", ";", "ReferenceBinding", "type", "=", "(", "ReferenceBinding", ")", "receiverType", ";", "PackageBinding", "declaringPackage", "=", "fieldBinding", ".", "declaringClass", ".", "fPackage", ";", "TypeBinding", "originalDeclaringClass", "=", "fieldBinding", ".", "declaringClass", ".", "original", "(", ")", ";", "do", "{", "if", "(", "type", ".", "isCapture", "(", ")", ")", "{", "if", "(", "originalDeclaringClass", "==", "type", ".", "erasure", "(", ")", ".", "original", "(", ")", ")", "return", "true", ";", "}", "else", "{", "if", "(", "originalDeclaringClass", "==", "type", ".", "original", "(", ")", ")", "return", "true", ";", "}", "if", "(", "declaringPackage", "!=", "type", ".", "fPackage", ")", "return", "false", ";", "}", "while", "(", "(", "type", "=", "type", ".", "superclass", "(", ")", ")", "!=", "null", ")", ";", "return", "false", ";", "}", "public", "final", "boolean", "canBeSeenByForCodeSnippet", "(", "MethodBinding", "methodBinding", ",", "TypeBinding", "receiverType", ",", "InvocationSite", "invocationSite", ",", "Scope", "scope", ")", "{", "if", "(", "methodBinding", ".", "isPublic", "(", ")", ")", "return", "true", ";", "ReferenceBinding", "invocationType", "=", "(", "ReferenceBinding", ")", "receiverType", ";", "if", "(", "invocationType", "==", "methodBinding", ".", "declaringClass", ")", "return", "true", ";", "if", "(", "methodBinding", ".", "isProtected", "(", ")", ")", "{", "if", "(", "invocationType", "==", "methodBinding", ".", "declaringClass", ")", "return", "true", ";", "if", "(", "invocationType", ".", "fPackage", "==", "methodBinding", ".", "declaringClass", ".", "fPackage", ")", "return", "true", ";", "if", "(", "methodBinding", ".", "declaringClass", ".", "isSuperclassOf", "(", "invocationType", ")", ")", "{", "if", "(", "invocationSite", ".", "isSuperAccess", "(", ")", ")", "return", "true", ";", "if", "(", "receiverType", "instanceof", "ArrayBinding", ")", "return", "false", ";", "if", "(", "invocationType", ".", "isSuperclassOf", "(", "(", "ReferenceBinding", ")", "receiverType", ")", ")", "return", "true", ";", "if", "(", "methodBinding", ".", "isStatic", "(", ")", ")", "return", "true", ";", "}", "return", "false", ";", "}", "if", "(", "methodBinding", ".", "isPrivate", "(", ")", ")", "{", "if", "(", "receiverType", "!=", "methodBinding", ".", "declaringClass", ")", "return", "false", ";", "if", "(", "invocationType", "!=", "methodBinding", ".", "declaringClass", ")", "{", "ReferenceBinding", "outerInvocationType", "=", "invocationType", ";", "ReferenceBinding", "temp", "=", "outerInvocationType", ".", "enclosingType", "(", ")", ";", "while", "(", "temp", "!=", "null", ")", "{", "outerInvocationType", "=", "temp", ";", "temp", "=", "temp", ".", "enclosingType", "(", ")", ";", "}", "ReferenceBinding", "outerDeclaringClass", "=", "methodBinding", ".", "declaringClass", ";", "temp", "=", "outerDeclaringClass", ".", "enclosingType", "(", ")", ";", "while", "(", "temp", "!=", "null", ")", "{", "outerDeclaringClass", "=", "temp", ";", "temp", "=", "temp", ".", "enclosingType", "(", ")", ";", "}", "if", "(", "outerInvocationType", "!=", "outerDeclaringClass", ")", "return", "false", ";", "}", "return", "true", ";", "}", "if", "(", "invocationType", ".", "fPackage", "!=", "methodBinding", ".", "declaringClass", ".", "fPackage", ")", "return", "false", ";", "if", "(", "receiverType", "instanceof", "ArrayBinding", ")", "return", "false", ";", "ReferenceBinding", "type", "=", "(", "ReferenceBinding", ")", "receiverType", ";", "PackageBinding", "declaringPackage", "=", "methodBinding", ".", "declaringClass", ".", "fPackage", ";", "TypeBinding", "originalDeclaringClass", "=", "methodBinding", ".", "declaringClass", ".", "original", "(", ")", ";", "do", "{", "if", "(", "type", ".", "isCapture", "(", ")", ")", "{", "if", "(", "originalDeclaringClass", "==", "type", ".", "erasure", "(", ")", ".", "original", "(", ")", ")", "return", "true", ";", "}", "else", "{", "if", "(", "originalDeclaringClass", "==", "type", ".", "original", "(", ")", ")", "return", "true", ";", "}", "if", "(", "declaringPackage", "!=", "type", ".", "fPackage", ")", "return", "false", ";", "}", "while", "(", "(", "type", "=", "type", ".", "superclass", "(", ")", ")", "!=", "null", ")", ";", "return", "false", ";", "}", "public", "final", "boolean", "canBeSeenByForCodeSnippet", "(", "ReferenceBinding", "referenceBinding", ",", "ReferenceBinding", "receiverType", ")", "{", "if", "(", "referenceBinding", ".", "isPublic", "(", ")", ")", "return", "true", ";", "if", "(", "receiverType", "==", "referenceBinding", ")", "return", "true", ";", "if", "(", "referenceBinding", ".", "isProtected", "(", ")", ")", "{", "return", "receiverType", ".", "fPackage", "==", "referenceBinding", ".", "fPackage", "||", "referenceBinding", ".", "isSuperclassOf", "(", "receiverType", ")", "||", "referenceBinding", ".", "enclosingType", "(", ")", ".", "isSuperclassOf", "(", "receiverType", ")", ";", "}", "if", "(", "referenceBinding", ".", "isPrivate", "(", ")", ")", "{", "ReferenceBinding", "outerInvocationType", "=", "receiverType", ";", "ReferenceBinding", "temp", "=", "outerInvocationType", ".", "enclosingType", "(", ")", ";", "while", "(", "temp", "!=", "null", ")", "{", "outerInvocationType", "=", "temp", ";", "temp", "=", "temp", ".", "enclosingType", "(", ")", ";", "}", "ReferenceBinding", "outerDeclaringClass", "=", "referenceBinding", ";", "temp", "=", "outerDeclaringClass", ".", "enclosingType", "(", ")", ";", "while", "(", "temp", "!=", "null", ")", "{", "outerDeclaringClass", "=", "temp", ";", "temp", "=", "temp", ".", "enclosingType", "(", ")", ";", "}", "return", "outerInvocationType", "==", "outerDeclaringClass", ";", "}", "return", "receiverType", ".", "fPackage", "==", "referenceBinding", ".", "fPackage", ";", "}", "public", "MethodBinding", "findExactMethod", "(", "ReferenceBinding", "receiverType", ",", "char", "[", "]", "selector", ",", "TypeBinding", "[", "]", "argumentTypes", ",", "InvocationSite", "invocationSite", ")", "{", "MethodBinding", "exactMethod", "=", "receiverType", ".", "getExactMethod", "(", "selector", ",", "argumentTypes", ",", "null", ")", ";", "if", "(", "exactMethod", "!=", "null", ")", "{", "if", "(", "receiverType", ".", "isInterface", "(", ")", "||", "canBeSeenByForCodeSnippet", "(", "exactMethod", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "return", "exactMethod", ";", "}", "return", "null", ";", "}", "public", "FieldBinding", "findFieldForCodeSnippet", "(", "TypeBinding", "receiverType", ",", "char", "[", "]", "fieldName", ",", "InvocationSite", "invocationSite", ")", "{", "if", "(", "receiverType", ".", "isBaseType", "(", ")", ")", "return", "null", ";", "if", "(", "receiverType", ".", "isArrayType", "(", ")", ")", "{", "TypeBinding", "leafType", "=", "receiverType", ".", "leafComponentType", "(", ")", ";", "if", "(", "leafType", "instanceof", "ReferenceBinding", ")", "if", "(", "!", "(", "(", "ReferenceBinding", ")", "leafType", ")", ".", "canBeSeenBy", "(", "this", ")", ")", "{", "return", "new", "ProblemFieldBinding", "(", "(", "ReferenceBinding", ")", "leafType", ",", "fieldName", ",", "ProblemReasons", ".", "ReceiverTypeNotVisible", ")", ";", "}", "if", "(", "CharOperation", ".", "equals", "(", "fieldName", ",", "TypeConstants", ".", "LENGTH", ")", ")", "return", "ArrayBinding", ".", "ArrayLength", ";", "return", "null", ";", "}", "ReferenceBinding", "currentType", "=", "(", "ReferenceBinding", ")", "receiverType", ";", "if", "(", "!", "currentType", ".", "canBeSeenBy", "(", "this", ")", ")", "return", "new", "ProblemFieldBinding", "(", "currentType", ",", "fieldName", ",", "ProblemReasons", ".", "ReceiverTypeNotVisible", ")", ";", "FieldBinding", "field", "=", "currentType", ".", "getField", "(", "fieldName", ",", "true", ")", ";", "if", "(", "field", "!=", "null", ")", "{", "if", "(", "canBeSeenByForCodeSnippet", "(", "field", ",", "currentType", ",", "invocationSite", ",", "this", ")", ")", "return", "field", ";", "else", "return", "new", "ProblemFieldBinding", "(", "field", ",", "field", ".", "declaringClass", ",", "fieldName", ",", "ProblemReasons", ".", "NotVisible", ")", ";", "}", "ReferenceBinding", "[", "]", "[", "]", "interfacesToVisit", "=", "null", ";", "int", "lastPosition", "=", "-", "1", ";", "FieldBinding", "visibleField", "=", "null", ";", "boolean", "keepLooking", "=", "true", ";", "boolean", "notVisible", "=", "false", ";", "while", "(", "keepLooking", ")", "{", "ReferenceBinding", "[", "]", "itsInterfaces", "=", "currentType", ".", "superInterfaces", "(", ")", ";", "if", "(", "itsInterfaces", "!=", "Binding", ".", "NO_SUPERINTERFACES", ")", "{", "if", "(", "interfacesToVisit", "==", "null", ")", "interfacesToVisit", "=", "new", "ReferenceBinding", "[", "5", "]", "[", "]", ";", "if", "(", "++", "lastPosition", "==", "interfacesToVisit", ".", "length", ")", "System", ".", "arraycopy", "(", "interfacesToVisit", ",", "0", ",", "interfacesToVisit", "=", "new", "ReferenceBinding", "[", "lastPosition", "*", "2", "]", "[", "]", ",", "0", ",", "lastPosition", ")", ";", "interfacesToVisit", "[", "lastPosition", "]", "=", "itsInterfaces", ";", "}", "if", "(", "(", "currentType", "=", "currentType", ".", "superclass", "(", ")", ")", "==", "null", ")", "break", ";", "if", "(", "(", "field", "=", "currentType", ".", "getField", "(", "fieldName", ",", "true", ")", ")", "!=", "null", ")", "{", "keepLooking", "=", "false", ";", "if", "(", "canBeSeenByForCodeSnippet", "(", "field", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "{", "if", "(", "visibleField", "==", "null", ")", "visibleField", "=", "field", ";", "else", "return", "new", "ProblemFieldBinding", "(", "visibleField", ",", "visibleField", ".", "declaringClass", ",", "fieldName", ",", "ProblemReasons", ".", "Ambiguous", ")", ";", "}", "else", "{", "notVisible", "=", "true", ";", "}", "}", "}", "if", "(", "interfacesToVisit", "!=", "null", ")", "{", "ProblemFieldBinding", "ambiguous", "=", "null", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "SimpleSet", "interfacesSeen", "=", "new", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "SimpleSet", "(", "lastPosition", "*", "2", ")", ";", "done", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "lastPosition", ";", "i", "++", ")", "{", "ReferenceBinding", "[", "]", "interfaces", "=", "interfacesToVisit", "[", "i", "]", ";", "for", "(", "int", "j", "=", "0", ",", "length", "=", "interfaces", ".", "length", ";", "j", "<", "length", ";", "j", "++", ")", "{", "ReferenceBinding", "anInterface", "=", "interfaces", "[", "j", "]", ";", "if", "(", "interfacesSeen", ".", "addIfNotIncluded", "(", "anInterface", ")", "==", "anInterface", ")", "{", "if", "(", "(", "field", "=", "anInterface", ".", "getField", "(", "fieldName", ",", "true", ")", ")", "!=", "null", ")", "{", "if", "(", "visibleField", "==", "null", ")", "{", "visibleField", "=", "field", ";", "}", "else", "{", "ambiguous", "=", "new", "ProblemFieldBinding", "(", "visibleField", ",", "visibleField", ".", "declaringClass", ",", "fieldName", ",", "ProblemReasons", ".", "Ambiguous", ")", ";", "break", "done", ";", "}", "}", "else", "{", "ReferenceBinding", "[", "]", "itsInterfaces", "=", "anInterface", ".", "superInterfaces", "(", ")", ";", "if", "(", "itsInterfaces", "!=", "Binding", ".", "NO_SUPERINTERFACES", ")", "{", "if", "(", "++", "lastPosition", "==", "interfacesToVisit", ".", "length", ")", "System", ".", "arraycopy", "(", "interfacesToVisit", ",", "0", ",", "interfacesToVisit", "=", "new", "ReferenceBinding", "[", "lastPosition", "*", "2", "]", "[", "]", ",", "0", ",", "lastPosition", ")", ";", "interfacesToVisit", "[", "lastPosition", "]", "=", "itsInterfaces", ";", "}", "}", "}", "}", "}", "if", "(", "ambiguous", "!=", "null", ")", "return", "ambiguous", ";", "}", "if", "(", "visibleField", "!=", "null", ")", "return", "visibleField", ";", "if", "(", "notVisible", ")", "return", "new", "ProblemFieldBinding", "(", "currentType", ",", "fieldName", ",", "ProblemReasons", ".", "NotVisible", ")", ";", "return", "null", ";", "}", "public", "MethodBinding", "findMethod", "(", "ReferenceBinding", "receiverType", ",", "char", "[", "]", "selector", ",", "TypeBinding", "[", "]", "argumentTypes", ",", "InvocationSite", "invocationSite", ")", "{", "MethodBinding", "methodBinding", "=", "super", ".", "findMethod", "(", "receiverType", ",", "selector", ",", "argumentTypes", ",", "invocationSite", ")", ";", "if", "(", "methodBinding", "!=", "null", "&&", "methodBinding", ".", "isValidBinding", "(", ")", ")", "if", "(", "!", "canBeSeenByForCodeSnippet", "(", "methodBinding", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "return", "new", "ProblemMethodBinding", "(", "methodBinding", ",", "selector", ",", "argumentTypes", ",", "ProblemReasons", ".", "NotVisible", ")", ";", "return", "methodBinding", ";", "}", "public", "MethodBinding", "findMethodForArray", "(", "ArrayBinding", "receiverType", ",", "char", "[", "]", "selector", ",", "TypeBinding", "[", "]", "argumentTypes", ",", "InvocationSite", "invocationSite", ")", "{", "ReferenceBinding", "object", "=", "getJavaLangObject", "(", ")", ";", "MethodBinding", "methodBinding", "=", "object", ".", "getExactMethod", "(", "selector", ",", "argumentTypes", ",", "null", ")", ";", "if", "(", "methodBinding", "!=", "null", ")", "{", "if", "(", "argumentTypes", "==", "Binding", ".", "NO_PARAMETERS", "&&", "CharOperation", ".", "equals", "(", "selector", ",", "TypeConstants", ".", "CLONE", ")", ")", "return", "new", "MethodBinding", "(", "(", "methodBinding", ".", "modifiers", "&", "~", "ClassFileConstants", ".", "AccProtected", ")", "|", "ClassFileConstants", ".", "AccPublic", ",", "TypeConstants", ".", "CLONE", ",", "methodBinding", ".", "returnType", ",", "argumentTypes", ",", "null", ",", "object", ")", ";", "if", "(", "canBeSeenByForCodeSnippet", "(", "methodBinding", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "return", "methodBinding", ";", "}", "methodBinding", "=", "findMethod", "(", "object", ",", "selector", ",", "argumentTypes", ",", "invocationSite", ")", ";", "if", "(", "methodBinding", "==", "null", ")", "return", "new", "ProblemMethodBinding", "(", "selector", ",", "argumentTypes", ",", "ProblemReasons", ".", "NotFound", ")", ";", "if", "(", "methodBinding", ".", "isValidBinding", "(", ")", ")", "{", "MethodBinding", "compatibleMethod", "=", "computeCompatibleMethod", "(", "methodBinding", ",", "argumentTypes", ",", "invocationSite", ")", ";", "if", "(", "compatibleMethod", "==", "null", ")", "return", "new", "ProblemMethodBinding", "(", "methodBinding", ",", "selector", ",", "argumentTypes", ",", "ProblemReasons", ".", "NotFound", ")", ";", "methodBinding", "=", "compatibleMethod", ";", "if", "(", "!", "canBeSeenByForCodeSnippet", "(", "methodBinding", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "return", "new", "ProblemMethodBinding", "(", "methodBinding", ",", "selector", ",", "methodBinding", ".", "parameters", ",", "ProblemReasons", ".", "NotVisible", ")", ";", "}", "return", "methodBinding", ";", "}", "public", "Binding", "getBinding", "(", "char", "[", "]", "[", "]", "compoundName", ",", "int", "mask", ",", "InvocationSite", "invocationSite", ",", "ReferenceBinding", "receiverType", ")", "{", "Binding", "binding", "=", "getBinding", "(", "compoundName", "[", "0", "]", ",", "mask", "|", "Binding", ".", "TYPE", "|", "Binding", ".", "PACKAGE", ",", "invocationSite", ",", "true", ")", ";", "invocationSite", ".", "setFieldIndex", "(", "1", ")", ";", "if", "(", "!", "binding", ".", "isValidBinding", "(", ")", "||", "binding", "instanceof", "VariableBinding", ")", "return", "binding", ";", "int", "length", "=", "compoundName", ".", "length", ";", "int", "currentIndex", "=", "1", ";", "foundType", ":", "if", "(", "binding", "instanceof", "PackageBinding", ")", "{", "PackageBinding", "packageBinding", "=", "(", "PackageBinding", ")", "binding", ";", "while", "(", "currentIndex", "<", "length", ")", "{", "binding", "=", "packageBinding", ".", "getTypeOrPackage", "(", "compoundName", "[", "currentIndex", "++", "]", ")", ";", "invocationSite", ".", "setFieldIndex", "(", "currentIndex", ")", ";", "if", "(", "binding", "==", "null", ")", "{", "if", "(", "currentIndex", "==", "length", ")", "return", "new", "ProblemReferenceBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "null", ",", "ProblemReasons", ".", "NotFound", ")", ";", "else", "return", "new", "ProblemBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "ProblemReasons", ".", "NotFound", ")", ";", "}", "if", "(", "binding", "instanceof", "ReferenceBinding", ")", "{", "if", "(", "!", "binding", ".", "isValidBinding", "(", ")", ")", "return", "new", "ProblemReferenceBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "(", "ReferenceBinding", ")", "(", "(", "ReferenceBinding", ")", "binding", ")", ".", "closestMatch", "(", ")", ",", "binding", ".", "problemId", "(", ")", ")", ";", "if", "(", "!", "this", ".", "canBeSeenByForCodeSnippet", "(", "(", "ReferenceBinding", ")", "binding", ",", "receiverType", ")", ")", "return", "new", "ProblemReferenceBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "(", "ReferenceBinding", ")", "binding", ",", "ProblemReasons", ".", "NotVisible", ")", ";", "break", "foundType", ";", "}", "packageBinding", "=", "(", "PackageBinding", ")", "binding", ";", "}", "return", "new", "ProblemReferenceBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "null", ",", "ProblemReasons", ".", "NotFound", ")", ";", "}", "while", "(", "currentIndex", "<", "length", ")", "{", "ReferenceBinding", "typeBinding", "=", "(", "ReferenceBinding", ")", "binding", ";", "char", "[", "]", "nextName", "=", "compoundName", "[", "currentIndex", "++", "]", ";", "invocationSite", ".", "setFieldIndex", "(", "currentIndex", ")", ";", "if", "(", "(", "binding", "=", "findFieldForCodeSnippet", "(", "typeBinding", ",", "nextName", ",", "invocationSite", ")", ")", "!=", "null", ")", "{", "if", "(", "!", "binding", ".", "isValidBinding", "(", ")", ")", "{", "return", "new", "ProblemFieldBinding", "(", "(", "FieldBinding", ")", "binding", ",", "(", "(", "FieldBinding", ")", "binding", ")", ".", "declaringClass", ",", "CharOperation", ".", "concatWith", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "'.'", ")", ",", "binding", ".", "problemId", "(", ")", ")", ";", "}", "break", ";", "}", "if", "(", "(", "binding", "=", "findMemberType", "(", "nextName", ",", "typeBinding", ")", ")", "==", "null", ")", "return", "new", "ProblemBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "typeBinding", ",", "ProblemReasons", ".", "NotFound", ")", ";", "if", "(", "!", "binding", ".", "isValidBinding", "(", ")", ")", "return", "new", "ProblemReferenceBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "(", "ReferenceBinding", ")", "(", "(", "ReferenceBinding", ")", "binding", ")", ".", "closestMatch", "(", ")", ",", "binding", ".", "problemId", "(", ")", ")", ";", "}", "if", "(", "(", "mask", "&", "Binding", ".", "FIELD", ")", "!=", "0", "&&", "(", "binding", "instanceof", "FieldBinding", ")", ")", "{", "FieldBinding", "field", "=", "(", "FieldBinding", ")", "binding", ";", "if", "(", "!", "field", ".", "isStatic", "(", ")", ")", "{", "return", "new", "ProblemFieldBinding", "(", "field", ",", "field", ".", "declaringClass", ",", "CharOperation", ".", "concatWith", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "'.'", ")", ",", "ProblemReasons", ".", "NonStaticReferenceInStaticContext", ")", ";", "}", "return", "binding", ";", "}", "if", "(", "(", "mask", "&", "Binding", ".", "TYPE", ")", "!=", "0", "&&", "(", "binding", "instanceof", "ReferenceBinding", ")", ")", "{", "return", "binding", ";", "}", "return", "new", "ProblemBinding", "(", "CharOperation", ".", "subarray", "(", "compoundName", ",", "0", ",", "currentIndex", ")", ",", "ProblemReasons", ".", "NotFound", ")", ";", "}", "public", "MethodBinding", "getConstructor", "(", "ReferenceBinding", "receiverType", ",", "TypeBinding", "[", "]", "argumentTypes", ",", "InvocationSite", "invocationSite", ")", "{", "MethodBinding", "methodBinding", "=", "receiverType", ".", "getExactConstructor", "(", "argumentTypes", ")", ";", "if", "(", "methodBinding", "!=", "null", ")", "{", "if", "(", "canBeSeenByForCodeSnippet", "(", "methodBinding", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "{", "return", "methodBinding", ";", "}", "}", "MethodBinding", "[", "]", "methods", "=", "receiverType", ".", "getMethods", "(", "TypeConstants", ".", "INIT", ")", ";", "if", "(", "methods", "==", "Binding", ".", "NO_METHODS", ")", "{", "return", "new", "ProblemMethodBinding", "(", "TypeConstants", ".", "INIT", ",", "argumentTypes", ",", "ProblemReasons", ".", "NotFound", ")", ";", "}", "MethodBinding", "[", "]", "compatible", "=", "new", "MethodBinding", "[", "methods", ".", "length", "]", ";", "int", "compatibleIndex", "=", "0", ";", "for", "(", "int", "i", "=", "0", ",", "length", "=", "methods", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "MethodBinding", "compatibleMethod", "=", "computeCompatibleMethod", "(", "methods", "[", "i", "]", ",", "argumentTypes", ",", "invocationSite", ")", ";", "if", "(", "compatibleMethod", "!=", "null", ")", "compatible", "[", "compatibleIndex", "++", "]", "=", "compatibleMethod", ";", "}", "if", "(", "compatibleIndex", "==", "0", ")", "return", "new", "ProblemMethodBinding", "(", "TypeConstants", ".", "INIT", ",", "argumentTypes", ",", "ProblemReasons", ".", "NotFound", ")", ";", "MethodBinding", "[", "]", "visible", "=", "new", "MethodBinding", "[", "compatibleIndex", "]", ";", "int", "visibleIndex", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "compatibleIndex", ";", "i", "++", ")", "{", "MethodBinding", "method", "=", "compatible", "[", "i", "]", ";", "if", "(", "canBeSeenByForCodeSnippet", "(", "method", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "{", "visible", "[", "visibleIndex", "++", "]", "=", "method", ";", "}", "}", "if", "(", "visibleIndex", "==", "1", ")", "{", "return", "visible", "[", "0", "]", ";", "}", "if", "(", "visibleIndex", "==", "0", ")", "{", "return", "new", "ProblemMethodBinding", "(", "compatible", "[", "0", "]", ",", "TypeConstants", ".", "INIT", ",", "compatible", "[", "0", "]", ".", "parameters", ",", "ProblemReasons", ".", "NotVisible", ")", ";", "}", "return", "mostSpecificClassMethodBinding", "(", "visible", ",", "visibleIndex", ",", "invocationSite", ")", ";", "}", "public", "FieldBinding", "getFieldForCodeSnippet", "(", "TypeBinding", "receiverType", ",", "char", "[", "]", "fieldName", ",", "InvocationSite", "invocationSite", ")", "{", "FieldBinding", "field", "=", "findFieldForCodeSnippet", "(", "receiverType", ",", "fieldName", ",", "invocationSite", ")", ";", "if", "(", "field", "==", "null", ")", "return", "new", "ProblemFieldBinding", "(", "receiverType", "instanceof", "ReferenceBinding", "?", "(", "ReferenceBinding", ")", "receiverType", ":", "null", ",", "fieldName", ",", "ProblemReasons", ".", "NotFound", ")", ";", "else", "return", "field", ";", "}", "public", "MethodBinding", "getImplicitMethod", "(", "ReferenceBinding", "receiverType", ",", "char", "[", "]", "selector", ",", "TypeBinding", "[", "]", "argumentTypes", ",", "InvocationSite", "invocationSite", ")", "{", "MethodBinding", "methodBinding", "=", "findExactMethod", "(", "receiverType", ",", "selector", ",", "argumentTypes", ",", "invocationSite", ")", ";", "if", "(", "methodBinding", "==", "null", ")", "methodBinding", "=", "findMethod", "(", "receiverType", ",", "selector", ",", "argumentTypes", ",", "invocationSite", ")", ";", "if", "(", "methodBinding", "!=", "null", ")", "{", "if", "(", "methodBinding", ".", "isValidBinding", "(", ")", ")", "if", "(", "!", "canBeSeenByForCodeSnippet", "(", "methodBinding", ",", "receiverType", ",", "invocationSite", ",", "this", ")", ")", "return", "new", "ProblemMethodBinding", "(", "methodBinding", ",", "selector", ",", "argumentTypes", ",", "ProblemReasons", ".", "NotVisible", ")", ";", "return", "methodBinding", ";", "}", "return", "new", "ProblemMethodBinding", "(", "selector", ",", "argumentTypes", ",", "ProblemReasons", ".", "NotFound", ")", ";", "}", "}", "</s>" ]
5,102
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ThisReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "CodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "Opcodes", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "InvocationSite", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "public", "class", "CodeSnippetThisReference", "extends", "ThisReference", "implements", "EvaluationConstants", ",", "InvocationSite", "{", "EvaluationContext", "evaluationContext", ";", "FieldBinding", "delegateThis", ";", "boolean", "isImplicit", ";", "public", "CodeSnippetThisReference", "(", "int", "s", ",", "int", "sourceEnd", ",", "EvaluationContext", "evaluationContext", ",", "boolean", "isImplicit", ")", "{", "super", "(", "s", ",", "sourceEnd", ")", ";", "this", ".", "evaluationContext", "=", "evaluationContext", ";", "this", ".", "isImplicit", "=", "isImplicit", ";", "}", "public", "boolean", "checkAccess", "(", "MethodScope", "methodScope", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "isConstructorCall", ")", "{", "methodScope", ".", "problemReporter", "(", ")", ".", "fieldsOrThisBeforeConstructorInvocation", "(", "this", ")", ";", "return", "false", ";", "}", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "==", "null", "||", "this", ".", "evaluationContext", ".", "isStatic", ")", "{", "methodScope", ".", "problemReporter", "(", ")", ".", "errorThisSuperInStatic", "(", "this", ")", ";", "return", "false", ";", "}", "return", "true", ";", "}", "public", "void", "generateCode", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "boolean", "valueRequired", ")", "{", "int", "pc", "=", "codeStream", ".", "position", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "aload_0", "(", ")", ";", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "this", ".", "delegateThis", ",", "null", ")", ";", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "}", "public", "TypeBinding", "[", "]", "genericTypeArguments", "(", ")", "{", "return", "null", ";", "}", "public", "boolean", "isSuperAccess", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isTypeAccess", "(", ")", "{", "return", "false", ";", "}", "public", "StringBuffer", "printExpression", "(", "int", "indent", ",", "StringBuffer", "output", ")", "{", "char", "[", "]", "declaringType", "=", "this", ".", "evaluationContext", ".", "declaringTypeName", ";", "output", ".", "append", "(", "'('", ")", ";", "if", "(", "declaringType", "==", "null", ")", "output", ".", "append", "(", "\"\"", ")", ";", "else", "output", ".", "append", "(", "declaringType", ")", ";", "return", "output", ".", "append", "(", "\")this\"", ")", ";", "}", "public", "TypeBinding", "resolveType", "(", "BlockScope", "scope", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "TypeBinding", "snippetType", "=", "null", ";", "MethodScope", "methodScope", "=", "scope", ".", "methodScope", "(", ")", ";", "if", "(", "!", "this", ".", "isImplicit", "&&", "!", "checkAccess", "(", "methodScope", ")", ")", "{", "return", "null", ";", "}", "snippetType", "=", "scope", ".", "enclosingSourceType", "(", ")", ";", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "snippetType", ",", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "==", "null", "||", "!", "this", ".", "delegateThis", ".", "isValidBinding", "(", ")", ")", "{", "methodScope", ".", "problemReporter", "(", ")", ".", "errorThisSuperInStatic", "(", "this", ")", ";", "return", "null", ";", "}", "return", "this", ".", "resolvedType", "=", "this", ".", "delegateThis", ".", "type", ";", "}", "public", "void", "setActualReceiverType", "(", "ReferenceBinding", "receiverType", ")", "{", "}", "public", "void", "setDepth", "(", "int", "depth", ")", "{", "}", "public", "void", "setFieldIndex", "(", "int", "index", ")", "{", "}", "}", "</s>" ]
5,103
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Assignment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompoundAssignment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "IntLiteral", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "QualifiedNameReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "CodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "Opcodes", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "flow", ".", "FlowInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "LocalVariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemFieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReasons", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeIds", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", ";", "public", "class", "CodeSnippetQualifiedNameReference", "extends", "QualifiedNameReference", "implements", "EvaluationConstants", ",", "ProblemReasons", "{", "EvaluationContext", "evaluationContext", ";", "FieldBinding", "delegateThis", ";", "public", "CodeSnippetQualifiedNameReference", "(", "char", "[", "]", "[", "]", "sources", ",", "long", "[", "]", "positions", ",", "int", "sourceStart", ",", "int", "sourceEnd", ",", "EvaluationContext", "evaluationContext", ")", "{", "super", "(", "sources", ",", "positions", ",", "sourceStart", ",", "sourceEnd", ")", ";", "this", ".", "evaluationContext", "=", "evaluationContext", ";", "}", "public", "TypeBinding", "checkFieldAccess", "(", "BlockScope", "scope", ")", "{", "FieldBinding", "fieldBinding", "=", "(", "FieldBinding", ")", "this", ".", "binding", ";", "MethodScope", "methodScope", "=", "scope", ".", "methodScope", "(", ")", ";", "TypeBinding", "declaringClass", "=", "fieldBinding", ".", "original", "(", ")", ".", "declaringClass", ";", "if", "(", "(", "this", ".", "indexOfFirstFieldBinding", "==", "1", "||", "declaringClass", ".", "isEnum", "(", ")", ")", "&&", "methodScope", ".", "enclosingSourceType", "(", ")", "==", "declaringClass", "&&", "methodScope", ".", "lastVisibleFieldID", ">=", "0", "&&", "fieldBinding", ".", "id", ">=", "methodScope", ".", "lastVisibleFieldID", "&&", "(", "!", "fieldBinding", ".", "isStatic", "(", ")", "||", "methodScope", ".", "isStatic", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "forwardReference", "(", "this", ",", "this", ".", "indexOfFirstFieldBinding", "-", "1", ",", "fieldBinding", ")", ";", "}", "this", ".", "bits", "&=", "~", "ASTNode", ".", "RestrictiveFlagMASK", ";", "this", ".", "bits", "|=", "Binding", ".", "FIELD", ";", "return", "getOtherFieldBindings", "(", "scope", ")", ";", "}", "public", "void", "generateCode", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "boolean", "valueRequired", ")", "{", "int", "pc", "=", "codeStream", ".", "position", ";", "if", "(", "(", "this", ".", "bits", "&", "Binding", ".", "VARIABLE", ")", "==", "0", ")", "{", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "return", ";", "}", "FieldBinding", "lastFieldBinding", "=", "this", ".", "otherBindings", "==", "null", "?", "(", "FieldBinding", ")", "this", ".", "binding", ":", "this", ".", "otherBindings", "[", "this", ".", "otherBindings", ".", "length", "-", "1", "]", ";", "if", "(", "lastFieldBinding", ".", "canBeSeenBy", "(", "getFinalReceiverType", "(", ")", ",", "this", ",", "currentScope", ")", ")", "{", "super", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "valueRequired", ")", ";", "return", ";", "}", "lastFieldBinding", "=", "generateReadSequence", "(", "currentScope", ",", "codeStream", ")", ";", "if", "(", "lastFieldBinding", "!=", "null", ")", "{", "boolean", "isStatic", "=", "lastFieldBinding", ".", "isStatic", "(", ")", ";", "Constant", "fieldConstant", "=", "lastFieldBinding", ".", "constant", "(", ")", ";", "if", "(", "fieldConstant", "!=", "Constant", ".", "NotAConstant", ")", "{", "if", "(", "!", "isStatic", ")", "{", "codeStream", ".", "invokeObjectGetClass", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateConstant", "(", "fieldConstant", ",", "this", ".", "implicitConversion", ")", ";", "}", "}", "else", "{", "boolean", "isFirst", "=", "lastFieldBinding", "==", "this", ".", "binding", "&&", "(", "this", ".", "indexOfFirstFieldBinding", "==", "1", "||", "lastFieldBinding", ".", "declaringClass", "==", "currentScope", ".", "enclosingReceiverType", "(", ")", ")", "&&", "this", ".", "otherBindings", "==", "null", ";", "TypeBinding", "requiredGenericCast", "=", "getGenericCast", "(", "this", ".", "otherBindings", "==", "null", "?", "0", ":", "this", ".", "otherBindings", ".", "length", ")", ";", "if", "(", "valueRequired", "||", "(", "!", "isFirst", "&&", "currentScope", ".", "compilerOptions", "(", ")", ".", "complianceLevel", ">=", "ClassFileConstants", ".", "JDK1_4", ")", "||", "(", "(", "this", ".", "implicitConversion", "&", "TypeIds", ".", "UNBOXING", ")", "!=", "0", ")", "||", "requiredGenericCast", "!=", "null", ")", "{", "int", "lastFieldPc", "=", "codeStream", ".", "position", ";", "if", "(", "lastFieldBinding", ".", "declaringClass", "==", "null", ")", "{", "codeStream", ".", "arraylength", "(", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "codeStream", ".", "pop", "(", ")", ";", "}", "}", "else", "{", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "lastFieldBinding", ")", ";", "if", "(", "requiredGenericCast", "!=", "null", ")", "codeStream", ".", "checkcast", "(", "requiredGenericCast", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "boolean", "isUnboxing", "=", "(", "this", ".", "implicitConversion", "&", "TypeIds", ".", "UNBOXING", ")", "!=", "0", ";", "if", "(", "isUnboxing", ")", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "switch", "(", "isUnboxing", "?", "postConversionType", "(", "currentScope", ")", ".", "id", ":", "lastFieldBinding", ".", "type", ".", "id", ")", "{", "case", "T_long", ":", "case", "T_double", ":", "codeStream", ".", "pop2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "pop", "(", ")", ";", "}", "}", "}", "int", "fieldPosition", "=", "(", "int", ")", "(", "this", ".", "sourcePositions", "[", "this", ".", "sourcePositions", ".", "length", "-", "1", "]", ">>>", "32", ")", ";", "codeStream", ".", "recordPositionsFrom", "(", "lastFieldPc", ",", "fieldPosition", ")", ";", "}", "else", "{", "if", "(", "!", "isStatic", ")", "{", "codeStream", ".", "invokeObjectGetClass", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "}", "}", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "}", "public", "void", "generateAssignment", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "Assignment", "assignment", ",", "boolean", "valueRequired", ")", "{", "FieldBinding", "lastFieldBinding", "=", "this", ".", "otherBindings", "==", "null", "?", "(", "FieldBinding", ")", "this", ".", "binding", ":", "this", ".", "otherBindings", "[", "this", ".", "otherBindings", ".", "length", "-", "1", "]", ";", "if", "(", "lastFieldBinding", ".", "canBeSeenBy", "(", "getFinalReceiverType", "(", ")", ",", "this", ",", "currentScope", ")", ")", "{", "super", ".", "generateAssignment", "(", "currentScope", ",", "codeStream", ",", "assignment", ",", "valueRequired", ")", ";", "return", ";", "}", "lastFieldBinding", "=", "generateReadSequence", "(", "currentScope", ",", "codeStream", ")", ";", "codeStream", ".", "generateEmulationForField", "(", "lastFieldBinding", ")", ";", "codeStream", ".", "swap", "(", ")", ";", "assignment", ".", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "if", "(", "valueRequired", ")", "{", "switch", "(", "lastFieldBinding", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2_x2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup_x2", "(", ")", ";", "break", ";", "}", "}", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "lastFieldBinding", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "}", "public", "void", "generateCompoundAssignment", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "Expression", "expression", ",", "int", "operator", ",", "int", "assignmentImplicitConversion", ",", "boolean", "valueRequired", ")", "{", "FieldBinding", "lastFieldBinding", "=", "this", ".", "otherBindings", "==", "null", "?", "(", "FieldBinding", ")", "this", ".", "binding", ":", "this", ".", "otherBindings", "[", "this", ".", "otherBindings", ".", "length", "-", "1", "]", ";", "if", "(", "lastFieldBinding", ".", "canBeSeenBy", "(", "getFinalReceiverType", "(", ")", ",", "this", ",", "currentScope", ")", ")", "{", "super", ".", "generateCompoundAssignment", "(", "currentScope", ",", "codeStream", ",", "expression", ",", "operator", ",", "assignmentImplicitConversion", ",", "valueRequired", ")", ";", "return", ";", "}", "lastFieldBinding", "=", "generateReadSequence", "(", "currentScope", ",", "codeStream", ")", ";", "if", "(", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "generateEmulationForField", "(", "lastFieldBinding", ")", ";", "codeStream", ".", "swap", "(", ")", ";", "codeStream", ".", "aconst_null", "(", ")", ";", "codeStream", ".", "swap", "(", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "lastFieldBinding", ")", ";", "}", "else", "{", "codeStream", ".", "generateEmulationForField", "(", "lastFieldBinding", ")", ";", "codeStream", ".", "swap", "(", ")", ";", "codeStream", ".", "dup", "(", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "lastFieldBinding", ")", ";", "}", "int", "operationTypeID", ";", "if", "(", "(", "operationTypeID", "=", "(", "this", ".", "implicitConversion", "&", "IMPLICIT_CONVERSION_MASK", ")", ">>", "4", ")", "==", "T_JavaLangString", ")", "{", "codeStream", ".", "generateStringConcatenationAppend", "(", "currentScope", ",", "null", ",", "expression", ")", ";", "}", "else", "{", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "if", "(", "expression", "==", "IntLiteral", ".", "One", ")", "{", "codeStream", ".", "generateConstant", "(", "expression", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "}", "codeStream", ".", "sendOperator", "(", "operator", ",", "operationTypeID", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "assignmentImplicitConversion", ")", ";", "}", "if", "(", "valueRequired", ")", "{", "switch", "(", "lastFieldBinding", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2_x2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup_x2", "(", ")", ";", "break", ";", "}", "}", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "lastFieldBinding", ")", ";", "}", "public", "void", "generatePostIncrement", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "CompoundAssignment", "postIncrement", ",", "boolean", "valueRequired", ")", "{", "FieldBinding", "lastFieldBinding", "=", "this", ".", "otherBindings", "==", "null", "?", "(", "FieldBinding", ")", "this", ".", "binding", ":", "this", ".", "otherBindings", "[", "this", ".", "otherBindings", ".", "length", "-", "1", "]", ";", "if", "(", "lastFieldBinding", ".", "canBeSeenBy", "(", "getFinalReceiverType", "(", ")", ",", "this", ",", "currentScope", ")", ")", "{", "super", ".", "generatePostIncrement", "(", "currentScope", ",", "codeStream", ",", "postIncrement", ",", "valueRequired", ")", ";", "return", ";", "}", "lastFieldBinding", "=", "generateReadSequence", "(", "currentScope", ",", "codeStream", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "lastFieldBinding", ")", ";", "if", "(", "valueRequired", ")", "{", "switch", "(", "lastFieldBinding", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup", "(", ")", ";", "break", ";", "}", "}", "codeStream", ".", "generateEmulationForField", "(", "lastFieldBinding", ")", ";", "if", "(", "(", "lastFieldBinding", ".", "type", "==", "TypeBinding", ".", "LONG", ")", "||", "(", "lastFieldBinding", ".", "type", "==", "TypeBinding", ".", "DOUBLE", ")", ")", "{", "codeStream", ".", "dup_x2", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "if", "(", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "else", "{", "generateReadSequence", "(", "currentScope", ",", "codeStream", ")", ";", "}", "codeStream", ".", "dup_x2", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "else", "{", "codeStream", ".", "dup_x1", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "if", "(", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "else", "{", "generateReadSequence", "(", "currentScope", ",", "codeStream", ")", ";", "}", "codeStream", ".", "dup_x1", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "codeStream", ".", "generateConstant", "(", "postIncrement", ".", "expression", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "codeStream", ".", "sendOperator", "(", "postIncrement", ".", "operator", ",", "lastFieldBinding", ".", "type", ".", "id", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "postIncrement", ".", "preAssignImplicitConversion", ")", ";", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "lastFieldBinding", ")", ";", "}", "public", "FieldBinding", "generateReadSequence", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ")", "{", "int", "otherBindingsCount", "=", "this", ".", "otherBindings", "==", "null", "?", "0", ":", "this", ".", "otherBindings", ".", "length", ";", "boolean", "needValue", "=", "otherBindingsCount", "==", "0", "||", "!", "this", ".", "otherBindings", "[", "0", "]", ".", "isStatic", "(", ")", ";", "FieldBinding", "lastFieldBinding", ";", "TypeBinding", "lastGenericCast", ";", "TypeBinding", "lastReceiverType", ";", "boolean", "complyTo14", "=", "currentScope", ".", "compilerOptions", "(", ")", ".", "complianceLevel", ">=", "ClassFileConstants", ".", "JDK1_4", ";", "switch", "(", "this", ".", "bits", "&", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "lastFieldBinding", "=", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "original", "(", ")", ";", "lastGenericCast", "=", "this", ".", "genericCast", ";", "lastReceiverType", "=", "this", ".", "actualReceiverType", ";", "if", "(", "lastFieldBinding", ".", "constant", "(", ")", "!=", "Constant", ".", "NotAConstant", ")", "{", "break", ";", "}", "if", "(", "needValue", ")", "{", "if", "(", "lastFieldBinding", ".", "canBeSeenBy", "(", "this", ".", "actualReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "if", "(", "!", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "ReferenceBinding", "targetType", "=", "currentScope", ".", "enclosingSourceType", "(", ")", ".", "enclosingTypeAt", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", ">>", "DepthSHIFT", ")", ";", "Object", "[", "]", "emulationPath", "=", "currentScope", ".", "getEmulationPath", "(", "targetType", ",", "true", ",", "false", ")", ";", "codeStream", ".", "generateOuterAccess", "(", "emulationPath", ",", "this", ",", "targetType", ",", "currentScope", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "}", "}", "else", "{", "if", "(", "!", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "needImplementation", "(", "this", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "}", "else", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "}", "}", "break", ";", "case", "Binding", ".", "LOCAL", ":", "lastFieldBinding", "=", "null", ";", "lastGenericCast", "=", "null", ";", "LocalVariableBinding", "localBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ";", "lastReceiverType", "=", "localBinding", ".", "type", ";", "if", "(", "!", "needValue", ")", "break", ";", "Constant", "localConstant", "=", "localBinding", ".", "constant", "(", ")", ";", "if", "(", "localConstant", "!=", "Constant", ".", "NotAConstant", ")", "{", "codeStream", ".", "generateConstant", "(", "localConstant", ",", "0", ")", ";", "}", "else", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "VariableBinding", "[", "]", "path", "=", "currentScope", ".", "getEmulationPath", "(", "localBinding", ")", ";", "codeStream", ".", "generateOuterAccess", "(", "path", ",", "this", ",", "localBinding", ",", "currentScope", ")", ";", "}", "else", "{", "codeStream", ".", "load", "(", "localBinding", ")", ";", "}", "}", "break", ";", "default", ":", "return", "null", ";", "}", "int", "positionsLength", "=", "this", ".", "sourcePositions", ".", "length", ";", "FieldBinding", "initialFieldBinding", "=", "lastFieldBinding", ";", "if", "(", "this", ".", "otherBindings", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "otherBindingsCount", ";", "i", "++", ")", "{", "int", "pc", "=", "codeStream", ".", "position", ";", "FieldBinding", "nextField", "=", "this", ".", "otherBindings", "[", "i", "]", ".", "original", "(", ")", ";", "TypeBinding", "nextGenericCast", "=", "this", ".", "otherGenericCasts", "==", "null", "?", "null", ":", "this", ".", "otherGenericCasts", "[", "i", "]", ";", "if", "(", "lastFieldBinding", "!=", "null", ")", "{", "needValue", "=", "!", "nextField", ".", "isStatic", "(", ")", ";", "Constant", "fieldConstant", "=", "lastFieldBinding", ".", "constant", "(", ")", ";", "if", "(", "fieldConstant", "!=", "Constant", ".", "NotAConstant", ")", "{", "if", "(", "i", ">", "0", "&&", "!", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "invokeObjectGetClass", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "if", "(", "needValue", ")", "{", "codeStream", ".", "generateConstant", "(", "fieldConstant", ",", "0", ")", ";", "}", "}", "else", "{", "if", "(", "needValue", "||", "(", "i", ">", "0", "&&", "complyTo14", ")", "||", "lastGenericCast", "!=", "null", ")", "{", "if", "(", "lastFieldBinding", ".", "canBeSeenBy", "(", "lastReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "MethodBinding", "accessor", "=", "this", ".", "syntheticReadAccessors", "==", "null", "?", "null", ":", "this", ".", "syntheticReadAccessors", "[", "i", "]", ";", "if", "(", "accessor", "==", "null", ")", "{", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "lastFieldBinding", ",", "lastReceiverType", ",", "i", "==", "0", "&&", "this", ".", "indexOfFirstFieldBinding", "==", "1", ")", ";", "if", "(", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getstatic", ",", "lastFieldBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "lastFieldBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "}", "else", "{", "codeStream", ".", "invoke", "(", "Opcodes", ".", "OPC_invokestatic", ",", "accessor", ",", "null", ")", ";", "}", "}", "else", "{", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "lastFieldBinding", ")", ";", "}", "if", "(", "lastGenericCast", "!=", "null", ")", "{", "codeStream", ".", "checkcast", "(", "lastGenericCast", ")", ";", "lastReceiverType", "=", "lastGenericCast", ";", "}", "else", "{", "lastReceiverType", "=", "lastFieldBinding", ".", "type", ";", "}", "if", "(", "!", "needValue", ")", "codeStream", ".", "pop", "(", ")", ";", "}", "else", "{", "if", "(", "lastFieldBinding", "==", "initialFieldBinding", ")", "{", "if", "(", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "if", "(", "initialFieldBinding", ".", "declaringClass", "!=", "this", ".", "actualReceiverType", ".", "erasure", "(", ")", ")", "{", "if", "(", "lastFieldBinding", ".", "canBeSeenBy", "(", "lastReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "MethodBinding", "accessor", "=", "this", ".", "syntheticReadAccessors", "==", "null", "?", "null", ":", "this", ".", "syntheticReadAccessors", "[", "i", "]", ";", "if", "(", "accessor", "==", "null", ")", "{", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "lastFieldBinding", ",", "lastReceiverType", ",", "i", "==", "0", "&&", "this", ".", "indexOfFirstFieldBinding", "==", "1", ")", ";", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getstatic", ",", "lastFieldBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "codeStream", ".", "invoke", "(", "Opcodes", ".", "OPC_invokestatic", ",", "accessor", ",", "null", ")", ";", "}", "}", "else", "{", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "lastFieldBinding", ")", ";", "}", "codeStream", ".", "pop", "(", ")", ";", "}", "}", "}", "else", "if", "(", "!", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "invokeObjectGetClass", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "lastReceiverType", "=", "lastFieldBinding", ".", "type", ";", "}", "if", "(", "(", "positionsLength", "-", "otherBindingsCount", "+", "i", "-", "1", ")", ">=", "0", ")", "{", "int", "fieldPosition", "=", "(", "int", ")", "(", "this", ".", "sourcePositions", "[", "positionsLength", "-", "otherBindingsCount", "+", "i", "-", "1", "]", ">>>", "32", ")", ";", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "fieldPosition", ")", ";", "}", "}", "}", "lastFieldBinding", "=", "nextField", ";", "lastGenericCast", "=", "nextGenericCast", ";", "if", "(", "lastFieldBinding", "!=", "null", "&&", "!", "lastFieldBinding", ".", "canBeSeenBy", "(", "lastReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "if", "(", "lastFieldBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "}", "}", "}", "return", "lastFieldBinding", ";", "}", "public", "void", "generateReceiver", "(", "CodeStream", "codeStream", ")", "{", "codeStream", ".", "aload_0", "(", ")", ";", "if", "(", "this", ".", "delegateThis", "!=", "null", ")", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "this", ".", "delegateThis", ",", "null", ")", ";", "}", "}", "public", "TypeBinding", "getOtherFieldBindings", "(", "BlockScope", "scope", ")", "{", "int", "length", "=", "this", ".", "tokens", ".", "length", ";", "if", "(", "(", "this", ".", "bits", "&", "Binding", ".", "FIELD", ")", "!=", "0", ")", "{", "if", "(", "!", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "isStatic", "(", ")", ")", "{", "if", "(", "this", ".", "indexOfFirstFieldBinding", "==", "1", ")", "{", "if", "(", "scope", ".", "methodScope", "(", ")", ".", "isStatic", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "staticFieldAccessToNonStaticVariable", "(", "this", ",", "(", "FieldBinding", ")", "this", ".", "binding", ")", ";", "return", "null", ";", "}", "}", "else", "{", "scope", ".", "problemReporter", "(", ")", ".", "staticFieldAccessToNonStaticVariable", "(", "this", ",", "(", "FieldBinding", ")", "this", ".", "binding", ")", ";", "return", "null", ";", "}", "}", "if", "(", "isFieldUseDeprecated", "(", "(", "FieldBinding", ")", "this", ".", "binding", ",", "scope", ",", "(", "this", ".", "bits", "&", "IsStrictlyAssigned", ")", "!=", "0", "&&", "this", ".", "indexOfFirstFieldBinding", "==", "length", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "deprecatedField", "(", "(", "FieldBinding", ")", "this", ".", "binding", ",", "this", ")", ";", "}", "}", "TypeBinding", "type", "=", "(", "(", "VariableBinding", ")", "this", ".", "binding", ")", ".", "type", ";", "int", "index", "=", "this", ".", "indexOfFirstFieldBinding", ";", "if", "(", "index", "==", "length", ")", "{", "this", ".", "constant", "=", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "constant", "(", ")", ";", "return", "type", ";", "}", "int", "otherBindingsLength", "=", "length", "-", "index", ";", "this", ".", "otherBindings", "=", "new", "FieldBinding", "[", "otherBindingsLength", "]", ";", "this", ".", "constant", "=", "(", "(", "VariableBinding", ")", "this", ".", "binding", ")", ".", "constant", "(", ")", ";", "while", "(", "index", "<", "length", ")", "{", "char", "[", "]", "token", "=", "this", ".", "tokens", "[", "index", "]", ";", "if", "(", "type", "==", "null", ")", "return", "null", ";", "FieldBinding", "field", "=", "scope", ".", "getField", "(", "type", ",", "token", ",", "this", ")", ";", "int", "place", "=", "index", "-", "this", ".", "indexOfFirstFieldBinding", ";", "this", ".", "otherBindings", "[", "place", "]", "=", "field", ";", "if", "(", "!", "field", ".", "isValidBinding", "(", ")", ")", "{", "CodeSnippetScope", "localScope", "=", "new", "CodeSnippetScope", "(", "scope", ")", ";", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "!=", "null", ")", "{", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "scope", ".", "enclosingSourceType", "(", ")", ",", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "this", ".", "actualReceiverType", "=", "this", ".", "delegateThis", ".", "type", ";", "}", "else", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "scope", ".", "problemReporter", "(", ")", ".", "invalidField", "(", "this", ",", "field", ",", "index", ",", "type", ")", ";", "return", "null", ";", "}", "}", "field", "=", "localScope", ".", "getFieldForCodeSnippet", "(", "this", ".", "delegateThis", ".", "type", ",", "token", ",", "this", ")", ";", "this", ".", "otherBindings", "[", "place", "]", "=", "field", ";", "}", "if", "(", "field", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "isFieldUseDeprecated", "(", "field", ",", "scope", ",", "(", "this", ".", "bits", "&", "IsStrictlyAssigned", ")", "!=", "0", "&&", "index", "+", "1", "==", "length", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "deprecatedField", "(", "field", ",", "this", ")", ";", "}", "if", "(", "this", ".", "constant", "!=", "Constant", ".", "NotAConstant", ")", "{", "this", ".", "constant", "=", "field", ".", "constant", "(", ")", ";", "}", "type", "=", "field", ".", "type", ";", "index", "++", ";", "}", "else", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "scope", ".", "problemReporter", "(", ")", ".", "invalidField", "(", "this", ",", "field", ",", "index", ",", "type", ")", ";", "return", "null", ";", "}", "}", "return", "(", "this", ".", "otherBindings", "[", "otherBindingsLength", "-", "1", "]", ")", ".", "type", ";", "}", "public", "void", "manageSyntheticAccessIfNecessary", "(", "BlockScope", "currentScope", ",", "FieldBinding", "fieldBinding", ",", "int", "index", ",", "FlowInfo", "flowInfo", ")", "{", "}", "public", "TypeBinding", "reportError", "(", "BlockScope", "scope", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "!=", "null", ")", "{", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "scope", ".", "enclosingSourceType", "(", ")", ",", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "this", ".", "actualReceiverType", "=", "this", ".", "delegateThis", ".", "type", ";", "}", "else", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "if", "(", "(", "this", ".", "binding", "instanceof", "ProblemFieldBinding", "&&", "(", "(", "ProblemFieldBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "NotFound", ")", "||", "(", "this", ".", "binding", "instanceof", "ProblemBinding", "&&", "(", "(", "ProblemBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "NotFound", ")", ")", "{", "FieldBinding", "fieldBinding", "=", "scope", ".", "getField", "(", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "tokens", "[", "0", "]", ",", "this", ")", ";", "if", "(", "!", "fieldBinding", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "(", "(", "ProblemFieldBinding", ")", "fieldBinding", ")", ".", "problemId", "(", ")", "==", "NotVisible", ")", "{", "CodeSnippetScope", "localScope", "=", "new", "CodeSnippetScope", "(", "scope", ")", ";", "this", ".", "binding", "=", "localScope", ".", "getFieldForCodeSnippet", "(", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "tokens", "[", "0", "]", ",", "this", ")", ";", "if", "(", "this", ".", "binding", ".", "isValidBinding", "(", ")", ")", "{", "return", "checkFieldAccess", "(", "scope", ")", ";", "}", "else", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "}", "else", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "}", "this", ".", "binding", "=", "fieldBinding", ";", "return", "checkFieldAccess", "(", "scope", ")", ";", "}", "TypeBinding", "result", ";", "if", "(", "this", ".", "binding", "instanceof", "ProblemFieldBinding", "&&", "(", "(", "ProblemFieldBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "NotVisible", ")", "{", "CodeSnippetScope", "localScope", "=", "new", "CodeSnippetScope", "(", "scope", ")", ";", "if", "(", "(", "this", ".", "binding", "=", "localScope", ".", "getBinding", "(", "this", ".", "tokens", ",", "this", ".", "bits", "&", "RestrictiveFlagMASK", ",", "this", ",", "(", "ReferenceBinding", ")", "this", ".", "delegateThis", ".", "type", ")", ")", ".", "isValidBinding", "(", ")", ")", "{", "this", ".", "bits", "&=", "~", "RestrictiveFlagMASK", ";", "this", ".", "bits", "|=", "Binding", ".", "FIELD", ";", "result", "=", "getOtherFieldBindings", "(", "scope", ")", ";", "}", "else", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "if", "(", "result", "!=", "null", "&&", "result", ".", "isValidBinding", "(", ")", ")", "{", "return", "result", ";", "}", "}", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "}", "</s>" ]
5,104
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "CompilationResult", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TagBits", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeVariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "AbortType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ";", "public", "class", "CodeSnippetTypeDeclaration", "extends", "TypeDeclaration", "{", "public", "CodeSnippetTypeDeclaration", "(", "CompilationResult", "compilationResult", ")", "{", "super", "(", "compilationResult", ")", ";", "}", "public", "void", "generateCode", "(", "ClassFile", "enclosingClassFile", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "ASTNode", ".", "HasBeenGenerated", ")", "!=", "0", ")", "return", ";", "this", ".", "bits", "|=", "ASTNode", ".", "HasBeenGenerated", ";", "if", "(", "this", ".", "ignoreFurtherInvestigation", ")", "{", "if", "(", "this", ".", "binding", "==", "null", ")", "return", ";", "CodeSnippetClassFile", ".", "createProblemType", "(", "this", ",", "this", ".", "scope", ".", "referenceCompilationUnit", "(", ")", ".", "compilationResult", ")", ";", "return", ";", "}", "try", "{", "ClassFile", "classFile", "=", "new", "CodeSnippetClassFile", "(", "this", ".", "binding", ",", "enclosingClassFile", ",", "false", ")", ";", "classFile", ".", "addFieldInfos", "(", ")", ";", "if", "(", "this", ".", "binding", ".", "isMemberType", "(", ")", ")", "{", "classFile", ".", "recordInnerClasses", "(", "this", ".", "binding", ")", ";", "}", "else", "if", "(", "this", ".", "binding", ".", "isLocalType", "(", ")", ")", "{", "enclosingClassFile", ".", "recordInnerClasses", "(", "this", ".", "binding", ")", ";", "classFile", ".", "recordInnerClasses", "(", "this", ".", "binding", ")", ";", "}", "TypeVariableBinding", "[", "]", "typeVariables", "=", "this", ".", "binding", ".", "typeVariables", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "typeVariables", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "TypeVariableBinding", "typeVariableBinding", "=", "typeVariables", "[", "i", "]", ";", "if", "(", "(", "typeVariableBinding", ".", "tagBits", "&", "TagBits", ".", "ContainsNestedTypeReferences", ")", "!=", "0", ")", "{", "Util", ".", "recordNestedType", "(", "classFile", ",", "typeVariableBinding", ")", ";", "}", "}", "if", "(", "this", ".", "memberTypes", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "memberTypes", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "TypeDeclaration", "memberType", "=", "this", ".", "memberTypes", "[", "i", "]", ";", "classFile", ".", "recordInnerClasses", "(", "memberType", ".", "binding", ")", ";", "memberType", ".", "generateCode", "(", "this", ".", "scope", ",", "classFile", ")", ";", "}", "}", "classFile", ".", "setForMethodInfos", "(", ")", ";", "if", "(", "this", ".", "methods", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "methods", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "this", ".", "methods", "[", "i", "]", ".", "generateCode", "(", "this", ".", "scope", ",", "classFile", ")", ";", "}", "}", "classFile", ".", "addSpecialMethods", "(", ")", ";", "if", "(", "this", ".", "ignoreFurtherInvestigation", ")", "{", "throw", "new", "AbortType", "(", "this", ".", "scope", ".", "referenceCompilationUnit", "(", ")", ".", "compilationResult", ",", "null", ")", ";", "}", "classFile", ".", "addAttributes", "(", ")", ";", "this", ".", "scope", ".", "referenceCompilationUnit", "(", ")", ".", "compilationResult", ".", "record", "(", "this", ".", "binding", ".", "constantPoolName", "(", ")", ",", "classFile", ")", ";", "}", "catch", "(", "AbortType", "e", ")", "{", "if", "(", "this", ".", "binding", "==", "null", ")", "return", ";", "CodeSnippetClassFile", ".", "createProblemType", "(", "this", ",", "this", ".", "scope", ".", "referenceCompilationUnit", "(", ")", ".", "compilationResult", ")", ";", "}", "}", "}", "</s>" ]
5,105
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileReader", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFormatException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "INameEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "NameEnvironmentAnswer", ";", "public", "class", "CodeSnippetEnvironment", "implements", "INameEnvironment", ",", "EvaluationConstants", "{", "INameEnvironment", "env", ";", "EvaluationContext", "context", ";", "public", "CodeSnippetEnvironment", "(", "INameEnvironment", "env", ",", "EvaluationContext", "context", ")", "{", "this", ".", "env", "=", "env", ";", "this", ".", "context", "=", "context", ";", "}", "public", "NameEnvironmentAnswer", "findType", "(", "char", "[", "]", "[", "]", "compoundTypeName", ")", "{", "NameEnvironmentAnswer", "result", "=", "this", ".", "env", ".", "findType", "(", "compoundTypeName", ")", ";", "if", "(", "result", "!=", "null", ")", "{", "return", "result", ";", "}", "if", "(", "CharOperation", ".", "equals", "(", "compoundTypeName", ",", "ROOT_COMPOUND_NAME", ")", ")", "{", "IBinaryType", "binary", "=", "this", ".", "context", ".", "getRootCodeSnippetBinary", "(", ")", ";", "if", "(", "binary", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "return", "new", "NameEnvironmentAnswer", "(", "binary", ",", "null", ")", ";", "}", "}", "VariablesInfo", "installedVars", "=", "this", ".", "context", ".", "installedVars", ";", "ClassFile", "[", "]", "classFiles", "=", "installedVars", ".", "classFiles", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "classFiles", ".", "length", ";", "i", "++", ")", "{", "ClassFile", "classFile", "=", "classFiles", "[", "i", "]", ";", "if", "(", "CharOperation", ".", "equals", "(", "compoundTypeName", ",", "classFile", ".", "getCompoundName", "(", ")", ")", ")", "{", "ClassFileReader", "binary", "=", "null", ";", "try", "{", "binary", "=", "new", "ClassFileReader", "(", "classFile", ".", "getBytes", "(", ")", ",", "null", ")", ";", "}", "catch", "(", "ClassFormatException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "return", "null", ";", "}", "return", "new", "NameEnvironmentAnswer", "(", "binary", ",", "null", ")", ";", "}", "}", "return", "null", ";", "}", "public", "NameEnvironmentAnswer", "findType", "(", "char", "[", "]", "typeName", ",", "char", "[", "]", "[", "]", "packageName", ")", "{", "NameEnvironmentAnswer", "result", "=", "this", ".", "env", ".", "findType", "(", "typeName", ",", "packageName", ")", ";", "if", "(", "result", "!=", "null", ")", "{", "return", "result", ";", "}", "return", "findType", "(", "CharOperation", ".", "arrayConcat", "(", "packageName", ",", "typeName", ")", ")", ";", "}", "public", "boolean", "isPackage", "(", "char", "[", "]", "[", "]", "parentPackageName", ",", "char", "[", "]", "packageName", ")", "{", "return", "this", ".", "env", ".", "isPackage", "(", "parentPackageName", ",", "packageName", ")", ";", "}", "public", "void", "cleanup", "(", ")", "{", "this", ".", "env", ".", "cleanup", "(", ")", ";", "}", "}", "</s>" ]
5,106
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "public", "class", "InstallException", "extends", "Exception", "{", "private", "static", "final", "long", "serialVersionUID", "=", "-", "5870897747810654203L", ";", "public", "InstallException", "(", ")", "{", "super", "(", ")", ";", "}", "public", "InstallException", "(", "String", "s", ")", "{", "super", "(", "s", ")", ";", "}", "}", "</s>" ]
5,107
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "AllocationExpression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CastExpression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ParameterizedQualifiedTypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Wildcard", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "CodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "Opcodes", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "flow", ".", "FlowInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemMethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReasons", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeConstants", ";", "public", "class", "CodeSnippetAllocationExpression", "extends", "AllocationExpression", "implements", "ProblemReasons", ",", "EvaluationConstants", "{", "EvaluationContext", "evaluationContext", ";", "FieldBinding", "delegateThis", ";", "public", "CodeSnippetAllocationExpression", "(", "EvaluationContext", "evaluationContext", ")", "{", "this", ".", "evaluationContext", "=", "evaluationContext", ";", "}", "public", "void", "generateCode", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "boolean", "valueRequired", ")", "{", "int", "pc", "=", "codeStream", ".", "position", ";", "MethodBinding", "codegenBinding", "=", "this", ".", "binding", ".", "original", "(", ")", ";", "ReferenceBinding", "allocatedType", "=", "codegenBinding", ".", "declaringClass", ";", "if", "(", "codegenBinding", ".", "canBeSeenBy", "(", "allocatedType", ",", "this", ",", "currentScope", ")", ")", "{", "codeStream", ".", "new_", "(", "allocatedType", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "dup", "(", ")", ";", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "type", ".", "sourceStart", ")", ";", "if", "(", "allocatedType", ".", "isNestedType", "(", ")", ")", "{", "codeStream", ".", "generateSyntheticEnclosingInstanceValues", "(", "currentScope", ",", "allocatedType", ",", "enclosingInstance", "(", ")", ",", "this", ")", ";", "}", "if", "(", "this", ".", "arguments", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "count", "=", "this", ".", "arguments", ".", "length", ";", "i", "<", "count", ";", "i", "++", ")", "{", "this", ".", "arguments", "[", "i", "]", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "}", "}", "if", "(", "allocatedType", ".", "isNestedType", "(", ")", ")", "{", "codeStream", ".", "generateSyntheticOuterArgumentValues", "(", "currentScope", ",", "allocatedType", ",", "this", ")", ";", "}", "codeStream", ".", "invoke", "(", "Opcodes", ".", "OPC_invokespecial", ",", "codegenBinding", ",", "null", ")", ";", "}", "else", "{", "codeStream", ".", "generateEmulationForConstructor", "(", "currentScope", ",", "codegenBinding", ")", ";", "if", "(", "this", ".", "arguments", "!=", "null", ")", "{", "int", "argsLength", "=", "this", ".", "arguments", ".", "length", ";", "codeStream", ".", "generateInlinedValue", "(", "argsLength", ")", ";", "codeStream", ".", "newArray", "(", "currentScope", ".", "createArrayType", "(", "currentScope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_OBJECT", ",", "3", ")", ",", "1", ")", ")", ";", "codeStream", ".", "dup", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "argsLength", ";", "i", "++", ")", "{", "codeStream", ".", "generateInlinedValue", "(", "i", ")", ";", "this", ".", "arguments", "[", "i", "]", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "TypeBinding", "parameterBinding", "=", "codegenBinding", ".", "parameters", "[", "i", "]", ";", "if", "(", "parameterBinding", ".", "isBaseType", "(", ")", "&&", "parameterBinding", "!=", "TypeBinding", ".", "NULL", ")", "{", "codeStream", ".", "generateBoxingConversion", "(", "codegenBinding", ".", "parameters", "[", "i", "]", ".", "id", ")", ";", "}", "codeStream", ".", "aastore", "(", ")", ";", "if", "(", "i", "<", "argsLength", "-", "1", ")", "{", "codeStream", ".", "dup", "(", ")", ";", "}", "}", "}", "else", "{", "codeStream", ".", "generateInlinedValue", "(", "0", ")", ";", "codeStream", ".", "newArray", "(", "currentScope", ".", "createArrayType", "(", "currentScope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_OBJECT", ",", "3", ")", ",", "1", ")", ")", ";", "}", "codeStream", ".", "invokeJavaLangReflectConstructorNewInstance", "(", ")", ";", "codeStream", ".", "checkcast", "(", "allocatedType", ")", ";", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "}", "public", "void", "manageEnclosingInstanceAccessIfNecessary", "(", "BlockScope", "currentScope", ",", "FlowInfo", "flowInfo", ")", "{", "}", "public", "void", "manageSyntheticAccessIfNecessary", "(", "BlockScope", "currentScope", ",", "FlowInfo", "flowInfo", ")", "{", "}", "public", "TypeBinding", "resolveType", "(", "BlockScope", "scope", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "this", ".", "resolvedType", "=", "this", ".", "type", ".", "resolveType", "(", "scope", ",", "true", ")", ";", "checkParameterizedAllocation", ":", "{", "if", "(", "this", ".", "type", "instanceof", "ParameterizedQualifiedTypeReference", ")", "{", "ReferenceBinding", "currentType", "=", "(", "ReferenceBinding", ")", "this", ".", "resolvedType", ";", "if", "(", "currentType", "==", "null", ")", "return", "currentType", ";", "do", "{", "if", "(", "(", "currentType", ".", "modifiers", "&", "ClassFileConstants", ".", "AccStatic", ")", "!=", "0", ")", "break", "checkParameterizedAllocation", ";", "if", "(", "currentType", ".", "isRawType", "(", ")", ")", "break", "checkParameterizedAllocation", ";", "}", "while", "(", "(", "currentType", "=", "currentType", ".", "enclosingType", "(", ")", ")", "!=", "null", ")", ";", "ParameterizedQualifiedTypeReference", "qRef", "=", "(", "ParameterizedQualifiedTypeReference", ")", "this", ".", "type", ";", "for", "(", "int", "i", "=", "qRef", ".", "typeArguments", ".", "length", "-", "2", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "if", "(", "qRef", ".", "typeArguments", "[", "i", "]", "!=", "null", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "illegalQualifiedParameterizedTypeAllocation", "(", "this", ".", "type", ",", "this", ".", "resolvedType", ")", ";", "break", ";", "}", "}", "}", "}", "if", "(", "this", ".", "typeArguments", "!=", "null", ")", "{", "int", "length", "=", "this", ".", "typeArguments", ".", "length", ";", "boolean", "argHasError", "=", "scope", ".", "compilerOptions", "(", ")", ".", "sourceLevel", "<", "ClassFileConstants", ".", "JDK1_5", ";", "this", ".", "genericTypeArguments", "=", "new", "TypeBinding", "[", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "TypeReference", "typeReference", "=", "this", ".", "typeArguments", "[", "i", "]", ";", "if", "(", "(", "this", ".", "genericTypeArguments", "[", "i", "]", "=", "typeReference", ".", "resolveType", "(", "scope", ",", "true", ")", ")", "==", "null", ")", "{", "argHasError", "=", "true", ";", "}", "if", "(", "argHasError", "&&", "typeReference", "instanceof", "Wildcard", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "illegalUsageOfWildcard", "(", "typeReference", ")", ";", "}", "}", "if", "(", "argHasError", ")", "{", "if", "(", "this", ".", "arguments", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "arguments", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "this", ".", "arguments", "[", "i", "]", ".", "resolveType", "(", "scope", ")", ";", "}", "}", "return", "null", ";", "}", "}", "boolean", "argsContainCast", "=", "false", ";", "TypeBinding", "[", "]", "argumentTypes", "=", "Binding", ".", "NO_PARAMETERS", ";", "if", "(", "this", ".", "arguments", "!=", "null", ")", "{", "boolean", "argHasError", "=", "false", ";", "int", "length", "=", "this", ".", "arguments", ".", "length", ";", "argumentTypes", "=", "new", "TypeBinding", "[", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "Expression", "argument", "=", "this", ".", "arguments", "[", "i", "]", ";", "if", "(", "argument", "instanceof", "CastExpression", ")", "{", "argument", ".", "bits", "|=", "DisableUnnecessaryCastCheck", ";", "argsContainCast", "=", "true", ";", "}", "if", "(", "(", "argumentTypes", "[", "i", "]", "=", "argument", ".", "resolveType", "(", "scope", ")", ")", "==", "null", ")", "{", "argHasError", "=", "true", ";", "}", "}", "if", "(", "argHasError", ")", "{", "return", "this", ".", "resolvedType", ";", "}", "}", "if", "(", "this", ".", "resolvedType", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "!", "this", ".", "resolvedType", ".", "canBeInstantiated", "(", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "cannotInstantiate", "(", "this", ".", "type", ",", "this", ".", "resolvedType", ")", ";", "return", "this", ".", "resolvedType", ";", "}", "ReferenceBinding", "allocatedType", "=", "(", "ReferenceBinding", ")", "this", ".", "resolvedType", ";", "if", "(", "!", "(", "this", ".", "binding", "=", "scope", ".", "getConstructor", "(", "allocatedType", ",", "argumentTypes", ",", "this", ")", ")", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "this", ".", "binding", "instanceof", "ProblemMethodBinding", "&&", "(", "(", "ProblemMethodBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "NotVisible", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "!=", "null", ")", "{", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "scope", ".", "enclosingSourceType", "(", ")", ",", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "if", "(", "this", ".", "binding", ".", "declaringClass", "==", "null", ")", "{", "this", ".", "binding", ".", "declaringClass", "=", "allocatedType", ";", "}", "if", "(", "this", ".", "type", "!=", "null", "&&", "!", "this", ".", "type", ".", "resolvedType", ".", "isValidBinding", "(", ")", ")", "{", "return", "null", ";", "}", "scope", ".", "problemReporter", "(", ")", ".", "invalidConstructor", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "this", ".", "resolvedType", ";", "}", "}", "else", "{", "if", "(", "this", ".", "binding", ".", "declaringClass", "==", "null", ")", "{", "this", ".", "binding", ".", "declaringClass", "=", "allocatedType", ";", "}", "if", "(", "this", ".", "type", "!=", "null", "&&", "!", "this", ".", "type", ".", "resolvedType", ".", "isValidBinding", "(", ")", ")", "{", "return", "null", ";", "}", "scope", ".", "problemReporter", "(", ")", ".", "invalidConstructor", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "this", ".", "resolvedType", ";", "}", "CodeSnippetScope", "localScope", "=", "new", "CodeSnippetScope", "(", "scope", ")", ";", "MethodBinding", "privateBinding", "=", "localScope", ".", "getConstructor", "(", "(", "ReferenceBinding", ")", "this", ".", "delegateThis", ".", "type", ",", "argumentTypes", ",", "this", ")", ";", "if", "(", "!", "privateBinding", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "this", ".", "binding", ".", "declaringClass", "==", "null", ")", "{", "this", ".", "binding", ".", "declaringClass", "=", "allocatedType", ";", "}", "if", "(", "this", ".", "type", "!=", "null", "&&", "!", "this", ".", "type", ".", "resolvedType", ".", "isValidBinding", "(", ")", ")", "{", "return", "null", ";", "}", "scope", ".", "problemReporter", "(", ")", ".", "invalidConstructor", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "this", ".", "resolvedType", ";", "}", "else", "{", "this", ".", "binding", "=", "privateBinding", ";", "}", "}", "else", "{", "if", "(", "this", ".", "binding", ".", "declaringClass", "==", "null", ")", "{", "this", ".", "binding", ".", "declaringClass", "=", "allocatedType", ";", "}", "if", "(", "this", ".", "type", "!=", "null", "&&", "!", "this", ".", "type", ".", "resolvedType", ".", "isValidBinding", "(", ")", ")", "{", "return", "null", ";", "}", "scope", ".", "problemReporter", "(", ")", ".", "invalidConstructor", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "this", ".", "resolvedType", ";", "}", "}", "if", "(", "isMethodUseDeprecated", "(", "this", ".", "binding", ",", "scope", ",", "true", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "deprecatedMethod", "(", "this", ".", "binding", ",", "this", ")", ";", "}", "if", "(", "this", ".", "arguments", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "arguments", ".", "length", ";", "i", "++", ")", "{", "TypeBinding", "parameterType", "=", "this", ".", "binding", ".", "parameters", "[", "i", "]", ";", "TypeBinding", "argumentType", "=", "argumentTypes", "[", "i", "]", ";", "this", ".", "arguments", "[", "i", "]", ".", "computeConversion", "(", "scope", ",", "parameterType", ",", "argumentType", ")", ";", "if", "(", "argumentType", ".", "needsUncheckedConversion", "(", "parameterType", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "unsafeTypeConversion", "(", "this", ".", "arguments", "[", "i", "]", ",", "argumentType", ",", "parameterType", ")", ";", "}", "}", "if", "(", "argsContainCast", ")", "{", "CastExpression", ".", "checkNeedForArgumentCasts", "(", "scope", ",", "null", ",", "allocatedType", ",", "this", ".", "binding", ",", "this", ".", "arguments", ",", "argumentTypes", ",", "this", ")", ";", "}", "}", "if", "(", "allocatedType", ".", "isRawType", "(", ")", "&&", "this", ".", "binding", ".", "hasSubstitutedParameters", "(", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "unsafeRawInvocation", "(", "this", ",", "this", ".", "binding", ")", ";", "}", "if", "(", "this", ".", "typeArguments", "!=", "null", "&&", "this", ".", "binding", ".", "original", "(", ")", ".", "typeVariables", "==", "Binding", ".", "NO_TYPE_VARIABLES", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "unnecessaryTypeArgumentsForMethodInvocation", "(", "this", ".", "binding", ",", "this", ".", "genericTypeArguments", ",", "this", ".", "typeArguments", ")", ";", "}", "return", "allocatedType", ";", "}", "}", "</s>" ]
5,108
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CastExpression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MessageSend", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "NameReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "CodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "Opcodes", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "flow", ".", "FlowInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemMethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReasons", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeIds", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeVariableBinding", ";", "public", "class", "CodeSnippetMessageSend", "extends", "MessageSend", "{", "EvaluationContext", "evaluationContext", ";", "FieldBinding", "delegateThis", ";", "public", "CodeSnippetMessageSend", "(", "EvaluationContext", "evaluationContext", ")", "{", "this", ".", "evaluationContext", "=", "evaluationContext", ";", "}", "public", "void", "generateCode", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "boolean", "valueRequired", ")", "{", "int", "pc", "=", "codeStream", ".", "position", ";", "MethodBinding", "codegenBinding", "=", "this", ".", "binding", ".", "original", "(", ")", ";", "if", "(", "codegenBinding", ".", "canBeSeenBy", "(", "this", ".", "actualReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "boolean", "isStatic", "=", "codegenBinding", ".", "isStatic", "(", ")", ";", "if", "(", "!", "isStatic", "&&", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", ")", "{", "ReferenceBinding", "targetType", "=", "currentScope", ".", "enclosingSourceType", "(", ")", ".", "enclosingTypeAt", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", ">>", "DepthSHIFT", ")", ";", "Object", "[", "]", "path", "=", "currentScope", ".", "getEmulationPath", "(", "targetType", ",", "true", ",", "false", ")", ";", "if", "(", "path", "==", "null", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "needImplementation", "(", "this", ")", ";", "}", "else", "{", "codeStream", ".", "generateOuterAccess", "(", "path", ",", "this", ",", "targetType", ",", "currentScope", ")", ";", "}", "}", "else", "{", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "isStatic", ")", ";", "if", "(", "(", "this", ".", "bits", "&", "NeedReceiverGenericCast", ")", "!=", "0", ")", "{", "codeStream", ".", "checkcast", "(", "this", ".", "actualReceiverType", ")", ";", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "}", "generateArguments", "(", "this", ".", "binding", ",", "this", ".", "arguments", ",", "currentScope", ",", "codeStream", ")", ";", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "codegenBinding", ",", "this", ".", "actualReceiverType", ",", "this", ".", "receiver", ".", "isImplicitThis", "(", ")", ")", ";", "if", "(", "isStatic", ")", "{", "codeStream", ".", "invoke", "(", "Opcodes", ".", "OPC_invokestatic", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "if", "(", "(", "this", ".", "receiver", ".", "isSuper", "(", ")", ")", "||", "codegenBinding", ".", "isPrivate", "(", ")", ")", "{", "codeStream", ".", "invoke", "(", "Opcodes", ".", "OPC_invokespecial", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "if", "(", "constantPoolDeclaringClass", ".", "isInterface", "(", ")", ")", "{", "codeStream", ".", "invoke", "(", "Opcodes", ".", "OPC_invokeinterface", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "codeStream", ".", "invoke", "(", "Opcodes", ".", "OPC_invokevirtual", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "}", "}", "else", "{", "codeStream", ".", "generateEmulationForMethod", "(", "currentScope", ",", "codegenBinding", ")", ";", "boolean", "isStatic", "=", "codegenBinding", ".", "isStatic", "(", ")", ";", "if", "(", "!", "isStatic", "&&", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "needImplementation", "(", "this", ")", ";", "}", "else", "{", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "isStatic", ")", ";", "if", "(", "(", "this", ".", "bits", "&", "NeedReceiverGenericCast", ")", "!=", "0", ")", "{", "codeStream", ".", "checkcast", "(", "this", ".", "actualReceiverType", ")", ";", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "}", "if", "(", "isStatic", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "if", "(", "this", ".", "arguments", "!=", "null", ")", "{", "int", "argsLength", "=", "this", ".", "arguments", ".", "length", ";", "codeStream", ".", "generateInlinedValue", "(", "argsLength", ")", ";", "codeStream", ".", "newArray", "(", "currentScope", ".", "createArrayType", "(", "currentScope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_OBJECT", ",", "3", ")", ",", "1", ")", ")", ";", "codeStream", ".", "dup", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "argsLength", ";", "i", "++", ")", "{", "codeStream", ".", "generateInlinedValue", "(", "i", ")", ";", "this", ".", "arguments", "[", "i", "]", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "TypeBinding", "parameterBinding", "=", "codegenBinding", ".", "parameters", "[", "i", "]", ";", "if", "(", "parameterBinding", ".", "isBaseType", "(", ")", "&&", "parameterBinding", "!=", "TypeBinding", ".", "NULL", ")", "{", "codeStream", ".", "generateBoxingConversion", "(", "codegenBinding", ".", "parameters", "[", "i", "]", ".", "id", ")", ";", "}", "codeStream", ".", "aastore", "(", ")", ";", "if", "(", "i", "<", "argsLength", "-", "1", ")", "{", "codeStream", ".", "dup", "(", ")", ";", "}", "}", "}", "else", "{", "codeStream", ".", "generateInlinedValue", "(", "0", ")", ";", "codeStream", ".", "newArray", "(", "currentScope", ".", "createArrayType", "(", "currentScope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_OBJECT", ",", "3", ")", ",", "1", ")", ")", ";", "}", "codeStream", ".", "invokeJavaLangReflectMethodInvoke", "(", ")", ";", "if", "(", "codegenBinding", ".", "returnType", ".", "isBaseType", "(", ")", ")", "{", "int", "typeID", "=", "codegenBinding", ".", "returnType", ".", "id", ";", "if", "(", "typeID", "==", "T_void", ")", "{", "codeStream", ".", "pop", "(", ")", ";", "}", "codeStream", ".", "checkcast", "(", "typeID", ")", ";", "codeStream", ".", "getBaseTypeValue", "(", "typeID", ")", ";", "}", "else", "{", "codeStream", ".", "checkcast", "(", "codegenBinding", ".", "returnType", ")", ";", "}", "}", "if", "(", "this", ".", "valueCast", "!=", "null", ")", "codeStream", ".", "checkcast", "(", "this", ".", "valueCast", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "boolean", "isUnboxing", "=", "(", "this", ".", "implicitConversion", "&", "TypeIds", ".", "UNBOXING", ")", "!=", "0", ";", "if", "(", "isUnboxing", ")", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "switch", "(", "isUnboxing", "?", "postConversionType", "(", "currentScope", ")", ".", "id", ":", "codegenBinding", ".", "returnType", ".", "id", ")", "{", "case", "T_long", ":", "case", "T_double", ":", "codeStream", ".", "pop2", "(", ")", ";", "break", ";", "case", "T_void", ":", "break", ";", "default", ":", "codeStream", ".", "pop", "(", ")", ";", "}", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "(", "int", ")", "(", "this", ".", "nameSourcePosition", ">>>", "32", ")", ")", ";", "}", "public", "void", "manageSyntheticAccessIfNecessary", "(", "BlockScope", "currentScope", ",", "FlowInfo", "flowInfo", ")", "{", "if", "(", "(", "flowInfo", ".", "tagBits", "&", "FlowInfo", ".", "UNREACHABLE", ")", "==", "0", ")", "{", "MethodBinding", "codegenBinding", "=", "this", ".", "binding", ".", "original", "(", ")", ";", "if", "(", "codegenBinding", "!=", "this", ".", "binding", ")", "{", "if", "(", "codegenBinding", ".", "returnType", ".", "isTypeVariable", "(", ")", ")", "{", "TypeVariableBinding", "variableReturnType", "=", "(", "TypeVariableBinding", ")", "codegenBinding", ".", "returnType", ";", "if", "(", "variableReturnType", ".", "firstBound", "!=", "this", ".", "binding", ".", "returnType", ")", "{", "this", ".", "valueCast", "=", "this", ".", "binding", ".", "returnType", ";", "}", "}", "}", "}", "}", "public", "TypeBinding", "resolveType", "(", "BlockScope", "scope", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "boolean", "receiverCast", "=", "false", ",", "argsContainCast", "=", "false", ";", "if", "(", "this", ".", "receiver", "instanceof", "CastExpression", ")", "{", "this", ".", "receiver", ".", "bits", "|=", "DisableUnnecessaryCastCheck", ";", "receiverCast", "=", "true", ";", "}", "this", ".", "actualReceiverType", "=", "this", ".", "receiver", ".", "resolveType", "(", "scope", ")", ";", "if", "(", "receiverCast", "&&", "this", ".", "actualReceiverType", "!=", "null", ")", "{", "if", "(", "(", "(", "CastExpression", ")", "this", ".", "receiver", ")", ".", "expression", ".", "resolvedType", "==", "this", ".", "actualReceiverType", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "unnecessaryCast", "(", "(", "CastExpression", ")", "this", ".", "receiver", ")", ";", "}", "}", "if", "(", "this", ".", "typeArguments", "!=", "null", ")", "{", "int", "length", "=", "this", ".", "typeArguments", ".", "length", ";", "boolean", "argHasError", "=", "false", ";", "this", ".", "genericTypeArguments", "=", "new", "TypeBinding", "[", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "if", "(", "(", "this", ".", "genericTypeArguments", "[", "i", "]", "=", "this", ".", "typeArguments", "[", "i", "]", ".", "resolveType", "(", "scope", ",", "true", ")", ")", "==", "null", ")", "{", "argHasError", "=", "true", ";", "}", "}", "if", "(", "argHasError", ")", "{", "return", "null", ";", "}", "}", "TypeBinding", "[", "]", "argumentTypes", "=", "Binding", ".", "NO_PARAMETERS", ";", "if", "(", "this", ".", "arguments", "!=", "null", ")", "{", "boolean", "argHasError", "=", "false", ";", "int", "length", "=", "this", ".", "arguments", ".", "length", ";", "argumentTypes", "=", "new", "TypeBinding", "[", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "Expression", "argument", "=", "this", ".", "arguments", "[", "i", "]", ";", "if", "(", "argument", "instanceof", "CastExpression", ")", "{", "argument", ".", "bits", "|=", "DisableUnnecessaryCastCheck", ";", "argsContainCast", "=", "true", ";", "}", "if", "(", "(", "argumentTypes", "[", "i", "]", "=", "this", ".", "arguments", "[", "i", "]", ".", "resolveType", "(", "scope", ")", ")", "==", "null", ")", "argHasError", "=", "true", ";", "}", "if", "(", "argHasError", ")", "{", "if", "(", "this", ".", "actualReceiverType", "instanceof", "ReferenceBinding", ")", "{", "this", ".", "binding", "=", "scope", ".", "findMethod", "(", "(", "ReferenceBinding", ")", "this", ".", "actualReceiverType", ",", "this", ".", "selector", ",", "new", "TypeBinding", "[", "]", "{", "}", ",", "this", ")", ";", "}", "return", "null", ";", "}", "}", "if", "(", "this", ".", "actualReceiverType", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "this", ".", "actualReceiverType", ".", "isBaseType", "(", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "errorNoMethodFor", "(", "this", ",", "this", ".", "actualReceiverType", ",", "argumentTypes", ")", ";", "return", "null", ";", "}", "this", ".", "binding", "=", "this", ".", "receiver", ".", "isImplicitThis", "(", ")", "?", "scope", ".", "getImplicitMethod", "(", "this", ".", "selector", ",", "argumentTypes", ",", "this", ")", ":", "scope", ".", "getMethod", "(", "this", ".", "actualReceiverType", ",", "this", ".", "selector", ",", "argumentTypes", ",", "this", ")", ";", "if", "(", "!", "this", ".", "binding", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "this", ".", "binding", "instanceof", "ProblemMethodBinding", "&&", "(", "(", "ProblemMethodBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "ProblemReasons", ".", "NotVisible", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "!=", "null", ")", "{", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "scope", ".", "enclosingSourceType", "(", ")", ",", "EvaluationConstants", ".", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "scope", ".", "problemReporter", "(", ")", ".", "invalidMethod", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "null", ";", "}", "}", "else", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "scope", ".", "problemReporter", "(", ")", ".", "invalidMethod", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "null", ";", "}", "CodeSnippetScope", "localScope", "=", "new", "CodeSnippetScope", "(", "scope", ")", ";", "MethodBinding", "privateBinding", "=", "this", ".", "receiver", "instanceof", "CodeSnippetThisReference", "&&", "(", "(", "CodeSnippetThisReference", ")", "this", ".", "receiver", ")", ".", "isImplicit", "?", "localScope", ".", "getImplicitMethod", "(", "(", "ReferenceBinding", ")", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "selector", ",", "argumentTypes", ",", "this", ")", ":", "localScope", ".", "getMethod", "(", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "selector", ",", "argumentTypes", ",", "this", ")", ";", "if", "(", "!", "privateBinding", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "this", ".", "binding", ".", "declaringClass", "==", "null", ")", "{", "if", "(", "this", ".", "actualReceiverType", "instanceof", "ReferenceBinding", ")", "{", "this", ".", "binding", ".", "declaringClass", "=", "(", "ReferenceBinding", ")", "this", ".", "actualReceiverType", ";", "}", "else", "{", "scope", ".", "problemReporter", "(", ")", ".", "errorNoMethodFor", "(", "this", ",", "this", ".", "actualReceiverType", ",", "argumentTypes", ")", ";", "return", "null", ";", "}", "}", "scope", ".", "problemReporter", "(", ")", ".", "invalidMethod", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "null", ";", "}", "else", "{", "this", ".", "binding", "=", "privateBinding", ";", "}", "}", "else", "{", "if", "(", "this", ".", "binding", ".", "declaringClass", "==", "null", ")", "{", "if", "(", "this", ".", "actualReceiverType", "instanceof", "ReferenceBinding", ")", "{", "this", ".", "binding", ".", "declaringClass", "=", "(", "ReferenceBinding", ")", "this", ".", "actualReceiverType", ";", "}", "else", "{", "scope", ".", "problemReporter", "(", ")", ".", "errorNoMethodFor", "(", "this", ",", "this", ".", "actualReceiverType", ",", "argumentTypes", ")", ";", "return", "null", ";", "}", "}", "scope", ".", "problemReporter", "(", ")", ".", "invalidMethod", "(", "this", ",", "this", ".", "binding", ")", ";", "return", "null", ";", "}", "}", "if", "(", "!", "this", ".", "binding", ".", "isStatic", "(", ")", ")", "{", "if", "(", "this", ".", "receiver", "instanceof", "NameReference", "&&", "(", "(", "(", "NameReference", ")", "this", ".", "receiver", ")", ".", "bits", "&", "Binding", ".", "TYPE", ")", "!=", "0", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "mustUseAStaticMethod", "(", "this", ",", "this", ".", "binding", ")", ";", "}", "else", "{", "TypeBinding", "oldReceiverType", "=", "this", ".", "actualReceiverType", ";", "this", ".", "actualReceiverType", "=", "this", ".", "actualReceiverType", ".", "getErasureCompatibleType", "(", "this", ".", "binding", ".", "declaringClass", ")", ";", "this", ".", "receiver", ".", "computeConversion", "(", "scope", ",", "this", ".", "actualReceiverType", ",", "this", ".", "actualReceiverType", ")", ";", "if", "(", "this", ".", "actualReceiverType", "!=", "oldReceiverType", "&&", "this", ".", "receiver", ".", "postConversionType", "(", "scope", ")", "!=", "this", ".", "actualReceiverType", ")", "{", "this", ".", "bits", "|=", "NeedReceiverGenericCast", ";", "}", "}", "}", "if", "(", "checkInvocationArguments", "(", "scope", ",", "this", ".", "receiver", ",", "this", ".", "actualReceiverType", ",", "this", ".", "binding", ",", "this", ".", "arguments", ",", "argumentTypes", ",", "argsContainCast", ",", "this", ")", ")", "{", "this", ".", "bits", "|=", "ASTNode", ".", "Unchecked", ";", "}", "if", "(", "this", ".", "binding", ".", "isAbstract", "(", ")", ")", "{", "if", "(", "this", ".", "receiver", ".", "isSuper", "(", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "cannotDireclyInvokeAbstractMethod", "(", "this", ",", "this", ".", "binding", ")", ";", "}", "}", "if", "(", "isMethodUseDeprecated", "(", "this", ".", "binding", ",", "scope", ",", "true", ")", ")", "scope", ".", "problemReporter", "(", ")", ".", "deprecatedMethod", "(", "this", ".", "binding", ",", "this", ")", ";", "if", "(", "this", ".", "actualReceiverType", ".", "isArrayType", "(", ")", "&&", "this", ".", "binding", ".", "parameters", "==", "Binding", ".", "NO_PARAMETERS", "&&", "scope", ".", "compilerOptions", "(", ")", ".", "complianceLevel", ">=", "ClassFileConstants", ".", "JDK1_5", "&&", "CharOperation", ".", "equals", "(", "this", ".", "binding", ".", "selector", ",", "CLONE", ")", ")", "{", "this", ".", "resolvedType", "=", "this", ".", "actualReceiverType", ";", "}", "else", "{", "TypeBinding", "returnType", "=", "this", ".", "binding", ".", "returnType", ";", "if", "(", "returnType", "!=", "null", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "ASTNode", ".", "Unchecked", ")", "!=", "0", "&&", "this", ".", "genericTypeArguments", "==", "null", ")", "{", "returnType", "=", "scope", ".", "environment", "(", ")", ".", "convertToRawType", "(", "returnType", ".", "erasure", "(", ")", ",", "true", ")", ";", "}", "returnType", "=", "returnType", ".", "capture", "(", "scope", ",", "this", ".", "sourceEnd", ")", ";", "}", "this", ".", "resolvedType", "=", "returnType", ";", "}", "return", "this", ".", "resolvedType", ";", "}", "}", "</s>" ]
5,109
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Assignment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompoundAssignment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "IntLiteral", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "CodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "Opcodes", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "flow", ".", "FlowInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemFieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReasons", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeIds", ";", "public", "class", "CodeSnippetFieldReference", "extends", "FieldReference", "implements", "ProblemReasons", ",", "EvaluationConstants", "{", "EvaluationContext", "evaluationContext", ";", "FieldBinding", "delegateThis", ";", "public", "CodeSnippetFieldReference", "(", "char", "[", "]", "source", ",", "long", "pos", ",", "EvaluationContext", "evaluationContext", ")", "{", "super", "(", "source", ",", "pos", ")", ";", "this", ".", "evaluationContext", "=", "evaluationContext", ";", "}", "public", "void", "generateAssignment", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "Assignment", "assignment", ",", "boolean", "valueRequired", ")", "{", "FieldBinding", "codegenBinding", "=", "this", ".", "binding", ".", "original", "(", ")", ";", "if", "(", "codegenBinding", ".", "canBeSeenBy", "(", "this", ".", "actualReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "codegenBinding", ".", "isStatic", "(", ")", ")", ";", "assignment", ".", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "fieldStore", "(", "currentScope", ",", "codeStream", ",", "codegenBinding", ",", "null", ",", "this", ".", "actualReceiverType", ",", "this", ".", "receiver", ".", "isImplicitThis", "(", ")", ",", "valueRequired", ")", ";", "}", "else", "{", "codeStream", ".", "generateEmulationForField", "(", "codegenBinding", ")", ";", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "codegenBinding", ".", "isStatic", "(", ")", ")", ";", "if", "(", "codegenBinding", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "assignment", ".", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "if", "(", "valueRequired", ")", "{", "switch", "(", "codegenBinding", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2_x2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup_x2", "(", ")", ";", "break", ";", "}", "}", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "codegenBinding", ")", ";", "}", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "}", "public", "void", "generateCode", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "boolean", "valueRequired", ")", "{", "int", "pc", "=", "codeStream", ".", "position", ";", "if", "(", "this", ".", "constant", "!=", "Constant", ".", "NotAConstant", ")", "{", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateConstant", "(", "this", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "}", "}", "else", "{", "FieldBinding", "codegenBinding", "=", "this", ".", "binding", ".", "original", "(", ")", ";", "boolean", "isStatic", "=", "codegenBinding", ".", "isStatic", "(", ")", ";", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "isStatic", ")", ";", "if", "(", "valueRequired", ")", "{", "Constant", "fieldConstant", "=", "codegenBinding", ".", "constant", "(", ")", ";", "if", "(", "fieldConstant", "==", "Constant", ".", "NotAConstant", ")", "{", "if", "(", "codegenBinding", ".", "declaringClass", "==", "null", ")", "{", "codeStream", ".", "arraylength", "(", ")", ";", "}", "else", "{", "if", "(", "codegenBinding", ".", "canBeSeenBy", "(", "this", ".", "actualReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "codegenBinding", ",", "this", ".", "actualReceiverType", ",", "this", ".", "receiver", ".", "isImplicitThis", "(", ")", ")", ";", "if", "(", "isStatic", ")", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getstatic", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "}", "else", "{", "if", "(", "isStatic", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenBinding", ")", ";", "}", "}", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "if", "(", "!", "isStatic", ")", "{", "codeStream", ".", "invokeObjectGetClass", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "codeStream", ".", "generateConstant", "(", "fieldConstant", ",", "this", ".", "implicitConversion", ")", ";", "}", "}", "else", "{", "if", "(", "!", "isStatic", ")", "{", "codeStream", ".", "invokeObjectGetClass", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "}", "}", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "}", "public", "void", "generateCompoundAssignment", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "Expression", "expression", ",", "int", "operator", ",", "int", "assignmentImplicitConversion", ",", "boolean", "valueRequired", ")", "{", "boolean", "isStatic", ";", "FieldBinding", "codegenBinding", "=", "this", ".", "binding", ".", "original", "(", ")", ";", "if", "(", "codegenBinding", ".", "canBeSeenBy", "(", "this", ".", "actualReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "(", "isStatic", "=", "codegenBinding", ".", "isStatic", "(", ")", ")", ")", ";", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "codegenBinding", ",", "this", ".", "actualReceiverType", ",", "this", ".", "receiver", ".", "isImplicitThis", "(", ")", ")", ";", "if", "(", "isStatic", ")", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getstatic", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "codeStream", ".", "dup", "(", ")", ";", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "codegenBinding", ",", "constantPoolDeclaringClass", ")", ";", "}", "int", "operationTypeID", ";", "switch", "(", "operationTypeID", "=", "(", "this", ".", "implicitConversion", "&", "IMPLICIT_CONVERSION_MASK", ")", ">>", "4", ")", "{", "case", "T_JavaLangString", ":", "case", "T_JavaLangObject", ":", "case", "T_undefined", ":", "codeStream", ".", "generateStringConcatenationAppend", "(", "currentScope", ",", "null", ",", "expression", ")", ";", "break", ";", "default", ":", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "if", "(", "expression", "==", "IntLiteral", ".", "One", ")", "{", "codeStream", ".", "generateConstant", "(", "expression", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "}", "codeStream", ".", "sendOperator", "(", "operator", ",", "operationTypeID", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "assignmentImplicitConversion", ")", ";", "}", "fieldStore", "(", "currentScope", ",", "codeStream", ",", "codegenBinding", ",", "null", ",", "this", ".", "actualReceiverType", ",", "this", ".", "receiver", ".", "isImplicitThis", "(", ")", ",", "valueRequired", ")", ";", "}", "else", "{", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "(", "isStatic", "=", "codegenBinding", ".", "isStatic", "(", ")", ")", ")", ";", "if", "(", "isStatic", ")", "{", "codeStream", ".", "generateEmulationForField", "(", "codegenBinding", ")", ";", "codeStream", ".", "aconst_null", "(", ")", ";", "codeStream", ".", "aconst_null", "(", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenBinding", ")", ";", "}", "else", "{", "codeStream", ".", "generateEmulationForField", "(", "this", ".", "binding", ")", ";", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "isStatic", ")", ";", "codeStream", ".", "dup", "(", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenBinding", ")", ";", "}", "int", "operationTypeID", ";", "if", "(", "(", "operationTypeID", "=", "(", "this", ".", "implicitConversion", "&", "IMPLICIT_CONVERSION_MASK", ")", ">>", "4", ")", "==", "T_JavaLangString", ")", "{", "codeStream", ".", "generateStringConcatenationAppend", "(", "currentScope", ",", "null", ",", "expression", ")", ";", "}", "else", "{", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "if", "(", "expression", "==", "IntLiteral", ".", "One", ")", "{", "codeStream", ".", "generateConstant", "(", "expression", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "}", "codeStream", ".", "sendOperator", "(", "operator", ",", "operationTypeID", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "assignmentImplicitConversion", ")", ";", "}", "if", "(", "valueRequired", ")", "{", "if", "(", "(", "codegenBinding", ".", "type", "==", "TypeBinding", ".", "LONG", ")", "||", "(", "codegenBinding", ".", "type", "==", "TypeBinding", ".", "DOUBLE", ")", ")", "{", "codeStream", ".", "dup2_x2", "(", ")", ";", "}", "else", "{", "codeStream", ".", "dup_x2", "(", ")", ";", "}", "}", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "codegenBinding", ")", ";", "}", "}", "public", "void", "generatePostIncrement", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "CompoundAssignment", "postIncrement", ",", "boolean", "valueRequired", ")", "{", "boolean", "isStatic", ";", "FieldBinding", "codegenBinding", "=", "this", ".", "binding", ".", "original", "(", ")", ";", "if", "(", "codegenBinding", ".", "canBeSeenBy", "(", "this", ".", "actualReceiverType", ",", "this", ",", "currentScope", ")", ")", "{", "super", ".", "generatePostIncrement", "(", "currentScope", ",", "codeStream", ",", "postIncrement", ",", "valueRequired", ")", ";", "}", "else", "{", "this", ".", "receiver", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "!", "(", "isStatic", "=", "codegenBinding", ".", "isStatic", "(", ")", ")", ")", ";", "if", "(", "isStatic", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "codeStream", ".", "dup", "(", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenBinding", ")", ";", "int", "typeID", ";", "switch", "(", "typeID", "=", "codegenBinding", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "dup2_x1", "(", ")", ";", "}", "codeStream", ".", "dup2_x1", "(", ")", ";", "codeStream", ".", "pop2", "(", ")", ";", "break", ";", "default", ":", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "dup_x1", "(", ")", ";", "}", "codeStream", ".", "dup_x1", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "break", ";", "}", "codeStream", ".", "generateEmulationForField", "(", "codegenBinding", ")", ";", "codeStream", ".", "swap", "(", ")", ";", "switch", "(", "typeID", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2_x2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup2_x1", "(", ")", ";", "break", ";", "}", "codeStream", ".", "pop2", "(", ")", ";", "codeStream", ".", "generateConstant", "(", "postIncrement", ".", "expression", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "codeStream", ".", "sendOperator", "(", "postIncrement", ".", "operator", ",", "codegenBinding", ".", "type", ".", "id", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "postIncrement", ".", "preAssignImplicitConversion", ")", ";", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "codegenBinding", ")", ";", "}", "}", "public", "void", "manageSyntheticAccessIfNecessary", "(", "BlockScope", "currentScope", ",", "FlowInfo", "flowInfo", ",", "boolean", "isReadAccess", ")", "{", "if", "(", "(", "flowInfo", ".", "tagBits", "&", "FlowInfo", ".", "UNREACHABLE", ")", "!=", "0", ")", "return", ";", "}", "public", "TypeBinding", "resolveType", "(", "BlockScope", "scope", ")", "{", "this", ".", "actualReceiverType", "=", "this", ".", "receiver", ".", "resolveType", "(", "scope", ")", ";", "if", "(", "this", ".", "actualReceiverType", "==", "null", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "return", "null", ";", "}", "this", ".", "binding", "=", "scope", ".", "getField", "(", "this", ".", "actualReceiverType", ",", "this", ".", "token", ",", "this", ")", ";", "FieldBinding", "firstAttempt", "=", "this", ".", "binding", ";", "boolean", "isNotVisible", "=", "false", ";", "if", "(", "!", "this", ".", "binding", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "this", ".", "binding", "instanceof", "ProblemFieldBinding", "&&", "(", "(", "ProblemFieldBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "NotVisible", ")", "{", "isNotVisible", "=", "true", ";", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "!=", "null", ")", "{", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "scope", ".", "enclosingSourceType", "(", ")", ",", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "scope", ".", "problemReporter", "(", ")", ".", "invalidField", "(", "this", ",", "this", ".", "actualReceiverType", ")", ";", "return", "null", ";", "}", "this", ".", "actualReceiverType", "=", "this", ".", "delegateThis", ".", "type", ";", "}", "else", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "scope", ".", "problemReporter", "(", ")", ".", "invalidField", "(", "this", ",", "this", ".", "actualReceiverType", ")", ";", "return", "null", ";", "}", "CodeSnippetScope", "localScope", "=", "new", "CodeSnippetScope", "(", "scope", ")", ";", "this", ".", "binding", "=", "localScope", ".", "getFieldForCodeSnippet", "(", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "token", ",", "this", ")", ";", "}", "}", "if", "(", "!", "this", ".", "binding", ".", "isValidBinding", "(", ")", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "if", "(", "isNotVisible", ")", "{", "this", ".", "binding", "=", "firstAttempt", ";", "}", "scope", ".", "problemReporter", "(", ")", ".", "invalidField", "(", "this", ",", "this", ".", "actualReceiverType", ")", ";", "return", "null", ";", "}", "if", "(", "isFieldUseDeprecated", "(", "this", ".", "binding", ",", "scope", ",", "(", "this", ".", "bits", "&", "IsStrictlyAssigned", ")", "!=", "0", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "deprecatedField", "(", "this", ".", "binding", ",", "this", ")", ";", "}", "this", ".", "constant", "=", "this", ".", "receiver", ".", "isImplicitThis", "(", ")", "?", "this", ".", "binding", ".", "constant", "(", ")", ":", "Constant", ".", "NotAConstant", ";", "if", "(", "!", "this", ".", "receiver", ".", "isThis", "(", ")", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "}", "return", "this", ".", "resolvedType", "=", "this", ".", "binding", ".", "type", ";", "}", "}", "</s>" ]
5,110
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "public", "class", "GlobalVariable", "{", "char", "[", "]", "typeName", ";", "char", "[", "]", "name", ";", "char", "[", "]", "initializer", ";", "int", "declarationStart", "=", "-", "1", ",", "initializerStart", "=", "-", "1", ",", "initExpressionStart", ";", "int", "initializerLineStart", "=", "-", "1", ";", "public", "GlobalVariable", "(", "char", "[", "]", "typeName", ",", "char", "[", "]", "name", ",", "char", "[", "]", "initializer", ")", "{", "this", ".", "typeName", "=", "typeName", ";", "this", ".", "name", "=", "name", ";", "this", ".", "initializer", "=", "initializer", ";", "}", "public", "char", "[", "]", "getInitializer", "(", ")", "{", "return", "this", ".", "initializer", ";", "}", "public", "char", "[", "]", "getName", "(", ")", "{", "return", "this", ".", "name", ";", "}", "public", "char", "[", "]", "getTypeName", "(", ")", "{", "return", "this", ".", "typeName", ";", "}", "public", "String", "toString", "(", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "this", ".", "typeName", ")", ";", "buffer", ".", "append", "(", "\"", "\"", ")", ";", "buffer", ".", "append", "(", "this", ".", "name", ")", ";", "if", "(", "this", ".", "initializer", "!=", "null", ")", "{", "buffer", ".", "append", "(", "\"=", "\"", ")", ";", "buffer", ".", "append", "(", "this", ".", "initializer", ")", ";", "}", "buffer", ".", "append", "(", "\";\"", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
5,111
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "java", ".", "util", ".", "Locale", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "CompletionRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "WorkingCopyOwner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "codeassist", ".", "CompletionEngine", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "codeassist", ".", "ISelectionRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "codeassist", ".", "SelectionEngine", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileReader", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFormatException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "INameEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "DefaultProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "ProblemSeverities", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "SuffixConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "SearchableEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "public", "class", "EvaluationContext", "implements", "EvaluationConstants", ",", "SuffixConstants", "{", "static", "int", "VAR_CLASS_COUNTER", "=", "0", ";", "static", "int", "CODE_SNIPPET_COUNTER", "=", "0", ";", "GlobalVariable", "[", "]", "variables", ";", "int", "variableCount", ";", "char", "[", "]", "[", "]", "imports", ";", "char", "[", "]", "packageName", ";", "boolean", "varsChanged", ";", "VariablesInfo", "installedVars", ";", "IBinaryType", "codeSnippetBinary", ";", "String", "lineSeparator", ";", "char", "[", "]", "declaringTypeName", ";", "int", "[", "]", "localVariableModifiers", ";", "char", "[", "]", "[", "]", "localVariableTypeNames", ";", "char", "[", "]", "[", "]", "localVariableNames", ";", "boolean", "isStatic", ";", "boolean", "isConstructorCall", ";", "public", "EvaluationContext", "(", ")", "{", "this", ".", "variables", "=", "new", "GlobalVariable", "[", "5", "]", ";", "this", ".", "variableCount", "=", "0", ";", "this", ".", "imports", "=", "CharOperation", ".", "NO_CHAR_CHAR", ";", "this", ".", "packageName", "=", "CharOperation", ".", "NO_CHAR", ";", "this", ".", "varsChanged", "=", "true", ";", "this", ".", "isStatic", "=", "true", ";", "this", ".", "isConstructorCall", "=", "false", ";", "this", ".", "lineSeparator", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ".", "LINE_SEPARATOR", ";", "}", "public", "GlobalVariable", "[", "]", "allVariables", "(", ")", "{", "GlobalVariable", "[", "]", "result", "=", "new", "GlobalVariable", "[", "this", ".", "variableCount", "]", ";", "System", ".", "arraycopy", "(", "this", ".", "variables", ",", "0", ",", "result", ",", "0", ",", "this", ".", "variableCount", ")", ";", "return", "result", ";", "}", "public", "void", "complete", "(", "char", "[", "]", "codeSnippet", ",", "int", "completionPosition", ",", "SearchableEnvironment", "environment", ",", "CompletionRequestor", "requestor", ",", "Map", "options", ",", "final", "IJavaProject", "project", ",", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "{", "try", "{", "IRequestor", "variableRequestor", "=", "new", "IRequestor", "(", ")", "{", "public", "boolean", "acceptClassFiles", "(", "ClassFile", "[", "]", "classFiles", ",", "char", "[", "]", "codeSnippetClassName", ")", "{", "return", "true", ";", "}", "public", "void", "acceptProblem", "(", "CategorizedProblem", "problem", ",", "char", "[", "]", "fragmentSource", ",", "int", "fragmentKind", ")", "{", "}", "}", ";", "evaluateVariables", "(", "environment", ",", "options", ",", "variableRequestor", ",", "new", "DefaultProblemFactory", "(", "Locale", ".", "getDefault", "(", ")", ")", ")", ";", "}", "catch", "(", "InstallException", "e", ")", "{", "}", "final", "char", "[", "]", "className", "=", "\"\"", ".", "toCharArray", "(", ")", ";", "final", "CodeSnippetToCuMapper", "mapper", "=", "new", "CodeSnippetToCuMapper", "(", "codeSnippet", ",", "this", ".", "packageName", ",", "this", ".", "imports", ",", "className", ",", "this", ".", "installedVars", "==", "null", "?", "null", ":", "this", ".", "installedVars", ".", "className", ",", "this", ".", "localVariableNames", ",", "this", ".", "localVariableTypeNames", ",", "this", ".", "localVariableModifiers", ",", "this", ".", "declaringTypeName", ",", "this", ".", "lineSeparator", ")", ";", "ICompilationUnit", "sourceUnit", "=", "new", "ICompilationUnit", "(", ")", "{", "public", "char", "[", "]", "getFileName", "(", ")", "{", "return", "CharOperation", ".", "concat", "(", "className", ",", "Util", ".", "defaultJavaExtension", "(", ")", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "char", "[", "]", "getContents", "(", ")", "{", "return", "mapper", ".", "getCUSource", "(", "EvaluationContext", ".", "this", ".", "lineSeparator", ")", ";", "}", "public", "char", "[", "]", "getMainTypeName", "(", ")", "{", "return", "className", ";", "}", "public", "char", "[", "]", "[", "]", "getPackageName", "(", ")", "{", "return", "null", ";", "}", "}", ";", "CompletionEngine", "engine", "=", "new", "CompletionEngine", "(", "environment", ",", "mapper", ".", "getCompletionRequestor", "(", "requestor", ")", ",", "options", ",", "project", ",", "owner", ",", "monitor", ")", ";", "if", "(", "this", ".", "installedVars", "!=", "null", ")", "{", "IBinaryType", "binaryType", "=", "getRootCodeSnippetBinary", "(", ")", ";", "if", "(", "binaryType", "!=", "null", ")", "{", "engine", ".", "lookupEnvironment", ".", "cacheBinaryType", "(", "binaryType", ",", "null", ")", ";", "}", "ClassFile", "[", "]", "classFiles", "=", "this", ".", "installedVars", ".", "classFiles", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "classFiles", ".", "length", ";", "i", "++", ")", "{", "ClassFile", "classFile", "=", "classFiles", "[", "i", "]", ";", "IBinaryType", "binary", "=", "null", ";", "try", "{", "binary", "=", "new", "ClassFileReader", "(", "classFile", ".", "getBytes", "(", ")", ",", "null", ")", ";", "}", "catch", "(", "ClassFormatException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "engine", ".", "lookupEnvironment", ".", "cacheBinaryType", "(", "binary", ",", "null", ")", ";", "}", "}", "engine", ".", "complete", "(", "sourceUnit", ",", "mapper", ".", "startPosOffset", "+", "completionPosition", ",", "mapper", ".", "startPosOffset", ",", "null", ")", ";", "}", "public", "void", "deleteVariable", "(", "GlobalVariable", "variable", ")", "{", "GlobalVariable", "[", "]", "vars", "=", "this", ".", "variables", ";", "int", "index", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "variableCount", ";", "i", "++", ")", "{", "if", "(", "vars", "[", "i", "]", ".", "equals", "(", "variable", ")", ")", "{", "index", "=", "i", ";", "break", ";", "}", "}", "if", "(", "index", "==", "-", "1", ")", "{", "return", ";", "}", "int", "elementCount", "=", "this", ".", "variableCount", "--", ";", "int", "j", "=", "elementCount", "-", "index", "-", "1", ";", "if", "(", "j", ">", "0", ")", "{", "System", ".", "arraycopy", "(", "vars", ",", "index", "+", "1", ",", "vars", ",", "index", ",", "j", ")", ";", "}", "vars", "[", "elementCount", "-", "1", "]", "=", "null", ";", "this", ".", "varsChanged", "=", "true", ";", "}", "private", "void", "deployCodeSnippetClassIfNeeded", "(", "IRequestor", "requestor", ")", "throws", "InstallException", "{", "if", "(", "this", ".", "codeSnippetBinary", "==", "null", ")", "{", "if", "(", "!", "requestor", ".", "acceptClassFiles", "(", "new", "ClassFile", "[", "]", "{", "new", "ClassFile", "(", ")", "{", "public", "byte", "[", "]", "getBytes", "(", ")", "{", "return", "getCodeSnippetBytes", "(", ")", ";", "}", "public", "char", "[", "]", "[", "]", "getCompoundName", "(", ")", "{", "return", "EvaluationConstants", ".", "ROOT_COMPOUND_NAME", ";", "}", "}", "}", ",", "null", ")", ")", "throw", "new", "InstallException", "(", ")", ";", "}", "}", "public", "void", "evaluate", "(", "char", "[", "]", "codeSnippet", ",", "char", "[", "]", "[", "]", "contextLocalVariableTypeNames", ",", "char", "[", "]", "[", "]", "contextLocalVariableNames", ",", "int", "[", "]", "contextLocalVariableModifiers", ",", "char", "[", "]", "contextDeclaringTypeName", ",", "boolean", "contextIsStatic", ",", "boolean", "contextIsConstructorCall", ",", "INameEnvironment", "environment", ",", "Map", "options", ",", "final", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "throws", "InstallException", "{", "this", ".", "localVariableTypeNames", "=", "contextLocalVariableTypeNames", ";", "this", ".", "localVariableNames", "=", "contextLocalVariableNames", ";", "this", ".", "localVariableModifiers", "=", "contextLocalVariableModifiers", ";", "this", ".", "declaringTypeName", "=", "contextDeclaringTypeName", ";", "this", ".", "isStatic", "=", "contextIsStatic", ";", "this", ".", "isConstructorCall", "=", "contextIsConstructorCall", ";", "deployCodeSnippetClassIfNeeded", "(", "requestor", ")", ";", "try", "{", "class", "ForwardingRequestor", "implements", "IRequestor", "{", "boolean", "hasErrors", "=", "false", ";", "public", "boolean", "acceptClassFiles", "(", "ClassFile", "[", "]", "classFiles", ",", "char", "[", "]", "codeSnippetClassName", ")", "{", "return", "requestor", ".", "acceptClassFiles", "(", "classFiles", ",", "codeSnippetClassName", ")", ";", "}", "public", "void", "acceptProblem", "(", "CategorizedProblem", "problem", ",", "char", "[", "]", "fragmentSource", ",", "int", "fragmentKind", ")", "{", "requestor", ".", "acceptProblem", "(", "problem", ",", "fragmentSource", ",", "fragmentKind", ")", ";", "if", "(", "problem", ".", "isError", "(", ")", ")", "{", "this", ".", "hasErrors", "=", "true", ";", "}", "}", "}", "ForwardingRequestor", "forwardingRequestor", "=", "new", "ForwardingRequestor", "(", ")", ";", "if", "(", "this", ".", "varsChanged", ")", "{", "evaluateVariables", "(", "environment", ",", "options", ",", "forwardingRequestor", ",", "problemFactory", ")", ";", "}", "if", "(", "!", "forwardingRequestor", ".", "hasErrors", ")", "{", "Evaluator", "evaluator", "=", "new", "CodeSnippetEvaluator", "(", "codeSnippet", ",", "this", ",", "environment", ",", "options", ",", "requestor", ",", "problemFactory", ")", ";", "ClassFile", "[", "]", "classes", "=", "evaluator", ".", "getClasses", "(", ")", ";", "if", "(", "classes", "!=", "null", "&&", "classes", ".", "length", ">", "0", ")", "{", "char", "[", "]", "simpleClassName", "=", "evaluator", ".", "getClassName", "(", ")", ";", "char", "[", "]", "pkgName", "=", "getPackageName", "(", ")", ";", "char", "[", "]", "qualifiedClassName", "=", "pkgName", ".", "length", "==", "0", "?", "simpleClassName", ":", "CharOperation", ".", "concat", "(", "pkgName", ",", "simpleClassName", ",", "'.'", ")", ";", "CODE_SNIPPET_COUNTER", "++", ";", "if", "(", "!", "requestor", ".", "acceptClassFiles", "(", "classes", ",", "qualifiedClassName", ")", ")", "throw", "new", "InstallException", "(", ")", ";", "}", "}", "}", "finally", "{", "this", ".", "localVariableTypeNames", "=", "null", ";", "this", ".", "localVariableNames", "=", "null", ";", "this", ".", "localVariableModifiers", "=", "null", ";", "this", ".", "declaringTypeName", "=", "null", ";", "this", ".", "isStatic", "=", "true", ";", "this", ".", "isConstructorCall", "=", "false", ";", "}", "}", "public", "void", "evaluate", "(", "char", "[", "]", "codeSnippet", ",", "INameEnvironment", "environment", ",", "Map", "options", ",", "final", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "throws", "InstallException", "{", "this", ".", "evaluate", "(", "codeSnippet", ",", "null", ",", "null", ",", "null", ",", "null", ",", "true", ",", "false", ",", "environment", ",", "options", ",", "requestor", ",", "problemFactory", ")", ";", "}", "public", "void", "evaluateImports", "(", "INameEnvironment", "environment", ",", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "imports", ".", "length", ";", "i", "++", ")", "{", "CategorizedProblem", "[", "]", "problems", "=", "new", "CategorizedProblem", "[", "]", "{", "null", "}", ";", "char", "[", "]", "importDeclaration", "=", "this", ".", "imports", "[", "i", "]", ";", "char", "[", "]", "[", "]", "splitDeclaration", "=", "CharOperation", ".", "splitOn", "(", "'.'", ",", "importDeclaration", ")", ";", "int", "splitLength", "=", "splitDeclaration", ".", "length", ";", "if", "(", "splitLength", ">", "0", ")", "{", "char", "[", "]", "pkgName", "=", "splitDeclaration", "[", "splitLength", "-", "1", "]", ";", "if", "(", "pkgName", ".", "length", "==", "1", "&&", "pkgName", "[", "0", "]", "==", "'*'", ")", "{", "char", "[", "]", "[", "]", "parentName", ";", "switch", "(", "splitLength", ")", "{", "case", "1", ":", "parentName", "=", "null", ";", "break", ";", "case", "2", ":", "parentName", "=", "null", ";", "pkgName", "=", "splitDeclaration", "[", "splitLength", "-", "2", "]", ";", "break", ";", "default", ":", "parentName", "=", "CharOperation", ".", "subarray", "(", "splitDeclaration", ",", "0", ",", "splitLength", "-", "2", ")", ";", "pkgName", "=", "splitDeclaration", "[", "splitLength", "-", "2", "]", ";", "}", "if", "(", "!", "environment", ".", "isPackage", "(", "parentName", ",", "pkgName", ")", ")", "{", "String", "[", "]", "arguments", "=", "new", "String", "[", "]", "{", "new", "String", "(", "importDeclaration", ")", "}", ";", "problems", "[", "0", "]", "=", "problemFactory", ".", "createProblem", "(", "importDeclaration", ",", "IProblem", ".", "ImportNotFound", ",", "arguments", ",", "arguments", ",", "ProblemSeverities", ".", "Warning", ",", "0", ",", "importDeclaration", ".", "length", "-", "1", ",", "i", ",", "0", ")", ";", "}", "}", "else", "{", "if", "(", "environment", ".", "findType", "(", "splitDeclaration", ")", "==", "null", ")", "{", "String", "[", "]", "arguments", "=", "new", "String", "[", "]", "{", "new", "String", "(", "importDeclaration", ")", "}", ";", "problems", "[", "0", "]", "=", "problemFactory", ".", "createProblem", "(", "importDeclaration", ",", "IProblem", ".", "ImportNotFound", ",", "arguments", ",", "arguments", ",", "ProblemSeverities", ".", "Warning", ",", "0", ",", "importDeclaration", ".", "length", "-", "1", ",", "i", ",", "0", ")", ";", "}", "}", "}", "else", "{", "String", "[", "]", "arguments", "=", "new", "String", "[", "]", "{", "new", "String", "(", "importDeclaration", ")", "}", ";", "problems", "[", "0", "]", "=", "problemFactory", ".", "createProblem", "(", "importDeclaration", ",", "IProblem", ".", "ImportNotFound", ",", "arguments", ",", "arguments", ",", "ProblemSeverities", ".", "Warning", ",", "0", ",", "importDeclaration", ".", "length", "-", "1", ",", "i", ",", "0", ")", ";", "}", "if", "(", "problems", "[", "0", "]", "!=", "null", ")", "{", "requestor", ".", "acceptProblem", "(", "problems", "[", "0", "]", ",", "importDeclaration", ",", "EvaluationResult", ".", "T_IMPORT", ")", ";", "}", "}", "}", "public", "void", "evaluateVariable", "(", "GlobalVariable", "variable", ",", "INameEnvironment", "environment", ",", "Map", "options", ",", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "throws", "InstallException", "{", "this", ".", "evaluate", "(", "variable", ".", "getName", "(", ")", ",", "environment", ",", "options", ",", "requestor", ",", "problemFactory", ")", ";", "}", "public", "void", "evaluateVariables", "(", "INameEnvironment", "environment", ",", "Map", "options", ",", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "throws", "InstallException", "{", "deployCodeSnippetClassIfNeeded", "(", "requestor", ")", ";", "VariablesEvaluator", "evaluator", "=", "new", "VariablesEvaluator", "(", "this", ",", "environment", ",", "options", ",", "requestor", ",", "problemFactory", ")", ";", "ClassFile", "[", "]", "classes", "=", "evaluator", ".", "getClasses", "(", ")", ";", "if", "(", "classes", "!=", "null", ")", "{", "if", "(", "classes", ".", "length", ">", "0", ")", "{", "Util", ".", "sort", "(", "classes", ",", "new", "Util", ".", "Comparer", "(", ")", "{", "public", "int", "compare", "(", "Object", "a", ",", "Object", "b", ")", "{", "if", "(", "a", "==", "b", ")", "return", "0", ";", "ClassFile", "enclosing", "=", "(", "(", "ClassFile", ")", "a", ")", ".", "enclosingClassFile", ";", "while", "(", "enclosing", "!=", "null", ")", "{", "if", "(", "enclosing", "==", "b", ")", "return", "1", ";", "enclosing", "=", "enclosing", ".", "enclosingClassFile", ";", "}", "return", "-", "1", ";", "}", "}", ")", ";", "if", "(", "!", "requestor", ".", "acceptClassFiles", "(", "classes", ",", "null", ")", ")", "{", "throw", "new", "InstallException", "(", ")", ";", "}", "int", "count", "=", "this", ".", "variableCount", ";", "GlobalVariable", "[", "]", "variablesCopy", "=", "new", "GlobalVariable", "[", "count", "]", ";", "System", ".", "arraycopy", "(", "this", ".", "variables", ",", "0", ",", "variablesCopy", ",", "0", ",", "count", ")", ";", "this", ".", "installedVars", "=", "new", "VariablesInfo", "(", "evaluator", ".", "getPackageName", "(", ")", ",", "evaluator", ".", "getClassName", "(", ")", ",", "classes", ",", "variablesCopy", ",", "count", ")", ";", "VAR_CLASS_COUNTER", "++", ";", "}", "this", ".", "varsChanged", "=", "false", ";", "}", "}", "byte", "[", "]", "getCodeSnippetBytes", "(", ")", "{", "return", "new", "byte", "[", "]", "{", "-", "54", ",", "-", "2", ",", "-", "70", ",", "-", "66", ",", "0", ",", "3", ",", "0", ",", "45", ",", "0", ",", "35", ",", "1", ",", "0", ",", "48", ",", "111", ",", "114", ",", "103", ",", "47", ",", "101", ",", "99", ",", "108", ",", "105", ",", "112", ",", "115", ",", "101", ",", "47", ",", "106", ",", "100", ",", "116", ",", "47", ",", "105", ",", "110", ",", "116", ",", "101", ",", "114", ",", "110", ",", "97", ",", "108", ",", "47", ",", "101", ",", "118", ",", "97", ",", "108", ",", "47", ",", "116", ",", "97", ",", "114", ",", "103", ",", "101", ",", "116", ",", "47", ",", "67", ",", "111", ",", "100", ",", "101", ",", "83", ",", "110", ",", "105", ",", "112", ",", "112", ",", "101", ",", "116", ",", "7", ",", "0", ",", "1", ",", "1", ",", "0", ",", "16", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "79", ",", "98", ",", "106", ",", "101", ",", "99", ",", "116", ",", "7", ",", "0", ",", "3", ",", "1", ",", "0", ",", "10", ",", "114", ",", "101", ",", "115", ",", "117", ",", "108", ",", "116", ",", "84", ",", "121", ",", "112", ",", "101", ",", "1", ",", "0", ",", "17", ",", "76", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "67", ",", "108", ",", "97", ",", "115", ",", "115", ",", "59", ",", "1", ",", "0", ",", "11", ",", "114", ",", "101", ",", "115", ",", "117", ",", "108", ",", "116", ",", "86", ",", "97", ",", "108", ",", "117", ",", "101", ",", "1", ",", "0", ",", "18", ",", "76", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "79", ",", "98", ",", "106", ",", "101", ",", "99", ",", "116", ",", "59", ",", "1", ",", "0", ",", "7", ",", "99", ",", "108", ",", "97", ",", "115", ",", "115", ",", "36", ",", "48", ",", "1", ",", "0", ",", "9", ",", "83", ",", "121", ",", "110", ",", "116", ",", "104", ",", "101", ",", "116", ",", "105", ",", "99", ",", "1", ",", "0", ",", "6", ",", "60", ",", "105", ",", "110", ",", "105", ",", "116", ",", "62", ",", "1", ",", "0", ",", "3", ",", "40", ",", "41", ",", "86", ",", "1", ",", "0", ",", "4", ",", "67", ",", "111", ",", "100", ",", "101", ",", "12", ",", "0", ",", "11", ",", "0", ",", "12", ",", "10", ",", "0", ",", "4", ",", "0", ",", "14", ",", "1", ",", "0", ",", "14", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "86", ",", "111", ",", "105", ",", "100", ",", "7", ",", "0", ",", "16", ",", "1", ",", "0", ",", "4", ",", "84", ",", "89", ",", "80", ",", "69", ",", "12", ",", "0", ",", "18", ",", "0", ",", "6", ",", "9", ",", "0", ",", "17", ",", "0", ",", "19", ",", "12", ",", "0", ",", "5", ",", "0", ",", "6", ",", "9", ",", "0", ",", "2", ",", "0", ",", "21", ",", "12", ",", "0", ",", "7", ",", "0", ",", "8", ",", "9", ",", "0", ",", "2", ",", "0", ",", "23", ",", "1", ",", "0", ",", "15", ",", "76", ",", "105", ",", "110", ",", "101", ",", "78", ",", "117", ",", "109", ",", "98", ",", "101", ",", "114", ",", "84", ",", "97", ",", "98", ",", "108", ",", "101", ",", "1", ",", "0", ",", "13", ",", "103", ",", "101", ",", "116", ",", "82", ",", "101", ",", "115", ",", "117", ",", "108", ",", "116", ",", "84", ",", "121", ",", "112", ",", "101", ",", "1", ",", "0", ",", "19", ",", "40", ",", "41", ",", "76", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "67", ",", "108", ",", "97", ",", "115", ",", "115", ",", "59", ",", "1", ",", "0", ",", "14", ",", "103", ",", "101", ",", "116", ",", "82", ",", "101", ",", "115", ",", "117", ",", "108", ",", "116", ",", "86", ",", "97", ",", "108", ",", "117", ",", "101", ",", "1", ",", "0", ",", "20", ",", "40", ",", "41", ",", "76", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "79", ",", "98", ",", "106", ",", "101", ",", "99", ",", "116", ",", "59", ",", "1", ",", "0", ",", "3", ",", "114", ",", "117", ",", "110", ",", "1", ",", "0", ",", "9", ",", "115", ",", "101", ",", "116", ",", "82", ",", "101", ",", "115", ",", "117", ",", "108", ",", "116", ",", "1", ",", "0", ",", "38", ",", "40", ",", "76", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "79", ",", "98", ",", "106", ",", "101", ",", "99", ",", "116", ",", "59", ",", "76", ",", "106", ",", "97", ",", "118", ",", "97", ",", "47", ",", "108", ",", "97", ",", "110", ",", "103", ",", "47", ",", "67", ",", "108", ",", "97", ",", "115", ",", "115", ",", "59", ",", "41", ",", "86", ",", "1", ",", "0", ",", "10", ",", "83", ",", "111", ",", "117", ",", "114", ",", "99", ",", "101", ",", "70", ",", "105", ",", "108", ",", "101", ",", "1", ",", "0", ",", "16", ",", "67", ",", "111", ",", "100", ",", "101", ",", "83", ",", "110", ",", "105", ",", "112", ",", "112", ",", "101", ",", "116", ",", "46", ",", "106", ",", "97", ",", "118", ",", "97", ",", "0", ",", "33", ",", "0", ",", "2", ",", "0", ",", "4", ",", "0", ",", "0", ",", "0", ",", "3", ",", "0", ",", "2", ",", "0", ",", "5", ",", "0", ",", "6", ",", "0", ",", "0", ",", "0", ",", "2", ",", "0", ",", "7", ",", "0", ",", "8", ",", "0", ",", "0", ",", "0", ",", "8", ",", "0", ",", "9", ",", "0", ",", "6", ",", "0", ",", "1", ",", "0", ",", "10", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "5", ",", "0", ",", "1", ",", "0", ",", "11", ",", "0", ",", "12", ",", "0", ",", "1", ",", "0", ",", "13", ",", "0", ",", "0", ",", "0", ",", "53", ",", "0", ",", "2", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "17", ",", "42", ",", "-", "73", ",", "0", ",", "15", ",", "42", ",", "-", "78", ",", "0", ",", "20", ",", "-", "75", ",", "0", ",", "22", ",", "42", ",", "1", ",", "-", "75", ",", "0", ",", "24", ",", "-", "79", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "25", ",", "0", ",", "0", ",", "0", ",", "18", ",", "0", ",", "4", ",", "0", ",", "0", ",", "0", ",", "17", ",", "0", ",", "4", ",", "0", ",", "18", ",", "0", ",", "11", ",", "0", ",", "19", ",", "0", ",", "16", ",", "0", ",", "17", ",", "0", ",", "1", ",", "0", ",", "26", ",", "0", ",", "27", ",", "0", ",", "1", ",", "0", ",", "13", ",", "0", ",", "0", ",", "0", ",", "29", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "5", ",", "42", ",", "-", "76", ",", "0", ",", "22", ",", "-", "80", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "25", ",", "0", ",", "0", ",", "0", ",", "6", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "24", ",", "0", ",", "1", ",", "0", ",", "28", ",", "0", ",", "29", ",", "0", ",", "1", ",", "0", ",", "13", ",", "0", ",", "0", ",", "0", ",", "29", ",", "0", ",", "1", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "5", ",", "42", ",", "-", "76", ",", "0", ",", "24", ",", "-", "80", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "25", ",", "0", ",", "0", ",", "0", ",", "6", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "30", ",", "0", ",", "1", ",", "0", ",", "30", ",", "0", ",", "12", ",", "0", ",", "1", ",", "0", ",", "13", ",", "0", ",", "0", ",", "0", ",", "25", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "1", ",", "-", "79", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "25", ",", "0", ",", "0", ",", "0", ",", "6", ",", "0", ",", "1", ",", "0", ",", "0", ",", "0", ",", "36", ",", "0", ",", "1", ",", "0", ",", "31", ",", "0", ",", "32", ",", "0", ",", "1", ",", "0", ",", "13", ",", "0", ",", "0", ",", "0", ",", "43", ",", "0", ",", "2", ",", "0", ",", "3", ",", "0", ",", "0", ",", "0", ",", "11", ",", "42", ",", "43", ",", "-", "75", ",", "0", ",", "24", ",", "42", ",", "44", ",", "-", "75", ",", "0", ",", "22", ",", "-", "79", ",", "0", ",", "0", ",", "0", ",", "1", ",", "0", ",", "25", ",", "0", ",", "0", ",", "0", ",", "14", ",", "0", ",", "3", ",", "0", ",", "0", ",", "0", ",", "42", ",", "0", ",", "5", ",", "0", ",", "43", ",", "0", ",", "10", ",", "0", ",", "41", ",", "0", ",", "1", ",", "0", ",", "33", ",", "0", ",", "0", ",", "0", ",", "2", ",", "0", ",", "34", "}", ";", "}", "public", "static", "String", "getCodeSnippetSource", "(", ")", "{", "return", "\"\"", "+", "\"n\"", "+", "\"/*n\"", "+", "\"\"", "+", "\"\"", "+", "\"", "*/n\"", "+", "\"/**n\"", "+", "\"\"", "+", "\"\"", "+", "\"", "*", "<p>n\"", "+", "\"\"", "+", "\"\"", "+", "\"\"", "+", "\"\"", "+", "\"", "*/n\"", "+", "\"\"", "+", "\"\"", "+", "\"\"", "+", "\"/**n\"", "+", "\"\"", "+", "\"", "*/n\"", "+", "\"\"", "+", "\"\"", "+", "\"}n\"", "+", "\"/**n\"", "+", "\"\"", "+", "\"", "*/n\"", "+", "\"\"", "+", "\"\"", "+", "\"}n\"", "+", "\"/**n\"", "+", "\"\"", "+", "\"\"", "+", "\"", "*/n\"", "+", "\"\"", "+", "\"}n\"", "+", "\"/**n\"", "+", "\"\"", "+", "\"", "*/n\"", "+", "\"\"", "+", "\"\"", "+", "\"\"", "+", "\"}n\"", "+", "\"}n\"", ";", "}", "public", "char", "[", "]", "[", "]", "getImports", "(", ")", "{", "return", "this", ".", "imports", ";", "}", "public", "char", "[", "]", "getPackageName", "(", ")", "{", "return", "this", ".", "packageName", ";", "}", "IBinaryType", "getRootCodeSnippetBinary", "(", ")", "{", "if", "(", "this", ".", "codeSnippetBinary", "==", "null", ")", "{", "this", ".", "codeSnippetBinary", "=", "new", "CodeSnippetSkeleton", "(", ")", ";", "}", "return", "this", ".", "codeSnippetBinary", ";", "}", "public", "char", "[", "]", "getVarClassName", "(", ")", "{", "if", "(", "this", ".", "installedVars", "==", "null", ")", "return", "CharOperation", ".", "NO_CHAR", ";", "return", "CharOperation", ".", "concat", "(", "this", ".", "installedVars", ".", "packageName", ",", "this", ".", "installedVars", ".", "className", ",", "'.'", ")", ";", "}", "public", "GlobalVariable", "newVariable", "(", "char", "[", "]", "typeName", ",", "char", "[", "]", "name", ",", "char", "[", "]", "initializer", ")", "{", "GlobalVariable", "var", "=", "new", "GlobalVariable", "(", "typeName", ",", "name", ",", "initializer", ")", ";", "if", "(", "this", ".", "variableCount", ">=", "this", ".", "variables", ".", "length", ")", "System", ".", "arraycopy", "(", "this", ".", "variables", ",", "0", ",", "this", ".", "variables", "=", "new", "GlobalVariable", "[", "this", ".", "variableCount", "*", "2", "]", ",", "0", ",", "this", ".", "variableCount", ")", ";", "this", ".", "variables", "[", "this", ".", "variableCount", "++", "]", "=", "var", ";", "this", ".", "varsChanged", "=", "true", ";", "return", "var", ";", "}", "public", "void", "select", "(", "char", "[", "]", "codeSnippet", ",", "int", "selectionSourceStart", ",", "int", "selectionSourceEnd", ",", "SearchableEnvironment", "environment", ",", "ISelectionRequestor", "requestor", ",", "Map", "options", ",", "WorkingCopyOwner", "owner", ")", "{", "final", "char", "[", "]", "className", "=", "\"\"", ".", "toCharArray", "(", ")", ";", "final", "CodeSnippetToCuMapper", "mapper", "=", "new", "CodeSnippetToCuMapper", "(", "codeSnippet", ",", "this", ".", "packageName", ",", "this", ".", "imports", ",", "className", ",", "this", ".", "installedVars", "==", "null", "?", "null", ":", "this", ".", "installedVars", ".", "className", ",", "this", ".", "localVariableNames", ",", "this", ".", "localVariableTypeNames", ",", "this", ".", "localVariableModifiers", ",", "this", ".", "declaringTypeName", ",", "this", ".", "lineSeparator", ")", ";", "ICompilationUnit", "sourceUnit", "=", "new", "ICompilationUnit", "(", ")", "{", "public", "char", "[", "]", "getFileName", "(", ")", "{", "return", "CharOperation", ".", "concat", "(", "className", ",", "Util", ".", "defaultJavaExtension", "(", ")", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "char", "[", "]", "getContents", "(", ")", "{", "return", "mapper", ".", "getCUSource", "(", "EvaluationContext", ".", "this", ".", "lineSeparator", ")", ";", "}", "public", "char", "[", "]", "getMainTypeName", "(", ")", "{", "return", "className", ";", "}", "public", "char", "[", "]", "[", "]", "getPackageName", "(", ")", "{", "return", "null", ";", "}", "}", ";", "SelectionEngine", "engine", "=", "new", "SelectionEngine", "(", "environment", ",", "mapper", ".", "getSelectionRequestor", "(", "requestor", ")", ",", "options", ",", "owner", ")", ";", "engine", ".", "select", "(", "sourceUnit", ",", "mapper", ".", "startPosOffset", "+", "selectionSourceStart", ",", "mapper", ".", "startPosOffset", "+", "selectionSourceEnd", ")", ";", "}", "public", "void", "setImports", "(", "char", "[", "]", "[", "]", "imports", ")", "{", "this", ".", "imports", "=", "imports", ";", "this", ".", "varsChanged", "=", "true", ";", "}", "public", "void", "setLineSeparator", "(", "String", "lineSeparator", ")", "{", "this", ".", "lineSeparator", "=", "lineSeparator", ";", "}", "public", "void", "setPackageName", "(", "char", "[", "]", "packageName", ")", "{", "this", ".", "packageName", "=", "packageName", ";", "this", ".", "varsChanged", "=", "true", ";", "}", "}", "</s>" ]
5,112
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Assignment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "BinaryExpression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompoundAssignment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "IntLiteral", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "SingleNameReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "CodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "Opcodes", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "flow", ".", "FlowContext", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "flow", ".", "FlowInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ClassScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "LocalVariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ParameterizedFieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemFieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReasons", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Scope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TagBits", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeIds", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", ";", "public", "class", "CodeSnippetSingleNameReference", "extends", "SingleNameReference", "implements", "EvaluationConstants", ",", "ProblemReasons", "{", "EvaluationContext", "evaluationContext", ";", "FieldBinding", "delegateThis", ";", "public", "CodeSnippetSingleNameReference", "(", "char", "[", "]", "source", ",", "long", "pos", ",", "EvaluationContext", "evaluationContext", ")", "{", "super", "(", "source", ",", "pos", ")", ";", "this", ".", "evaluationContext", "=", "evaluationContext", ";", "}", "public", "FlowInfo", "analyseCode", "(", "BlockScope", "currentScope", ",", "FlowContext", "flowContext", ",", "FlowInfo", "flowInfo", ",", "boolean", "valueRequired", ")", "{", "switch", "(", "this", ".", "bits", "&", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "FieldBinding", "fieldBinding", ";", "if", "(", "(", "fieldBinding", "=", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "isBlankFinal", "(", ")", "&&", "currentScope", ".", "needBlankFinalFieldInitializationCheck", "(", "fieldBinding", ")", ")", "{", "FlowInfo", "fieldInits", "=", "flowContext", ".", "getInitsForFinalBlankInitializationCheck", "(", "fieldBinding", ".", "declaringClass", ".", "original", "(", ")", ",", "flowInfo", ")", ";", "if", "(", "!", "fieldInits", ".", "isDefinitelyAssigned", "(", "fieldBinding", ")", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "uninitializedBlankFinalField", "(", "fieldBinding", ",", "this", ")", ";", "}", "}", "break", ";", "case", "Binding", ".", "LOCAL", ":", "LocalVariableBinding", "localBinding", ";", "if", "(", "!", "flowInfo", ".", "isDefinitelyAssigned", "(", "localBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ")", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "uninitializedLocalVariable", "(", "localBinding", ",", "this", ")", ";", "}", "if", "(", "(", "flowInfo", ".", "tagBits", "&", "FlowInfo", ".", "UNREACHABLE", ")", "==", "0", ")", "{", "localBinding", ".", "useFlag", "=", "LocalVariableBinding", ".", "USED", ";", "}", "else", "if", "(", "localBinding", ".", "useFlag", "==", "LocalVariableBinding", ".", "UNUSED", ")", "{", "localBinding", ".", "useFlag", "=", "LocalVariableBinding", ".", "FAKE_USED", ";", "}", "}", "return", "flowInfo", ";", "}", "public", "TypeBinding", "checkFieldAccess", "(", "BlockScope", "scope", ")", "{", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "return", "super", ".", "checkFieldAccess", "(", "scope", ")", ";", "}", "FieldBinding", "fieldBinding", "=", "(", "FieldBinding", ")", "this", ".", "binding", ";", "this", ".", "bits", "&=", "~", "RestrictiveFlagMASK", ";", "this", ".", "bits", "|=", "Binding", ".", "FIELD", ";", "if", "(", "!", "fieldBinding", ".", "isStatic", "(", ")", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "isStatic", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "staticFieldAccessToNonStaticVariable", "(", "this", ",", "fieldBinding", ")", ";", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "return", "null", ";", "}", "}", "this", ".", "constant", "=", "fieldBinding", ".", "constant", "(", ")", ";", "if", "(", "isFieldUseDeprecated", "(", "fieldBinding", ",", "scope", ",", "(", "this", ".", "bits", "&", "IsStrictlyAssigned", ")", "!=", "0", ")", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "deprecatedField", "(", "fieldBinding", ",", "this", ")", ";", "}", "return", "fieldBinding", ".", "type", ";", "}", "public", "void", "generateAssignment", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "Assignment", "assignment", ",", "boolean", "valueRequired", ")", "{", "if", "(", "assignment", ".", "expression", ".", "isCompactableOperation", "(", ")", ")", "{", "BinaryExpression", "operation", "=", "(", "BinaryExpression", ")", "assignment", ".", "expression", ";", "int", "operator", "=", "(", "operation", ".", "bits", "&", "OperatorMASK", ")", ">>", "OperatorSHIFT", ";", "SingleNameReference", "variableReference", ";", "if", "(", "(", "operation", ".", "left", "instanceof", "SingleNameReference", ")", "&&", "(", "(", "variableReference", "=", "(", "SingleNameReference", ")", "operation", ".", "left", ")", ".", "binding", "==", "this", ".", "binding", ")", ")", "{", "variableReference", ".", "generateCompoundAssignment", "(", "currentScope", ",", "codeStream", ",", "this", ".", "syntheticAccessors", "==", "null", "?", "null", ":", "this", ".", "syntheticAccessors", "[", "WRITE", "]", ",", "operation", ".", "right", ",", "operator", ",", "operation", ".", "implicitConversion", ",", "valueRequired", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "return", ";", "}", "if", "(", "(", "operation", ".", "right", "instanceof", "SingleNameReference", ")", "&&", "(", "(", "operator", "==", "PLUS", ")", "||", "(", "operator", "==", "MULTIPLY", ")", ")", "&&", "(", "(", "variableReference", "=", "(", "SingleNameReference", ")", "operation", ".", "right", ")", ".", "binding", "==", "this", ".", "binding", ")", "&&", "(", "operation", ".", "left", ".", "constant", "!=", "Constant", ".", "NotAConstant", ")", "&&", "(", "(", "(", "operation", ".", "left", ".", "implicitConversion", "&", "IMPLICIT_CONVERSION_MASK", ")", ">>", "4", ")", "!=", "T_JavaLangString", ")", "&&", "(", "(", "(", "operation", ".", "right", ".", "implicitConversion", "&", "IMPLICIT_CONVERSION_MASK", ")", ">>", "4", ")", "!=", "T_JavaLangString", ")", ")", "{", "variableReference", ".", "generateCompoundAssignment", "(", "currentScope", ",", "codeStream", ",", "this", ".", "syntheticAccessors", "==", "null", "?", "null", ":", "this", ".", "syntheticAccessors", "[", "WRITE", "]", ",", "operation", ".", "left", ",", "operator", ",", "operation", ".", "implicitConversion", ",", "valueRequired", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "return", ";", "}", "}", "switch", "(", "this", ".", "bits", "&", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "FieldBinding", "codegenField", "=", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "original", "(", ")", ";", "if", "(", "codegenField", ".", "canBeSeenBy", "(", "getReceiverType", "(", "currentScope", ")", ",", "this", ",", "currentScope", ")", ")", "{", "if", "(", "!", "codegenField", ".", "isStatic", "(", ")", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "ReferenceBinding", "targetType", "=", "currentScope", ".", "enclosingSourceType", "(", ")", ".", "enclosingTypeAt", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", ">>", "DepthSHIFT", ")", ";", "Object", "[", "]", "emulationPath", "=", "currentScope", ".", "getEmulationPath", "(", "targetType", ",", "true", ",", "false", ")", ";", "codeStream", ".", "generateOuterAccess", "(", "emulationPath", ",", "this", ",", "targetType", ",", "currentScope", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "}", "assignment", ".", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "fieldStore", "(", "currentScope", ",", "codeStream", ",", "codegenField", ",", "null", ",", "this", ".", "actualReceiverType", ",", "this", ".", "delegateThis", "==", "null", ",", "valueRequired", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "}", "else", "{", "codeStream", ".", "generateEmulationForField", "(", "codegenField", ")", ";", "if", "(", "!", "codegenField", ".", "isStatic", "(", ")", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "needImplementation", "(", "this", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "}", "else", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "assignment", ".", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "if", "(", "valueRequired", ")", "{", "if", "(", "(", "codegenField", ".", "type", "==", "TypeBinding", ".", "LONG", ")", "||", "(", "codegenField", ".", "type", "==", "TypeBinding", ".", "DOUBLE", ")", ")", "{", "codeStream", ".", "dup2_x2", "(", ")", ";", "}", "else", "{", "codeStream", ".", "dup_x2", "(", ")", ";", "}", "}", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "codegenField", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "}", "return", ";", "case", "Binding", ".", "LOCAL", ":", "LocalVariableBinding", "localBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ";", "if", "(", "localBinding", ".", "resolvedPosition", "!=", "-", "1", ")", "{", "assignment", ".", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "}", "else", "{", "if", "(", "assignment", ".", "expression", ".", "constant", "!=", "Constant", ".", "NotAConstant", ")", "{", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateConstant", "(", "assignment", ".", "expression", ".", "constant", ",", "assignment", ".", "implicitConversion", ")", ";", "}", "}", "else", "{", "assignment", ".", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "else", "{", "if", "(", "(", "localBinding", ".", "type", "==", "TypeBinding", ".", "LONG", ")", "||", "(", "localBinding", ".", "type", "==", "TypeBinding", ".", "DOUBLE", ")", ")", "{", "codeStream", ".", "pop2", "(", ")", ";", "}", "else", "{", "codeStream", ".", "pop", "(", ")", ";", "}", "}", "}", "return", ";", "}", "codeStream", ".", "store", "(", "localBinding", ",", "valueRequired", ")", ";", "if", "(", "(", "this", ".", "bits", "&", "FirstAssignmentToLocal", ")", "!=", "0", ")", "{", "localBinding", ".", "recordInitializationStartPC", "(", "codeStream", ".", "position", ")", ";", "}", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateImplicitConversion", "(", "assignment", ".", "implicitConversion", ")", ";", "}", "}", "}", "public", "void", "generateCode", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "boolean", "valueRequired", ")", "{", "int", "pc", "=", "codeStream", ".", "position", ";", "if", "(", "this", ".", "constant", "!=", "Constant", ".", "NotAConstant", ")", "{", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "generateConstant", "(", "this", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "}", "}", "else", "{", "switch", "(", "this", ".", "bits", "&", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "if", "(", "!", "valueRequired", ")", "break", ";", "FieldBinding", "codegenField", "=", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "original", "(", ")", ";", "Constant", "fieldConstant", "=", "codegenField", ".", "constant", "(", ")", ";", "if", "(", "fieldConstant", "==", "Constant", ".", "NotAConstant", ")", "{", "if", "(", "codegenField", ".", "canBeSeenBy", "(", "getReceiverType", "(", "currentScope", ")", ",", "this", ",", "currentScope", ")", ")", "{", "TypeBinding", "someReceiverType", "=", "this", ".", "delegateThis", "!=", "null", "?", "this", ".", "delegateThis", ".", "type", ":", "this", ".", "actualReceiverType", ";", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "codegenField", ",", "someReceiverType", ",", "true", ")", ";", "if", "(", "codegenField", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getstatic", ",", "codegenField", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "ReferenceBinding", "targetType", "=", "currentScope", ".", "enclosingSourceType", "(", ")", ".", "enclosingTypeAt", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", ">>", "DepthSHIFT", ")", ";", "Object", "[", "]", "emulationPath", "=", "currentScope", ".", "getEmulationPath", "(", "targetType", ",", "true", ",", "false", ")", ";", "codeStream", ".", "generateOuterAccess", "(", "emulationPath", ",", "this", ",", "targetType", ",", "currentScope", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "codegenField", ",", "constantPoolDeclaringClass", ")", ";", "}", "}", "else", "{", "if", "(", "!", "codegenField", ".", "isStatic", "(", ")", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "needImplementation", "(", "this", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "}", "else", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenField", ")", ";", "}", "if", "(", "this", ".", "genericCast", "!=", "null", ")", "codeStream", ".", "checkcast", "(", "this", ".", "genericCast", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "codeStream", ".", "generateConstant", "(", "fieldConstant", ",", "this", ".", "implicitConversion", ")", ";", "}", "break", ";", "case", "Binding", ".", "LOCAL", ":", "LocalVariableBinding", "localBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ";", "if", "(", "!", "valueRequired", ")", "break", ";", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "VariableBinding", "[", "]", "path", "=", "currentScope", ".", "getEmulationPath", "(", "localBinding", ")", ";", "codeStream", ".", "generateOuterAccess", "(", "path", ",", "this", ",", "localBinding", ",", "currentScope", ")", ";", "}", "else", "{", "codeStream", ".", "load", "(", "localBinding", ")", ";", "}", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "break", ";", "}", "}", "codeStream", ".", "recordPositionsFrom", "(", "pc", ",", "this", ".", "sourceStart", ")", ";", "}", "public", "void", "generateCompoundAssignment", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "MethodBinding", "writeAccessor", ",", "Expression", "expression", ",", "int", "operator", ",", "int", "assignmentImplicitConversion", ",", "boolean", "valueRequired", ")", "{", "switch", "(", "this", ".", "bits", "&", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "FieldBinding", "codegenField", "=", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "original", "(", ")", ";", "if", "(", "codegenField", ".", "isStatic", "(", ")", ")", "{", "if", "(", "codegenField", ".", "canBeSeenBy", "(", "getReceiverType", "(", "currentScope", ")", ",", "this", ",", "currentScope", ")", ")", "{", "TypeBinding", "someReceiverType", "=", "this", ".", "delegateThis", "!=", "null", "?", "this", ".", "delegateThis", ".", "type", ":", "this", ".", "actualReceiverType", ";", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "codegenField", ",", "someReceiverType", ",", "true", ")", ";", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getstatic", ",", "codegenField", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "codeStream", ".", "generateEmulationForField", "(", "codegenField", ")", ";", "codeStream", ".", "aconst_null", "(", ")", ";", "codeStream", ".", "aconst_null", "(", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenField", ")", ";", "}", "}", "else", "{", "if", "(", "codegenField", ".", "canBeSeenBy", "(", "getReceiverType", "(", "currentScope", ")", ",", "this", ",", "currentScope", ")", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "ReferenceBinding", "targetType", "=", "currentScope", ".", "enclosingSourceType", "(", ")", ".", "enclosingTypeAt", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", ">>", "DepthSHIFT", ")", ";", "Object", "[", "]", "emulationPath", "=", "currentScope", ".", "getEmulationPath", "(", "targetType", ",", "true", ",", "false", ")", ";", "codeStream", ".", "generateOuterAccess", "(", "emulationPath", ",", "this", ",", "targetType", ",", "currentScope", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "codeStream", ".", "dup", "(", ")", ";", "TypeBinding", "someReceiverType", "=", "this", ".", "delegateThis", "!=", "null", "?", "this", ".", "delegateThis", ".", "type", ":", "this", ".", "actualReceiverType", ";", "TypeBinding", "constantPoolDeclaringClass", "=", "CodeStream", ".", "getConstantPoolDeclaringClass", "(", "currentScope", ",", "codegenField", ",", "someReceiverType", ",", "true", ")", ";", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "codegenField", ",", "constantPoolDeclaringClass", ")", ";", "}", "else", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "needImplementation", "(", "this", ")", ";", "}", "codeStream", ".", "generateEmulationForField", "(", "codegenField", ")", ";", "generateReceiver", "(", "codeStream", ")", ";", "codeStream", ".", "dup", "(", ")", ";", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenField", ")", ";", "}", "}", "break", ";", "case", "Binding", ".", "LOCAL", ":", "LocalVariableBinding", "localBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ";", "switch", "(", "localBinding", ".", "type", ".", "id", ")", "{", "case", "T_JavaLangString", ":", "codeStream", ".", "generateStringConcatenationAppend", "(", "currentScope", ",", "this", ",", "expression", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "dup", "(", ")", ";", "}", "codeStream", ".", "store", "(", "localBinding", ",", "false", ")", ";", "return", ";", "case", "T_int", ":", "Constant", "assignConstant", ";", "if", "(", "(", "(", "assignConstant", "=", "expression", ".", "constant", ")", "!=", "Constant", ".", "NotAConstant", ")", "&&", "(", "assignConstant", ".", "typeID", "(", ")", "!=", "TypeIds", ".", "T_float", ")", "&&", "(", "assignConstant", ".", "typeID", "(", ")", "!=", "TypeIds", ".", "T_double", ")", ")", "{", "switch", "(", "operator", ")", "{", "case", "PLUS", ":", "int", "increment", "=", "assignConstant", ".", "intValue", "(", ")", ";", "if", "(", "increment", "!=", "(", "short", ")", "increment", ")", "break", ";", "codeStream", ".", "iinc", "(", "localBinding", ".", "resolvedPosition", ",", "increment", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "load", "(", "localBinding", ")", ";", "}", "return", ";", "case", "MINUS", ":", "increment", "=", "-", "assignConstant", ".", "intValue", "(", ")", ";", "if", "(", "increment", "!=", "(", "short", ")", "increment", ")", "break", ";", "codeStream", ".", "iinc", "(", "localBinding", ".", "resolvedPosition", ",", "increment", ")", ";", "if", "(", "valueRequired", ")", "{", "codeStream", ".", "load", "(", "localBinding", ")", ";", "}", "return", ";", "}", "}", "default", ":", "codeStream", ".", "load", "(", "localBinding", ")", ";", "}", "}", "int", "operationTypeID", ";", "switch", "(", "operationTypeID", "=", "(", "this", ".", "implicitConversion", "&", "IMPLICIT_CONVERSION_MASK", ")", ">>", "4", ")", "{", "case", "T_JavaLangString", ":", "case", "T_JavaLangObject", ":", "case", "T_undefined", ":", "codeStream", ".", "generateStringConcatenationAppend", "(", "currentScope", ",", "null", ",", "expression", ")", ";", "break", ";", "default", ":", "codeStream", ".", "generateImplicitConversion", "(", "this", ".", "implicitConversion", ")", ";", "if", "(", "expression", "==", "IntLiteral", ".", "One", ")", "{", "codeStream", ".", "generateConstant", "(", "expression", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "}", "else", "{", "expression", ".", "generateCode", "(", "currentScope", ",", "codeStream", ",", "true", ")", ";", "}", "codeStream", ".", "sendOperator", "(", "operator", ",", "operationTypeID", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "assignmentImplicitConversion", ")", ";", "}", "switch", "(", "this", ".", "bits", "&", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "FieldBinding", "codegenField", "=", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "original", "(", ")", ";", "if", "(", "codegenField", ".", "canBeSeenBy", "(", "getReceiverType", "(", "currentScope", ")", ",", "this", ",", "currentScope", ")", ")", "{", "fieldStore", "(", "currentScope", ",", "codeStream", ",", "codegenField", ",", "writeAccessor", ",", "this", ".", "actualReceiverType", ",", "this", ".", "delegateThis", "==", "null", ",", "valueRequired", ")", ";", "}", "else", "{", "if", "(", "valueRequired", ")", "{", "switch", "(", "codegenField", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2_x2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup_x2", "(", ")", ";", "break", ";", "}", "}", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "codegenField", ")", ";", "}", "return", ";", "case", "Binding", ".", "LOCAL", ":", "LocalVariableBinding", "localBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ";", "if", "(", "valueRequired", ")", "{", "switch", "(", "localBinding", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup", "(", ")", ";", "break", ";", "}", "}", "codeStream", ".", "store", "(", "localBinding", ",", "false", ")", ";", "}", "}", "public", "void", "generatePostIncrement", "(", "BlockScope", "currentScope", ",", "CodeStream", "codeStream", ",", "CompoundAssignment", "postIncrement", ",", "boolean", "valueRequired", ")", "{", "switch", "(", "this", ".", "bits", "&", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "FieldBinding", "codegenField", "=", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "original", "(", ")", ";", "if", "(", "codegenField", ".", "canBeSeenBy", "(", "getReceiverType", "(", "currentScope", ")", ",", "this", ",", "currentScope", ")", ")", "{", "super", ".", "generatePostIncrement", "(", "currentScope", ",", "codeStream", ",", "postIncrement", ",", "valueRequired", ")", ";", "}", "else", "{", "if", "(", "codegenField", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "else", "{", "if", "(", "(", "this", ".", "bits", "&", "DepthMASK", ")", "!=", "0", ")", "{", "currentScope", ".", "problemReporter", "(", ")", ".", "needImplementation", "(", "this", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "}", "codeStream", ".", "generateEmulatedReadAccessForField", "(", "codegenField", ")", ";", "if", "(", "valueRequired", ")", "{", "switch", "(", "codegenField", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup2", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup", "(", ")", ";", "break", ";", "}", "}", "codeStream", ".", "generateEmulationForField", "(", "codegenField", ")", ";", "switch", "(", "codegenField", ".", "type", ".", "id", ")", "{", "case", "TypeIds", ".", "T_long", ":", "case", "TypeIds", ".", "T_double", ":", "codeStream", ".", "dup_x2", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "if", "(", "codegenField", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "codeStream", ".", "dup_x2", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "break", ";", "default", ":", "codeStream", ".", "dup_x1", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "if", "(", "codegenField", ".", "isStatic", "(", ")", ")", "{", "codeStream", ".", "aconst_null", "(", ")", ";", "}", "else", "{", "generateReceiver", "(", "codeStream", ")", ";", "}", "codeStream", ".", "dup_x1", "(", ")", ";", "codeStream", ".", "pop", "(", ")", ";", "break", ";", "}", "codeStream", ".", "generateConstant", "(", "postIncrement", ".", "expression", ".", "constant", ",", "this", ".", "implicitConversion", ")", ";", "codeStream", ".", "sendOperator", "(", "postIncrement", ".", "operator", ",", "codegenField", ".", "type", ".", "id", ")", ";", "codeStream", ".", "generateImplicitConversion", "(", "postIncrement", ".", "preAssignImplicitConversion", ")", ";", "codeStream", ".", "generateEmulatedWriteAccessForField", "(", "codegenField", ")", ";", "}", "return", ";", "case", "Binding", ".", "LOCAL", ":", "super", ".", "generatePostIncrement", "(", "currentScope", ",", "codeStream", ",", "postIncrement", ",", "valueRequired", ")", ";", "}", "}", "public", "void", "generateReceiver", "(", "CodeStream", "codeStream", ")", "{", "codeStream", ".", "aload_0", "(", ")", ";", "if", "(", "this", ".", "delegateThis", "!=", "null", ")", "{", "codeStream", ".", "fieldAccess", "(", "Opcodes", ".", "OPC_getfield", ",", "this", ".", "delegateThis", ",", "null", ")", ";", "}", "}", "public", "TypeBinding", "getReceiverType", "(", "BlockScope", "currentScope", ")", "{", "Scope", "scope", "=", "currentScope", ".", "parent", ";", "while", "(", "true", ")", "{", "switch", "(", "scope", ".", "kind", ")", "{", "case", "Scope", ".", "CLASS_SCOPE", ":", "return", "(", "(", "ClassScope", ")", "scope", ")", ".", "referenceContext", ".", "binding", ";", "default", ":", "scope", "=", "scope", ".", "parent", ";", "}", "}", "}", "public", "void", "manageSyntheticAccessIfNecessary", "(", "BlockScope", "currentScope", ",", "FlowInfo", "flowInfo", ",", "boolean", "isReadAccess", ")", "{", "if", "(", "this", ".", "delegateThis", "==", "null", ")", "{", "super", ".", "manageSyntheticAccessIfNecessary", "(", "currentScope", ",", "flowInfo", ",", "isReadAccess", ")", ";", "return", ";", "}", "if", "(", "(", "flowInfo", ".", "tagBits", "&", "FlowInfo", ".", "UNREACHABLE", ")", "!=", "0", ")", "return", ";", "if", "(", "this", ".", "constant", "!=", "Constant", ".", "NotAConstant", ")", "return", ";", "if", "(", "this", ".", "binding", "instanceof", "ParameterizedFieldBinding", ")", "{", "ParameterizedFieldBinding", "parameterizedField", "=", "(", "ParameterizedFieldBinding", ")", "this", ".", "binding", ";", "FieldBinding", "codegenField", "=", "parameterizedField", ".", "originalField", ";", "if", "(", "(", "codegenField", ".", "type", ".", "tagBits", "&", "TagBits", ".", "HasTypeVariable", ")", "!=", "0", ")", "{", "this", ".", "genericCast", "=", "codegenField", ".", "type", ".", "genericCast", "(", "currentScope", ".", "boxing", "(", "parameterizedField", ".", "type", ")", ")", ";", "}", "}", "}", "public", "TypeBinding", "reportError", "(", "BlockScope", "scope", ")", "{", "this", ".", "constant", "=", "Constant", ".", "NotAConstant", ";", "if", "(", "this", ".", "binding", "instanceof", "ProblemFieldBinding", "&&", "(", "(", "ProblemFieldBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "NotFound", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "!=", "null", ")", "{", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "scope", ".", "enclosingSourceType", "(", ")", ",", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "!=", "null", ")", "{", "this", ".", "actualReceiverType", "=", "this", ".", "delegateThis", ".", "type", ";", "this", ".", "binding", "=", "scope", ".", "getField", "(", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "token", ",", "this", ")", ";", "if", "(", "!", "this", ".", "binding", ".", "isValidBinding", "(", ")", ")", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "return", "checkFieldAccess", "(", "scope", ")", ";", "}", "}", "}", "if", "(", "this", ".", "binding", "instanceof", "ProblemBinding", "&&", "(", "(", "ProblemBinding", ")", "this", ".", "binding", ")", ".", "problemId", "(", ")", "==", "NotFound", ")", "{", "if", "(", "this", ".", "evaluationContext", ".", "declaringTypeName", "!=", "null", ")", "{", "this", ".", "delegateThis", "=", "scope", ".", "getField", "(", "scope", ".", "enclosingSourceType", "(", ")", ",", "DELEGATE_THIS", ",", "this", ")", ";", "if", "(", "this", ".", "delegateThis", "!=", "null", ")", "{", "this", ".", "actualReceiverType", "=", "this", ".", "delegateThis", ".", "type", ";", "FieldBinding", "fieldBinding", "=", "scope", ".", "getField", "(", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "token", ",", "this", ")", ";", "if", "(", "!", "fieldBinding", ".", "isValidBinding", "(", ")", ")", "{", "if", "(", "(", "(", "ProblemFieldBinding", ")", "fieldBinding", ")", ".", "problemId", "(", ")", "==", "NotVisible", ")", "{", "CodeSnippetScope", "localScope", "=", "new", "CodeSnippetScope", "(", "scope", ")", ";", "this", ".", "binding", "=", "localScope", ".", "getFieldForCodeSnippet", "(", "this", ".", "delegateThis", ".", "type", ",", "this", ".", "token", ",", "this", ")", ";", "return", "checkFieldAccess", "(", "scope", ")", ";", "}", "else", "{", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "}", "this", ".", "binding", "=", "fieldBinding", ";", "return", "checkFieldAccess", "(", "scope", ")", ";", "}", "}", "}", "return", "super", ".", "reportError", "(", "scope", ")", ";", "}", "}", "</s>" ]
5,113
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CategorizedProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "CompilationResult", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "AbstractMethodDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "CodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "ConstantPool", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "codegen", ".", "StackMapFrameCodeStream", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "SourceTypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TagBits", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeVariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ";", "public", "class", "CodeSnippetClassFile", "extends", "ClassFile", "{", "public", "CodeSnippetClassFile", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "SourceTypeBinding", "aType", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", "enclosingClassFile", ",", "boolean", "creatingProblemType", ")", "{", "this", ".", "referenceBinding", "=", "aType", ";", "initByteArrays", "(", ")", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "0xCAFEBABEL", ">>", "24", ")", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "0xCAFEBABEL", ">>", "16", ")", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "0xCAFEBABEL", ">>", "8", ")", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "0xCAFEBABEL", ">>", "0", ")", ";", "long", "targetVersion", "=", "this", ".", "targetJDK", "=", "this", ".", "referenceBinding", ".", "scope", ".", "compilerOptions", "(", ")", ".", "targetJDK", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "targetVersion", ">>", "8", ")", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "targetVersion", ">>", "0", ")", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "targetVersion", ">>", "24", ")", ";", "this", ".", "header", "[", "this", ".", "headerOffset", "++", "]", "=", "(", "byte", ")", "(", "targetVersion", ">>", "16", ")", ";", "this", ".", "constantPoolOffset", "=", "this", ".", "headerOffset", ";", "this", ".", "headerOffset", "+=", "2", ";", "this", ".", "constantPool", "=", "new", "ConstantPool", "(", "this", ")", ";", "int", "accessFlags", "=", "aType", ".", "getAccessFlags", "(", ")", ";", "if", "(", "!", "aType", ".", "isInterface", "(", ")", ")", "{", "accessFlags", "|=", "ClassFileConstants", ".", "AccSuper", ";", "}", "if", "(", "aType", ".", "isNestedType", "(", ")", ")", "{", "if", "(", "aType", ".", "isStatic", "(", ")", ")", "{", "accessFlags", "&=", "~", "ClassFileConstants", ".", "AccStatic", ";", "}", "if", "(", "aType", ".", "isPrivate", "(", ")", ")", "{", "accessFlags", "&=", "~", "(", "ClassFileConstants", ".", "AccPrivate", "|", "ClassFileConstants", ".", "AccPublic", ")", ";", "}", "if", "(", "aType", ".", "isProtected", "(", ")", ")", "{", "accessFlags", "&=", "~", "ClassFileConstants", ".", "AccProtected", ";", "accessFlags", "|=", "ClassFileConstants", ".", "AccPublic", ";", "}", "}", "accessFlags", "&=", "~", "ClassFileConstants", ".", "AccStrictfp", ";", "this", ".", "enclosingClassFile", "=", "enclosingClassFile", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "(", "accessFlags", ">>", "8", ")", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "accessFlags", ";", "int", "classNameIndex", "=", "this", ".", "constantPool", ".", "literalIndexForType", "(", "aType", ")", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "(", "classNameIndex", ">>", "8", ")", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "classNameIndex", ";", "int", "superclassNameIndex", ";", "if", "(", "aType", ".", "isInterface", "(", ")", ")", "{", "superclassNameIndex", "=", "this", ".", "constantPool", ".", "literalIndexForType", "(", "ConstantPool", ".", "JavaLangObjectConstantPoolName", ")", ";", "}", "else", "{", "superclassNameIndex", "=", "(", "aType", ".", "superclass", "==", "null", "?", "0", ":", "this", ".", "constantPool", ".", "literalIndexForType", "(", "aType", ".", "superclass", ")", ")", ";", "}", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "(", "superclassNameIndex", ">>", "8", ")", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "superclassNameIndex", ";", "ReferenceBinding", "[", "]", "superInterfacesBinding", "=", "aType", ".", "superInterfaces", "(", ")", ";", "int", "interfacesCount", "=", "superInterfacesBinding", ".", "length", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "(", "interfacesCount", ">>", "8", ")", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "interfacesCount", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "interfacesCount", ";", "i", "++", ")", "{", "int", "interfaceIndex", "=", "this", ".", "constantPool", ".", "literalIndexForType", "(", "superInterfacesBinding", "[", "i", "]", ")", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "(", "interfaceIndex", ">>", "8", ")", ";", "this", ".", "contents", "[", "this", ".", "contentsOffset", "++", "]", "=", "(", "byte", ")", "interfaceIndex", ";", "}", "this", ".", "produceAttributes", "=", "this", ".", "referenceBinding", ".", "scope", ".", "compilerOptions", "(", ")", ".", "produceDebugAttributes", ";", "this", ".", "creatingProblemType", "=", "creatingProblemType", ";", "if", "(", "this", ".", "targetJDK", ">=", "ClassFileConstants", ".", "JDK1_6", ")", "{", "this", ".", "codeStream", "=", "new", "StackMapFrameCodeStream", "(", "this", ")", ";", "this", ".", "produceAttributes", "|=", "ClassFileConstants", ".", "ATTR_STACK_MAP_TABLE", ";", "}", "else", "if", "(", "this", ".", "targetJDK", "==", "ClassFileConstants", ".", "CLDC_1_1", ")", "{", "this", ".", "targetJDK", "=", "ClassFileConstants", ".", "JDK1_1", ";", "this", ".", "produceAttributes", "|=", "ClassFileConstants", ".", "ATTR_STACK_MAP", ";", "this", ".", "codeStream", "=", "new", "StackMapFrameCodeStream", "(", "this", ")", ";", "}", "else", "{", "this", ".", "codeStream", "=", "new", "CodeStream", "(", "this", ")", ";", "}", "this", ".", "codeStream", ".", "maxFieldCount", "=", "aType", ".", "scope", ".", "outerMostClassScope", "(", ")", ".", "referenceType", "(", ")", ".", "maxFieldCount", ";", "}", "public", "static", "void", "createProblemType", "(", "TypeDeclaration", "typeDeclaration", ",", "CompilationResult", "unitResult", ")", "{", "SourceTypeBinding", "typeBinding", "=", "typeDeclaration", ".", "binding", ";", "ClassFile", "classFile", "=", "new", "CodeSnippetClassFile", "(", "typeBinding", ",", "null", ",", "true", ")", ";", "if", "(", "typeBinding", ".", "hasMemberTypes", "(", ")", ")", "{", "ReferenceBinding", "[", "]", "members", "=", "typeBinding", ".", "memberTypes", ";", "for", "(", "int", "i", "=", "0", ",", "l", "=", "members", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "classFile", ".", "recordInnerClasses", "(", "members", "[", "i", "]", ")", ";", "}", "if", "(", "typeBinding", ".", "isNestedType", "(", ")", ")", "{", "classFile", ".", "recordInnerClasses", "(", "typeBinding", ")", ";", "}", "TypeVariableBinding", "[", "]", "typeVariables", "=", "typeBinding", ".", "typeVariables", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "typeVariables", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "TypeVariableBinding", "typeVariableBinding", "=", "typeVariables", "[", "i", "]", ";", "if", "(", "(", "typeVariableBinding", ".", "tagBits", "&", "TagBits", ".", "ContainsNestedTypeReferences", ")", "!=", "0", ")", "{", "Util", ".", "recordNestedType", "(", "classFile", ",", "typeVariableBinding", ")", ";", "}", "}", "FieldBinding", "[", "]", "fields", "=", "typeBinding", ".", "fields", "(", ")", ";", "if", "(", "(", "fields", "!=", "null", ")", "&&", "(", "fields", "!=", "Binding", ".", "NO_FIELDS", ")", ")", "{", "classFile", ".", "addFieldInfos", "(", ")", ";", "}", "else", "{", "classFile", ".", "contents", "[", "classFile", ".", "contentsOffset", "++", "]", "=", "0", ";", "classFile", ".", "contents", "[", "classFile", ".", "contentsOffset", "++", "]", "=", "0", ";", "}", "classFile", ".", "setForMethodInfos", "(", ")", ";", "int", "problemsLength", ";", "CategorizedProblem", "[", "]", "problems", "=", "unitResult", ".", "getErrors", "(", ")", ";", "if", "(", "problems", "==", "null", ")", "{", "problems", "=", "new", "CategorizedProblem", "[", "0", "]", ";", "}", "CategorizedProblem", "[", "]", "problemsCopy", "=", "new", "CategorizedProblem", "[", "problemsLength", "=", "problems", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "problems", ",", "0", ",", "problemsCopy", ",", "0", ",", "problemsLength", ")", ";", "AbstractMethodDeclaration", "[", "]", "methodDecls", "=", "typeDeclaration", ".", "methods", ";", "if", "(", "methodDecls", "!=", "null", ")", "{", "if", "(", "typeBinding", ".", "isInterface", "(", ")", ")", "{", "classFile", ".", "addProblemClinit", "(", "problemsCopy", ")", ";", "for", "(", "int", "i", "=", "0", ",", "length", "=", "methodDecls", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "AbstractMethodDeclaration", "methodDecl", "=", "methodDecls", "[", "i", "]", ";", "MethodBinding", "method", "=", "methodDecl", ".", "binding", ";", "if", "(", "method", "==", "null", "||", "method", ".", "isConstructor", "(", ")", ")", "continue", ";", "method", ".", "modifiers", "=", "ClassFileConstants", ".", "AccPublic", "|", "ClassFileConstants", ".", "AccAbstract", ";", "classFile", ".", "addAbstractMethod", "(", "methodDecl", ",", "method", ")", ";", "}", "}", "else", "{", "for", "(", "int", "i", "=", "0", ",", "length", "=", "methodDecls", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "AbstractMethodDeclaration", "methodDecl", "=", "methodDecls", "[", "i", "]", ";", "MethodBinding", "method", "=", "methodDecl", ".", "binding", ";", "if", "(", "method", "==", "null", ")", "continue", ";", "if", "(", "method", ".", "isConstructor", "(", ")", ")", "{", "classFile", ".", "addProblemConstructor", "(", "methodDecl", ",", "method", ",", "problemsCopy", ")", ";", "}", "else", "if", "(", "method", ".", "isAbstract", "(", ")", ")", "{", "classFile", ".", "addAbstractMethod", "(", "methodDecl", ",", "method", ")", ";", "}", "else", "{", "classFile", ".", "addProblemMethod", "(", "methodDecl", ",", "method", ",", "problemsCopy", ")", ";", "}", "}", "}", "classFile", ".", "addDefaultAbstractMethods", "(", ")", ";", "}", "if", "(", "typeDeclaration", ".", "memberTypes", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "typeDeclaration", ".", "memberTypes", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "TypeDeclaration", "memberType", "=", "typeDeclaration", ".", "memberTypes", "[", "i", "]", ";", "if", "(", "memberType", ".", "binding", "!=", "null", ")", "{", "ClassFile", ".", "createProblemType", "(", "memberType", ",", "unitResult", ")", ";", "}", "}", "}", "classFile", ".", "addAttributes", "(", ")", ";", "unitResult", ".", "record", "(", "typeBinding", ".", "constantPoolName", "(", ")", ",", "classFile", ")", ";", "}", "}", "</s>" ]
5,114
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "CompilationResult", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "Compiler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "DefaultErrorHandlingPolicies", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ICompilerRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "INameEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "public", "abstract", "class", "Evaluator", "{", "EvaluationContext", "context", ";", "INameEnvironment", "environment", ";", "Map", "options", ";", "IRequestor", "requestor", ";", "IProblemFactory", "problemFactory", ";", "Evaluator", "(", "EvaluationContext", "context", ",", "INameEnvironment", "environment", ",", "Map", "options", ",", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "{", "this", ".", "context", "=", "context", ";", "this", ".", "environment", "=", "environment", ";", "this", ".", "options", "=", "options", ";", "this", ".", "requestor", "=", "requestor", ";", "this", ".", "problemFactory", "=", "problemFactory", ";", "}", "protected", "abstract", "void", "addEvaluationResultForCompilationProblem", "(", "Map", "resultsByIDs", ",", "CategorizedProblem", "problem", ",", "char", "[", "]", "cuSource", ")", ";", "protected", "EvaluationResult", "[", "]", "evaluationResultsForCompilationProblems", "(", "CompilationResult", "result", ",", "char", "[", "]", "cuSource", ")", "{", "CategorizedProblem", "[", "]", "problems", "=", "result", ".", "getAllProblems", "(", ")", ";", "HashMap", "resultsByIDs", "=", "new", "HashMap", "(", "5", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "problems", ".", "length", ";", "i", "++", ")", "{", "addEvaluationResultForCompilationProblem", "(", "resultsByIDs", ",", "problems", "[", "i", "]", ",", "cuSource", ")", ";", "}", "int", "size", "=", "resultsByIDs", ".", "size", "(", ")", ";", "EvaluationResult", "[", "]", "evalResults", "=", "new", "EvaluationResult", "[", "size", "]", ";", "Iterator", "results", "=", "resultsByIDs", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "evalResults", "[", "i", "]", "=", "(", "EvaluationResult", ")", "results", ".", "next", "(", ")", ";", "}", "return", "evalResults", ";", "}", "ClassFile", "[", "]", "getClasses", "(", ")", "{", "final", "char", "[", "]", "source", "=", "getSource", "(", ")", ";", "final", "ArrayList", "classDefinitions", "=", "new", "ArrayList", "(", ")", ";", "class", "CompilerRequestor", "implements", "ICompilerRequestor", "{", "boolean", "hasErrors", "=", "false", ";", "public", "void", "acceptResult", "(", "CompilationResult", "result", ")", "{", "if", "(", "result", ".", "hasProblems", "(", ")", ")", "{", "EvaluationResult", "[", "]", "evalResults", "=", "evaluationResultsForCompilationProblems", "(", "result", ",", "source", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "evalResults", ".", "length", ";", "i", "++", ")", "{", "EvaluationResult", "evalResult", "=", "evalResults", "[", "i", "]", ";", "CategorizedProblem", "[", "]", "problems", "=", "evalResult", ".", "getProblems", "(", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "problems", ".", "length", ";", "j", "++", ")", "{", "Evaluator", ".", "this", ".", "requestor", ".", "acceptProblem", "(", "problems", "[", "j", "]", ",", "evalResult", ".", "getEvaluationID", "(", ")", ",", "evalResult", ".", "getEvaluationType", "(", ")", ")", ";", "}", "}", "}", "if", "(", "result", ".", "hasErrors", "(", ")", ")", "{", "this", ".", "hasErrors", "=", "true", ";", "}", "else", "{", "ClassFile", "[", "]", "classFiles", "=", "result", ".", "getClassFiles", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "classFiles", ".", "length", ";", "i", "++", ")", "{", "ClassFile", "classFile", "=", "classFiles", "[", "i", "]", ";", "classDefinitions", ".", "add", "(", "classFile", ")", ";", "}", "}", "}", "}", "CompilerRequestor", "compilerRequestor", "=", "new", "CompilerRequestor", "(", ")", ";", "Compiler", "compiler", "=", "getCompiler", "(", "compilerRequestor", ")", ";", "compiler", ".", "compile", "(", "new", "ICompilationUnit", "[", "]", "{", "new", "ICompilationUnit", "(", ")", "{", "public", "char", "[", "]", "getFileName", "(", ")", "{", "return", "CharOperation", ".", "concat", "(", "Evaluator", ".", "this", ".", "getClassName", "(", ")", ",", "Util", ".", "defaultJavaExtension", "(", ")", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "char", "[", "]", "getContents", "(", ")", "{", "return", "source", ";", "}", "public", "char", "[", "]", "getMainTypeName", "(", ")", "{", "return", "Evaluator", ".", "this", ".", "getClassName", "(", ")", ";", "}", "public", "char", "[", "]", "[", "]", "getPackageName", "(", ")", "{", "return", "null", ";", "}", "}", "}", ")", ";", "if", "(", "compilerRequestor", ".", "hasErrors", ")", "{", "return", "null", ";", "}", "else", "{", "ClassFile", "[", "]", "result", "=", "new", "ClassFile", "[", "classDefinitions", ".", "size", "(", ")", "]", ";", "classDefinitions", ".", "toArray", "(", "result", ")", ";", "return", "result", ";", "}", "}", "protected", "abstract", "char", "[", "]", "getClassName", "(", ")", ";", "Compiler", "getCompiler", "(", "ICompilerRequestor", "compilerRequestor", ")", "{", "CompilerOptions", "compilerOptions", "=", "new", "CompilerOptions", "(", "this", ".", "options", ")", ";", "compilerOptions", ".", "performMethodsFullRecovery", "=", "true", ";", "compilerOptions", ".", "performStatementsRecovery", "=", "true", ";", "return", "new", "Compiler", "(", "this", ".", "environment", ",", "DefaultErrorHandlingPolicies", ".", "exitAfterAllProblems", "(", ")", ",", "compilerOptions", ",", "compilerRequestor", ",", "this", ".", "problemFactory", ")", ";", "}", "protected", "abstract", "char", "[", "]", "getSource", "(", ")", ";", "}", "</s>" ]
5,115
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "SuperReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "InvocationSite", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ";", "public", "class", "CodeSnippetSuperReference", "extends", "SuperReference", "implements", "EvaluationConstants", ",", "InvocationSite", "{", "public", "CodeSnippetSuperReference", "(", "int", "pos", ",", "int", "sourceEnd", ")", "{", "super", "(", "pos", ",", "sourceEnd", ")", ";", "}", "public", "TypeBinding", "[", "]", "genericTypeArguments", "(", ")", "{", "return", "null", ";", "}", "public", "TypeBinding", "resolveType", "(", "BlockScope", "scope", ")", "{", "scope", ".", "problemReporter", "(", ")", ".", "cannotUseSuperInCodeSnippet", "(", "this", ".", "sourceStart", ",", "this", ".", "sourceEnd", ")", ";", "return", "null", ";", "}", "public", "boolean", "isSuperAccess", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isTypeAccess", "(", ")", "{", "return", "false", ";", "}", "public", "void", "setActualReceiverType", "(", "ReferenceBinding", "receiverType", ")", "{", "}", "public", "void", "setDepth", "(", "int", "depth", ")", "{", "}", "public", "void", "setFieldIndex", "(", "int", "index", ")", "{", "}", "}", "</s>" ]
5,116
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "Compiler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "DefaultErrorHandlingPolicies", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ICompilerRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileReader", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFormatException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "INameEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "public", "class", "CodeSnippetEvaluator", "extends", "Evaluator", "implements", "EvaluationConstants", "{", "static", "final", "boolean", "DEVELOPMENT_MODE", "=", "false", ";", "char", "[", "]", "codeSnippet", ";", "CodeSnippetToCuMapper", "mapper", ";", "CodeSnippetEvaluator", "(", "char", "[", "]", "codeSnippet", ",", "EvaluationContext", "context", ",", "INameEnvironment", "environment", ",", "Map", "options", ",", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "{", "super", "(", "context", ",", "environment", ",", "options", ",", "requestor", ",", "problemFactory", ")", ";", "this", ".", "codeSnippet", "=", "codeSnippet", ";", "}", "protected", "void", "addEvaluationResultForCompilationProblem", "(", "Map", "resultsByIDs", ",", "CategorizedProblem", "problem", ",", "char", "[", "]", "cuSource", ")", "{", "CodeSnippetToCuMapper", "sourceMapper", "=", "getMapper", "(", ")", ";", "int", "pbLineNumber", "=", "problem", ".", "getSourceLineNumber", "(", ")", ";", "int", "evaluationType", "=", "sourceMapper", ".", "getEvaluationType", "(", "pbLineNumber", ")", ";", "char", "[", "]", "evaluationID", "=", "null", ";", "switch", "(", "evaluationType", ")", "{", "case", "EvaluationResult", ".", "T_PACKAGE", ":", "evaluationID", "=", "this", ".", "context", ".", "packageName", ";", "problem", ".", "setSourceLineNumber", "(", "1", ")", ";", "problem", ".", "setSourceStart", "(", "0", ")", ";", "problem", ".", "setSourceEnd", "(", "evaluationID", ".", "length", "-", "1", ")", ";", "break", ";", "case", "EvaluationResult", ".", "T_IMPORT", ":", "evaluationID", "=", "sourceMapper", ".", "getImport", "(", "pbLineNumber", ")", ";", "problem", ".", "setSourceLineNumber", "(", "1", ")", ";", "problem", ".", "setSourceStart", "(", "0", ")", ";", "problem", ".", "setSourceEnd", "(", "evaluationID", ".", "length", "-", "1", ")", ";", "break", ";", "case", "EvaluationResult", ".", "T_CODE_SNIPPET", ":", "evaluationID", "=", "this", ".", "codeSnippet", ";", "problem", ".", "setSourceLineNumber", "(", "pbLineNumber", "-", "this", ".", "mapper", ".", "lineNumberOffset", ")", ";", "problem", ".", "setSourceStart", "(", "problem", ".", "getSourceStart", "(", ")", "-", "this", ".", "mapper", ".", "startPosOffset", ")", ";", "problem", ".", "setSourceEnd", "(", "problem", ".", "getSourceEnd", "(", ")", "-", "this", ".", "mapper", ".", "startPosOffset", ")", ";", "break", ";", "case", "EvaluationResult", ".", "T_INTERNAL", ":", "evaluationID", "=", "cuSource", ";", "break", ";", "}", "EvaluationResult", "result", "=", "(", "EvaluationResult", ")", "resultsByIDs", ".", "get", "(", "evaluationID", ")", ";", "if", "(", "result", "==", "null", ")", "{", "resultsByIDs", ".", "put", "(", "evaluationID", ",", "new", "EvaluationResult", "(", "evaluationID", ",", "evaluationType", ",", "new", "CategorizedProblem", "[", "]", "{", "problem", "}", ")", ")", ";", "}", "else", "{", "result", ".", "addProblem", "(", "problem", ")", ";", "}", "}", "protected", "char", "[", "]", "getClassName", "(", ")", "{", "return", "CharOperation", ".", "concat", "(", "CODE_SNIPPET_CLASS_NAME_PREFIX", ",", "Integer", ".", "toString", "(", "EvaluationContext", ".", "CODE_SNIPPET_COUNTER", "+", "1", ")", ".", "toCharArray", "(", ")", ")", ";", "}", "Compiler", "getCompiler", "(", "ICompilerRequestor", "compilerRequestor", ")", "{", "Compiler", "compiler", "=", "null", ";", "if", "(", "!", "DEVELOPMENT_MODE", ")", "{", "CompilerOptions", "compilerOptions", "=", "new", "CompilerOptions", "(", "this", ".", "options", ")", ";", "compilerOptions", ".", "performMethodsFullRecovery", "=", "true", ";", "compilerOptions", ".", "performStatementsRecovery", "=", "true", ";", "compiler", "=", "new", "CodeSnippetCompiler", "(", "this", ".", "environment", ",", "DefaultErrorHandlingPolicies", ".", "exitAfterAllProblems", "(", ")", ",", "compilerOptions", ",", "compilerRequestor", ",", "this", ".", "problemFactory", ",", "this", ".", "context", ",", "getMapper", "(", ")", ".", "startPosOffset", ",", "getMapper", "(", ")", ".", "startPosOffset", "+", "this", ".", "codeSnippet", ".", "length", "-", "1", ")", ";", "(", "(", "CodeSnippetParser", ")", "compiler", ".", "parser", ")", ".", "lineSeparatorLength", "=", "this", ".", "context", ".", "lineSeparator", ".", "length", "(", ")", ";", "IBinaryType", "binary", "=", "this", ".", "context", ".", "getRootCodeSnippetBinary", "(", ")", ";", "if", "(", "binary", "!=", "null", ")", "{", "compiler", ".", "lookupEnvironment", ".", "cacheBinaryType", "(", "binary", ",", "null", ")", ";", "}", "VariablesInfo", "installedVars", "=", "this", ".", "context", ".", "installedVars", ";", "if", "(", "installedVars", "!=", "null", ")", "{", "ClassFile", "[", "]", "globalClassFiles", "=", "installedVars", ".", "classFiles", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "globalClassFiles", ".", "length", ";", "i", "++", ")", "{", "ClassFileReader", "binaryType", "=", "null", ";", "try", "{", "binaryType", "=", "new", "ClassFileReader", "(", "globalClassFiles", "[", "i", "]", ".", "getBytes", "(", ")", ",", "null", ")", ";", "}", "catch", "(", "ClassFormatException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "compiler", ".", "lookupEnvironment", ".", "cacheBinaryType", "(", "binaryType", ",", "null", ")", ";", "}", "}", "}", "else", "{", "CompilerOptions", "compilerOptions", "=", "new", "CompilerOptions", "(", "this", ".", "options", ")", ";", "compilerOptions", ".", "performMethodsFullRecovery", "=", "true", ";", "compilerOptions", ".", "performStatementsRecovery", "=", "true", ";", "compiler", "=", "new", "Compiler", "(", "getWrapperEnvironment", "(", ")", ",", "DefaultErrorHandlingPolicies", ".", "exitAfterAllProblems", "(", ")", ",", "compilerOptions", ",", "compilerRequestor", ",", "this", ".", "problemFactory", ")", ";", "}", "return", "compiler", ";", "}", "private", "CodeSnippetToCuMapper", "getMapper", "(", ")", "{", "if", "(", "this", ".", "mapper", "==", "null", ")", "{", "char", "[", "]", "varClassName", "=", "null", ";", "VariablesInfo", "installedVars", "=", "this", ".", "context", ".", "installedVars", ";", "if", "(", "installedVars", "!=", "null", ")", "{", "char", "[", "]", "superPackageName", "=", "installedVars", ".", "packageName", ";", "if", "(", "superPackageName", "!=", "null", "&&", "superPackageName", ".", "length", "!=", "0", ")", "{", "varClassName", "=", "CharOperation", ".", "concat", "(", "superPackageName", ",", "installedVars", ".", "className", ",", "'.'", ")", ";", "}", "else", "{", "varClassName", "=", "installedVars", ".", "className", ";", "}", "}", "this", ".", "mapper", "=", "new", "CodeSnippetToCuMapper", "(", "this", ".", "codeSnippet", ",", "this", ".", "context", ".", "packageName", ",", "this", ".", "context", ".", "imports", ",", "getClassName", "(", ")", ",", "varClassName", ",", "this", ".", "context", ".", "localVariableNames", ",", "this", ".", "context", ".", "localVariableTypeNames", ",", "this", ".", "context", ".", "localVariableModifiers", ",", "this", ".", "context", ".", "declaringTypeName", ",", "this", ".", "context", ".", "lineSeparator", ")", ";", "}", "return", "this", ".", "mapper", ";", "}", "protected", "char", "[", "]", "getSource", "(", ")", "{", "return", "getMapper", "(", ")", ".", "cuSource", ";", "}", "private", "INameEnvironment", "getWrapperEnvironment", "(", ")", "{", "return", "new", "CodeSnippetEnvironment", "(", "this", ".", "environment", ",", "this", ".", "context", ")", ";", "}", "}", "</s>" ]
5,117
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "Compiler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ICompilerRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileReader", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFormatException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "INameEnvironment", ";", "public", "class", "VariablesEvaluator", "extends", "Evaluator", "implements", "EvaluationConstants", "{", "VariablesEvaluator", "(", "EvaluationContext", "context", ",", "INameEnvironment", "environment", ",", "Map", "options", ",", "IRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ")", "{", "super", "(", "context", ",", "environment", ",", "options", ",", "requestor", ",", "problemFactory", ")", ";", "}", "protected", "void", "addEvaluationResultForCompilationProblem", "(", "Map", "resultsByIDs", ",", "CategorizedProblem", "problem", ",", "char", "[", "]", "cuSource", ")", "{", "char", "[", "]", "evaluationID", "=", "cuSource", ";", "int", "evaluationType", "=", "EvaluationResult", ".", "T_INTERNAL", ";", "int", "pbLine", "=", "problem", ".", "getSourceLineNumber", "(", ")", ";", "int", "currentLine", "=", "1", ";", "char", "[", "]", "packageName", "=", "getPackageName", "(", ")", ";", "if", "(", "packageName", ".", "length", ">", "0", ")", "{", "if", "(", "pbLine", "==", "1", ")", "{", "evaluationID", "=", "packageName", ";", "evaluationType", "=", "EvaluationResult", ".", "T_PACKAGE", ";", "problem", ".", "setSourceLineNumber", "(", "1", ")", ";", "problem", ".", "setSourceStart", "(", "0", ")", ";", "problem", ".", "setSourceEnd", "(", "evaluationID", ".", "length", "-", "1", ")", ";", "}", "currentLine", "++", ";", "}", "char", "[", "]", "[", "]", "imports", "=", "this", ".", "context", ".", "imports", ";", "if", "(", "(", "currentLine", "<=", "pbLine", ")", "&&", "(", "pbLine", "<", "(", "currentLine", "+", "imports", ".", "length", ")", ")", ")", "{", "evaluationID", "=", "imports", "[", "pbLine", "-", "currentLine", "]", ";", "evaluationType", "=", "EvaluationResult", ".", "T_IMPORT", ";", "problem", ".", "setSourceLineNumber", "(", "1", ")", ";", "problem", ".", "setSourceStart", "(", "0", ")", ";", "problem", ".", "setSourceEnd", "(", "evaluationID", ".", "length", "-", "1", ")", ";", "}", "currentLine", "+=", "imports", ".", "length", "+", "1", ";", "int", "varCount", "=", "this", ".", "context", ".", "variableCount", ";", "if", "(", "(", "currentLine", "<=", "pbLine", ")", "&&", "(", "pbLine", "<", "currentLine", "+", "varCount", ")", ")", "{", "GlobalVariable", "var", "=", "this", ".", "context", ".", "variables", "[", "pbLine", "-", "currentLine", "]", ";", "evaluationID", "=", "var", ".", "getName", "(", ")", ";", "evaluationType", "=", "EvaluationResult", ".", "T_VARIABLE", ";", "int", "pbStart", "=", "problem", ".", "getSourceStart", "(", ")", "-", "var", ".", "declarationStart", ";", "int", "pbEnd", "=", "problem", ".", "getSourceEnd", "(", ")", "-", "var", ".", "declarationStart", ";", "int", "typeLength", "=", "var", ".", "getTypeName", "(", ")", ".", "length", ";", "if", "(", "(", "0", "<=", "pbStart", ")", "&&", "(", "pbEnd", "<", "typeLength", ")", ")", "{", "problem", ".", "setSourceLineNumber", "(", "-", "1", ")", ";", "}", "else", "{", "pbStart", "-=", "typeLength", "+", "1", ";", "pbEnd", "-=", "typeLength", "+", "1", ";", "problem", ".", "setSourceLineNumber", "(", "0", ")", ";", "}", "problem", ".", "setSourceStart", "(", "pbStart", ")", ";", "problem", ".", "setSourceEnd", "(", "pbEnd", ")", ";", "}", "currentLine", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "varCount", ";", "i", "++", ")", "{", "GlobalVariable", "var", "=", "this", ".", "context", ".", "variables", "[", "i", "]", ";", "char", "[", "]", "initializer", "=", "var", ".", "getInitializer", "(", ")", ";", "int", "initializerLength", "=", "initializer", "==", "null", "?", "0", ":", "initializer", ".", "length", ";", "if", "(", "(", "var", ".", "initializerStart", "<=", "problem", ".", "getSourceStart", "(", ")", ")", "&&", "(", "problem", ".", "getSourceEnd", "(", ")", "<", "var", ".", "initializerStart", "+", "var", ".", "name", ".", "length", ")", ")", "{", "return", ";", "}", "else", "if", "(", "(", "var", ".", "initExpressionStart", "<=", "problem", ".", "getSourceStart", "(", ")", ")", "&&", "(", "problem", ".", "getSourceEnd", "(", ")", "<", "var", ".", "initExpressionStart", "+", "initializerLength", ")", ")", "{", "evaluationID", "=", "var", ".", "name", ";", "evaluationType", "=", "EvaluationResult", ".", "T_VARIABLE", ";", "problem", ".", "setSourceLineNumber", "(", "pbLine", "-", "var", ".", "initializerLineStart", "+", "1", ")", ";", "problem", ".", "setSourceStart", "(", "problem", ".", "getSourceStart", "(", ")", "-", "var", ".", "initExpressionStart", ")", ";", "problem", ".", "setSourceEnd", "(", "problem", ".", "getSourceEnd", "(", ")", "-", "var", ".", "initExpressionStart", ")", ";", "break", ";", "}", "}", "EvaluationResult", "result", "=", "(", "EvaluationResult", ")", "resultsByIDs", ".", "get", "(", "evaluationID", ")", ";", "if", "(", "result", "==", "null", ")", "{", "resultsByIDs", ".", "put", "(", "evaluationID", ",", "new", "EvaluationResult", "(", "evaluationID", ",", "evaluationType", ",", "new", "CategorizedProblem", "[", "]", "{", "problem", "}", ")", ")", ";", "}", "else", "{", "result", ".", "addProblem", "(", "problem", ")", ";", "}", "}", "protected", "char", "[", "]", "getClassName", "(", ")", "{", "return", "CharOperation", ".", "concat", "(", "EvaluationConstants", ".", "GLOBAL_VARS_CLASS_NAME_PREFIX", ",", "Integer", ".", "toString", "(", "EvaluationContext", ".", "VAR_CLASS_COUNTER", "+", "1", ")", ".", "toCharArray", "(", ")", ")", ";", "}", "Compiler", "getCompiler", "(", "ICompilerRequestor", "compilerRequestor", ")", "{", "Compiler", "compiler", "=", "super", ".", "getCompiler", "(", "compilerRequestor", ")", ";", "IBinaryType", "binaryType", "=", "this", ".", "context", ".", "getRootCodeSnippetBinary", "(", ")", ";", "if", "(", "binaryType", "!=", "null", ")", "{", "compiler", ".", "lookupEnvironment", ".", "cacheBinaryType", "(", "binaryType", ",", "null", ")", ";", "}", "VariablesInfo", "installedVars", "=", "this", ".", "context", ".", "installedVars", ";", "if", "(", "installedVars", "!=", "null", ")", "{", "ClassFile", "[", "]", "classFiles", "=", "installedVars", ".", "classFiles", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "classFiles", ".", "length", ";", "i", "++", ")", "{", "ClassFile", "classFile", "=", "classFiles", "[", "i", "]", ";", "IBinaryType", "binary", "=", "null", ";", "try", "{", "binary", "=", "new", "ClassFileReader", "(", "classFile", ".", "getBytes", "(", ")", ",", "null", ")", ";", "}", "catch", "(", "ClassFormatException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "compiler", ".", "lookupEnvironment", ".", "cacheBinaryType", "(", "binary", ",", "null", ")", ";", "}", "}", "return", "compiler", ";", "}", "protected", "char", "[", "]", "getPackageName", "(", ")", "{", "return", "this", ".", "context", ".", "packageName", ";", "}", "protected", "char", "[", "]", "getSource", "(", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "int", "lineNumberOffset", "=", "1", ";", "char", "[", "]", "packageName", "=", "getPackageName", "(", ")", ";", "if", "(", "packageName", ".", "length", "!=", "0", ")", "{", "buffer", ".", "append", "(", "\"package", "\"", ")", ";", "buffer", ".", "append", "(", "packageName", ")", ";", "buffer", ".", "append", "(", "';'", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "++", ";", "}", "char", "[", "]", "[", "]", "imports", "=", "this", ".", "context", ".", "imports", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "imports", ".", "length", ";", "i", "++", ")", "{", "buffer", ".", "append", "(", "\"import", "\"", ")", ";", "buffer", ".", "append", "(", "imports", "[", "i", "]", ")", ";", "buffer", ".", "append", "(", "';'", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "++", ";", "}", "buffer", ".", "append", "(", "\"\"", ")", ";", "buffer", ".", "append", "(", "getClassName", "(", ")", ")", ";", "buffer", ".", "append", "(", "\"", "extends", "\"", ")", ";", "buffer", ".", "append", "(", "PACKAGE_NAME", ")", ";", "buffer", ".", "append", "(", "\".\"", ")", ";", "buffer", ".", "append", "(", "ROOT_CLASS_NAME", ")", ";", "buffer", ".", "append", "(", "\"", "{\"", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "++", ";", "GlobalVariable", "[", "]", "vars", "=", "this", ".", "context", ".", "variables", ";", "VariablesInfo", "installedVars", "=", "this", ".", "context", ".", "installedVars", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "context", ".", "variableCount", ";", "i", "++", ")", "{", "GlobalVariable", "var", "=", "vars", "[", "i", "]", ";", "buffer", ".", "append", "(", "\"\"", ")", ";", "var", ".", "declarationStart", "=", "buffer", ".", "length", "(", ")", ";", "buffer", ".", "append", "(", "var", ".", "typeName", ")", ";", "buffer", ".", "append", "(", "\"", "\"", ")", ";", "char", "[", "]", "varName", "=", "var", ".", "name", ";", "buffer", ".", "append", "(", "varName", ")", ";", "buffer", ".", "append", "(", "';'", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "++", ";", "}", "buffer", ".", "append", "(", "\"tstatic", "{\"", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "++", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "context", ".", "variableCount", ";", "i", "++", ")", "{", "GlobalVariable", "var", "=", "vars", "[", "i", "]", ";", "char", "[", "]", "varName", "=", "var", ".", "name", ";", "GlobalVariable", "installedVar", "=", "installedVars", "==", "null", "?", "null", ":", "installedVars", ".", "varNamed", "(", "varName", ")", ";", "if", "(", "installedVar", "==", "null", "||", "!", "CharOperation", ".", "equals", "(", "installedVar", ".", "typeName", ",", "var", ".", "typeName", ")", ")", "{", "char", "[", "]", "initializer", "=", "var", ".", "initializer", ";", "if", "(", "initializer", "!=", "null", ")", "{", "buffer", ".", "append", "(", "\"tttry", "{\"", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "++", ";", "var", ".", "initializerLineStart", "=", "lineNumberOffset", ";", "buffer", ".", "append", "(", "\"ttt\"", ")", ";", "var", ".", "initializerStart", "=", "buffer", ".", "length", "(", ")", ";", "buffer", ".", "append", "(", "varName", ")", ";", "buffer", ".", "append", "(", "\"=", "\"", ")", ";", "var", ".", "initExpressionStart", "=", "buffer", ".", "length", "(", ")", ";", "buffer", ".", "append", "(", "initializer", ")", ";", "lineNumberOffset", "+=", "numberOfCRs", "(", "initializer", ")", ";", "buffer", ".", "append", "(", "';'", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "buffer", ".", "append", "(", "\"\"", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "buffer", ".", "append", "(", "\"\"", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "buffer", ".", "append", "(", "\"tt}\"", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "+=", "4", ";", "}", "}", "else", "{", "buffer", ".", "append", "(", "\"tt\"", ")", ";", "buffer", ".", "append", "(", "varName", ")", ";", "buffer", ".", "append", "(", "\"=", "\"", ")", ";", "char", "[", "]", "installedPackageName", "=", "installedVars", ".", "packageName", ";", "if", "(", "installedPackageName", "!=", "null", "&&", "installedPackageName", ".", "length", "!=", "0", ")", "{", "buffer", ".", "append", "(", "installedPackageName", ")", ";", "buffer", ".", "append", "(", "\".\"", ")", ";", "}", "buffer", ".", "append", "(", "installedVars", ".", "className", ")", ";", "buffer", ".", "append", "(", "\".\"", ")", ";", "buffer", ".", "append", "(", "varName", ")", ";", "buffer", ".", "append", "(", "';'", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "lineNumberOffset", "++", ";", "}", "}", "buffer", ".", "append", "(", "\"t}\"", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "buffer", ".", "append", "(", "'}'", ")", ".", "append", "(", "this", ".", "context", ".", "lineSeparator", ")", ";", "int", "length", "=", "buffer", ".", "length", "(", ")", ";", "char", "[", "]", "result", "=", "new", "char", "[", "length", "]", ";", "buffer", ".", "getChars", "(", "0", ",", "length", ",", "result", ",", "0", ")", ";", "return", "result", ";", "}", "private", "int", "numberOfCRs", "(", "char", "[", "]", "source", ")", "{", "int", "numberOfCRs", "=", "0", ";", "boolean", "lastWasCR", "=", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "source", ".", "length", ";", "i", "++", ")", "{", "char", "currentChar", "=", "source", "[", "i", "]", ";", "switch", "(", "currentChar", ")", "{", "case", "'\\r'", ":", "lastWasCR", "=", "true", ";", "numberOfCRs", "++", ";", "break", ";", "case", "'\\n'", ":", "if", "(", "!", "lastWasCR", ")", "numberOfCRs", "++", ";", "lastWasCR", "=", "false", ";", "break", ";", "default", ":", "lastWasCR", "=", "false", ";", "}", "}", "return", "numberOfCRs", ";", "}", "}", "</s>" ]
5,118
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CategorizedProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ClassFile", ";", "public", "interface", "IRequestor", "{", "boolean", "acceptClassFiles", "(", "ClassFile", "[", "]", "classFiles", ",", "char", "[", "]", "codeSnippetClassName", ")", ";", "void", "acceptProblem", "(", "CategorizedProblem", "problem", ",", "char", "[", "]", "fragmentSource", ",", "int", "fragmentKind", ")", ";", "}", "</s>" ]
5,119
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "Compiler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ICompilerRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IErrorHandlingPolicy", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "INameEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "public", "class", "CodeSnippetCompiler", "extends", "Compiler", "{", "EvaluationContext", "evaluationContext", ";", "int", "codeSnippetStart", ";", "int", "codeSnippetEnd", ";", "public", "CodeSnippetCompiler", "(", "INameEnvironment", "environment", ",", "IErrorHandlingPolicy", "policy", ",", "CompilerOptions", "compilerOptions", ",", "ICompilerRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ",", "EvaluationContext", "evaluationContext", ",", "int", "codeSnippetStart", ",", "int", "codeSnippetEnd", ")", "{", "super", "(", "environment", ",", "policy", ",", "compilerOptions", ",", "requestor", ",", "problemFactory", ")", ";", "this", ".", "codeSnippetStart", "=", "codeSnippetStart", ";", "this", ".", "codeSnippetEnd", "=", "codeSnippetEnd", ";", "this", ".", "evaluationContext", "=", "evaluationContext", ";", "this", ".", "parser", "=", "new", "CodeSnippetParser", "(", "this", ".", "problemReporter", ",", "evaluationContext", ",", "this", ".", "options", ".", "parseLiteralExpressionsAsConstants", ",", "codeSnippetStart", ",", "codeSnippetEnd", ")", ";", "this", ".", "parseThreshold", "=", "1", ";", "}", "public", "void", "initializeParser", "(", ")", "{", "this", ".", "parser", "=", "new", "CodeSnippetParser", "(", "this", ".", "problemReporter", ",", "this", ".", "evaluationContext", ",", "this", ".", "options", ".", "parseLiteralExpressionsAsConstants", ",", "this", ".", "codeSnippetStart", ",", "this", ".", "codeSnippetEnd", ")", ";", "}", "}", "</s>" ]
5,120
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "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", ".", "IBinaryField", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryMethod", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryNestedType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "public", "class", "CodeSnippetSkeleton", "implements", "IBinaryType", ",", "EvaluationConstants", "{", "public", "static", "class", "BinaryMethodSkeleton", "implements", "IBinaryMethod", "{", "char", "[", "]", "[", "]", "exceptionTypeNames", ";", "char", "[", "]", "methodDescriptor", ";", "char", "[", "]", "selector", ";", "boolean", "isConstructor", ";", "public", "BinaryMethodSkeleton", "(", "char", "[", "]", "selector", ",", "char", "[", "]", "methodDescriptor", ",", "char", "[", "]", "[", "]", "exceptionTypeNames", ",", "boolean", "isConstructor", ")", "{", "this", ".", "selector", "=", "selector", ";", "this", ".", "methodDescriptor", "=", "methodDescriptor", ";", "this", ".", "exceptionTypeNames", "=", "exceptionTypeNames", ";", "this", ".", "isConstructor", "=", "isConstructor", ";", "}", "public", "IBinaryAnnotation", "[", "]", "getAnnotations", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "[", "]", "getArgumentNames", "(", ")", "{", "return", "null", ";", "}", "public", "Object", "getDefaultValue", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "[", "]", "getExceptionTypeNames", "(", ")", "{", "return", "this", ".", "exceptionTypeNames", ";", "}", "public", "char", "[", "]", "getGenericSignature", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getMethodDescriptor", "(", ")", "{", "return", "this", ".", "methodDescriptor", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "return", "ClassFileConstants", ".", "AccPublic", ";", "}", "public", "IBinaryAnnotation", "[", "]", "getParameterAnnotations", "(", "int", "index", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getSelector", "(", ")", "{", "return", "this", ".", "selector", ";", "}", "public", "long", "getTagBits", "(", ")", "{", "return", "0", ";", "}", "public", "boolean", "isClinit", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isConstructor", "(", ")", "{", "return", "this", ".", "isConstructor", ";", "}", "}", "IBinaryMethod", "[", "]", "methods", "=", "new", "IBinaryMethod", "[", "]", "{", "new", "BinaryMethodSkeleton", "(", "\"<init>\"", ".", "toCharArray", "(", ")", ",", "\"()V\"", ".", "toCharArray", "(", ")", ",", "new", "char", "[", "]", "[", "]", "{", "}", ",", "true", ")", ",", "new", "BinaryMethodSkeleton", "(", "\"run\"", ".", "toCharArray", "(", ")", ",", "\"()V\"", ".", "toCharArray", "(", ")", ",", "new", "char", "[", "]", "[", "]", "{", "\"\"", ".", "toCharArray", "(", ")", "}", ",", "false", ")", ",", "new", "BinaryMethodSkeleton", "(", "\"setResult\"", ".", "toCharArray", "(", ")", ",", "\"\"", ".", "toCharArray", "(", ")", ",", "new", "char", "[", "]", "[", "]", "{", "}", ",", "false", ")", "}", ";", "public", "CodeSnippetSkeleton", "(", ")", "{", "super", "(", ")", ";", "}", "public", "IBinaryAnnotation", "[", "]", "getAnnotations", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getEnclosingMethod", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getEnclosingTypeName", "(", ")", "{", "return", "null", ";", "}", "public", "IBinaryField", "[", "]", "getFields", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getFileName", "(", ")", "{", "return", "CharOperation", ".", "concat", "(", "CODE_SNIPPET_NAME", ",", "Util", ".", "defaultJavaExtension", "(", ")", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "char", "[", "]", "getGenericSignature", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "[", "]", "getInterfaceNames", "(", ")", "{", "return", "null", ";", "}", "public", "String", "getJavadocContents", "(", ")", "{", "return", "null", ";", "}", "public", "String", "getJavadocContents", "(", "IProgressMonitor", "monitor", ",", "String", "defaultEncoding", ")", "throws", "JavaModelException", "{", "return", "null", ";", "}", "public", "IBinaryNestedType", "[", "]", "getMemberTypes", "(", ")", "{", "return", "null", ";", "}", "public", "IBinaryMethod", "[", "]", "getMethods", "(", ")", "{", "return", "this", ".", "methods", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "return", "ClassFileConstants", ".", "AccPublic", ";", "}", "public", "char", "[", "]", "[", "]", "[", "]", "getMissingTypeNames", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getName", "(", ")", "{", "return", "CODE_SNIPPET_NAME", ";", "}", "public", "char", "[", "]", "getSourceName", "(", ")", "{", "return", "ROOT_CLASS_NAME", ";", "}", "public", "char", "[", "]", "getSuperclassName", "(", ")", "{", "return", "null", ";", "}", "public", "long", "getTagBits", "(", ")", "{", "return", "0", ";", "}", "public", "String", "getURLContents", "(", "String", "docUrlValue", ",", "String", "defaultEncoding", ")", "{", "return", "null", ";", "}", "public", "boolean", "isAnonymous", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isBinaryType", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "isLocal", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isMember", "(", ")", "{", "return", "false", ";", "}", "public", "char", "[", "]", "sourceFileName", "(", ")", "{", "return", "null", ";", "}", "}", "</s>" ]
5,121
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "ICodeAssist", "{", "void", "codeComplete", "(", "int", "offset", ",", "ICodeCompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "int", "offset", ",", "ICompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "int", "offset", ",", "CompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "int", "offset", ",", "CompletionRequestor", "requestor", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "int", "offset", ",", "ICompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "int", "offset", ",", "CompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "int", "offset", ",", "CompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IJavaElement", "[", "]", "codeSelect", "(", "int", "offset", ",", "int", "length", ")", "throws", "JavaModelException", ";", "IJavaElement", "[", "]", "codeSelect", "(", "int", "offset", ",", "int", "length", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,122
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "ITypeRoot", "extends", "IJavaElement", ",", "IParent", ",", "IOpenable", ",", "ISourceReference", ",", "ICodeAssist", "{", "IType", "findPrimaryType", "(", ")", ";", "IJavaElement", "getElementAt", "(", "int", "position", ")", "throws", "JavaModelException", ";", "ICompilationUnit", "getWorkingCopy", "(", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,123
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "ScannerHelper", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "public", "final", "class", "Signature", "{", "public", "static", "final", "char", "C_BOOLEAN", "=", "'Z'", ";", "public", "static", "final", "char", "C_BYTE", "=", "'B'", ";", "public", "static", "final", "char", "C_CHAR", "=", "'C'", ";", "public", "static", "final", "char", "C_DOUBLE", "=", "'D'", ";", "public", "static", "final", "char", "C_FLOAT", "=", "'F'", ";", "public", "static", "final", "char", "C_INT", "=", "'I'", ";", "public", "static", "final", "char", "C_SEMICOLON", "=", "';'", ";", "public", "static", "final", "char", "C_COLON", "=", "':'", ";", "public", "static", "final", "char", "C_LONG", "=", "'J'", ";", "public", "static", "final", "char", "C_SHORT", "=", "'S'", ";", "public", "static", "final", "char", "C_VOID", "=", "'V'", ";", "public", "static", "final", "char", "C_TYPE_VARIABLE", "=", "'T'", ";", "public", "static", "final", "char", "C_STAR", "=", "'*'", ";", "public", "static", "final", "char", "C_EXCEPTION_START", "=", "'^'", ";", "public", "static", "final", "char", "C_EXTENDS", "=", "'+'", ";", "public", "static", "final", "char", "C_SUPER", "=", "'-'", ";", "public", "static", "final", "char", "C_DOT", "=", "'.'", ";", "public", "static", "final", "char", "C_DOLLAR", "=", "'$'", ";", "public", "static", "final", "char", "C_ARRAY", "=", "'['", ";", "public", "static", "final", "char", "C_RESOLVED", "=", "'L'", ";", "public", "static", "final", "char", "C_UNRESOLVED", "=", "'Q'", ";", "public", "static", "final", "char", "C_NAME_END", "=", "';'", ";", "public", "static", "final", "char", "C_PARAM_START", "=", "'('", ";", "public", "static", "final", "char", "C_PARAM_END", "=", "')'", ";", "public", "static", "final", "char", "C_GENERIC_START", "=", "'<'", ";", "public", "static", "final", "char", "C_GENERIC_END", "=", "'>'", ";", "public", "static", "final", "char", "C_CAPTURE", "=", "'!'", ";", "public", "static", "final", "String", "SIG_BOOLEAN", "=", "\"Z\"", ";", "public", "static", "final", "String", "SIG_BYTE", "=", "\"B\"", ";", "public", "static", "final", "String", "SIG_CHAR", "=", "\"C\"", ";", "public", "static", "final", "String", "SIG_DOUBLE", "=", "\"D\"", ";", "public", "static", "final", "String", "SIG_FLOAT", "=", "\"F\"", ";", "public", "static", "final", "String", "SIG_INT", "=", "\"I\"", ";", "public", "static", "final", "String", "SIG_LONG", "=", "\"J\"", ";", "public", "static", "final", "String", "SIG_SHORT", "=", "\"S\"", ";", "public", "static", "final", "String", "SIG_VOID", "=", "\"V\"", ";", "public", "static", "final", "int", "CLASS_TYPE_SIGNATURE", "=", "1", ";", "public", "static", "final", "int", "BASE_TYPE_SIGNATURE", "=", "2", ";", "public", "static", "final", "int", "TYPE_VARIABLE_SIGNATURE", "=", "3", ";", "public", "static", "final", "int", "ARRAY_TYPE_SIGNATURE", "=", "4", ";", "public", "static", "final", "int", "WILDCARD_TYPE_SIGNATURE", "=", "5", ";", "public", "static", "final", "int", "CAPTURE_TYPE_SIGNATURE", "=", "6", ";", "private", "static", "final", "char", "[", "]", "BOOLEAN", "=", "\"boolean\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "BYTE", "=", "\"byte\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "CHAR", "=", "\"char\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "DOUBLE", "=", "\"double\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "FLOAT", "=", "\"float\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "INT", "=", "\"int\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "LONG", "=", "\"long\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "SHORT", "=", "\"short\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "VOID", "=", "\"void\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "EXTENDS", "=", "\"extends\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "SUPER", "=", "\"super\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "CAPTURE", "=", "\"capture-of\"", ".", "toCharArray", "(", ")", ";", "private", "Signature", "(", ")", "{", "}", "private", "static", "int", "checkName", "(", "char", "[", "]", "name", ",", "char", "[", "]", "typeName", ",", "int", "pos", ",", "int", "length", ")", "{", "if", "(", "CharOperation", ".", "fragmentEquals", "(", "name", ",", "typeName", ",", "pos", ",", "true", ")", ")", "{", "pos", "+=", "name", ".", "length", ";", "if", "(", "pos", "==", "length", ")", "return", "pos", ";", "char", "currentChar", "=", "typeName", "[", "pos", "]", ";", "switch", "(", "currentChar", ")", "{", "case", "'", "'", ":", "case", "'.'", ":", "case", "'<'", ":", "case", "'>'", ":", "case", "'['", ":", "case", "','", ":", "return", "pos", ";", "default", ":", "if", "(", "ScannerHelper", ".", "isWhitespace", "(", "currentChar", ")", ")", "return", "pos", ";", "}", "}", "return", "-", "1", ";", "}", "public", "static", "char", "[", "]", "createArraySignature", "(", "char", "[", "]", "typeSignature", ",", "int", "arrayCount", ")", "{", "if", "(", "arrayCount", "==", "0", ")", "return", "typeSignature", ";", "int", "sigLength", "=", "typeSignature", ".", "length", ";", "char", "[", "]", "result", "=", "new", "char", "[", "arrayCount", "+", "sigLength", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arrayCount", ";", "i", "++", ")", "{", "result", "[", "i", "]", "=", "C_ARRAY", ";", "}", "System", ".", "arraycopy", "(", "typeSignature", ",", "0", ",", "result", ",", "arrayCount", ",", "sigLength", ")", ";", "return", "result", ";", "}", "public", "static", "String", "createArraySignature", "(", "String", "typeSignature", ",", "int", "arrayCount", ")", "{", "return", "new", "String", "(", "createArraySignature", "(", "typeSignature", ".", "toCharArray", "(", ")", ",", "arrayCount", ")", ")", ";", "}", "public", "static", "char", "[", "]", "createMethodSignature", "(", "char", "[", "]", "[", "]", "parameterTypes", ",", "char", "[", "]", "returnType", ")", "{", "int", "parameterTypesLength", "=", "parameterTypes", ".", "length", ";", "int", "parameterLength", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parameterTypesLength", ";", "i", "++", ")", "{", "parameterLength", "+=", "parameterTypes", "[", "i", "]", ".", "length", ";", "}", "int", "returnTypeLength", "=", "returnType", ".", "length", ";", "char", "[", "]", "result", "=", "new", "char", "[", "1", "+", "parameterLength", "+", "1", "+", "returnTypeLength", "]", ";", "result", "[", "0", "]", "=", "C_PARAM_START", ";", "int", "index", "=", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parameterTypesLength", ";", "i", "++", ")", "{", "char", "[", "]", "parameterType", "=", "parameterTypes", "[", "i", "]", ";", "int", "length", "=", "parameterType", ".", "length", ";", "System", ".", "arraycopy", "(", "parameterType", ",", "0", ",", "result", ",", "index", ",", "length", ")", ";", "index", "+=", "length", ";", "}", "result", "[", "index", "]", "=", "C_PARAM_END", ";", "System", ".", "arraycopy", "(", "returnType", ",", "0", ",", "result", ",", "index", "+", "1", ",", "returnTypeLength", ")", ";", "return", "result", ";", "}", "public", "static", "String", "createMethodSignature", "(", "String", "[", "]", "parameterTypes", ",", "String", "returnType", ")", "{", "int", "parameterTypesLenth", "=", "parameterTypes", ".", "length", ";", "char", "[", "]", "[", "]", "parameters", "=", "new", "char", "[", "parameterTypesLenth", "]", "[", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parameterTypesLenth", ";", "i", "++", ")", "{", "parameters", "[", "i", "]", "=", "parameterTypes", "[", "i", "]", ".", "toCharArray", "(", ")", ";", "}", "return", "new", "String", "(", "createMethodSignature", "(", "parameters", ",", "returnType", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "createTypeParameterSignature", "(", "char", "[", "]", "typeParameterName", ",", "char", "[", "]", "[", "]", "boundSignatures", ")", "{", "int", "length", "=", "boundSignatures", ".", "length", ";", "if", "(", "length", "==", "0", ")", "{", "return", "CharOperation", ".", "append", "(", "typeParameterName", ",", "C_COLON", ")", ";", "}", "int", "boundsSize", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "boundsSize", "+=", "boundSignatures", "[", "i", "]", ".", "length", "+", "1", ";", "}", "int", "nameLength", "=", "typeParameterName", ".", "length", ";", "char", "[", "]", "result", "=", "new", "char", "[", "nameLength", "+", "boundsSize", "]", ";", "System", ".", "arraycopy", "(", "typeParameterName", ",", "0", ",", "result", ",", "0", ",", "nameLength", ")", ";", "int", "index", "=", "nameLength", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "result", "[", "index", "++", "]", "=", "C_COLON", ";", "int", "boundLength", "=", "boundSignatures", "[", "i", "]", ".", "length", ";", "System", ".", "arraycopy", "(", "boundSignatures", "[", "i", "]", ",", "0", ",", "result", ",", "index", ",", "boundLength", ")", ";", "index", "+=", "boundLength", ";", "}", "return", "result", ";", "}", "public", "static", "String", "createTypeParameterSignature", "(", "String", "typeParameterName", ",", "String", "[", "]", "boundSignatures", ")", "{", "int", "length", "=", "boundSignatures", ".", "length", ";", "char", "[", "]", "[", "]", "boundSignatureChars", "=", "new", "char", "[", "length", "]", "[", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "boundSignatureChars", "[", "i", "]", "=", "boundSignatures", "[", "i", "]", ".", "toCharArray", "(", ")", ";", "}", "return", "new", "String", "(", "createTypeParameterSignature", "(", "typeParameterName", ".", "toCharArray", "(", ")", ",", "boundSignatureChars", ")", ")", ";", "}", "public", "static", "String", "createTypeSignature", "(", "char", "[", "]", "typeName", ",", "boolean", "isResolved", ")", "{", "return", "new", "String", "(", "createCharArrayTypeSignature", "(", "typeName", ",", "isResolved", ")", ")", ";", "}", "public", "static", "char", "[", "]", "createCharArrayTypeSignature", "(", "char", "[", "]", "typeName", ",", "boolean", "isResolved", ")", "{", "if", "(", "typeName", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"null\"", ")", ";", "int", "length", "=", "typeName", ".", "length", ";", "if", "(", "length", "==", "0", ")", "throw", "new", "IllegalArgumentException", "(", "new", "String", "(", "typeName", ")", ")", ";", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "5", ")", ";", "int", "pos", "=", "encodeTypeSignature", "(", "typeName", ",", "0", ",", "isResolved", ",", "length", ",", "buffer", ")", ";", "pos", "=", "consumeWhitespace", "(", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "pos", "<", "length", ")", "throw", "new", "IllegalArgumentException", "(", "new", "String", "(", "typeName", ")", ")", ";", "char", "[", "]", "result", "=", "new", "char", "[", "length", "=", "buffer", ".", "length", "(", ")", "]", ";", "buffer", ".", "getChars", "(", "0", ",", "length", ",", "result", ",", "0", ")", ";", "return", "result", ";", "}", "private", "static", "int", "consumeWhitespace", "(", "char", "[", "]", "typeName", ",", "int", "pos", ",", "int", "length", ")", "{", "while", "(", "pos", "<", "length", ")", "{", "char", "currentChar", "=", "typeName", "[", "pos", "]", ";", "if", "(", "currentChar", "!=", "'", "'", "&&", "!", "ScannerHelper", ".", "isWhitespace", "(", "currentChar", ")", ")", "{", "break", ";", "}", "pos", "++", ";", "}", "return", "pos", ";", "}", "private", "static", "int", "encodeQualifiedName", "(", "char", "[", "]", "typeName", ",", "int", "pos", ",", "int", "length", ",", "StringBuffer", "buffer", ")", "{", "int", "count", "=", "0", ";", "char", "lastAppendedChar", "=", "0", ";", "nameLoop", ":", "while", "(", "pos", "<", "length", ")", "{", "char", "currentChar", "=", "typeName", "[", "pos", "]", ";", "switch", "(", "currentChar", ")", "{", "case", "'<'", ":", "case", "'>'", ":", "case", "'['", ":", "case", "','", ":", "break", "nameLoop", ";", "case", "'.'", ":", "buffer", ".", "append", "(", "C_DOT", ")", ";", "lastAppendedChar", "=", "C_DOT", ";", "count", "++", ";", "break", ";", "default", ":", "if", "(", "currentChar", "==", "'", "'", "||", "ScannerHelper", ".", "isWhitespace", "(", "currentChar", ")", ")", "{", "if", "(", "lastAppendedChar", "==", "C_DOT", ")", "{", "pos", "=", "consumeWhitespace", "(", "typeName", ",", "pos", ",", "length", ")", "-", "1", ";", "break", ";", "}", "int", "checkPos", "=", "checkNextChar", "(", "typeName", ",", "'.'", ",", "pos", ",", "length", ",", "true", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "buffer", ".", "append", "(", "C_DOT", ")", ";", "lastAppendedChar", "=", "C_DOT", ";", "count", "++", ";", "pos", "=", "checkPos", ";", "break", ";", "}", "break", "nameLoop", ";", "}", "buffer", ".", "append", "(", "currentChar", ")", ";", "lastAppendedChar", "=", "currentChar", ";", "count", "++", ";", "break", ";", "}", "pos", "++", ";", "}", "if", "(", "count", "==", "0", ")", "throw", "new", "IllegalArgumentException", "(", "new", "String", "(", "typeName", ")", ")", ";", "return", "pos", ";", "}", "private", "static", "int", "encodeArrayDimension", "(", "char", "[", "]", "typeName", ",", "int", "pos", ",", "int", "length", ",", "StringBuffer", "buffer", ")", "{", "int", "checkPos", ";", "while", "(", "pos", "<", "length", "&&", "(", "checkPos", "=", "checkNextChar", "(", "typeName", ",", "'['", ",", "pos", ",", "length", ",", "true", ")", ")", ">", "0", ")", "{", "pos", "=", "checkNextChar", "(", "typeName", ",", "']'", ",", "checkPos", ",", "length", ",", "false", ")", ";", "buffer", ".", "append", "(", "C_ARRAY", ")", ";", "}", "return", "pos", ";", "}", "private", "static", "int", "checkArrayDimension", "(", "char", "[", "]", "typeName", ",", "int", "pos", ",", "int", "length", ")", "{", "int", "genericBalance", "=", "0", ";", "while", "(", "pos", "<", "length", ")", "{", "switch", "(", "typeName", "[", "pos", "]", ")", "{", "case", "'<'", ":", "genericBalance", "++", ";", "break", ";", "case", "','", ":", "if", "(", "genericBalance", "==", "0", ")", "return", "-", "1", ";", "break", ";", "case", "'>'", ":", "if", "(", "genericBalance", "==", "0", ")", "return", "-", "1", ";", "genericBalance", "--", ";", "break", ";", "case", "'['", ":", "if", "(", "genericBalance", "==", "0", ")", "{", "return", "pos", ";", "}", "}", "pos", "++", ";", "}", "return", "-", "1", ";", "}", "private", "static", "int", "checkNextChar", "(", "char", "[", "]", "typeName", ",", "char", "expectedChar", ",", "int", "pos", ",", "int", "length", ",", "boolean", "isOptional", ")", "{", "pos", "=", "consumeWhitespace", "(", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "pos", "<", "length", "&&", "typeName", "[", "pos", "]", "==", "expectedChar", ")", "return", "pos", "+", "1", ";", "if", "(", "!", "isOptional", ")", "throw", "new", "IllegalArgumentException", "(", "new", "String", "(", "typeName", ")", ")", ";", "return", "-", "1", ";", "}", "private", "static", "int", "encodeTypeSignature", "(", "char", "[", "]", "typeName", ",", "int", "start", ",", "boolean", "isResolved", ",", "int", "length", ",", "StringBuffer", "buffer", ")", "{", "int", "pos", "=", "start", ";", "pos", "=", "consumeWhitespace", "(", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "pos", ">=", "length", ")", "throw", "new", "IllegalArgumentException", "(", "new", "String", "(", "typeName", ")", ")", ";", "int", "checkPos", ";", "char", "currentChar", "=", "typeName", "[", "pos", "]", ";", "switch", "(", "currentChar", ")", "{", "case", "'b'", ":", "checkPos", "=", "checkName", "(", "BOOLEAN", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_BOOLEAN", ")", ";", "return", "pos", ";", "}", "checkPos", "=", "checkName", "(", "BYTE", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_BYTE", ")", ";", "return", "pos", ";", "}", "break", ";", "case", "'d'", ":", "checkPos", "=", "checkName", "(", "DOUBLE", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_DOUBLE", ")", ";", "return", "pos", ";", "}", "break", ";", "case", "'f'", ":", "checkPos", "=", "checkName", "(", "FLOAT", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_FLOAT", ")", ";", "return", "pos", ";", "}", "break", ";", "case", "'i'", ":", "checkPos", "=", "checkName", "(", "INT", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_INT", ")", ";", "return", "pos", ";", "}", "break", ";", "case", "'l'", ":", "checkPos", "=", "checkName", "(", "LONG", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_LONG", ")", ";", "return", "pos", ";", "}", "break", ";", "case", "'s'", ":", "checkPos", "=", "checkName", "(", "SHORT", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_SHORT", ")", ";", "return", "pos", ";", "}", "break", ";", "case", "'v'", ":", "checkPos", "=", "checkName", "(", "VOID", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_VOID", ")", ";", "return", "pos", ";", "}", "break", ";", "case", "'c'", ":", "checkPos", "=", "checkName", "(", "CHAR", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "C_CHAR", ")", ";", "return", "pos", ";", "}", "else", "{", "checkPos", "=", "checkName", "(", "CAPTURE", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "pos", "=", "consumeWhitespace", "(", "typeName", ",", "checkPos", ",", "length", ")", ";", "if", "(", "typeName", "[", "pos", "]", "!=", "'?'", ")", "{", "break", ";", "}", "}", "else", "{", "break", ";", "}", "}", "buffer", ".", "append", "(", "C_CAPTURE", ")", ";", "case", "'?'", ":", "pos", "=", "consumeWhitespace", "(", "typeName", ",", "pos", "+", "1", ",", "length", ")", ";", "checkPos", "=", "checkName", "(", "EXTENDS", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "buffer", ".", "append", "(", "C_EXTENDS", ")", ";", "pos", "=", "encodeTypeSignature", "(", "typeName", ",", "checkPos", ",", "isResolved", ",", "length", ",", "buffer", ")", ";", "return", "pos", ";", "}", "checkPos", "=", "checkName", "(", "SUPER", ",", "typeName", ",", "pos", ",", "length", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "buffer", ".", "append", "(", "C_SUPER", ")", ";", "pos", "=", "encodeTypeSignature", "(", "typeName", ",", "checkPos", ",", "isResolved", ",", "length", ",", "buffer", ")", ";", "return", "pos", ";", "}", "buffer", ".", "append", "(", "C_STAR", ")", ";", "return", "pos", ";", "}", "checkPos", "=", "checkArrayDimension", "(", "typeName", ",", "pos", ",", "length", ")", ";", "int", "end", ";", "if", "(", "checkPos", ">", "0", ")", "{", "end", "=", "encodeArrayDimension", "(", "typeName", ",", "checkPos", ",", "length", ",", "buffer", ")", ";", "}", "else", "{", "end", "=", "-", "1", ";", "}", "buffer", ".", "append", "(", "isResolved", "?", "C_RESOLVED", ":", "C_UNRESOLVED", ")", ";", "while", "(", "true", ")", "{", "pos", "=", "encodeQualifiedName", "(", "typeName", ",", "pos", ",", "length", ",", "buffer", ")", ";", "checkPos", "=", "checkNextChar", "(", "typeName", ",", "'<'", ",", "pos", ",", "length", ",", "true", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "buffer", ".", "append", "(", "C_GENERIC_START", ")", ";", "pos", "=", "encodeTypeSignature", "(", "typeName", ",", "checkPos", ",", "isResolved", ",", "length", ",", "buffer", ")", ";", "while", "(", "(", "checkPos", "=", "checkNextChar", "(", "typeName", ",", "','", ",", "pos", ",", "length", ",", "true", ")", ")", ">", "0", ")", "{", "pos", "=", "encodeTypeSignature", "(", "typeName", ",", "checkPos", ",", "isResolved", ",", "length", ",", "buffer", ")", ";", "}", "pos", "=", "checkNextChar", "(", "typeName", ",", "'>'", ",", "pos", ",", "length", ",", "false", ")", ";", "buffer", ".", "append", "(", "C_GENERIC_END", ")", ";", "}", "checkPos", "=", "checkNextChar", "(", "typeName", ",", "'.'", ",", "pos", ",", "length", ",", "true", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "buffer", ".", "append", "(", "C_DOT", ")", ";", "pos", "=", "checkPos", ";", "}", "else", "{", "break", ";", "}", "}", "buffer", ".", "append", "(", "C_NAME_END", ")", ";", "if", "(", "end", ">", "0", ")", "pos", "=", "end", ";", "return", "pos", ";", "}", "public", "static", "String", "createTypeSignature", "(", "String", "typeName", ",", "boolean", "isResolved", ")", "{", "return", "createTypeSignature", "(", "typeName", "==", "null", "?", "null", ":", "typeName", ".", "toCharArray", "(", ")", ",", "isResolved", ")", ";", "}", "public", "static", "int", "getArrayCount", "(", "char", "[", "]", "typeSignature", ")", "throws", "IllegalArgumentException", "{", "try", "{", "int", "count", "=", "0", ";", "while", "(", "typeSignature", "[", "count", "]", "==", "C_ARRAY", ")", "{", "++", "count", ";", "}", "return", "count", ";", "}", "catch", "(", "ArrayIndexOutOfBoundsException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "static", "int", "getArrayCount", "(", "String", "typeSignature", ")", "throws", "IllegalArgumentException", "{", "return", "getArrayCount", "(", "typeSignature", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "static", "char", "[", "]", "getElementType", "(", "char", "[", "]", "typeSignature", ")", "throws", "IllegalArgumentException", "{", "int", "count", "=", "getArrayCount", "(", "typeSignature", ")", ";", "if", "(", "count", "==", "0", ")", "return", "typeSignature", ";", "int", "length", "=", "typeSignature", ".", "length", ";", "char", "[", "]", "result", "=", "new", "char", "[", "length", "-", "count", "]", ";", "System", ".", "arraycopy", "(", "typeSignature", ",", "count", ",", "result", ",", "0", ",", "length", "-", "count", ")", ";", "return", "result", ";", "}", "public", "static", "String", "getElementType", "(", "String", "typeSignature", ")", "throws", "IllegalArgumentException", "{", "return", "new", "String", "(", "getElementType", "(", "typeSignature", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "int", "getParameterCount", "(", "char", "[", "]", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "try", "{", "int", "count", "=", "0", ";", "int", "i", "=", "CharOperation", ".", "indexOf", "(", "C_PARAM_START", ",", "methodSignature", ")", ";", "if", "(", "i", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "else", "{", "i", "++", ";", "}", "for", "(", ";", ";", ")", "{", "if", "(", "methodSignature", "[", "i", "]", "==", "C_PARAM_END", ")", "{", "return", "count", ";", "}", "int", "e", "=", "Util", ".", "scanTypeSignature", "(", "methodSignature", ",", "i", ")", ";", "if", "(", "e", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "else", "{", "i", "=", "e", "+", "1", ";", "}", "count", "++", ";", "}", "}", "catch", "(", "ArrayIndexOutOfBoundsException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "static", "int", "getTypeSignatureKind", "(", "char", "[", "]", "typeSignature", ")", "{", "if", "(", "typeSignature", ".", "length", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "typeSignature", "[", "0", "]", ";", "if", "(", "c", "==", "C_GENERIC_START", ")", "{", "int", "count", "=", "1", ";", "for", "(", "int", "i", "=", "1", ",", "length", "=", "typeSignature", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "switch", "(", "typeSignature", "[", "i", "]", ")", "{", "case", "C_GENERIC_START", ":", "count", "++", ";", "break", ";", "case", "C_GENERIC_END", ":", "count", "--", ";", "break", ";", "}", "if", "(", "count", "==", "0", ")", "{", "if", "(", "i", "+", "1", "<", "length", ")", "c", "=", "typeSignature", "[", "i", "+", "1", "]", ";", "break", ";", "}", "}", "}", "switch", "(", "c", ")", "{", "case", "C_ARRAY", ":", "return", "ARRAY_TYPE_SIGNATURE", ";", "case", "C_RESOLVED", ":", "case", "C_UNRESOLVED", ":", "return", "CLASS_TYPE_SIGNATURE", ";", "case", "C_TYPE_VARIABLE", ":", "return", "TYPE_VARIABLE_SIGNATURE", ";", "case", "C_BOOLEAN", ":", "case", "C_BYTE", ":", "case", "C_CHAR", ":", "case", "C_DOUBLE", ":", "case", "C_FLOAT", ":", "case", "C_INT", ":", "case", "C_LONG", ":", "case", "C_SHORT", ":", "case", "C_VOID", ":", "return", "BASE_TYPE_SIGNATURE", ";", "case", "C_STAR", ":", "case", "C_SUPER", ":", "case", "C_EXTENDS", ":", "return", "WILDCARD_TYPE_SIGNATURE", ";", "case", "C_CAPTURE", ":", "return", "CAPTURE_TYPE_SIGNATURE", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "static", "int", "getTypeSignatureKind", "(", "String", "typeSignature", ")", "{", "if", "(", "typeSignature", ".", "length", "(", ")", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "typeSignature", ".", "charAt", "(", "0", ")", ";", "if", "(", "c", "==", "C_GENERIC_START", ")", "{", "int", "count", "=", "1", ";", "for", "(", "int", "i", "=", "1", ",", "length", "=", "typeSignature", ".", "length", "(", ")", ";", "i", "<", "length", ";", "i", "++", ")", "{", "switch", "(", "typeSignature", ".", "charAt", "(", "i", ")", ")", "{", "case", "C_GENERIC_START", ":", "count", "++", ";", "break", ";", "case", "C_GENERIC_END", ":", "count", "--", ";", "break", ";", "}", "if", "(", "count", "==", "0", ")", "{", "if", "(", "i", "+", "1", "<", "length", ")", "c", "=", "typeSignature", ".", "charAt", "(", "i", "+", "1", ")", ";", "break", ";", "}", "}", "}", "switch", "(", "c", ")", "{", "case", "C_ARRAY", ":", "return", "ARRAY_TYPE_SIGNATURE", ";", "case", "C_RESOLVED", ":", "case", "C_UNRESOLVED", ":", "return", "CLASS_TYPE_SIGNATURE", ";", "case", "C_TYPE_VARIABLE", ":", "return", "TYPE_VARIABLE_SIGNATURE", ";", "case", "C_BOOLEAN", ":", "case", "C_BYTE", ":", "case", "C_CHAR", ":", "case", "C_DOUBLE", ":", "case", "C_FLOAT", ":", "case", "C_INT", ":", "case", "C_LONG", ":", "case", "C_SHORT", ":", "case", "C_VOID", ":", "return", "BASE_TYPE_SIGNATURE", ";", "case", "C_STAR", ":", "case", "C_SUPER", ":", "case", "C_EXTENDS", ":", "return", "WILDCARD_TYPE_SIGNATURE", ";", "case", "C_CAPTURE", ":", "return", "CAPTURE_TYPE_SIGNATURE", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "static", "int", "getParameterCount", "(", "String", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "return", "getParameterCount", "(", "methodSignature", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "static", "char", "[", "]", "[", "]", "getParameterTypes", "(", "char", "[", "]", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "try", "{", "int", "count", "=", "getParameterCount", "(", "methodSignature", ")", ";", "char", "[", "]", "[", "]", "result", "=", "new", "char", "[", "count", "]", "[", "]", ";", "if", "(", "count", "==", "0", ")", "{", "return", "result", ";", "}", "int", "i", "=", "CharOperation", ".", "indexOf", "(", "C_PARAM_START", ",", "methodSignature", ")", ";", "if", "(", "i", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "else", "{", "i", "++", ";", "}", "int", "t", "=", "0", ";", "for", "(", ";", ";", ")", "{", "if", "(", "methodSignature", "[", "i", "]", "==", "C_PARAM_END", ")", "{", "return", "result", ";", "}", "int", "e", "=", "Util", ".", "scanTypeSignature", "(", "methodSignature", ",", "i", ")", ";", "if", "(", "e", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "result", "[", "t", "]", "=", "CharOperation", ".", "subarray", "(", "methodSignature", ",", "i", ",", "e", "+", "1", ")", ";", "t", "++", ";", "i", "=", "e", "+", "1", ";", "}", "}", "catch", "(", "ArrayIndexOutOfBoundsException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "static", "String", "[", "]", "getParameterTypes", "(", "String", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "char", "[", "]", "[", "]", "parameterTypes", "=", "getParameterTypes", "(", "methodSignature", ".", "toCharArray", "(", ")", ")", ";", "return", "CharOperation", ".", "toStrings", "(", "parameterTypes", ")", ";", "}", "public", "static", "String", "[", "]", "getThrownExceptionTypes", "(", "String", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "char", "[", "]", "[", "]", "parameterTypes", "=", "getThrownExceptionTypes", "(", "methodSignature", ".", "toCharArray", "(", ")", ")", ";", "return", "CharOperation", ".", "toStrings", "(", "parameterTypes", ")", ";", "}", "public", "static", "char", "[", "]", "[", "]", "getThrownExceptionTypes", "(", "char", "[", "]", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "int", "exceptionStart", "=", "CharOperation", ".", "indexOf", "(", "C_EXCEPTION_START", ",", "methodSignature", ")", ";", "if", "(", "exceptionStart", "==", "-", "1", ")", "{", "int", "paren", "=", "CharOperation", ".", "lastIndexOf", "(", "C_PARAM_END", ",", "methodSignature", ")", ";", "if", "(", "paren", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "exceptionStart", "=", "Util", ".", "scanTypeSignature", "(", "methodSignature", ",", "paren", "+", "1", ")", "+", "1", ";", "int", "length", "=", "methodSignature", ".", "length", ";", "if", "(", "exceptionStart", "==", "length", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "length", "=", "methodSignature", ".", "length", ";", "int", "i", "=", "exceptionStart", ";", "ArrayList", "exceptionList", "=", "new", "ArrayList", "(", "1", ")", ";", "while", "(", "i", "<", "length", ")", "{", "if", "(", "methodSignature", "[", "i", "]", "==", "C_EXCEPTION_START", ")", "{", "exceptionStart", "++", ";", "i", "++", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "i", "=", "Util", ".", "scanTypeSignature", "(", "methodSignature", ",", "i", ")", "+", "1", ";", "exceptionList", ".", "add", "(", "CharOperation", ".", "subarray", "(", "methodSignature", ",", "exceptionStart", ",", "i", ")", ")", ";", "exceptionStart", "=", "i", ";", "}", "char", "[", "]", "[", "]", "result", ";", "exceptionList", ".", "toArray", "(", "result", "=", "new", "char", "[", "exceptionList", ".", "size", "(", ")", "]", "[", "]", ")", ";", "return", "result", ";", "}", "public", "static", "char", "[", "]", "[", "]", "getTypeArguments", "(", "char", "[", "]", "parameterizedTypeSignature", ")", "throws", "IllegalArgumentException", "{", "int", "length", "=", "parameterizedTypeSignature", ".", "length", ";", "if", "(", "length", "<", "2", "||", "parameterizedTypeSignature", "[", "length", "-", "2", "]", "!=", "C_GENERIC_END", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "int", "count", "=", "1", ";", "int", "start", "=", "length", "-", "2", ";", "while", "(", "start", ">=", "0", "&&", "count", ">", "0", ")", "{", "switch", "(", "parameterizedTypeSignature", "[", "--", "start", "]", ")", "{", "case", "C_GENERIC_START", ":", "count", "--", ";", "break", ";", "case", "C_GENERIC_END", ":", "count", "++", ";", "break", ";", "}", "}", "if", "(", "start", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "ArrayList", "args", "=", "new", "ArrayList", "(", ")", ";", "int", "p", "=", "start", "+", "1", ";", "while", "(", "true", ")", "{", "if", "(", "p", ">=", "parameterizedTypeSignature", ".", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "parameterizedTypeSignature", "[", "p", "]", ";", "if", "(", "c", "==", "C_GENERIC_END", ")", "{", "int", "size", "=", "args", ".", "size", "(", ")", ";", "char", "[", "]", "[", "]", "result", "=", "new", "char", "[", "size", "]", "[", "]", ";", "args", ".", "toArray", "(", "result", ")", ";", "return", "result", ";", "}", "int", "e", "=", "Util", ".", "scanTypeArgumentSignature", "(", "parameterizedTypeSignature", ",", "p", ")", ";", "args", ".", "add", "(", "CharOperation", ".", "subarray", "(", "parameterizedTypeSignature", ",", "p", ",", "e", "+", "1", ")", ")", ";", "p", "=", "e", "+", "1", ";", "}", "}", "public", "static", "String", "[", "]", "getTypeArguments", "(", "String", "parameterizedTypeSignature", ")", "throws", "IllegalArgumentException", "{", "char", "[", "]", "[", "]", "args", "=", "getTypeArguments", "(", "parameterizedTypeSignature", ".", "toCharArray", "(", ")", ")", ";", "return", "CharOperation", ".", "toStrings", "(", "args", ")", ";", "}", "public", "static", "char", "[", "]", "getTypeErasure", "(", "char", "[", "]", "parameterizedTypeSignature", ")", "throws", "IllegalArgumentException", "{", "int", "end", "=", "CharOperation", ".", "indexOf", "(", "C_GENERIC_START", ",", "parameterizedTypeSignature", ")", ";", "if", "(", "end", "==", "-", "1", ")", "return", "parameterizedTypeSignature", ";", "int", "length", "=", "parameterizedTypeSignature", ".", "length", ";", "char", "[", "]", "result", "=", "new", "char", "[", "length", "]", ";", "int", "pos", "=", "0", ";", "int", "start", "=", "0", ";", "int", "deep", "=", "0", ";", "for", "(", "int", "idx", "=", "end", ";", "idx", "<", "length", ";", "idx", "++", ")", "{", "switch", "(", "parameterizedTypeSignature", "[", "idx", "]", ")", "{", "case", "C_GENERIC_START", ":", "if", "(", "deep", "==", "0", ")", "{", "int", "size", "=", "idx", "-", "start", ";", "System", ".", "arraycopy", "(", "parameterizedTypeSignature", ",", "start", ",", "result", ",", "pos", ",", "size", ")", ";", "end", "=", "idx", ";", "pos", "+=", "size", ";", "}", "deep", "++", ";", "break", ";", "case", "C_GENERIC_END", ":", "deep", "--", ";", "if", "(", "deep", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "if", "(", "deep", "==", "0", ")", "start", "=", "idx", "+", "1", ";", "break", ";", "}", "}", "if", "(", "deep", ">", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "int", "size", "=", "pos", "+", "length", "-", "start", ";", "char", "[", "]", "resized", "=", "new", "char", "[", "size", "]", ";", "System", ".", "arraycopy", "(", "result", ",", "0", ",", "resized", ",", "0", ",", "pos", ")", ";", "System", ".", "arraycopy", "(", "parameterizedTypeSignature", ",", "start", ",", "resized", ",", "pos", ",", "length", "-", "start", ")", ";", "return", "resized", ";", "}", "public", "static", "String", "getTypeErasure", "(", "String", "parameterizedTypeSignature", ")", "throws", "IllegalArgumentException", "{", "return", "new", "String", "(", "getTypeErasure", "(", "parameterizedTypeSignature", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "[", "]", "getTypeParameters", "(", "char", "[", "]", "methodOrTypeSignature", ")", "throws", "IllegalArgumentException", "{", "try", "{", "int", "length", "=", "methodOrTypeSignature", ".", "length", ";", "if", "(", "length", "==", "0", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "if", "(", "methodOrTypeSignature", "[", "0", "]", "!=", "C_GENERIC_START", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "ArrayList", "paramList", "=", "new", "ArrayList", "(", "1", ")", ";", "int", "paramStart", "=", "1", ",", "i", "=", "1", ";", "while", "(", "i", "<", "length", ")", "{", "if", "(", "methodOrTypeSignature", "[", "i", "]", "==", "C_GENERIC_END", ")", "{", "int", "size", "=", "paramList", ".", "size", "(", ")", ";", "if", "(", "size", "==", "0", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "char", "[", "]", "[", "]", "result", ";", "paramList", ".", "toArray", "(", "result", "=", "new", "char", "[", "size", "]", "[", "]", ")", ";", "return", "result", ";", "}", "i", "=", "CharOperation", ".", "indexOf", "(", "C_COLON", ",", "methodOrTypeSignature", ",", "i", ")", ";", "if", "(", "i", "<", "0", "||", "i", ">=", "length", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "while", "(", "methodOrTypeSignature", "[", "i", "]", "==", "':'", ")", "{", "i", "++", ";", "switch", "(", "methodOrTypeSignature", "[", "i", "]", ")", "{", "case", "':'", ":", "break", ";", "case", "C_GENERIC_END", ":", "break", ";", "case", "C_RESOLVED", ":", "try", "{", "i", "=", "Util", ".", "scanClassTypeSignature", "(", "methodOrTypeSignature", ",", "i", ")", ";", "i", "++", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "break", ";", "case", "C_ARRAY", ":", "try", "{", "i", "=", "Util", ".", "scanArrayTypeSignature", "(", "methodOrTypeSignature", ",", "i", ")", ";", "i", "++", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "break", ";", "case", "C_TYPE_VARIABLE", ":", "try", "{", "i", "=", "Util", ".", "scanTypeVariableSignature", "(", "methodOrTypeSignature", ",", "i", ")", ";", "i", "++", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "}", "break", ";", "}", "}", "paramList", ".", "add", "(", "CharOperation", ".", "subarray", "(", "methodOrTypeSignature", ",", "paramStart", ",", "i", ")", ")", ";", "paramStart", "=", "i", ";", "}", "}", "catch", "(", "ArrayIndexOutOfBoundsException", "e", ")", "{", "}", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "public", "static", "String", "[", "]", "getTypeParameters", "(", "String", "methodOrTypeSignature", ")", "throws", "IllegalArgumentException", "{", "char", "[", "]", "[", "]", "params", "=", "getTypeParameters", "(", "methodOrTypeSignature", ".", "toCharArray", "(", ")", ")", ";", "return", "CharOperation", ".", "toStrings", "(", "params", ")", ";", "}", "public", "static", "String", "getTypeVariable", "(", "String", "formalTypeParameterSignature", ")", "throws", "IllegalArgumentException", "{", "return", "new", "String", "(", "getTypeVariable", "(", "formalTypeParameterSignature", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "getTypeVariable", "(", "char", "[", "]", "formalTypeParameterSignature", ")", "throws", "IllegalArgumentException", "{", "int", "p", "=", "CharOperation", ".", "indexOf", "(", "C_COLON", ",", "formalTypeParameterSignature", ")", ";", "if", "(", "p", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "return", "CharOperation", ".", "subarray", "(", "formalTypeParameterSignature", ",", "0", ",", "p", ")", ";", "}", "public", "static", "char", "[", "]", "[", "]", "getTypeParameterBounds", "(", "char", "[", "]", "formalTypeParameterSignature", ")", "throws", "IllegalArgumentException", "{", "int", "p1", "=", "CharOperation", ".", "indexOf", "(", "C_COLON", ",", "formalTypeParameterSignature", ")", ";", "if", "(", "p1", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "p1", "==", "formalTypeParameterSignature", ".", "length", "-", "1", ")", "{", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "}", "int", "p2", "=", "CharOperation", ".", "indexOf", "(", "C_COLON", ",", "formalTypeParameterSignature", ",", "p1", "+", "1", ")", ";", "char", "[", "]", "classBound", ";", "if", "(", "p2", "<", "0", ")", "{", "classBound", "=", "CharOperation", ".", "subarray", "(", "formalTypeParameterSignature", ",", "p1", "+", "1", ",", "formalTypeParameterSignature", ".", "length", ")", ";", "return", "new", "char", "[", "]", "[", "]", "{", "classBound", "}", ";", "}", "if", "(", "p2", "==", "p1", "+", "1", ")", "{", "classBound", "=", "null", ";", "}", "else", "{", "classBound", "=", "CharOperation", ".", "subarray", "(", "formalTypeParameterSignature", ",", "p1", "+", "1", ",", "p2", ")", ";", "}", "char", "[", "]", "[", "]", "interfaceBounds", "=", "CharOperation", ".", "splitOn", "(", "C_COLON", ",", "formalTypeParameterSignature", ",", "p2", "+", "1", ",", "formalTypeParameterSignature", ".", "length", ")", ";", "if", "(", "classBound", "==", "null", ")", "{", "return", "interfaceBounds", ";", "}", "int", "resultLength", "=", "interfaceBounds", ".", "length", "+", "1", ";", "char", "[", "]", "[", "]", "result", "=", "new", "char", "[", "resultLength", "]", "[", "]", ";", "result", "[", "0", "]", "=", "classBound", ";", "System", ".", "arraycopy", "(", "interfaceBounds", ",", "0", ",", "result", ",", "1", ",", "interfaceBounds", ".", "length", ")", ";", "return", "result", ";", "}", "public", "static", "String", "[", "]", "getTypeParameterBounds", "(", "String", "formalTypeParameterSignature", ")", "throws", "IllegalArgumentException", "{", "char", "[", "]", "[", "]", "bounds", "=", "getTypeParameterBounds", "(", "formalTypeParameterSignature", ".", "toCharArray", "(", ")", ")", ";", "return", "CharOperation", ".", "toStrings", "(", "bounds", ")", ";", "}", "public", "static", "char", "[", "]", "getQualifier", "(", "char", "[", "]", "name", ")", "{", "int", "firstGenericStart", "=", "CharOperation", ".", "indexOf", "(", "C_GENERIC_START", ",", "name", ")", ";", "int", "lastDot", "=", "CharOperation", ".", "lastIndexOf", "(", "C_DOT", ",", "name", ",", "0", ",", "firstGenericStart", "==", "-", "1", "?", "name", ".", "length", "-", "1", ":", "firstGenericStart", ")", ";", "if", "(", "lastDot", "==", "-", "1", ")", "{", "return", "CharOperation", ".", "NO_CHAR", ";", "}", "return", "CharOperation", ".", "subarray", "(", "name", ",", "0", ",", "lastDot", ")", ";", "}", "public", "static", "String", "getQualifier", "(", "String", "name", ")", "{", "char", "[", "]", "qualifier", "=", "getQualifier", "(", "name", ".", "toCharArray", "(", ")", ")", ";", "if", "(", "qualifier", ".", "length", "==", "0", ")", "return", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ".", "EMPTY_STRING", ";", "return", "new", "String", "(", "qualifier", ")", ";", "}", "public", "static", "char", "[", "]", "getReturnType", "(", "char", "[", "]", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "int", "paren", "=", "CharOperation", ".", "lastIndexOf", "(", "C_PARAM_END", ",", "methodSignature", ")", ";", "if", "(", "paren", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "last", "=", "Util", ".", "scanTypeSignature", "(", "methodSignature", ",", "paren", "+", "1", ")", ";", "return", "CharOperation", ".", "subarray", "(", "methodSignature", ",", "paren", "+", "1", ",", "last", "+", "1", ")", ";", "}", "public", "static", "String", "getReturnType", "(", "String", "methodSignature", ")", "throws", "IllegalArgumentException", "{", "return", "new", "String", "(", "getReturnType", "(", "methodSignature", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "getSignatureQualifier", "(", "char", "[", "]", "typeSignature", ")", "{", "if", "(", "typeSignature", "==", "null", ")", "return", "CharOperation", ".", "NO_CHAR", ";", "char", "[", "]", "qualifiedType", "=", "Signature", ".", "toCharArray", "(", "typeSignature", ")", ";", "int", "dotCount", "=", "0", ";", "indexFound", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<", "typeSignature", ".", "length", ";", "i", "++", ")", "{", "switch", "(", "typeSignature", "[", "i", "]", ")", "{", "case", "C_DOT", ":", "dotCount", "++", ";", "break", ";", "case", "C_GENERIC_START", ":", "break", "indexFound", ";", "case", "C_DOLLAR", ":", "break", "indexFound", ";", "}", "}", "if", "(", "dotCount", ">", "0", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "qualifiedType", ".", "length", ";", "i", "++", ")", "{", "if", "(", "qualifiedType", "[", "i", "]", "==", "'.'", ")", "{", "dotCount", "--", ";", "}", "if", "(", "dotCount", "<=", "0", ")", "{", "return", "CharOperation", ".", "subarray", "(", "qualifiedType", ",", "0", ",", "i", ")", ";", "}", "}", "}", "return", "CharOperation", ".", "NO_CHAR", ";", "}", "public", "static", "String", "getSignatureQualifier", "(", "String", "typeSignature", ")", "{", "return", "new", "String", "(", "getSignatureQualifier", "(", "typeSignature", "==", "null", "?", "null", ":", "typeSignature", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "getSignatureSimpleName", "(", "char", "[", "]", "typeSignature", ")", "{", "if", "(", "typeSignature", "==", "null", ")", "return", "CharOperation", ".", "NO_CHAR", ";", "char", "[", "]", "qualifiedType", "=", "Signature", ".", "toCharArray", "(", "typeSignature", ")", ";", "int", "dotCount", "=", "0", ";", "indexFound", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<", "typeSignature", ".", "length", ";", "i", "++", ")", "{", "switch", "(", "typeSignature", "[", "i", "]", ")", "{", "case", "C_DOT", ":", "dotCount", "++", ";", "break", ";", "case", "C_GENERIC_START", ":", "break", "indexFound", ";", "case", "C_DOLLAR", ":", "break", "indexFound", ";", "}", "}", "if", "(", "dotCount", ">", "0", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "qualifiedType", ".", "length", ";", "i", "++", ")", "{", "if", "(", "qualifiedType", "[", "i", "]", "==", "'.'", ")", "{", "dotCount", "--", ";", "}", "if", "(", "dotCount", "<=", "0", ")", "{", "return", "CharOperation", ".", "subarray", "(", "qualifiedType", ",", "i", "+", "1", ",", "qualifiedType", ".", "length", ")", ";", "}", "}", "}", "return", "qualifiedType", ";", "}", "public", "static", "String", "getSignatureSimpleName", "(", "String", "typeSignature", ")", "{", "return", "new", "String", "(", "getSignatureSimpleName", "(", "typeSignature", "==", "null", "?", "null", ":", "typeSignature", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "getSimpleName", "(", "char", "[", "]", "name", ")", "{", "int", "lastDot", "=", "-", "1", ",", "lastGenericStart", "=", "-", "1", ",", "lastGenericEnd", "=", "-", "1", ";", "int", "depth", "=", "0", ";", "int", "length", "=", "name", ".", "length", ";", "lastDotLookup", ":", "for", "(", "int", "i", "=", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "switch", "(", "name", "[", "i", "]", ")", "{", "case", "'.'", ":", "if", "(", "depth", "==", "0", ")", "{", "lastDot", "=", "i", ";", "break", "lastDotLookup", ";", "}", "break", ";", "case", "'<'", ":", "depth", "--", ";", "if", "(", "depth", "==", "0", ")", "lastGenericStart", "=", "i", ";", "break", ";", "case", "'>'", ":", "if", "(", "depth", "==", "0", ")", "lastGenericEnd", "=", "i", ";", "depth", "++", ";", "break", ";", "}", "}", "if", "(", "lastGenericStart", "<", "0", ")", "{", "if", "(", "lastDot", "<", "0", ")", "{", "return", "name", ";", "}", "return", "CharOperation", ".", "subarray", "(", "name", ",", "lastDot", "+", "1", ",", "length", ")", ";", "}", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "10", ")", ";", "int", "nameStart", "=", "lastDot", "<", "0", "?", "0", ":", "lastDot", "+", "1", ";", "buffer", ".", "append", "(", "name", ",", "nameStart", ",", "lastGenericStart", "-", "nameStart", ")", ";", "appendArgumentSimpleNames", "(", "name", ",", "lastGenericStart", ",", "lastGenericEnd", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "name", ",", "lastGenericEnd", "+", "1", ",", "length", "-", "lastGenericEnd", "-", "1", ")", ";", "char", "[", "]", "result", "=", "new", "char", "[", "length", "=", "buffer", ".", "length", "(", ")", "]", ";", "buffer", ".", "getChars", "(", "0", ",", "length", ",", "result", ",", "0", ")", ";", "return", "result", ";", "}", "public", "static", "String", "getSimpleName", "(", "String", "name", ")", "{", "int", "lastDot", "=", "-", "1", ",", "lastGenericStart", "=", "-", "1", ",", "lastGenericEnd", "=", "-", "1", ";", "int", "depth", "=", "0", ";", "int", "length", "=", "name", ".", "length", "(", ")", ";", "lastDotLookup", ":", "for", "(", "int", "i", "=", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "switch", "(", "name", ".", "charAt", "(", "i", ")", ")", "{", "case", "'.'", ":", "if", "(", "depth", "==", "0", ")", "{", "lastDot", "=", "i", ";", "break", "lastDotLookup", ";", "}", "break", ";", "case", "'<'", ":", "depth", "--", ";", "if", "(", "depth", "==", "0", ")", "lastGenericStart", "=", "i", ";", "break", ";", "case", "'>'", ":", "if", "(", "depth", "==", "0", ")", "lastGenericEnd", "=", "i", ";", "depth", "++", ";", "break", ";", "}", "}", "if", "(", "lastGenericStart", "<", "0", ")", "{", "if", "(", "lastDot", "<", "0", ")", "{", "return", "name", ";", "}", "return", "name", ".", "substring", "(", "lastDot", "+", "1", ",", "length", ")", ";", "}", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "10", ")", ";", "char", "[", "]", "nameChars", "=", "name", ".", "toCharArray", "(", ")", ";", "int", "nameStart", "=", "lastDot", "<", "0", "?", "0", ":", "lastDot", "+", "1", ";", "buffer", ".", "append", "(", "nameChars", ",", "nameStart", ",", "lastGenericStart", "-", "nameStart", ")", ";", "appendArgumentSimpleNames", "(", "nameChars", ",", "lastGenericStart", ",", "lastGenericEnd", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "nameChars", ",", "lastGenericEnd", "+", "1", ",", "length", "-", "lastGenericEnd", "-", "1", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "private", "static", "void", "appendSimpleName", "(", "char", "[", "]", "name", ",", "int", "start", ",", "int", "end", ",", "StringBuffer", "buffer", ")", "{", "int", "lastDot", "=", "-", "1", ",", "lastGenericStart", "=", "-", "1", ",", "lastGenericEnd", "=", "-", "1", ";", "int", "depth", "=", "0", ";", "if", "(", "name", "[", "start", "]", "==", "'?'", ")", "{", "buffer", ".", "append", "(", "\"?\"", ")", ";", "int", "index", "=", "consumeWhitespace", "(", "name", ",", "start", "+", "1", ",", "end", "+", "1", ")", ";", "switch", "(", "name", "[", "index", "]", ")", "{", "case", "'e'", ":", "int", "checkPos", "=", "checkName", "(", "EXTENDS", ",", "name", ",", "index", ",", "end", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "buffer", ".", "append", "(", "'", "'", ")", ".", "append", "(", "EXTENDS", ")", ".", "append", "(", "'", "'", ")", ";", "index", "=", "consumeWhitespace", "(", "name", ",", "checkPos", ",", "end", "+", "1", ")", ";", "}", "break", ";", "case", "'s'", ":", "checkPos", "=", "checkName", "(", "SUPER", ",", "name", ",", "index", ",", "end", "+", "1", ")", ";", "if", "(", "checkPos", ">", "0", ")", "{", "buffer", ".", "append", "(", "'", "'", ")", ".", "append", "(", "SUPER", ")", ".", "append", "(", "'", "'", ")", ";", "index", "=", "consumeWhitespace", "(", "name", ",", "checkPos", ",", "end", "+", "1", ")", ";", "}", "break", ";", "}", "start", "=", "index", ";", "}", "lastDotLookup", ":", "for", "(", "int", "i", "=", "end", ";", "i", ">=", "start", ";", "i", "--", ")", "{", "switch", "(", "name", "[", "i", "]", ")", "{", "case", "'.'", ":", "if", "(", "depth", "==", "0", ")", "{", "lastDot", "=", "i", ";", "char", "c", "=", "name", "[", "start", "]", ";", "if", "(", "c", "==", "C_EXTENDS", "||", "c", "==", "C_SUPER", ")", "{", "buffer", ".", "append", "(", "c", ")", ";", "}", "break", "lastDotLookup", ";", "}", "break", ";", "case", "'<'", ":", "depth", "--", ";", "if", "(", "depth", "==", "0", ")", "lastGenericStart", "=", "i", ";", "break", ";", "case", "'>'", ":", "if", "(", "depth", "==", "0", ")", "lastGenericEnd", "=", "i", ";", "depth", "++", ";", "break", ";", "}", "}", "int", "nameStart", "=", "lastDot", "<", "0", "?", "start", ":", "lastDot", "+", "1", ";", "int", "nameEnd", "=", "lastGenericStart", "<", "0", "?", "end", "+", "1", ":", "lastGenericStart", ";", "buffer", ".", "append", "(", "name", ",", "nameStart", ",", "nameEnd", "-", "nameStart", ")", ";", "if", "(", "lastGenericStart", ">=", "0", ")", "{", "appendArgumentSimpleNames", "(", "name", ",", "lastGenericStart", ",", "lastGenericEnd", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "name", ",", "lastGenericEnd", "+", "1", ",", "end", "-", "lastGenericEnd", ")", ";", "}", "}", "private", "static", "void", "appendArgumentSimpleNames", "(", "char", "[", "]", "name", ",", "int", "start", ",", "int", "end", ",", "StringBuffer", "buffer", ")", "{", "buffer", ".", "append", "(", "'<'", ")", ";", "int", "depth", "=", "0", ";", "int", "argumentStart", "=", "-", "1", ";", "int", "argumentCount", "=", "0", ";", "for", "(", "int", "i", "=", "start", ";", "i", "<=", "end", ";", "i", "++", ")", "{", "switch", "(", "name", "[", "i", "]", ")", "{", "case", "'<'", ":", "depth", "++", ";", "if", "(", "depth", "==", "1", ")", "{", "argumentStart", "=", "i", "+", "1", ";", "}", "break", ";", "case", "'>'", ":", "if", "(", "depth", "==", "1", ")", "{", "if", "(", "argumentCount", ">", "0", ")", "buffer", ".", "append", "(", "','", ")", ";", "appendSimpleName", "(", "name", ",", "argumentStart", ",", "i", "-", "1", ",", "buffer", ")", ";", "argumentCount", "++", ";", "}", "depth", "--", ";", "break", ";", "case", "','", ":", "if", "(", "depth", "==", "1", ")", "{", "if", "(", "argumentCount", ">", "0", ")", "buffer", ".", "append", "(", "','", ")", ";", "appendSimpleName", "(", "name", ",", "argumentStart", ",", "i", "-", "1", ",", "buffer", ")", ";", "argumentCount", "++", ";", "argumentStart", "=", "i", "+", "1", ";", "}", "break", ";", "}", "}", "buffer", ".", "append", "(", "'>'", ")", ";", "}", "public", "static", "char", "[", "]", "[", "]", "getSimpleNames", "(", "char", "[", "]", "name", ")", "{", "int", "length", "=", "name", "==", "null", "?", "0", ":", "name", ".", "length", ";", "if", "(", "length", "==", "0", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "int", "wordCount", "=", "1", ";", "countingWords", ":", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "switch", "(", "name", "[", "i", "]", ")", "{", "case", "C_DOT", ":", "wordCount", "++", ";", "break", ";", "case", "C_GENERIC_START", ":", "break", "countingWords", ";", "}", "char", "[", "]", "[", "]", "split", "=", "new", "char", "[", "wordCount", "]", "[", "]", ";", "int", "last", "=", "0", ",", "currentWord", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "if", "(", "name", "[", "i", "]", "==", "C_GENERIC_START", ")", "break", ";", "if", "(", "name", "[", "i", "]", "==", "C_DOT", ")", "{", "split", "[", "currentWord", "]", "=", "new", "char", "[", "i", "-", "last", "]", ";", "System", ".", "arraycopy", "(", "name", ",", "last", ",", "split", "[", "currentWord", "++", "]", ",", "0", ",", "i", "-", "last", ")", ";", "last", "=", "i", "+", "1", ";", "}", "}", "split", "[", "currentWord", "]", "=", "new", "char", "[", "length", "-", "last", "]", ";", "System", ".", "arraycopy", "(", "name", ",", "last", ",", "split", "[", "currentWord", "]", ",", "0", ",", "length", "-", "last", ")", ";", "return", "split", ";", "}", "public", "static", "String", "[", "]", "getSimpleNames", "(", "String", "name", ")", "{", "return", "CharOperation", ".", "toStrings", "(", "getSimpleNames", "(", "name", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "removeCapture", "(", "char", "[", "]", "methodOrTypeSignature", ")", "{", "return", "CharOperation", ".", "remove", "(", "methodOrTypeSignature", ",", "C_CAPTURE", ")", ";", "}", "public", "static", "String", "removeCapture", "(", "String", "methodOrTypeSignature", ")", "{", "char", "[", "]", "array", "=", "methodOrTypeSignature", ".", "toCharArray", "(", ")", ";", "char", "[", "]", "result", "=", "removeCapture", "(", "array", ")", ";", "if", "(", "array", "==", "result", ")", "return", "methodOrTypeSignature", ";", "return", "new", "String", "(", "result", ")", ";", "}", "public", "static", "char", "[", "]", "toCharArray", "(", "char", "[", "]", "methodSignature", ",", "char", "[", "]", "methodName", ",", "char", "[", "]", "[", "]", "parameterNames", ",", "boolean", "fullyQualifyTypeNames", ",", "boolean", "includeReturnType", ")", "{", "return", "toCharArray", "(", "methodSignature", ",", "methodName", ",", "parameterNames", ",", "fullyQualifyTypeNames", ",", "includeReturnType", ",", "false", ")", ";", "}", "public", "static", "char", "[", "]", "toCharArray", "(", "char", "[", "]", "methodSignature", ",", "char", "[", "]", "methodName", ",", "char", "[", "]", "[", "]", "parameterNames", ",", "boolean", "fullyQualifyTypeNames", ",", "boolean", "includeReturnType", ",", "boolean", "isVargArgs", ")", "{", "int", "firstParen", "=", "CharOperation", ".", "indexOf", "(", "C_PARAM_START", ",", "methodSignature", ")", ";", "if", "(", "firstParen", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "methodSignature", ".", "length", "+", "10", ")", ";", "if", "(", "includeReturnType", ")", "{", "char", "[", "]", "rts", "=", "getReturnType", "(", "methodSignature", ")", ";", "appendTypeSignature", "(", "rts", ",", "0", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "buffer", ".", "append", "(", "'", "'", ")", ";", "}", "if", "(", "methodName", "!=", "null", ")", "{", "buffer", ".", "append", "(", "methodName", ")", ";", "}", "buffer", ".", "append", "(", "'('", ")", ";", "char", "[", "]", "[", "]", "pts", "=", "getParameterTypes", "(", "methodSignature", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "pts", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "if", "(", "i", "==", "max", "-", "1", ")", "{", "appendTypeSignature", "(", "pts", "[", "i", "]", ",", "0", ",", "fullyQualifyTypeNames", ",", "buffer", ",", "isVargArgs", ")", ";", "}", "else", "{", "appendTypeSignature", "(", "pts", "[", "i", "]", ",", "0", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "}", "if", "(", "parameterNames", "!=", "null", ")", "{", "buffer", ".", "append", "(", "'", "'", ")", ";", "buffer", ".", "append", "(", "parameterNames", "[", "i", "]", ")", ";", "}", "if", "(", "i", "!=", "pts", ".", "length", "-", "1", ")", "{", "buffer", ".", "append", "(", "','", ")", ";", "buffer", ".", "append", "(", "'", "'", ")", ";", "}", "}", "buffer", ".", "append", "(", "')'", ")", ";", "char", "[", "]", "result", "=", "new", "char", "[", "buffer", ".", "length", "(", ")", "]", ";", "buffer", ".", "getChars", "(", "0", ",", "buffer", ".", "length", "(", ")", ",", "result", ",", "0", ")", ";", "return", "result", ";", "}", "public", "static", "char", "[", "]", "toCharArray", "(", "char", "[", "]", "signature", ")", "throws", "IllegalArgumentException", "{", "int", "sigLength", "=", "signature", ".", "length", ";", "if", "(", "sigLength", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "signature", "[", "0", "]", "==", "C_PARAM_START", "||", "signature", "[", "0", "]", "==", "C_GENERIC_START", ")", "{", "return", "toCharArray", "(", "signature", ",", "CharOperation", ".", "NO_CHAR", ",", "null", ",", "true", ",", "true", ")", ";", "}", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "signature", ".", "length", "+", "10", ")", ";", "appendTypeSignature", "(", "signature", ",", "0", ",", "true", ",", "buffer", ")", ";", "char", "[", "]", "result", "=", "new", "char", "[", "buffer", ".", "length", "(", ")", "]", ";", "buffer", ".", "getChars", "(", "0", ",", "buffer", ".", "length", "(", ")", ",", "result", ",", "0", ")", ";", "return", "result", ";", "}", "private", "static", "int", "appendTypeSignature", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ")", "{", "return", "appendTypeSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ",", "false", ")", ";", "}", "private", "static", "int", "appendTypeSignature", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ",", "boolean", "isVarArgs", ")", "{", "if", "(", "start", ">=", "string", ".", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "string", "[", "start", "]", ";", "if", "(", "isVarArgs", ")", "{", "switch", "(", "c", ")", "{", "case", "C_ARRAY", ":", "return", "appendArrayTypeSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ",", "true", ")", ";", "case", "C_RESOLVED", ":", "case", "C_UNRESOLVED", ":", "case", "C_TYPE_VARIABLE", ":", "case", "C_BOOLEAN", ":", "case", "C_BYTE", ":", "case", "C_CHAR", ":", "case", "C_DOUBLE", ":", "case", "C_FLOAT", ":", "case", "C_INT", ":", "case", "C_LONG", ":", "case", "C_SHORT", ":", "case", "C_VOID", ":", "case", "C_STAR", ":", "case", "C_EXTENDS", ":", "case", "C_SUPER", ":", "case", "C_CAPTURE", ":", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "else", "{", "switch", "(", "c", ")", "{", "case", "C_ARRAY", ":", "return", "appendArrayTypeSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "case", "C_RESOLVED", ":", "case", "C_UNRESOLVED", ":", "return", "appendClassTypeSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "case", "C_TYPE_VARIABLE", ":", "int", "e", "=", "Util", ".", "scanTypeVariableSignature", "(", "string", ",", "start", ")", ";", "buffer", ".", "append", "(", "string", ",", "start", "+", "1", ",", "e", "-", "start", "-", "1", ")", ";", "return", "e", ";", "case", "C_BOOLEAN", ":", "buffer", ".", "append", "(", "BOOLEAN", ")", ";", "return", "start", ";", "case", "C_BYTE", ":", "buffer", ".", "append", "(", "BYTE", ")", ";", "return", "start", ";", "case", "C_CHAR", ":", "buffer", ".", "append", "(", "CHAR", ")", ";", "return", "start", ";", "case", "C_DOUBLE", ":", "buffer", ".", "append", "(", "DOUBLE", ")", ";", "return", "start", ";", "case", "C_FLOAT", ":", "buffer", ".", "append", "(", "FLOAT", ")", ";", "return", "start", ";", "case", "C_INT", ":", "buffer", ".", "append", "(", "INT", ")", ";", "return", "start", ";", "case", "C_LONG", ":", "buffer", ".", "append", "(", "LONG", ")", ";", "return", "start", ";", "case", "C_SHORT", ":", "buffer", ".", "append", "(", "SHORT", ")", ";", "return", "start", ";", "case", "C_VOID", ":", "buffer", ".", "append", "(", "VOID", ")", ";", "return", "start", ";", "case", "C_CAPTURE", ":", "return", "appendCaptureTypeSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "case", "C_STAR", ":", "case", "C_EXTENDS", ":", "case", "C_SUPER", ":", "return", "appendTypeArgumentSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "}", "private", "static", "int", "appendArrayTypeSignature", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ")", "{", "return", "appendArrayTypeSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ",", "false", ")", ";", "}", "private", "static", "int", "appendCaptureTypeSignature", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ")", "{", "if", "(", "start", ">=", "string", ".", "length", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "string", "[", "start", "]", ";", "if", "(", "c", "!=", "C_CAPTURE", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "buffer", ".", "append", "(", "CAPTURE", ")", ".", "append", "(", "'", "'", ")", ";", "return", "appendTypeArgumentSignature", "(", "string", ",", "start", "+", "1", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "}", "private", "static", "int", "appendArrayTypeSignature", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ",", "boolean", "isVarArgs", ")", "{", "int", "length", "=", "string", ".", "length", ";", "if", "(", "start", ">=", "length", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "string", "[", "start", "]", ";", "if", "(", "c", "!=", "C_ARRAY", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "index", "=", "start", ";", "c", "=", "string", "[", "++", "index", "]", ";", "while", "(", "c", "==", "C_ARRAY", ")", "{", "if", "(", "index", ">=", "length", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "c", "=", "string", "[", "++", "index", "]", ";", "}", "int", "e", "=", "appendTypeSignature", "(", "string", ",", "index", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "for", "(", "int", "i", "=", "1", ",", "dims", "=", "index", "-", "start", ";", "i", "<", "dims", ";", "i", "++", ")", "{", "buffer", ".", "append", "(", "'['", ")", ".", "append", "(", "']'", ")", ";", "}", "if", "(", "isVarArgs", ")", "{", "buffer", ".", "append", "(", "'.'", ")", ".", "append", "(", "'.'", ")", ".", "append", "(", "'.'", ")", ";", "}", "else", "{", "buffer", ".", "append", "(", "'['", ")", ".", "append", "(", "']'", ")", ";", "}", "return", "e", ";", "}", "private", "static", "int", "appendClassTypeSignature", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ")", "{", "if", "(", "start", ">=", "string", ".", "length", "-", "2", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "string", "[", "start", "]", ";", "if", "(", "c", "!=", "C_RESOLVED", "&&", "c", "!=", "C_UNRESOLVED", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "boolean", "resolved", "=", "(", "c", "==", "C_RESOLVED", ")", ";", "boolean", "removePackageQualifiers", "=", "!", "fullyQualifyTypeNames", ";", "if", "(", "!", "resolved", ")", "{", "removePackageQualifiers", "=", "false", ";", "}", "int", "p", "=", "start", "+", "1", ";", "int", "checkpoint", "=", "buffer", ".", "length", "(", ")", ";", "int", "innerTypeStart", "=", "-", "1", ";", "boolean", "inAnonymousType", "=", "false", ";", "while", "(", "true", ")", "{", "if", "(", "p", ">=", "string", ".", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "c", "=", "string", "[", "p", "]", ";", "switch", "(", "c", ")", "{", "case", "C_SEMICOLON", ":", "return", "p", ";", "case", "C_GENERIC_START", ":", "int", "e", "=", "appendTypeArgumentSignatures", "(", "string", ",", "p", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "removePackageQualifiers", "=", "false", ";", "p", "=", "e", ";", "break", ";", "case", "C_DOT", ":", "if", "(", "removePackageQualifiers", ")", "{", "buffer", ".", "setLength", "(", "checkpoint", ")", ";", "}", "else", "{", "buffer", ".", "append", "(", "'.'", ")", ";", "}", "break", ";", "case", "'/'", ":", "if", "(", "removePackageQualifiers", ")", "{", "buffer", ".", "setLength", "(", "checkpoint", ")", ";", "}", "else", "{", "buffer", ".", "append", "(", "'/'", ")", ";", "}", "break", ";", "case", "C_DOLLAR", ":", "innerTypeStart", "=", "buffer", ".", "length", "(", ")", ";", "inAnonymousType", "=", "false", ";", "if", "(", "resolved", ")", "{", "removePackageQualifiers", "=", "false", ";", "buffer", ".", "append", "(", "'.'", ")", ";", "}", "break", ";", "default", ":", "if", "(", "innerTypeStart", "!=", "-", "1", "&&", "!", "inAnonymousType", "&&", "Character", ".", "isDigit", "(", "c", ")", ")", "{", "inAnonymousType", "=", "true", ";", "buffer", ".", "setLength", "(", "innerTypeStart", ")", ";", "buffer", ".", "insert", "(", "checkpoint", ",", "\"new", "\"", ")", ";", "buffer", ".", "append", "(", "\"(){}\"", ")", ";", "}", "if", "(", "!", "inAnonymousType", ")", "buffer", ".", "append", "(", "c", ")", ";", "innerTypeStart", "=", "-", "1", ";", "}", "p", "++", ";", "}", "}", "private", "static", "int", "appendTypeArgumentSignatures", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ")", "{", "if", "(", "start", ">=", "string", ".", "length", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "string", "[", "start", "]", ";", "if", "(", "c", "!=", "C_GENERIC_START", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "buffer", ".", "append", "(", "'<'", ")", ";", "int", "p", "=", "start", "+", "1", ";", "int", "count", "=", "0", ";", "while", "(", "true", ")", "{", "if", "(", "p", ">=", "string", ".", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "c", "=", "string", "[", "p", "]", ";", "if", "(", "c", "==", "C_GENERIC_END", ")", "{", "buffer", ".", "append", "(", "'>'", ")", ";", "return", "p", ";", "}", "if", "(", "count", "!=", "0", ")", "{", "buffer", ".", "append", "(", "','", ")", ";", "}", "int", "e", "=", "appendTypeArgumentSignature", "(", "string", ",", "p", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "count", "++", ";", "p", "=", "e", "+", "1", ";", "}", "}", "private", "static", "int", "appendTypeArgumentSignature", "(", "char", "[", "]", "string", ",", "int", "start", ",", "boolean", "fullyQualifyTypeNames", ",", "StringBuffer", "buffer", ")", "{", "if", "(", "start", ">=", "string", ".", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "c", "=", "string", "[", "start", "]", ";", "switch", "(", "c", ")", "{", "case", "C_STAR", ":", "buffer", ".", "append", "(", "'?'", ")", ";", "return", "start", ";", "case", "C_EXTENDS", ":", "buffer", ".", "append", "(", "\"?", "extends", "\"", ")", ";", "return", "appendTypeSignature", "(", "string", ",", "start", "+", "1", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "case", "C_SUPER", ":", "buffer", ".", "append", "(", "\"?", "super", "\"", ")", ";", "return", "appendTypeSignature", "(", "string", ",", "start", "+", "1", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "default", ":", "return", "appendTypeSignature", "(", "string", ",", "start", ",", "fullyQualifyTypeNames", ",", "buffer", ")", ";", "}", "}", "public", "static", "char", "[", "]", "toQualifiedName", "(", "char", "[", "]", "[", "]", "segments", ")", "{", "int", "length", "=", "segments", ".", "length", ";", "if", "(", "length", "==", "0", ")", "return", "CharOperation", ".", "NO_CHAR", ";", "if", "(", "length", "==", "1", ")", "return", "segments", "[", "0", "]", ";", "int", "resultLength", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "resultLength", "+=", "segments", "[", "i", "]", ".", "length", "+", "1", ";", "}", "resultLength", "--", ";", "char", "[", "]", "result", "=", "new", "char", "[", "resultLength", "]", ";", "int", "index", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "char", "[", "]", "segment", "=", "segments", "[", "i", "]", ";", "int", "segmentLength", "=", "segment", ".", "length", ";", "System", ".", "arraycopy", "(", "segment", ",", "0", ",", "result", ",", "index", ",", "segmentLength", ")", ";", "index", "+=", "segmentLength", ";", "if", "(", "i", "!=", "length", "-", "1", ")", "{", "result", "[", "index", "++", "]", "=", "C_DOT", ";", "}", "}", "return", "result", ";", "}", "public", "static", "String", "toQualifiedName", "(", "String", "[", "]", "segments", ")", "{", "int", "length", "=", "segments", ".", "length", ";", "char", "[", "]", "[", "]", "charArrays", "=", "new", "char", "[", "length", "]", "[", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "charArrays", "[", "i", "]", "=", "segments", "[", "i", "]", ".", "toCharArray", "(", ")", ";", "}", "return", "new", "String", "(", "toQualifiedName", "(", "charArrays", ")", ")", ";", "}", "public", "static", "String", "toString", "(", "String", "signature", ")", "throws", "IllegalArgumentException", "{", "return", "new", "String", "(", "toCharArray", "(", "signature", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "String", "toString", "(", "String", "methodSignature", ",", "String", "methodName", ",", "String", "[", "]", "parameterNames", ",", "boolean", "fullyQualifyTypeNames", ",", "boolean", "includeReturnType", ")", "{", "return", "toString", "(", "methodSignature", ",", "methodName", ",", "parameterNames", ",", "fullyQualifyTypeNames", ",", "includeReturnType", ",", "false", ")", ";", "}", "public", "static", "String", "toString", "(", "String", "methodSignature", ",", "String", "methodName", ",", "String", "[", "]", "parameterNames", ",", "boolean", "fullyQualifyTypeNames", ",", "boolean", "includeReturnType", ",", "boolean", "isVarArgs", ")", "{", "char", "[", "]", "[", "]", "params", ";", "if", "(", "parameterNames", "==", "null", ")", "{", "params", "=", "null", ";", "}", "else", "{", "int", "paramLength", "=", "parameterNames", ".", "length", ";", "params", "=", "new", "char", "[", "paramLength", "]", "[", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "paramLength", ";", "i", "++", ")", "{", "params", "[", "i", "]", "=", "parameterNames", "[", "i", "]", ".", "toCharArray", "(", ")", ";", "}", "}", "return", "new", "String", "(", "toCharArray", "(", "methodSignature", ".", "toCharArray", "(", ")", ",", "methodName", "==", "null", "?", "null", ":", "methodName", ".", "toCharArray", "(", ")", ",", "params", ",", "fullyQualifyTypeNames", ",", "includeReturnType", ",", "isVarArgs", ")", ")", ";", "}", "}", "</s>" ]
5,124
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IBufferFactory", "{", "IBuffer", "createBuffer", "(", "IOpenable", "owner", ")", ";", "}", "</s>" ]
5,125
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IField", "extends", "IMember", ",", "IAnnotatable", "{", "public", "Object", "getConstant", "(", ")", "throws", "JavaModelException", ";", "String", "getElementName", "(", ")", ";", "String", "getKey", "(", ")", ";", "String", "getTypeSignature", "(", ")", "throws", "JavaModelException", ";", "boolean", "isEnumConstant", "(", ")", "throws", "JavaModelException", ";", "boolean", "isResolved", "(", ")", ";", "}", "</s>" ]
5,126
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IImportContainer", "extends", "IJavaElement", ",", "IParent", ",", "ISourceReference", "{", "IImportDeclaration", "getImport", "(", "String", "name", ")", ";", "}", "</s>" ]
5,127
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "KeyKind", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "KeyToSignature", ";", "public", "final", "class", "BindingKey", "{", "private", "String", "key", ";", "public", "BindingKey", "(", "String", "key", ")", "{", "this", ".", "key", "=", "key", ";", "}", "public", "static", "String", "createArrayTypeBindingKey", "(", "String", "typeKey", ",", "int", "arrayDimension", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "while", "(", "arrayDimension", "--", ">", "0", ")", "buffer", ".", "append", "(", "'['", ")", ";", "buffer", ".", "append", "(", "typeKey", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "public", "static", "String", "createParameterizedTypeBindingKey", "(", "String", "genericTypeKey", ",", "String", "[", "]", "argumentTypeKeys", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "Signature", ".", "getTypeErasure", "(", "genericTypeKey", ")", ")", ";", "buffer", ".", "insert", "(", "buffer", ".", "length", "(", ")", "-", "1", ",", "'<'", ")", ";", "for", "(", "int", "i", "=", "0", ",", "length", "=", "argumentTypeKeys", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "String", "argumentTypeKey", "=", "argumentTypeKeys", "[", "i", "]", ";", "buffer", ".", "insert", "(", "buffer", ".", "length", "(", ")", "-", "1", ",", "argumentTypeKey", ")", ";", "}", "buffer", ".", "insert", "(", "buffer", ".", "length", "(", ")", "-", "1", ",", "'>'", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "public", "static", "String", "createTypeBindingKey", "(", "String", "typeName", ")", "{", "return", "Signature", ".", "createTypeSignature", "(", "typeName", ".", "replace", "(", "'.'", ",", "'/'", ")", ",", "true", ")", ";", "}", "public", "static", "String", "createTypeVariableBindingKey", "(", "String", "typeVariableName", ",", "String", "declaringKey", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "declaringKey", ")", ";", "buffer", ".", "append", "(", "':'", ")", ";", "buffer", ".", "append", "(", "'T'", ")", ";", "buffer", ".", "append", "(", "typeVariableName", ")", ";", "buffer", ".", "append", "(", "';'", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "public", "static", "String", "createWilcardTypeBindingKey", "(", "String", "typeKey", ",", "char", "kind", ")", "{", "switch", "(", "kind", ")", "{", "case", "Signature", ".", "C_STAR", ":", "return", "\"*\"", ";", "case", "Signature", ".", "C_SUPER", ":", "return", "'-'", "+", "typeKey", ";", "case", "Signature", ".", "C_EXTENDS", ":", "return", "'+'", "+", "typeKey", ";", "}", "return", "null", ";", "}", "public", "static", "String", "createWildcardTypeBindingKey", "(", "String", "genericTypeKey", ",", "char", "boundKind", ",", "String", "boundTypeKey", ",", "int", "rank", ")", "{", "String", "wildCardKey", ";", "switch", "(", "boundKind", ")", "{", "case", "Signature", ".", "C_STAR", ":", "wildCardKey", "=", "new", "String", "(", "TypeConstants", ".", "WILDCARD_STAR", ")", ";", "break", ";", "case", "Signature", ".", "C_SUPER", ":", "wildCardKey", "=", "new", "String", "(", "TypeConstants", ".", "WILDCARD_MINUS", ")", "+", "boundTypeKey", ";", "break", ";", "case", "Signature", ".", "C_EXTENDS", ":", "wildCardKey", "=", "new", "String", "(", "TypeConstants", ".", "WILDCARD_PLUS", ")", "+", "boundTypeKey", ";", "break", ";", "default", ":", "return", "null", ";", "}", "return", "genericTypeKey", "+", "'{'", "+", "rank", "+", "'}'", "+", "wildCardKey", ";", "}", "public", "String", "[", "]", "getThrownExceptions", "(", ")", "{", "KeyToSignature", "keyToSignature", "=", "new", "KeyToSignature", "(", "this", ".", "key", ",", "KeyToSignature", ".", "THROWN_EXCEPTIONS", ")", ";", "keyToSignature", ".", "parse", "(", ")", ";", "return", "keyToSignature", ".", "getThrownExceptions", "(", ")", ";", "}", "public", "String", "[", "]", "getTypeArguments", "(", ")", "{", "KeyToSignature", "keyToSignature", "=", "new", "KeyToSignature", "(", "this", ".", "key", ",", "KeyToSignature", ".", "TYPE_ARGUMENTS", ")", ";", "keyToSignature", ".", "parse", "(", ")", ";", "return", "keyToSignature", ".", "getTypeArguments", "(", ")", ";", "}", "public", "boolean", "isRawType", "(", ")", "{", "KeyKind", "kind", "=", "new", "KeyKind", "(", "this", ".", "key", ")", ";", "kind", ".", "parse", "(", ")", ";", "return", "(", "kind", ".", "flags", "&", "KeyKind", ".", "F_RAW_TYPE", ")", "!=", "0", ";", "}", "public", "boolean", "isParameterizedType", "(", ")", "{", "KeyKind", "kind", "=", "new", "KeyKind", "(", "this", ".", "key", ")", ";", "kind", ".", "parse", "(", ")", ";", "return", "(", "kind", ".", "flags", "&", "KeyKind", ".", "F_PARAMETERIZED_TYPE", ")", "!=", "0", ";", "}", "public", "boolean", "isParameterizedMethod", "(", ")", "{", "KeyKind", "kind", "=", "new", "KeyKind", "(", "this", ".", "key", ")", ";", "kind", ".", "parse", "(", ")", ";", "return", "(", "kind", ".", "flags", "&", "KeyKind", ".", "F_PARAMETERIZED_METHOD", ")", "!=", "0", ";", "}", "public", "String", "toSignature", "(", ")", "{", "KeyToSignature", "keyToSignature", "=", "new", "KeyToSignature", "(", "this", ".", "key", ",", "KeyToSignature", ".", "SIGNATURE", ")", ";", "keyToSignature", ".", "parse", "(", ")", ";", "return", "keyToSignature", ".", "signature", ".", "toString", "(", ")", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "this", ".", "key", ";", "}", "}", "</s>" ]
5,128
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IMarker", ";", "public", "interface", "IJavaModelMarker", "{", "String", "JAVA_MODEL_PROBLEM_MARKER", "=", "JavaCore", ".", "PLUGIN_ID", "+", "\".problem\"", ";", "String", "TRANSIENT_PROBLEM", "=", "JavaCore", ".", "PLUGIN_ID", "+", "\"\"", ";", "String", "TASK_MARKER", "=", "JavaCore", ".", "PLUGIN_ID", "+", "\".task\"", ";", "String", "ARGUMENTS", "=", "\"arguments\"", ";", "String", "ID", "=", "\"id\"", ";", "String", "CATEGORY_ID", "=", "\"categoryId\"", ";", "String", "FLAGS", "=", "\"flags\"", ";", "String", "CYCLE_DETECTED", "=", "\"\"", ";", "String", "BUILDPATH_PROBLEM_MARKER", "=", "JavaCore", ".", "PLUGIN_ID", "+", "\"\"", ";", "String", "CLASSPATH_FILE_FORMAT", "=", "\"\"", ";", "}", "</s>" ]
5,129
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "eval", ";", "public", "interface", "IGlobalVariable", "{", "public", "String", "getInitializer", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "String", "getTypeName", "(", ")", ";", "}", "</s>" ]
5,130
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IMarker", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "eval", ".", "EvaluationConstants", ";", "public", "interface", "ICodeSnippetRequestor", "{", "public", "static", "final", "String", "LOCAL_VAR_PREFIX", "=", "new", "String", "(", "EvaluationConstants", ".", "LOCAL_VAR_PREFIX", ")", ";", "public", "static", "final", "String", "DELEGATE_THIS", "=", "new", "String", "(", "EvaluationConstants", ".", "DELEGATE_THIS", ")", ";", "public", "static", "final", "String", "RUN_METHOD", "=", "EvaluationConstants", ".", "RUN_METHOD", ";", "public", "static", "final", "String", "RESULT_VALUE_FIELD", "=", "EvaluationConstants", ".", "RESULT_VALUE_FIELD", ";", "public", "static", "final", "String", "RESULT_TYPE_FIELD", "=", "EvaluationConstants", ".", "RESULT_TYPE_FIELD", ";", "public", "static", "final", "int", "VARIABLE", "=", "1", ";", "public", "static", "final", "int", "CODE_SNIPPET", "=", "2", ";", "public", "static", "final", "int", "IMPORT", "=", "3", ";", "public", "static", "final", "int", "PACKAGE", "=", "4", ";", "public", "static", "final", "int", "INTERNAL", "=", "5", ";", "public", "boolean", "acceptClassFiles", "(", "byte", "[", "]", "[", "]", "classFileBytes", ",", "String", "[", "]", "[", "]", "classFileCompoundNames", ",", "String", "codeSnippetClassName", ")", ";", "public", "void", "acceptProblem", "(", "IMarker", "problemMarker", ",", "String", "fragmentSource", ",", "int", "fragmentKind", ")", ";", "}", "</s>" ]
5,131
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "eval", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "public", "interface", "IEvaluationContext", "{", "public", "IGlobalVariable", "[", "]", "allVariables", "(", ")", ";", "public", "void", "codeComplete", "(", "String", "codeSnippet", ",", "int", "position", ",", "ICompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "public", "void", "codeComplete", "(", "String", "codeSnippet", ",", "int", "position", ",", "ICompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "public", "void", "codeComplete", "(", "String", "codeSnippet", ",", "int", "position", ",", "CompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "public", "void", "codeComplete", "(", "String", "codeSnippet", ",", "int", "position", ",", "CompletionRequestor", "requestor", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "public", "void", "codeComplete", "(", "String", "codeSnippet", ",", "int", "position", ",", "CompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "public", "void", "codeComplete", "(", "String", "codeSnippet", ",", "int", "position", ",", "CompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "public", "IJavaElement", "[", "]", "codeSelect", "(", "String", "codeSnippet", ",", "int", "offset", ",", "int", "length", ")", "throws", "JavaModelException", ";", "public", "IJavaElement", "[", "]", "codeSelect", "(", "String", "codeSnippet", ",", "int", "offset", ",", "int", "length", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "public", "void", "deleteVariable", "(", "IGlobalVariable", "variable", ")", ";", "public", "void", "evaluateCodeSnippet", "(", "String", "codeSnippet", ",", "String", "[", "]", "localVariableTypeNames", ",", "String", "[", "]", "localVariableNames", ",", "int", "[", "]", "localVariableModifiers", ",", "IType", "declaringType", ",", "boolean", "isStatic", ",", "boolean", "isConstructorCall", ",", "ICodeSnippetRequestor", "requestor", ",", "IProgressMonitor", "progressMonitor", ")", "throws", "JavaModelException", ";", "public", "void", "evaluateCodeSnippet", "(", "String", "codeSnippet", ",", "ICodeSnippetRequestor", "requestor", ",", "IProgressMonitor", "progressMonitor", ")", "throws", "JavaModelException", ";", "public", "void", "evaluateVariable", "(", "IGlobalVariable", "variable", ",", "ICodeSnippetRequestor", "requestor", ",", "IProgressMonitor", "progressMonitor", ")", "throws", "JavaModelException", ";", "public", "String", "[", "]", "getImports", "(", ")", ";", "public", "String", "getPackageName", "(", ")", ";", "public", "IJavaProject", "getProject", "(", ")", ";", "public", "IGlobalVariable", "newVariable", "(", "String", "typeName", ",", "String", "name", ",", "String", "initializer", ")", ";", "public", "void", "setImports", "(", "String", "[", "]", "imports", ")", ";", "public", "void", "setPackageName", "(", "String", "packageName", ")", ";", "public", "void", "validateImports", "(", "ICodeSnippetRequestor", "requestor", ")", "throws", "JavaModelException", ";", "public", "void", "codeComplete", "(", "String", "codeSnippet", ",", "int", "position", ",", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICodeCompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,132
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "ITypeParameter", "extends", "IJavaElement", ",", "ISourceReference", "{", "String", "[", "]", "getBounds", "(", ")", "throws", "JavaModelException", ";", "String", "[", "]", "getBoundsSignatures", "(", ")", "throws", "JavaModelException", ";", "IMember", "getDeclaringMember", "(", ")", ";", "ISourceRange", "getNameRange", "(", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,133
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "HashSet", ";", "import", "java", ".", "util", ".", "Hashtable", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "CoreException", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IConfigurationElement", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IExtension", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IExtensionPoint", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "OperationCanceledException", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "Path", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "Platform", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "Plugin", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "QualifiedName", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "SubProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "jobs", ".", "ISchedulingRule", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IContainer", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IFile", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IFolder", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IMarker", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IMarkerDelta", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IProject", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResource", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResourceChangeEvent", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResourceChangeListener", ";", "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", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "search", ".", "IJavaSearchConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "search", ".", "IJavaSearchScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "search", ".", "SearchEngine", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "search", ".", "SearchPattern", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "search", ".", "TypeNameRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "ProblemReporter", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "builder", ".", "JavaBuilder", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "builder", ".", "State", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "MementoTokenizer", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Messages", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "import", "org", ".", "osgi", ".", "framework", ".", "BundleContext", ";", "public", "final", "class", "JavaCore", "extends", "Plugin", "{", "private", "static", "final", "IResource", "[", "]", "NO_GENERATED_RESOURCES", "=", "new", "IResource", "[", "0", "]", ";", "private", "static", "Plugin", "JAVA_CORE_PLUGIN", "=", "null", ";", "public", "static", "final", "String", "PLUGIN_ID", "=", "\"\"", ";", "public", "static", "final", "String", "BUILDER_ID", "=", "PLUGIN_ID", "+", "\".javabuilder\"", ";", "public", "static", "final", "String", "MODEL_ID", "=", "PLUGIN_ID", "+", "\".javamodel\"", ";", "public", "static", "final", "String", "NATURE_ID", "=", "PLUGIN_ID", "+", "\".javanature\"", ";", "protected", "static", "final", "String", "ATT_HANDLE_ID", "=", "\"\"", ";", "public", "static", "final", "String", "USER_LIBRARY_CONTAINER_ID", "=", "\"\"", ";", "public", "static", "final", "String", "COMPILER_LOCAL_VARIABLE_ATTR", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_LINE_NUMBER_ATTR", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_SOURCE_FILE_ATTR", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_CODEGEN_UNUSED_LOCAL", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_CODEGEN_TARGET_PLATFORM", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_CODEGEN_INLINE_JSR_BYTECODE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_DOC_COMMENT_SUPPORT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNREACHABLE_CODE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INVALID_IMPORT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_DEPRECATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_DEPRECATION_IN_DEPRECATED_CODE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_DEPRECATION_WHEN_OVERRIDING_DEPRECATED_METHOD", "=", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_HIDDEN_CATCH_BLOCK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_LOCAL", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_PARAMETER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_PARAMETER_WHEN_IMPLEMENTING_ABSTRACT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_PARAMETER_WHEN_OVERRIDING_CONCRETE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_PARAMETER_INCLUDE_DOC_COMMENT_REFERENCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_IMPORT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_TYPE_ARGUMENTS_FOR_METHOD_INVOCATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_SYNTHETIC_ACCESS_EMULATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_NON_NLS_STRING_LITERAL", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_ASSERT_IDENTIFIER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_ENUM_IDENTIFIER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_STATIC_ACCESS_RECEIVER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INDIRECT_STATIC_ACCESS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_NO_EFFECT_ASSIGNMENT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_PRIVATE_MEMBER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_LOCAL_VARIABLE_HIDING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_SPECIAL_PARAMETER_HIDING_FIELD", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_FIELD_HIDING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_TYPE_PARAMETER_HIDING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_POSSIBLE_ACCIDENTAL_BOOLEAN_ASSIGNMENT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_FALLTHROUGH_CASE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_EMPTY_STATEMENT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_BOOLEAN_METHOD_THROWING_EXCEPTION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNNECESSARY_TYPE_CHECK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNNECESSARY_ELSE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_INCLUDE_DOC_COMMENT_REFERENCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_EXEMPT_EXCEPTION_AND_THROWABLE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNQUALIFIED_FIELD_ACCESS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNSAFE_TYPE_OPERATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNCHECKED_TYPE_OPERATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_RAW_TYPE_REFERENCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_FINAL_PARAMETER_BOUND", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_SERIAL_VERSION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_AUTOBOXING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_ANNOTATION_SUPER_INTERFACE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_OVERRIDE_ANNOTATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_DEPRECATED_ANNOTATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_HASHCODE_METHOD", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_DEAD_CODE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_DEAD_CODE_IN_TRIVIAL_IF_STATEMENT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INCOMPLETE_ENUM_SWITCH", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INCONSISTENT_NULL_CHECK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_LABEL", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INVALID_JAVADOC", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INVALID_JAVADOC_TAGS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INVALID_JAVADOC_TAGS__DEPRECATED_REF", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INVALID_JAVADOC_TAGS__NOT_VISIBLE_REF", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_INVALID_JAVADOC_TAGS_VISIBILITY", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_TAGS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_TAGS_VISIBILITY", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_TAGS_OVERRIDING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_COMMENTS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_COMMENTS_VISIBILITY", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_COMMENTS_OVERRIDING", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MAX_PER_UNIT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_FATAL_OPTIONAL_ERROR", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_PARAMETER_ASSIGNMENT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_SOURCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_COMPLIANCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_TASK_PRIORITIES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_TASK_TAGS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_TASK_CASE_SENSITIVE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_FORBIDDEN_REFERENCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_DISCOURAGED_REFERENCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_SUPPRESS_WARNINGS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNHANDLED_WARNING_TOKEN", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_WARNING_TOKEN", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_NULL_REFERENCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_POTENTIAL_NULL_REFERENCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_REDUNDANT_NULL_CHECK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_OVERRIDING_METHOD_WITHOUT_SUPER_INVOCATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_REDUNDANT_SUPERINTERFACE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_COMPARING_IDENTICAL", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "COMPILER_PB_UNUSED_OBJECT_ALLOCATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_JAVA_BUILD_ORDER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_JAVA_BUILD_RESOURCE_COPY_FILTER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_JAVA_BUILD_DUPLICATE_RESOURCE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_JAVA_BUILD_RECREATE_MODIFIED_CLASS_FILES_IN_OUTPUT_FOLDER", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_INCOMPLETE_CLASSPATH", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_CIRCULAR_CLASSPATH", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_INCOMPATIBLE_JDK_LEVEL", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_JAVA_BUILD_INVALID_CLASSPATH", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_ENCODING", "=", "PLUGIN_ID", "+", "\".encoding\"", ";", "public", "static", "final", "String", "CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_NEWLINE_OPENING_BRACE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_NEWLINE_CONTROL", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_NEWLINE_ELSE_IF", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_NEWLINE_EMPTY_BLOCK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_CLEAR_BLANK_LINES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_LINE_SPLIT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_COMPACT_ASSIGNMENT", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_TAB_CHAR", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_TAB_SIZE", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "FORMATTER_SPACE_CASTEXPRESSION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_VISIBILITY_CHECK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_DEPRECATION_CHECK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_CAMEL_CASE_MATCH", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_IMPLICIT_QUALIFICATION", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_FIELD_PREFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_STATIC_FIELD_PREFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_STATIC_FINAL_FIELD_PREFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_LOCAL_PREFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_ARGUMENT_PREFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_FIELD_SUFFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_STATIC_FIELD_SUFFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_STATIC_FINAL_FIELD_SUFFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_LOCAL_SUFFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_ARGUMENT_SUFFIXES", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_FORBIDDEN_REFERENCE_CHECK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_DISCOURAGED_REFERENCE_CHECK", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "CODEASSIST_SUGGEST_STATIC_IMPORTS", "=", "PLUGIN_ID", "+", "\"\"", ";", "public", "static", "final", "String", "DEFAULT_TASK_TAG", "=", "\"TODO\"", ";", "public", "static", "final", "String", "DEFAULT_TASK_PRIORITY", "=", "\"NORMAL\"", ";", "public", "static", "final", "String", "DEFAULT_TASK_TAGS", "=", "\"\"", ";", "public", "static", "final", "String", "DEFAULT_TASK_PRIORITIES", "=", "\"\"", ";", "public", "static", "final", "String", "GENERATE", "=", "\"generate\"", ";", "public", "static", "final", "String", "DO_NOT_GENERATE", "=", "\"\"", ";", "public", "static", "final", "String", "PRESERVE", "=", "\"preserve\"", ";", "public", "static", "final", "String", "OPTIMIZE_OUT", "=", "\"optimize", "out\"", ";", "public", "static", "final", "String", "COMPILER_TASK_PRIORITY_HIGH", "=", "\"HIGH\"", ";", "public", "static", "final", "String", "COMPILER_TASK_PRIORITY_LOW", "=", "\"LOW\"", ";", "public", "static", "final", "String", "COMPILER_TASK_PRIORITY_NORMAL", "=", "\"NORMAL\"", ";", "public", "static", "final", "String", "VERSION_1_1", "=", "\"1.1\"", ";", "public", "static", "final", "String", "VERSION_1_2", "=", "\"1.2\"", ";", "public", "static", "final", "String", "VERSION_1_3", "=", "\"1.3\"", ";", "public", "static", "final", "String", "VERSION_1_4", "=", "\"1.4\"", ";", "public", "static", "final", "String", "VERSION_1_5", "=", "\"1.5\"", ";", "public", "static", "final", "String", "VERSION_1_6", "=", "\"1.6\"", ";", "public", "static", "final", "String", "VERSION_1_7", "=", "\"1.7\"", ";", "public", "static", "final", "String", "VERSION_CLDC_1_1", "=", "\"cldc1.1\"", ";", "public", "static", "final", "String", "ABORT", "=", "\"abort\"", ";", "public", "static", "final", "String", "ERROR", "=", "\"error\"", ";", "public", "static", "final", "String", "WARNING", "=", "\"warning\"", ";", "public", "static", "final", "String", "IGNORE", "=", "\"ignore\"", ";", "public", "static", "final", "String", "COMPUTE", "=", "\"compute\"", ";", "public", "static", "final", "String", "INSERT", "=", "\"insert\"", ";", "public", "static", "final", "String", "DO_NOT_INSERT", "=", "\"\"", ";", "public", "static", "final", "String", "PRESERVE_ONE", "=", "\"preserve", "one\"", ";", "public", "static", "final", "String", "CLEAR_ALL", "=", "\"clear", "all\"", ";", "public", "static", "final", "String", "NORMAL", "=", "\"normal\"", ";", "public", "static", "final", "String", "COMPACT", "=", "\"compact\"", ";", "public", "static", "final", "String", "TAB", "=", "\"tab\"", ";", "public", "static", "final", "String", "SPACE", "=", "\"space\"", ";", "public", "static", "final", "String", "ENABLED", "=", "\"enabled\"", ";", "public", "static", "final", "String", "DISABLED", "=", "\"disabled\"", ";", "public", "static", "final", "String", "CLEAN", "=", "\"clean\"", ";", "public", "static", "final", "String", "PUBLIC", "=", "\"public\"", ";", "public", "static", "final", "String", "PROTECTED", "=", "\"protected\"", ";", "public", "static", "final", "String", "DEFAULT", "=", "\"default\"", ";", "public", "static", "final", "String", "PRIVATE", "=", "\"private\"", ";", "public", "static", "final", "String", "NEVER", "=", "\"never\"", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_NO_TAG", "=", "CompilerOptions", ".", "NO_TAG", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_RETURN_TAG", "=", "CompilerOptions", ".", "RETURN_TAG", ";", "public", "static", "final", "String", "COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_ALL_STANDARD_TAGS", "=", "CompilerOptions", ".", "ALL_STANDARD_TAGS", ";", "public", "static", "final", "String", "JAVA_SOURCE_CONTENT_TYPE", "=", "JavaCore", ".", "PLUGIN_ID", "+", "\".javaSource\"", ";", "public", "JavaCore", "(", ")", "{", "super", "(", ")", ";", "JAVA_CORE_PLUGIN", "=", "this", ";", "}", "public", "static", "void", "addElementChangedListener", "(", "IElementChangedListener", "listener", ")", "{", "addElementChangedListener", "(", "listener", ",", "ElementChangedEvent", ".", "POST_CHANGE", "|", "ElementChangedEvent", ".", "POST_RECONCILE", ")", ";", "}", "public", "static", "void", "addElementChangedListener", "(", "IElementChangedListener", "listener", ",", "int", "eventMask", ")", "{", "JavaModelManager", ".", "getDeltaState", "(", ")", ".", "addElementChangedListener", "(", "listener", ",", "eventMask", ")", ";", "}", "public", "static", "void", "addJavaElementMarkerAttributes", "(", "Map", "attributes", ",", "IJavaElement", "element", ")", "{", "if", "(", "element", "instanceof", "IMember", ")", "element", "=", "(", "(", "IMember", ")", "element", ")", ".", "getClassFile", "(", ")", ";", "if", "(", "attributes", "!=", "null", "&&", "element", "!=", "null", ")", "attributes", ".", "put", "(", "ATT_HANDLE_ID", ",", "element", ".", "getHandleIdentifier", "(", ")", ")", ";", "}", "private", "static", "void", "addNonJavaResources", "(", "Object", "[", "]", "nonJavaResources", ",", "IContainer", "container", ",", "int", "rootPathSegmentCounts", ",", "ArrayList", "collector", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "nonJavaResources", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "Object", "nonJavaResource", "=", "nonJavaResources", "[", "i", "]", ";", "if", "(", "nonJavaResource", "instanceof", "IFile", ")", "{", "IFile", "file", "=", "(", "IFile", ")", "nonJavaResource", ";", "IPath", "path", "=", "file", ".", "getFullPath", "(", ")", ".", "removeFirstSegments", "(", "rootPathSegmentCounts", ")", ";", "IResource", "member", "=", "container", ".", "findMember", "(", "path", ")", ";", "if", "(", "member", "!=", "null", "&&", "member", ".", "exists", "(", ")", ")", "{", "collector", ".", "add", "(", "member", ")", ";", "}", "}", "else", "if", "(", "nonJavaResource", "instanceof", "IFolder", ")", "{", "IFolder", "folder", "=", "(", "IFolder", ")", "nonJavaResource", ";", "IResource", "[", "]", "members", "=", "null", ";", "try", "{", "members", "=", "folder", ".", "members", "(", ")", ";", "}", "catch", "(", "CoreException", "e", ")", "{", "}", "if", "(", "members", "!=", "null", ")", "{", "addNonJavaResources", "(", "members", ",", "container", ",", "rootPathSegmentCounts", ",", "collector", ")", ";", "}", "}", "}", "}", "public", "static", "void", "addPreProcessingResourceChangedListener", "(", "IResourceChangeListener", "listener", ")", "{", "addPreProcessingResourceChangedListener", "(", "listener", ",", "IResourceChangeEvent", ".", "POST_CHANGE", ")", ";", "}", "public", "static", "void", "addPreProcessingResourceChangedListener", "(", "IResourceChangeListener", "listener", ",", "int", "eventMask", ")", "{", "JavaModelManager", ".", "getDeltaState", "(", ")", ".", "addPreResourceChangedListener", "(", "listener", ",", "eventMask", ")", ";", "}", "public", "void", "configureJavaElementMarker", "(", "IMarker", "marker", ",", "IJavaElement", "element", ")", "throws", "CoreException", "{", "if", "(", "element", "instanceof", "IMember", ")", "element", "=", "(", "(", "IMember", ")", "element", ")", ".", "getClassFile", "(", ")", ";", "if", "(", "marker", "!=", "null", "&&", "element", "!=", "null", ")", "marker", ".", "setAttribute", "(", "ATT_HANDLE_ID", ",", "element", ".", "getHandleIdentifier", "(", ")", ")", ";", "}", "public", "static", "IJavaElement", "create", "(", "String", "handleIdentifier", ")", "{", "return", "create", "(", "handleIdentifier", ",", "DefaultWorkingCopyOwner", ".", "PRIMARY", ")", ";", "}", "public", "static", "IJavaElement", "create", "(", "String", "handleIdentifier", ",", "WorkingCopyOwner", "owner", ")", "{", "if", "(", "handleIdentifier", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "owner", "==", "null", ")", "owner", "=", "DefaultWorkingCopyOwner", ".", "PRIMARY", ";", "MementoTokenizer", "memento", "=", "new", "MementoTokenizer", "(", "handleIdentifier", ")", ";", "JavaModel", "model", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getJavaModel", "(", ")", ";", "return", "model", ".", "getHandleFromMemento", "(", "memento", ",", "owner", ")", ";", "}", "public", "static", "IJavaElement", "create", "(", "IFile", "file", ")", "{", "return", "JavaModelManager", ".", "create", "(", "file", ",", "null", ")", ";", "}", "public", "static", "IJavaElement", "create", "(", "IFolder", "folder", ")", "{", "return", "JavaModelManager", ".", "create", "(", "folder", ",", "null", ")", ";", "}", "public", "static", "IJavaProject", "create", "(", "IProject", "project", ")", "{", "if", "(", "project", "==", "null", ")", "{", "return", "null", ";", "}", "JavaModel", "javaModel", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getJavaModel", "(", ")", ";", "return", "javaModel", ".", "getJavaProject", "(", "project", ")", ";", "}", "public", "static", "IJavaElement", "create", "(", "IResource", "resource", ")", "{", "return", "JavaModelManager", ".", "create", "(", "resource", ",", "null", ")", ";", "}", "public", "static", "IJavaElement", "create", "(", "IResource", "resource", ",", "IJavaProject", "project", ")", "{", "return", "JavaModelManager", ".", "create", "(", "resource", ",", "project", ")", ";", "}", "public", "static", "IJavaModel", "create", "(", "IWorkspaceRoot", "root", ")", "{", "if", "(", "root", "==", "null", ")", "{", "return", "null", ";", "}", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getJavaModel", "(", ")", ";", "}", "public", "static", "IClassFile", "createClassFileFrom", "(", "IFile", "file", ")", "{", "return", "JavaModelManager", ".", "createClassFileFrom", "(", "file", ",", "null", ")", ";", "}", "public", "static", "ICompilationUnit", "createCompilationUnitFrom", "(", "IFile", "file", ")", "{", "return", "JavaModelManager", ".", "createCompilationUnitFrom", "(", "file", ",", "null", ")", ";", "}", "public", "static", "IPackageFragmentRoot", "createJarPackageFragmentRootFrom", "(", "IFile", "file", ")", "{", "return", "JavaModelManager", ".", "createJarPackageFragmentRootFrom", "(", "file", ",", "null", ")", ";", "}", "public", "static", "IClasspathContainer", "getClasspathContainer", "(", "IPath", "containerPath", ",", "IJavaProject", "project", ")", "throws", "JavaModelException", "{", "JavaModelManager", "manager", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ";", "IClasspathContainer", "container", "=", "manager", ".", "getClasspathContainer", "(", "containerPath", ",", "project", ")", ";", "if", "(", "container", "==", "JavaModelManager", ".", "CONTAINER_INITIALIZATION_IN_PROGRESS", ")", "{", "return", "manager", ".", "getPreviousSessionContainer", "(", "containerPath", ",", "project", ")", ";", "}", "return", "container", ";", "}", "public", "static", "ClasspathContainerInitializer", "getClasspathContainerInitializer", "(", "String", "containerID", ")", "{", "Hashtable", "containerInitializersCache", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "containerInitializersCache", ";", "ClasspathContainerInitializer", "initializer", "=", "(", "ClasspathContainerInitializer", ")", "containerInitializersCache", ".", "get", "(", "containerID", ")", ";", "if", "(", "initializer", "==", "null", ")", "{", "initializer", "=", "computeClasspathContainerInitializer", "(", "containerID", ")", ";", "if", "(", "initializer", "==", "null", ")", "return", "null", ";", "containerInitializersCache", ".", "put", "(", "containerID", ",", "initializer", ")", ";", "}", "return", "initializer", ";", "}", "private", "static", "ClasspathContainerInitializer", "computeClasspathContainerInitializer", "(", "String", "containerID", ")", "{", "Plugin", "jdtCorePlugin", "=", "JavaCore", ".", "getPlugin", "(", ")", ";", "if", "(", "jdtCorePlugin", "==", "null", ")", "return", "null", ";", "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", "++", ")", "{", "IConfigurationElement", "configurationElement", "=", "configElements", "[", "j", "]", ";", "String", "initializerID", "=", "configurationElement", ".", "getAttribute", "(", "\"id\"", ")", ";", "if", "(", "initializerID", "!=", "null", "&&", "initializerID", ".", "equals", "(", "containerID", ")", ")", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_ADVANCED", ")", "verbose_found_container_initializer", "(", "containerID", ",", "configurationElement", ")", ";", "try", "{", "Object", "execExt", "=", "configurationElement", ".", "createExecutableExtension", "(", "\"class\"", ")", ";", "if", "(", "execExt", "instanceof", "ClasspathContainerInitializer", ")", "{", "return", "(", "ClasspathContainerInitializer", ")", "execExt", ";", "}", "}", "catch", "(", "CoreException", "e", ")", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE", "||", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_FAILURE", ")", "{", "verbose_failed_to_instanciate_container_initializer", "(", "containerID", ",", "configurationElement", ")", ";", "e", ".", "printStackTrace", "(", ")", ";", "}", "}", "}", "}", "}", "}", "return", "null", ";", "}", "private", "static", "void", "verbose_failed_to_instanciate_container_initializer", "(", "String", "containerID", ",", "IConfigurationElement", "configurationElement", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"\"", "+", "containerID", "+", "'\\n'", "+", "\"tclass:", "\"", "+", "configurationElement", ".", "getAttribute", "(", "\"class\"", ")", ",", "System", ".", "err", ")", ";", "}", "private", "static", "void", "verbose_found_container_initializer", "(", "String", "containerID", ",", "IConfigurationElement", "configurationElement", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"\"", "+", "containerID", "+", "'\\n'", "+", "\"tclass:", "\"", "+", "configurationElement", ".", "getAttribute", "(", "\"class\"", ")", ")", ";", "}", "public", "static", "IPath", "getClasspathVariable", "(", "final", "String", "variableName", ")", "{", "JavaModelManager", "manager", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ";", "IPath", "variablePath", "=", "manager", ".", "variableGet", "(", "variableName", ")", ";", "if", "(", "variablePath", "==", "JavaModelManager", ".", "VARIABLE_INITIALIZATION_IN_PROGRESS", ")", "{", "return", "manager", ".", "getPreviousSessionVariable", "(", "variableName", ")", ";", "}", "if", "(", "variablePath", "!=", "null", ")", "{", "if", "(", "variablePath", "==", "JavaModelManager", ".", "CP_ENTRY_IGNORE_PATH", ")", "return", "null", ";", "return", "variablePath", ";", "}", "final", "ClasspathVariableInitializer", "initializer", "=", "JavaCore", ".", "getClasspathVariableInitializer", "(", "variableName", ")", ";", "if", "(", "initializer", "!=", "null", ")", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE", ")", "verbose_triggering_variable_initialization", "(", "variableName", ",", "initializer", ")", ";", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_ADVANCED", ")", "verbose_triggering_variable_initialization_invocation_trace", "(", ")", ";", "manager", ".", "variablePut", "(", "variableName", ",", "JavaModelManager", ".", "VARIABLE_INITIALIZATION_IN_PROGRESS", ")", ";", "boolean", "ok", "=", "false", ";", "try", "{", "initializer", ".", "initialize", "(", "variableName", ")", ";", "variablePath", "=", "manager", ".", "variableGet", "(", "variableName", ")", ";", "if", "(", "variablePath", "==", "JavaModelManager", ".", "VARIABLE_INITIALIZATION_IN_PROGRESS", ")", "return", "null", ";", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_ADVANCED", ")", "verbose_variable_value_after_initialization", "(", "variableName", ",", "variablePath", ")", ";", "manager", ".", "variablesWithInitializer", ".", "add", "(", "variableName", ")", ";", "ok", "=", "true", ";", "}", "catch", "(", "RuntimeException", "e", ")", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE", "||", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_FAILURE", ")", "e", ".", "printStackTrace", "(", ")", ";", "throw", "e", ";", "}", "catch", "(", "Error", "e", ")", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE", "||", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_FAILURE", ")", "e", ".", "printStackTrace", "(", ")", ";", "throw", "e", ";", "}", "finally", "{", "if", "(", "!", "ok", ")", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "variablePut", "(", "variableName", ",", "null", ")", ";", "}", "}", "else", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_ADVANCED", "||", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_FAILURE", ")", "verbose_no_variable_initializer_found", "(", "variableName", ")", ";", "}", "return", "variablePath", ";", "}", "private", "static", "void", "verbose_no_variable_initializer_found", "(", "String", "variableName", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"tvariable:", "\"", "+", "variableName", ")", ";", "}", "private", "static", "void", "verbose_variable_value_after_initialization", "(", "String", "variableName", ",", "IPath", "variablePath", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"tvariable:", "\"", "+", "variableName", "+", "'\\n'", "+", "\"\"", "+", "variablePath", ")", ";", "}", "private", "static", "void", "verbose_triggering_variable_initialization", "(", "String", "variableName", ",", "ClasspathVariableInitializer", "initializer", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"tvariable:", "\"", "+", "variableName", "+", "'\\n'", "+", "\"\"", "+", "initializer", ")", ";", "}", "private", "static", "void", "verbose_triggering_variable_initialization_invocation_trace", "(", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"\"", ")", ";", "new", "Exception", "(", "\"\"", ")", ".", "printStackTrace", "(", "System", ".", "out", ")", ";", "}", "public", "static", "String", "getClasspathVariableDeprecationMessage", "(", "String", "variableName", ")", "{", "JavaModelManager", "manager", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ";", "String", "message", "=", "(", "String", ")", "manager", ".", "deprecatedVariables", ".", "get", "(", "variableName", ")", ";", "if", "(", "message", "!=", "null", ")", "{", "return", "message", ";", "}", "IPath", "variablePath", "=", "manager", ".", "variableGet", "(", "variableName", ")", ";", "if", "(", "variablePath", "!=", "null", "&&", "variablePath", "!=", "JavaModelManager", ".", "VARIABLE_INITIALIZATION_IN_PROGRESS", ")", "{", "return", "null", ";", "}", "Plugin", "jdtCorePlugin", "=", "JavaCore", ".", "getPlugin", "(", ")", ";", "if", "(", "jdtCorePlugin", "==", "null", ")", "return", "null", ";", "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", "++", ")", "{", "IConfigurationElement", "configElement", "=", "configElements", "[", "j", "]", ";", "String", "varAttribute", "=", "configElement", ".", "getAttribute", "(", "\"variable\"", ")", ";", "if", "(", "variableName", ".", "equals", "(", "varAttribute", ")", ")", "{", "String", "deprecatedAttribute", "=", "configElement", ".", "getAttribute", "(", "\"deprecated\"", ")", ";", "if", "(", "deprecatedAttribute", "!=", "null", ")", "{", "return", "deprecatedAttribute", ";", "}", "}", "}", "}", "}", "return", "null", ";", "}", "public", "static", "ClasspathVariableInitializer", "getClasspathVariableInitializer", "(", "String", "variable", ")", "{", "Plugin", "jdtCorePlugin", "=", "JavaCore", ".", "getPlugin", "(", ")", ";", "if", "(", "jdtCorePlugin", "==", "null", ")", "return", "null", ";", "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", "++", ")", "{", "IConfigurationElement", "configElement", "=", "configElements", "[", "j", "]", ";", "try", "{", "String", "varAttribute", "=", "configElement", ".", "getAttribute", "(", "\"variable\"", ")", ";", "if", "(", "variable", ".", "equals", "(", "varAttribute", ")", ")", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_ADVANCED", ")", "verbose_found_variable_initializer", "(", "variable", ",", "configElement", ")", ";", "Object", "execExt", "=", "configElement", ".", "createExecutableExtension", "(", "\"class\"", ")", ";", "if", "(", "execExt", "instanceof", "ClasspathVariableInitializer", ")", "{", "ClasspathVariableInitializer", "initializer", "=", "(", "ClasspathVariableInitializer", ")", "execExt", ";", "String", "deprecatedAttribute", "=", "configElement", ".", "getAttribute", "(", "\"deprecated\"", ")", ";", "if", "(", "deprecatedAttribute", "!=", "null", ")", "{", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "deprecatedVariables", ".", "put", "(", "variable", ",", "deprecatedAttribute", ")", ";", "}", "String", "readOnlyAttribute", "=", "configElement", ".", "getAttribute", "(", "\"readOnly\"", ")", ";", "if", "(", "JavaModelManager", ".", "TRUE", ".", "equals", "(", "readOnlyAttribute", ")", ")", "{", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "readOnlyVariables", ".", "add", "(", "variable", ")", ";", "}", "return", "initializer", ";", "}", "}", "}", "catch", "(", "CoreException", "e", ")", "{", "if", "(", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE", "||", "JavaModelManager", ".", "CP_RESOLVE_VERBOSE_FAILURE", ")", "{", "verbose_failed_to_instanciate_variable_initializer", "(", "variable", ",", "configElement", ")", ";", "e", ".", "printStackTrace", "(", ")", ";", "}", "}", "}", "}", "}", "return", "null", ";", "}", "private", "static", "void", "verbose_failed_to_instanciate_variable_initializer", "(", "String", "variable", ",", "IConfigurationElement", "configElement", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"tvariable:", "\"", "+", "variable", "+", "'\\n'", "+", "\"tclass:", "\"", "+", "configElement", ".", "getAttribute", "(", "\"class\"", ")", ",", "System", ".", "err", ")", ";", "}", "private", "static", "void", "verbose_found_variable_initializer", "(", "String", "variable", ",", "IConfigurationElement", "configElement", ")", "{", "Util", ".", "verbose", "(", "\"\"", "+", "\"tvariable:", "\"", "+", "variable", "+", "'\\n'", "+", "\"tclass:", "\"", "+", "configElement", ".", "getAttribute", "(", "\"class\"", ")", ")", ";", "}", "public", "static", "String", "[", "]", "getClasspathVariableNames", "(", ")", "{", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "variableNames", "(", ")", ";", "}", "public", "static", "Hashtable", "getDefaultOptions", "(", ")", "{", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getDefaultOptions", "(", ")", ";", "}", "public", "static", "String", "getEncoding", "(", ")", "{", "try", "{", "return", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ".", "getRoot", "(", ")", ".", "getDefaultCharset", "(", ")", ";", "}", "catch", "(", "IllegalStateException", "ise", ")", "{", "return", "System", ".", "getProperty", "(", "\"\"", ")", ";", "}", "catch", "(", "CoreException", "ce", ")", "{", "}", "return", "ResourcesPlugin", ".", "getEncoding", "(", ")", ";", "}", "public", "static", "IResource", "[", "]", "getGeneratedResources", "(", "IRegion", "region", ",", "boolean", "includesNonJavaResources", ")", "{", "if", "(", "region", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "IJavaElement", "[", "]", "elements", "=", "region", ".", "getElements", "(", ")", ";", "HashMap", "projectsStates", "=", "new", "HashMap", "(", ")", ";", "ArrayList", "collector", "=", "new", "ArrayList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "elements", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "IJavaElement", "element", "=", "elements", "[", "i", "]", ";", "IJavaProject", "javaProject", "=", "element", ".", "getJavaProject", "(", ")", ";", "IProject", "project", "=", "javaProject", ".", "getProject", "(", ")", ";", "State", "state", "=", "null", ";", "State", "currentState", "=", "(", "State", ")", "projectsStates", ".", "get", "(", "project", ")", ";", "if", "(", "currentState", "!=", "null", ")", "{", "state", "=", "currentState", ";", "}", "else", "{", "state", "=", "(", "State", ")", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getLastBuiltState", "(", "project", ",", "null", ")", ";", "if", "(", "state", "!=", "null", ")", "{", "projectsStates", ".", "put", "(", "project", ",", "state", ")", ";", "}", "}", "if", "(", "state", "==", "null", ")", "continue", ";", "if", "(", "element", ".", "getElementType", "(", ")", "==", "IJavaElement", ".", "JAVA_PROJECT", ")", "{", "IPackageFragmentRoot", "[", "]", "roots", "=", "null", ";", "try", "{", "roots", "=", "javaProject", ".", "getPackageFragmentRoots", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "if", "(", "roots", "==", "null", ")", "continue", ";", "IRegion", "region2", "=", "JavaCore", ".", "newRegion", "(", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "roots", ".", "length", ";", "j", "++", ")", "{", "region2", ".", "add", "(", "roots", "[", "j", "]", ")", ";", "}", "IResource", "[", "]", "res", "=", "getGeneratedResources", "(", "region2", ",", "includesNonJavaResources", ")", ";", "for", "(", "int", "j", "=", "0", ",", "max2", "=", "res", ".", "length", ";", "j", "<", "max2", ";", "j", "++", ")", "{", "collector", ".", "add", "(", "res", "[", "j", "]", ")", ";", "}", "continue", ";", "}", "IPath", "outputLocation", "=", "null", ";", "try", "{", "outputLocation", "=", "javaProject", ".", "getOutputLocation", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "IJavaElement", "root", "=", "element", ";", "while", "(", "root", "!=", "null", "&&", "root", ".", "getElementType", "(", ")", "!=", "IJavaElement", ".", "PACKAGE_FRAGMENT_ROOT", ")", "{", "root", "=", "root", ".", "getParent", "(", ")", ";", "}", "if", "(", "root", "==", "null", ")", "continue", ";", "IPackageFragmentRoot", "packageFragmentRoot", "=", "(", "IPackageFragmentRoot", ")", "root", ";", "int", "rootPathSegmentCounts", "=", "packageFragmentRoot", ".", "getPath", "(", ")", ".", "segmentCount", "(", ")", ";", "try", "{", "IClasspathEntry", "entry", "=", "packageFragmentRoot", ".", "getRawClasspathEntry", "(", ")", ";", "IPath", "entryOutputLocation", "=", "entry", ".", "getOutputLocation", "(", ")", ";", "if", "(", "entryOutputLocation", "!=", "null", ")", "{", "outputLocation", "=", "entryOutputLocation", ";", "}", "}", "catch", "(", "JavaModelException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "if", "(", "outputLocation", "==", "null", ")", "continue", ";", "IContainer", "container", "=", "(", "IContainer", ")", "project", ".", "getWorkspace", "(", ")", ".", "getRoot", "(", ")", ".", "findMember", "(", "outputLocation", ")", ";", "switch", "(", "element", ".", "getElementType", "(", ")", ")", "{", "case", "IJavaElement", ".", "COMPILATION_UNIT", ":", "ICompilationUnit", "unit", "=", "(", "ICompilationUnit", ")", "element", ";", "getGeneratedResource", "(", "unit", ",", "container", ",", "state", ",", "rootPathSegmentCounts", ",", "collector", ")", ";", "break", ";", "case", "IJavaElement", ".", "PACKAGE_FRAGMENT", ":", "IPackageFragment", "fragment", "=", "(", "IPackageFragment", ")", "element", ";", "ICompilationUnit", "[", "]", "compilationUnits", "=", "null", ";", "try", "{", "compilationUnits", "=", "fragment", ".", "getCompilationUnits", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "if", "(", "compilationUnits", "==", "null", ")", "continue", ";", "for", "(", "int", "j", "=", "0", ",", "max2", "=", "compilationUnits", ".", "length", ";", "j", "<", "max2", ";", "j", "++", ")", "{", "getGeneratedResource", "(", "compilationUnits", "[", "j", "]", ",", "container", ",", "state", ",", "rootPathSegmentCounts", ",", "collector", ")", ";", "}", "if", "(", "includesNonJavaResources", ")", "{", "Object", "[", "]", "nonJavaResources", "=", "null", ";", "try", "{", "nonJavaResources", "=", "fragment", ".", "getNonJavaResources", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "if", "(", "nonJavaResources", "!=", "null", ")", "{", "addNonJavaResources", "(", "nonJavaResources", ",", "container", ",", "rootPathSegmentCounts", ",", "collector", ")", ";", "}", "}", "break", ";", "case", "IJavaElement", ".", "PACKAGE_FRAGMENT_ROOT", ":", "IPackageFragmentRoot", "fragmentRoot", "=", "(", "IPackageFragmentRoot", ")", "element", ";", "if", "(", "fragmentRoot", ".", "isArchive", "(", ")", ")", "continue", ";", "IJavaElement", "[", "]", "children", "=", "null", ";", "try", "{", "children", "=", "fragmentRoot", ".", "getChildren", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "if", "(", "children", "==", "null", ")", "continue", ";", "for", "(", "int", "j", "=", "0", ",", "max2", "=", "children", ".", "length", ";", "j", "<", "max2", ";", "j", "++", ")", "{", "fragment", "=", "(", "IPackageFragment", ")", "children", "[", "j", "]", ";", "ICompilationUnit", "[", "]", "units", "=", "null", ";", "try", "{", "units", "=", "fragment", ".", "getCompilationUnits", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "if", "(", "units", "==", "null", ")", "continue", ";", "for", "(", "int", "n", "=", "0", ",", "max3", "=", "units", ".", "length", ";", "n", "<", "max3", ";", "n", "++", ")", "{", "getGeneratedResource", "(", "units", "[", "n", "]", ",", "container", ",", "state", ",", "rootPathSegmentCounts", ",", "collector", ")", ";", "}", "if", "(", "includesNonJavaResources", ")", "{", "Object", "[", "]", "nonJavaResources", "=", "null", ";", "try", "{", "nonJavaResources", "=", "fragment", ".", "getNonJavaResources", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "if", "(", "nonJavaResources", "!=", "null", ")", "{", "addNonJavaResources", "(", "nonJavaResources", ",", "container", ",", "rootPathSegmentCounts", ",", "collector", ")", ";", "}", "}", "}", "break", ";", "}", "}", "int", "size", "=", "collector", ".", "size", "(", ")", ";", "if", "(", "size", "!=", "0", ")", "{", "IResource", "[", "]", "result", "=", "new", "IResource", "[", "size", "]", ";", "collector", ".", "toArray", "(", "result", ")", ";", "return", "result", ";", "}", "return", "NO_GENERATED_RESOURCES", ";", "}", "private", "static", "void", "getGeneratedResource", "(", "ICompilationUnit", "unit", ",", "IContainer", "container", ",", "State", "state", ",", "int", "rootPathSegmentCounts", ",", "ArrayList", "collector", ")", "{", "IResource", "resource", "=", "unit", ".", "getResource", "(", ")", ";", "char", "[", "]", "[", "]", "typeNames", "=", "state", ".", "getDefinedTypeNamesFor", "(", "resource", ".", "getProjectRelativePath", "(", ")", ".", "toString", "(", ")", ")", ";", "if", "(", "typeNames", "!=", "null", ")", "{", "IPath", "path", "=", "unit", ".", "getPath", "(", ")", ".", "removeFirstSegments", "(", "rootPathSegmentCounts", ")", ".", "removeLastSegments", "(", "1", ")", ";", "for", "(", "int", "j", "=", "0", ",", "max2", "=", "typeNames", ".", "length", ";", "j", "<", "max2", ";", "j", "++", ")", "{", "IPath", "localPath", "=", "path", ".", "append", "(", "new", "String", "(", "typeNames", "[", "j", "]", ")", "+", "\".class\"", ")", ";", "IResource", "member", "=", "container", ".", "findMember", "(", "localPath", ")", ";", "if", "(", "member", "!=", "null", "&&", "member", ".", "exists", "(", ")", ")", "{", "collector", ".", "add", "(", "member", ")", ";", "}", "}", "}", "else", "{", "IPath", "path", "=", "unit", ".", "getPath", "(", ")", ".", "removeFirstSegments", "(", "rootPathSegmentCounts", ")", ".", "removeLastSegments", "(", "1", ")", ";", "path", "=", "path", ".", "append", "(", "Util", ".", "getNameWithoutJavaLikeExtension", "(", "unit", ".", "getElementName", "(", ")", ")", "+", "\".class\"", ")", ";", "IResource", "member", "=", "container", ".", "findMember", "(", "path", ")", ";", "if", "(", "member", "!=", "null", "&&", "member", ".", "exists", "(", ")", ")", "{", "collector", ".", "add", "(", "member", ")", ";", "}", "}", "}", "public", "static", "JavaCore", "getJavaCore", "(", ")", "{", "return", "(", "JavaCore", ")", "getPlugin", "(", ")", ";", "}", "public", "static", "String", "[", "]", "getJavaLikeExtensions", "(", ")", "{", "return", "CharOperation", ".", "toStrings", "(", "Util", ".", "getJavaLikeExtensions", "(", ")", ")", ";", "}", "public", "static", "String", "getOption", "(", "String", "optionName", ")", "{", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getOption", "(", "optionName", ")", ";", "}", "public", "static", "String", "getOptionForConfigurableSeverity", "(", "int", "problemID", ")", "{", "return", "CompilerOptions", ".", "optionKeyFromIrritant", "(", "ProblemReporter", ".", "getIrritant", "(", "problemID", ")", ")", ";", "}", "public", "static", "Hashtable", "getOptions", "(", ")", "{", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getOptions", "(", ")", ";", "}", "public", "static", "Plugin", "getPlugin", "(", ")", "{", "return", "JAVA_CORE_PLUGIN", ";", "}", "public", "static", "IClasspathEntry", "getResolvedClasspathEntry", "(", "IClasspathEntry", "entry", ")", "{", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "resolveVariableEntry", "(", "entry", ",", "false", ")", ";", "}", "public", "static", "IPath", "getResolvedVariablePath", "(", "IPath", "variablePath", ")", "{", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getResolvedVariablePath", "(", "variablePath", ",", "false", ")", ";", "}", "public", "static", "IWorkingCopy", "[", "]", "getSharedWorkingCopies", "(", "IBufferFactory", "factory", ")", "{", "if", "(", "factory", "==", "null", ")", "factory", "=", "BufferManager", ".", "getDefaultBufferManager", "(", ")", ".", "getDefaultBufferFactory", "(", ")", ";", "return", "getWorkingCopies", "(", "BufferFactoryWrapper", ".", "create", "(", "factory", ")", ")", ";", "}", "public", "static", "String", "[", "]", "getUserLibraryNames", "(", ")", "{", "return", "JavaModelManager", ".", "getUserLibraryManager", "(", ")", ".", "getUserLibraryNames", "(", ")", ";", "}", "public", "static", "ICompilationUnit", "[", "]", "getWorkingCopies", "(", "WorkingCopyOwner", "owner", ")", "{", "JavaModelManager", "manager", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ";", "if", "(", "owner", "==", "null", ")", "owner", "=", "DefaultWorkingCopyOwner", ".", "PRIMARY", ";", "ICompilationUnit", "[", "]", "result", "=", "manager", ".", "getWorkingCopies", "(", "owner", ",", "false", ")", ";", "if", "(", "result", "==", "null", ")", "return", "JavaModelManager", ".", "NO_WORKING_COPY", ";", "return", "result", ";", "}", "public", "static", "void", "initializeAfterLoad", "(", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "try", "{", "if", "(", "monitor", "!=", "null", ")", "{", "monitor", ".", "beginTask", "(", "Messages", ".", "javamodel_initialization", ",", "100", ")", ";", "monitor", ".", "subTask", "(", "Messages", ".", "javamodel_configuring_classpath_containers", ")", ";", "}", "JavaModelManager", "manager", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ";", "SubProgressMonitor", "subMonitor", "=", "null", ";", "try", "{", "if", "(", "monitor", "!=", "null", ")", "{", "subMonitor", "=", "new", "SubProgressMonitor", "(", "monitor", ",", "50", ")", ";", "subMonitor", ".", "beginTask", "(", "\"\"", ",", "100", ")", ";", "subMonitor", ".", "worked", "(", "5", ")", ";", "manager", ".", "batchContainerInitializationsProgress", ".", "initializeAfterLoadMonitor", ".", "set", "(", "subMonitor", ")", ";", "}", "if", "(", "manager", ".", "forceBatchInitializations", "(", "true", ")", ")", "{", "manager", ".", "getClasspathContainer", "(", "Path", ".", "EMPTY", ",", "null", ")", ";", "}", "else", "{", "while", "(", "manager", ".", "batchContainerInitializations", "==", "JavaModelManager", ".", "BATCH_INITIALIZATION_IN_PROGRESS", ")", "{", "if", "(", "subMonitor", "!=", "null", ")", "{", "subMonitor", ".", "subTask", "(", "manager", ".", "batchContainerInitializationsProgress", ".", "subTaskName", ")", ";", "subMonitor", ".", "worked", "(", "manager", ".", "batchContainerInitializationsProgress", ".", "getWorked", "(", ")", ")", ";", "}", "synchronized", "(", "manager", ")", "{", "try", "{", "manager", ".", "wait", "(", "100", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "}", "}", "}", "}", "}", "finally", "{", "if", "(", "subMonitor", "!=", "null", ")", "subMonitor", ".", "done", "(", ")", ";", "manager", ".", "batchContainerInitializationsProgress", ".", "initializeAfterLoadMonitor", ".", "set", "(", "null", ")", ";", "}", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "subTask", "(", "Messages", ".", "javamodel_resetting_source_attachment_properties", ")", ";", "ExternalFoldersManager", "externalFoldersManager", "=", "JavaModelManager", ".", "getExternalManager", "(", ")", ";", "final", "IJavaProject", "[", "]", "projects", "=", "manager", ".", "getJavaModel", "(", ")", ".", "getJavaProjects", "(", ")", ";", "HashSet", "visitedPaths", "=", "new", "HashSet", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "length", "=", "projects", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "JavaProject", "javaProject", "=", "(", "JavaProject", ")", "projects", "[", "i", "]", ";", "IClasspathEntry", "[", "]", "classpath", ";", "try", "{", "classpath", "=", "javaProject", ".", "getResolvedClasspath", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "continue", ";", "}", "if", "(", "classpath", "!=", "null", ")", "{", "boolean", "needExternalFolderCreation", "=", "false", ";", "for", "(", "int", "j", "=", "0", ",", "length2", "=", "classpath", ".", "length", ";", "j", "<", "length2", ";", "j", "++", ")", "{", "IClasspathEntry", "entry", "=", "classpath", "[", "j", "]", ";", "if", "(", "entry", ".", "getSourceAttachmentPath", "(", ")", "!=", "null", ")", "{", "IPath", "entryPath", "=", "entry", ".", "getPath", "(", ")", ";", "if", "(", "visitedPaths", ".", "add", "(", "entryPath", ")", ")", "{", "Util", ".", "setSourceAttachmentProperty", "(", "entryPath", ",", "null", ")", ";", "}", "}", "if", "(", "!", "needExternalFolderCreation", "&&", "entry", ".", "getEntryKind", "(", ")", "==", "IClasspathEntry", ".", "CPE_LIBRARY", ")", "{", "IPath", "entryPath", "=", "entry", ".", "getPath", "(", ")", ";", "if", "(", "ExternalFoldersManager", ".", "isExternalFolderPath", "(", "entryPath", ")", "&&", "externalFoldersManager", ".", "getFolder", "(", "entryPath", ")", "==", "null", ")", "{", "needExternalFolderCreation", "=", "true", ";", "}", "}", "}", "if", "(", "needExternalFolderCreation", ")", "manager", ".", "deltaState", ".", "addExternalFolderChange", "(", "javaProject", ",", "null", ")", ";", "}", "}", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "subTask", "(", "Messages", ".", "javamodel_initializing_delta_state", ")", ";", "manager", ".", "deltaState", ".", "rootsAreStale", "=", "true", ";", "manager", ".", "deltaState", ".", "initializeRoots", "(", "true", ")", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "subTask", "(", "Messages", ".", "javamodel_configuring_searchengine", ")", ";", "SearchEngine", "engine", "=", "new", "SearchEngine", "(", ")", ";", "IJavaSearchScope", "scope", "=", "SearchEngine", ".", "createWorkspaceScope", "(", ")", ";", "try", "{", "engine", ".", "searchAllTypeNames", "(", "null", ",", "SearchPattern", ".", "R_EXACT_MATCH", ",", "\"!@$#!@\"", ".", "toCharArray", "(", ")", ",", "SearchPattern", ".", "R_PATTERN_MATCH", "|", "SearchPattern", ".", "R_CASE_SENSITIVE", ",", "IJavaSearchConstants", ".", "CLASS", ",", "scope", ",", "new", "TypeNameRequestor", "(", ")", "{", "public", "void", "acceptType", "(", "int", "modifiers", ",", "char", "[", "]", "packageName", ",", "char", "[", "]", "simpleTypeName", ",", "char", "[", "]", "[", "]", "enclosingTypeNames", ",", "String", "path", ")", "{", "}", "}", ",", "IJavaSearchConstants", ".", "CANCEL_IF_NOT_READY_TO_SEARCH", ",", "monitor", "==", "null", "?", "null", ":", "new", "SubProgressMonitor", "(", "monitor", ",", "49", ")", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "catch", "(", "OperationCanceledException", "e", ")", "{", "if", "(", "monitor", "!=", "null", "&&", "monitor", ".", "isCanceled", "(", ")", ")", "throw", "e", ";", "}", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "subTask", "(", "Messages", ".", "javamodel_getting_build_state_number", ")", ";", "QualifiedName", "qName", "=", "new", "QualifiedName", "(", "JavaCore", ".", "PLUGIN_ID", ",", "\"\"", ")", ";", "IWorkspaceRoot", "root", "=", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ".", "getRoot", "(", ")", ";", "String", "versionNumber", "=", "null", ";", "try", "{", "versionNumber", "=", "root", ".", "getPersistentProperty", "(", "qName", ")", ";", "}", "catch", "(", "CoreException", "e", ")", "{", "}", "final", "JavaModel", "model", "=", "manager", ".", "getJavaModel", "(", ")", ";", "String", "newVersionNumber", "=", "Byte", ".", "toString", "(", "State", ".", "VERSION", ")", ";", "if", "(", "!", "newVersionNumber", ".", "equals", "(", "versionNumber", ")", ")", "{", "if", "(", "JavaBuilder", ".", "DEBUG", ")", "System", ".", "out", ".", "println", "(", "\"\"", ")", ";", "IWorkspaceRunnable", "runnable", "=", "new", "IWorkspaceRunnable", "(", ")", "{", "public", "void", "run", "(", "IProgressMonitor", "progressMonitor2", ")", "throws", "CoreException", "{", "for", "(", "int", "i", "=", "0", ",", "length", "=", "projects", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "IJavaProject", "project", "=", "projects", "[", "i", "]", ";", "try", "{", "if", "(", "JavaBuilder", ".", "DEBUG", ")", "System", ".", "out", ".", "println", "(", "\"Touching", "\"", "+", "project", ".", "getElementName", "(", ")", ")", ";", "project", ".", "getProject", "(", ")", ".", "touch", "(", "progressMonitor2", ")", ";", "}", "catch", "(", "CoreException", "e", ")", "{", "}", "}", "}", "}", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "subTask", "(", "Messages", ".", "javamodel_building_after_upgrade", ")", ";", "try", "{", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ".", "run", "(", "runnable", ",", "monitor", ")", ";", "}", "catch", "(", "CoreException", "e", ")", "{", "}", "try", "{", "root", ".", "setPersistentProperty", "(", "qName", ",", "newVersionNumber", ")", ";", "}", "catch", "(", "CoreException", "e", ")", "{", "Util", ".", "log", "(", "e", ",", "\"\"", ")", ";", "}", "}", "try", "{", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "subTask", "(", "Messages", ".", "javamodel_refreshing_external_jars", ")", ";", "model", ".", "refreshExternalArchives", "(", "null", ",", "monitor", "==", "null", "?", "null", ":", "new", "SubProgressMonitor", "(", "monitor", ",", "1", ")", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "}", "}", "finally", "{", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "done", "(", ")", ";", "}", "}", "public", "static", "boolean", "isClasspathVariableReadOnly", "(", "String", "variableName", ")", "{", "return", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "readOnlyVariables", ".", "contains", "(", "variableName", ")", ";", "}", "public", "static", "boolean", "isJavaLikeFileName", "(", "String", "fileName", ")", "{", "return", "Util", ".", "isJavaLikeFileName", "(", "fileName", ")", ";", "}", "public", "static", "boolean", "isReferencedBy", "(", "IJavaElement", "element", ",", "IMarker", "marker", ")", "throws", "CoreException", "{", "if", "(", "element", "instanceof", "IMember", ")", "{", "IMember", "member", "=", "(", "IMember", ")", "element", ";", "if", "(", "member", ".", "isBinary", "(", ")", ")", "{", "element", "=", "member", ".", "getClassFile", "(", ")", ";", "}", "else", "{", "element", "=", "member", ".", "getCompilationUnit", "(", ")", ";", "}", "}", "if", "(", "element", "==", "null", ")", "return", "false", ";", "if", "(", "marker", "==", "null", ")", "return", "false", ";", "String", "markerHandleId", "=", "(", "String", ")", "marker", ".", "getAttribute", "(", "ATT_HANDLE_ID", ")", ";", "if", "(", "markerHandleId", "==", "null", ")", "return", "false", ";", "IJavaElement", "markerElement", "=", "JavaCore", ".", "create", "(", "markerHandleId", ")", ";", "while", "(", "true", ")", "{", "if", "(", "element", ".", "equals", "(", "markerElement", ")", ")", "return", "true", ";", "if", "(", "markerElement", "instanceof", "IClassFile", ")", "{", "IType", "enclosingType", "=", "(", "(", "IClassFile", ")", "markerElement", ")", ".", "getType", "(", ")", ".", "getDeclaringType", "(", ")", ";", "if", "(", "enclosingType", "!=", "null", ")", "{", "markerElement", "=", "enclosingType", ".", "getClassFile", "(", ")", ";", "continue", ";", "}", "}", "break", ";", "}", "return", "false", ";", "}", "public", "static", "boolean", "isReferencedBy", "(", "IJavaElement", "element", ",", "IMarkerDelta", "markerDelta", ")", "throws", "CoreException", "{", "if", "(", "element", "instanceof", "IMember", ")", "{", "IMember", "member", "=", "(", "IMember", ")", "element", ";", "if", "(", "member", ".", "isBinary", "(", ")", ")", "{", "element", "=", "member", ".", "getClassFile", "(", ")", ";", "}", "else", "{", "element", "=", "member", ".", "getCompilationUnit", "(", ")", ";", "}", "}", "if", "(", "element", "==", "null", ")", "return", "false", ";", "if", "(", "markerDelta", "==", "null", ")", "return", "false", ";", "String", "markerDeltarHandleId", "=", "(", "String", ")", "markerDelta", ".", "getAttribute", "(", "ATT_HANDLE_ID", ")", ";", "if", "(", "markerDeltarHandleId", "==", "null", ")", "return", "false", ";", "IJavaElement", "markerElement", "=", "JavaCore", ".", "create", "(", "markerDeltarHandleId", ")", ";", "while", "(", "true", ")", "{", "if", "(", "element", ".", "equals", "(", "markerElement", ")", ")", "return", "true", ";", "if", "(", "markerElement", "instanceof", "IClassFile", ")", "{", "IType", "enclosingType", "=", "(", "(", "IClassFile", ")", "markerElement", ")", ".", "getType", "(", ")", ".", "getDeclaringType", "(", ")", ";", "if", "(", "enclosingType", "!=", "null", ")", "{", "markerElement", "=", "enclosingType", ".", "getClassFile", "(", ")", ";", "continue", ";", "}", "}", "break", ";", "}", "return", "false", ";", "}", "public", "static", "IAccessRule", "newAccessRule", "(", "IPath", "filePattern", ",", "int", "kind", ")", "{", "return", "new", "ClasspathAccessRule", "(", "filePattern", ",", "kind", ")", ";", "}", "public", "static", "IClasspathAttribute", "newClasspathAttribute", "(", "String", "name", ",", "String", "value", ")", "{", "return", "new", "ClasspathAttribute", "(", "name", ",", "value", ")", ";", "}", "public", "static", "IClasspathEntry", "newContainerEntry", "(", "IPath", "containerPath", ")", "{", "return", "newContainerEntry", "(", "containerPath", ",", "ClasspathEntry", ".", "NO_ACCESS_RULES", ",", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ",", "false", ")", ";", "}", "public", "static", "IClasspathEntry", "newContainerEntry", "(", "IPath", "containerPath", ",", "boolean", "isExported", ")", "{", "return", "newContainerEntry", "(", "containerPath", ",", "ClasspathEntry", ".", "NO_ACCESS_RULES", ",", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ",", "isExported", ")", ";", "}", "public", "static", "IClasspathEntry", "newContainerEntry", "(", "IPath", "containerPath", ",", "IAccessRule", "[", "]", "accessRules", ",", "IClasspathAttribute", "[", "]", "extraAttributes", ",", "boolean", "isExported", ")", "{", "if", "(", "containerPath", "==", "null", ")", "{", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "}", "else", "if", "(", "containerPath", ".", "segmentCount", "(", ")", "<", "1", ")", "{", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", "+", "containerPath", ".", "makeRelative", "(", ")", ".", "toString", "(", ")", "+", "\"\"", ")", ";", "}", "if", "(", "accessRules", "==", "null", ")", "{", "accessRules", "=", "ClasspathEntry", ".", "NO_ACCESS_RULES", ";", "}", "if", "(", "extraAttributes", "==", "null", ")", "{", "extraAttributes", "=", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ";", "}", "return", "new", "ClasspathEntry", "(", "IPackageFragmentRoot", ".", "K_SOURCE", ",", "IClasspathEntry", ".", "CPE_CONTAINER", ",", "containerPath", ",", "ClasspathEntry", ".", "INCLUDE_ALL", ",", "ClasspathEntry", ".", "EXCLUDE_NONE", ",", "null", ",", "null", ",", "null", ",", "isExported", ",", "accessRules", ",", "true", ",", "extraAttributes", ")", ";", "}", "public", "static", "ITypeHierarchy", "newTypeHierarchy", "(", "IRegion", "region", ",", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", "{", "if", "(", "region", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "Messages", ".", "hierarchy_nullRegion", ")", ";", "}", "ICompilationUnit", "[", "]", "workingCopies", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "getWorkingCopies", "(", "owner", ",", "true", ")", ";", "CreateTypeHierarchyOperation", "op", "=", "new", "CreateTypeHierarchyOperation", "(", "region", ",", "workingCopies", ",", "null", ",", "true", ")", ";", "op", ".", "runOperation", "(", "monitor", ")", ";", "return", "op", ".", "getResult", "(", ")", ";", "}", "public", "static", "IClasspathEntry", "newLibraryEntry", "(", "IPath", "path", ",", "IPath", "sourceAttachmentPath", ",", "IPath", "sourceAttachmentRootPath", ")", "{", "return", "newLibraryEntry", "(", "path", ",", "sourceAttachmentPath", ",", "sourceAttachmentRootPath", ",", "ClasspathEntry", ".", "NO_ACCESS_RULES", ",", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ",", "false", ")", ";", "}", "public", "static", "IClasspathEntry", "newLibraryEntry", "(", "IPath", "path", ",", "IPath", "sourceAttachmentPath", ",", "IPath", "sourceAttachmentRootPath", ",", "boolean", "isExported", ")", "{", "return", "newLibraryEntry", "(", "path", ",", "sourceAttachmentPath", ",", "sourceAttachmentRootPath", ",", "ClasspathEntry", ".", "NO_ACCESS_RULES", ",", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ",", "isExported", ")", ";", "}", "public", "static", "IClasspathEntry", "newLibraryEntry", "(", "IPath", "path", ",", "IPath", "sourceAttachmentPath", ",", "IPath", "sourceAttachmentRootPath", ",", "IAccessRule", "[", "]", "accessRules", ",", "IClasspathAttribute", "[", "]", "extraAttributes", ",", "boolean", "isExported", ")", "{", "if", "(", "path", "==", "null", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "if", "(", "accessRules", "==", "null", ")", "{", "accessRules", "=", "ClasspathEntry", ".", "NO_ACCESS_RULES", ";", "}", "if", "(", "extraAttributes", "==", "null", ")", "{", "extraAttributes", "=", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ";", "}", "boolean", "hasDotDot", "=", "ClasspathEntry", ".", "hasDotDot", "(", "path", ")", ";", "if", "(", "!", "hasDotDot", "&&", "!", "path", ".", "isAbsolute", "(", ")", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", "+", "path", ")", ";", "if", "(", "sourceAttachmentPath", "!=", "null", ")", "{", "if", "(", "sourceAttachmentPath", ".", "isEmpty", "(", ")", ")", "{", "sourceAttachmentPath", "=", "null", ";", "}", "else", "if", "(", "!", "sourceAttachmentPath", ".", "isAbsolute", "(", ")", ")", "{", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", "+", "sourceAttachmentPath", "+", "\"\"", ")", ";", "}", "}", "return", "new", "ClasspathEntry", "(", "IPackageFragmentRoot", ".", "K_BINARY", ",", "IClasspathEntry", ".", "CPE_LIBRARY", ",", "hasDotDot", "?", "path", ":", "JavaProject", ".", "canonicalizedPath", "(", "path", ")", ",", "ClasspathEntry", ".", "INCLUDE_ALL", ",", "ClasspathEntry", ".", "EXCLUDE_NONE", ",", "sourceAttachmentPath", ",", "sourceAttachmentRootPath", ",", "null", ",", "isExported", ",", "accessRules", ",", "false", ",", "extraAttributes", ")", ";", "}", "public", "static", "IClasspathEntry", "newProjectEntry", "(", "IPath", "path", ")", "{", "return", "newProjectEntry", "(", "path", ",", "false", ")", ";", "}", "public", "static", "IClasspathEntry", "newProjectEntry", "(", "IPath", "path", ",", "boolean", "isExported", ")", "{", "if", "(", "!", "path", ".", "isAbsolute", "(", ")", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "return", "newProjectEntry", "(", "path", ",", "ClasspathEntry", ".", "NO_ACCESS_RULES", ",", "true", ",", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ",", "isExported", ")", ";", "}", "public", "static", "IClasspathEntry", "newProjectEntry", "(", "IPath", "path", ",", "IAccessRule", "[", "]", "accessRules", ",", "boolean", "combineAccessRules", ",", "IClasspathAttribute", "[", "]", "extraAttributes", ",", "boolean", "isExported", ")", "{", "if", "(", "!", "path", ".", "isAbsolute", "(", ")", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "if", "(", "accessRules", "==", "null", ")", "{", "accessRules", "=", "ClasspathEntry", ".", "NO_ACCESS_RULES", ";", "}", "if", "(", "extraAttributes", "==", "null", ")", "{", "extraAttributes", "=", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ";", "}", "return", "new", "ClasspathEntry", "(", "IPackageFragmentRoot", ".", "K_SOURCE", ",", "IClasspathEntry", ".", "CPE_PROJECT", ",", "path", ",", "ClasspathEntry", ".", "INCLUDE_ALL", ",", "ClasspathEntry", ".", "EXCLUDE_NONE", ",", "null", ",", "null", ",", "null", ",", "isExported", ",", "accessRules", ",", "combineAccessRules", ",", "extraAttributes", ")", ";", "}", "public", "static", "IRegion", "newRegion", "(", ")", "{", "return", "new", "Region", "(", ")", ";", "}", "public", "static", "IClasspathEntry", "newSourceEntry", "(", "IPath", "path", ")", "{", "return", "newSourceEntry", "(", "path", ",", "ClasspathEntry", ".", "INCLUDE_ALL", ",", "ClasspathEntry", ".", "EXCLUDE_NONE", ",", "null", ")", ";", "}", "public", "static", "IClasspathEntry", "newSourceEntry", "(", "IPath", "path", ",", "IPath", "[", "]", "exclusionPatterns", ")", "{", "return", "newSourceEntry", "(", "path", ",", "ClasspathEntry", ".", "INCLUDE_ALL", ",", "exclusionPatterns", ",", "null", ")", ";", "}", "public", "static", "IClasspathEntry", "newSourceEntry", "(", "IPath", "path", ",", "IPath", "[", "]", "exclusionPatterns", ",", "IPath", "specificOutputLocation", ")", "{", "return", "newSourceEntry", "(", "path", ",", "ClasspathEntry", ".", "INCLUDE_ALL", ",", "exclusionPatterns", ",", "specificOutputLocation", ")", ";", "}", "public", "static", "IClasspathEntry", "newSourceEntry", "(", "IPath", "path", ",", "IPath", "[", "]", "inclusionPatterns", ",", "IPath", "[", "]", "exclusionPatterns", ",", "IPath", "specificOutputLocation", ")", "{", "return", "newSourceEntry", "(", "path", ",", "inclusionPatterns", ",", "exclusionPatterns", ",", "specificOutputLocation", ",", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ")", ";", "}", "public", "static", "IClasspathEntry", "newSourceEntry", "(", "IPath", "path", ",", "IPath", "[", "]", "inclusionPatterns", ",", "IPath", "[", "]", "exclusionPatterns", ",", "IPath", "specificOutputLocation", ",", "IClasspathAttribute", "[", "]", "extraAttributes", ")", "{", "if", "(", "path", "==", "null", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "if", "(", "!", "path", ".", "isAbsolute", "(", ")", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "if", "(", "exclusionPatterns", "==", "null", ")", "{", "exclusionPatterns", "=", "ClasspathEntry", ".", "EXCLUDE_NONE", ";", "}", "if", "(", "inclusionPatterns", "==", "null", ")", "{", "inclusionPatterns", "=", "ClasspathEntry", ".", "INCLUDE_ALL", ";", "}", "if", "(", "extraAttributes", "==", "null", ")", "{", "extraAttributes", "=", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ";", "}", "return", "new", "ClasspathEntry", "(", "IPackageFragmentRoot", ".", "K_SOURCE", ",", "IClasspathEntry", ".", "CPE_SOURCE", ",", "path", ",", "inclusionPatterns", ",", "exclusionPatterns", ",", "null", ",", "null", ",", "specificOutputLocation", ",", "false", ",", "null", ",", "false", ",", "extraAttributes", ")", ";", "}", "public", "static", "IClasspathEntry", "newVariableEntry", "(", "IPath", "variablePath", ",", "IPath", "variableSourceAttachmentPath", ",", "IPath", "sourceAttachmentRootPath", ")", "{", "return", "newVariableEntry", "(", "variablePath", ",", "variableSourceAttachmentPath", ",", "sourceAttachmentRootPath", ",", "false", ")", ";", "}", "public", "static", "IClasspathEntry", "newVariableEntry", "(", "IPath", "variablePath", ",", "IPath", "variableSourceAttachmentPath", ",", "IPath", "variableSourceAttachmentRootPath", ",", "boolean", "isExported", ")", "{", "return", "newVariableEntry", "(", "variablePath", ",", "variableSourceAttachmentPath", ",", "variableSourceAttachmentRootPath", ",", "ClasspathEntry", ".", "NO_ACCESS_RULES", ",", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ",", "isExported", ")", ";", "}", "public", "static", "IClasspathEntry", "newVariableEntry", "(", "IPath", "variablePath", ",", "IPath", "variableSourceAttachmentPath", ",", "IPath", "variableSourceAttachmentRootPath", ",", "IAccessRule", "[", "]", "accessRules", ",", "IClasspathAttribute", "[", "]", "extraAttributes", ",", "boolean", "isExported", ")", "{", "if", "(", "variablePath", "==", "null", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "if", "(", "variablePath", ".", "segmentCount", "(", ")", "<", "1", ")", "{", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", "+", "variablePath", ".", "makeRelative", "(", ")", ".", "toString", "(", ")", "+", "\"\"", ")", ";", "}", "if", "(", "accessRules", "==", "null", ")", "{", "accessRules", "=", "ClasspathEntry", ".", "NO_ACCESS_RULES", ";", "}", "if", "(", "extraAttributes", "==", "null", ")", "{", "extraAttributes", "=", "ClasspathEntry", ".", "NO_EXTRA_ATTRIBUTES", ";", "}", "return", "new", "ClasspathEntry", "(", "IPackageFragmentRoot", ".", "K_SOURCE", ",", "IClasspathEntry", ".", "CPE_VARIABLE", ",", "variablePath", ",", "ClasspathEntry", ".", "INCLUDE_ALL", ",", "ClasspathEntry", ".", "EXCLUDE_NONE", ",", "variableSourceAttachmentPath", ",", "variableSourceAttachmentRootPath", ",", "null", ",", "isExported", ",", "accessRules", ",", "false", ",", "extraAttributes", ")", ";", "}", "public", "static", "IClasspathEntry", "[", "]", "getReferencedClasspathEntries", "(", "IClasspathEntry", "libraryEntry", ",", "IJavaProject", "project", ")", "{", "JavaModelManager", "manager", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ";", "return", "manager", ".", "getReferencedClasspathEntries", "(", "libraryEntry", ",", "project", ")", ";", "}", "public", "static", "void", "removeClasspathVariable", "(", "String", "variableName", ")", "{", "removeClasspathVariable", "(", "variableName", ",", "null", ")", ";", "}", "public", "static", "void", "removeClasspathVariable", "(", "String", "variableName", ",", "IProgressMonitor", "monitor", ")", "{", "try", "{", "SetVariablesOperation", "operation", "=", "new", "SetVariablesOperation", "(", "new", "String", "[", "]", "{", "variableName", "}", ",", "new", "IPath", "[", "]", "{", "null", "}", ",", "true", ")", ";", "operation", ".", "runOperation", "(", "monitor", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "Util", ".", "log", "(", "e", ",", "\"\"", "+", "variableName", ")", ";", "}", "}", "public", "static", "void", "removeElementChangedListener", "(", "IElementChangedListener", "listener", ")", "{", "JavaModelManager", ".", "getDeltaState", "(", ")", ".", "removeElementChangedListener", "(", "listener", ")", ";", "}", "public", "static", "String", "removeJavaLikeExtension", "(", "String", "fileName", ")", "{", "return", "Util", ".", "getNameWithoutJavaLikeExtension", "(", "fileName", ")", ";", "}", "public", "static", "void", "removePreProcessingResourceChangedListener", "(", "IResourceChangeListener", "listener", ")", "{", "JavaModelManager", ".", "getDeltaState", "(", ")", ".", "removePreResourceChangedListener", "(", "listener", ")", ";", "}", "public", "static", "void", "run", "(", "IWorkspaceRunnable", "action", ",", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "run", "(", "action", ",", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ".", "getRoot", "(", ")", ",", "monitor", ")", ";", "}", "public", "static", "void", "run", "(", "IWorkspaceRunnable", "action", ",", "ISchedulingRule", "rule", ",", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "IWorkspace", "workspace", "=", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ";", "if", "(", "workspace", ".", "isTreeLocked", "(", ")", ")", "{", "new", "BatchOperation", "(", "action", ")", ".", "run", "(", "monitor", ")", ";", "}", "else", "{", "workspace", ".", "run", "(", "new", "BatchOperation", "(", "action", ")", ",", "rule", ",", "IWorkspace", ".", "AVOID_UPDATE", ",", "monitor", ")", ";", "}", "}", "public", "static", "void", "setClasspathContainer", "(", "IPath", "containerPath", ",", "IJavaProject", "[", "]", "affectedProjects", ",", "IClasspathContainer", "[", "]", "respectiveContainers", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", "{", "if", "(", "affectedProjects", ".", "length", "!=", "respectiveContainers", ".", "length", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "if", "(", "affectedProjects", ".", "length", "==", "1", ")", "{", "IClasspathContainer", "container", "=", "respectiveContainers", "[", "0", "]", ";", "if", "(", "container", "!=", "null", ")", "{", "JavaModelManager", "manager", "=", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ";", "IJavaProject", "project", "=", "affectedProjects", "[", "0", "]", ";", "IClasspathContainer", "existingCointainer", "=", "manager", ".", "containerGet", "(", "project", ",", "containerPath", ")", ";", "if", "(", "existingCointainer", "==", "JavaModelManager", ".", "CONTAINER_INITIALIZATION_IN_PROGRESS", ")", "{", "manager", ".", "containerBeingInitializedPut", "(", "project", ",", "containerPath", ",", "container", ")", ";", "return", ";", "}", "}", "}", "SetContainerOperation", "operation", "=", "new", "SetContainerOperation", "(", "containerPath", ",", "affectedProjects", ",", "respectiveContainers", ")", ";", "operation", ".", "runOperation", "(", "monitor", ")", ";", "}", "public", "static", "void", "setClasspathVariable", "(", "String", "variableName", ",", "IPath", "path", ")", "throws", "JavaModelException", "{", "setClasspathVariable", "(", "variableName", ",", "path", ",", "null", ")", ";", "}", "public", "static", "void", "setClasspathVariable", "(", "String", "variableName", ",", "IPath", "path", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", "{", "if", "(", "path", "==", "null", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "setClasspathVariables", "(", "new", "String", "[", "]", "{", "variableName", "}", ",", "new", "IPath", "[", "]", "{", "path", "}", ",", "monitor", ")", ";", "}", "public", "static", "void", "setClasspathVariables", "(", "String", "[", "]", "variableNames", ",", "IPath", "[", "]", "paths", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", "{", "if", "(", "variableNames", ".", "length", "!=", "paths", ".", "length", ")", "throw", "new", "ClasspathEntry", ".", "AssertionFailedException", "(", "\"\"", ")", ";", "SetVariablesOperation", "operation", "=", "new", "SetVariablesOperation", "(", "variableNames", ",", "paths", ",", "true", ")", ";", "operation", ".", "runOperation", "(", "monitor", ")", ";", "}", "public", "static", "void", "setComplianceOptions", "(", "String", "compliance", ",", "Map", "options", ")", "{", "switch", "(", "(", "int", ")", "(", "CompilerOptions", ".", "versionToJdkLevel", "(", "compliance", ")", ">>>", "16", ")", ")", "{", "case", "ClassFileConstants", ".", "MAJOR_VERSION_1_3", ":", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ",", "JavaCore", ".", "VERSION_1_3", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_SOURCE", ",", "JavaCore", ".", "VERSION_1_3", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_TARGET_PLATFORM", ",", "JavaCore", ".", "VERSION_1_1", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ASSERT_IDENTIFIER", ",", "JavaCore", ".", "IGNORE", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ENUM_IDENTIFIER", ",", "JavaCore", ".", "IGNORE", ")", ";", "break", ";", "case", "ClassFileConstants", ".", "MAJOR_VERSION_1_4", ":", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ",", "JavaCore", ".", "VERSION_1_4", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_SOURCE", ",", "JavaCore", ".", "VERSION_1_3", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_TARGET_PLATFORM", ",", "JavaCore", ".", "VERSION_1_2", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ASSERT_IDENTIFIER", ",", "JavaCore", ".", "WARNING", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ENUM_IDENTIFIER", ",", "JavaCore", ".", "WARNING", ")", ";", "break", ";", "case", "ClassFileConstants", ".", "MAJOR_VERSION_1_5", ":", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ",", "JavaCore", ".", "VERSION_1_5", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_SOURCE", ",", "JavaCore", ".", "VERSION_1_5", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_TARGET_PLATFORM", ",", "JavaCore", ".", "VERSION_1_5", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ASSERT_IDENTIFIER", ",", "JavaCore", ".", "ERROR", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ENUM_IDENTIFIER", ",", "JavaCore", ".", "ERROR", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_INLINE_JSR_BYTECODE", ",", "JavaCore", ".", "ENABLED", ")", ";", "break", ";", "case", "ClassFileConstants", ".", "MAJOR_VERSION_1_6", ":", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ",", "JavaCore", ".", "VERSION_1_6", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_SOURCE", ",", "JavaCore", ".", "VERSION_1_6", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_TARGET_PLATFORM", ",", "JavaCore", ".", "VERSION_1_6", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ASSERT_IDENTIFIER", ",", "JavaCore", ".", "ERROR", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ENUM_IDENTIFIER", ",", "JavaCore", ".", "ERROR", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_INLINE_JSR_BYTECODE", ",", "JavaCore", ".", "ENABLED", ")", ";", "break", ";", "case", "ClassFileConstants", ".", "MAJOR_VERSION_1_7", ":", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ",", "JavaCore", ".", "VERSION_1_7", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_SOURCE", ",", "JavaCore", ".", "VERSION_1_7", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_TARGET_PLATFORM", ",", "JavaCore", ".", "VERSION_1_7", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ASSERT_IDENTIFIER", ",", "JavaCore", ".", "ERROR", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_PB_ENUM_IDENTIFIER", ",", "JavaCore", ".", "ERROR", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "COMPILER_CODEGEN_INLINE_JSR_BYTECODE", ",", "JavaCore", ".", "ENABLED", ")", ";", "}", "}", "public", "static", "void", "setOptions", "(", "Hashtable", "newOptions", ")", "{", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "setOptions", "(", "newOptions", ")", ";", "}", "public", "void", "stop", "(", "BundleContext", "context", ")", "throws", "Exception", "{", "try", "{", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "shutdown", "(", ")", ";", "}", "finally", "{", "super", ".", "stop", "(", "context", ")", ";", "}", "}", "public", "void", "start", "(", "BundleContext", "context", ")", "throws", "Exception", "{", "super", ".", "start", "(", "context", ")", ";", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "startup", "(", ")", ";", "}", "}", "</s>" ]
5,134
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IMarker", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResource", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "IWorkingCopy", "{", "void", "commit", "(", "boolean", "force", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "destroy", "(", ")", ";", "IJavaElement", "findSharedWorkingCopy", "(", "IBufferFactory", "bufferFactory", ")", ";", "IJavaElement", "getOriginal", "(", "IJavaElement", "workingCopyElement", ")", ";", "IJavaElement", "getOriginalElement", "(", ")", ";", "IJavaElement", "[", "]", "findElements", "(", "IJavaElement", "element", ")", ";", "IType", "findPrimaryType", "(", ")", ";", "IJavaElement", "getSharedWorkingCopy", "(", "IProgressMonitor", "monitor", ",", "IBufferFactory", "factory", ",", "IProblemRequestor", "problemRequestor", ")", "throws", "JavaModelException", ";", "IJavaElement", "getWorkingCopy", "(", ")", "throws", "JavaModelException", ";", "IJavaElement", "getWorkingCopy", "(", "IProgressMonitor", "monitor", ",", "IBufferFactory", "factory", ",", "IProblemRequestor", "problemRequestor", ")", "throws", "JavaModelException", ";", "boolean", "isBasedOn", "(", "IResource", "resource", ")", ";", "boolean", "isWorkingCopy", "(", ")", ";", "IMarker", "[", "]", "reconcile", "(", ")", "throws", "JavaModelException", ";", "void", "reconcile", "(", "boolean", "forceProblemDetection", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "restore", "(", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,135
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IInitializer", "extends", "IMember", "{", "}", "</s>" ]
5,136
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "java", ".", "io", ".", "PrintStream", ";", "import", "java", ".", "io", ".", "PrintWriter", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "CoreException", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IStatus", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "JavaModelStatus", ";", "public", "class", "JavaModelException", "extends", "CoreException", "{", "private", "static", "final", "long", "serialVersionUID", "=", "-", "760398656505871287L", ";", "CoreException", "nestedCoreException", ";", "public", "JavaModelException", "(", "Throwable", "e", ",", "int", "code", ")", "{", "this", "(", "new", "JavaModelStatus", "(", "code", ",", "e", ")", ")", ";", "}", "public", "JavaModelException", "(", "CoreException", "exception", ")", "{", "super", "(", "exception", ".", "getStatus", "(", ")", ")", ";", "this", ".", "nestedCoreException", "=", "exception", ";", "}", "public", "JavaModelException", "(", "IJavaModelStatus", "status", ")", "{", "super", "(", "status", ")", ";", "}", "public", "Throwable", "getException", "(", ")", "{", "if", "(", "this", ".", "nestedCoreException", "==", "null", ")", "{", "return", "getStatus", "(", ")", ".", "getException", "(", ")", ";", "}", "else", "{", "return", "this", ".", "nestedCoreException", ";", "}", "}", "public", "IJavaModelStatus", "getJavaModelStatus", "(", ")", "{", "IStatus", "status", "=", "getStatus", "(", ")", ";", "if", "(", "status", "instanceof", "IJavaModelStatus", ")", "{", "return", "(", "IJavaModelStatus", ")", "status", ";", "}", "else", "{", "return", "new", "JavaModelStatus", "(", "this", ".", "nestedCoreException", ")", ";", "}", "}", "public", "boolean", "isDoesNotExist", "(", ")", "{", "IJavaModelStatus", "javaModelStatus", "=", "getJavaModelStatus", "(", ")", ";", "return", "javaModelStatus", "!=", "null", "&&", "javaModelStatus", ".", "isDoesNotExist", "(", ")", ";", "}", "public", "void", "printStackTrace", "(", "PrintStream", "output", ")", "{", "synchronized", "(", "output", ")", "{", "super", ".", "printStackTrace", "(", "output", ")", ";", "Throwable", "throwable", "=", "getException", "(", ")", ";", "if", "(", "throwable", "!=", "null", ")", "{", "output", ".", "print", "(", "\"Caused", "by:", "\"", ")", ";", "throwable", ".", "printStackTrace", "(", "output", ")", ";", "}", "}", "}", "public", "void", "printStackTrace", "(", "PrintWriter", "output", ")", "{", "synchronized", "(", "output", ")", "{", "super", ".", "printStackTrace", "(", "output", ")", ";", "Throwable", "throwable", "=", "getException", "(", ")", ";", "if", "(", "throwable", "!=", "null", ")", "{", "output", ".", "print", "(", "\"Caused", "by:", "\"", ")", ";", "throwable", ".", "printStackTrace", "(", "output", ")", ";", "}", "}", "}", "public", "String", "toString", "(", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "\"\"", ")", ";", "if", "(", "getException", "(", ")", "!=", "null", ")", "{", "if", "(", "getException", "(", ")", "instanceof", "CoreException", ")", "{", "CoreException", "c", "=", "(", "CoreException", ")", "getException", "(", ")", ";", "buffer", ".", "append", "(", "\"\"", ")", ";", "buffer", ".", "append", "(", "c", ".", "getStatus", "(", ")", ".", "getCode", "(", ")", ")", ";", "buffer", ".", "append", "(", "\"]", "\"", ")", ";", "buffer", ".", "append", "(", "c", ".", "getStatus", "(", ")", ".", "getMessage", "(", ")", ")", ";", "}", "else", "{", "buffer", ".", "append", "(", "getException", "(", ")", ".", "toString", "(", ")", ")", ";", "}", "}", "else", "{", "buffer", ".", "append", "(", "getStatus", "(", ")", ".", "toString", "(", ")", ")", ";", "}", "return", "buffer", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
5,137
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResource", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IAdaptable", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "jobs", ".", "ISchedulingRule", ";", "public", "interface", "IJavaElement", "extends", "IAdaptable", "{", "int", "JAVA_MODEL", "=", "1", ";", "int", "JAVA_PROJECT", "=", "2", ";", "int", "PACKAGE_FRAGMENT_ROOT", "=", "3", ";", "int", "PACKAGE_FRAGMENT", "=", "4", ";", "int", "COMPILATION_UNIT", "=", "5", ";", "int", "CLASS_FILE", "=", "6", ";", "int", "TYPE", "=", "7", ";", "int", "FIELD", "=", "8", ";", "int", "METHOD", "=", "9", ";", "int", "INITIALIZER", "=", "10", ";", "int", "PACKAGE_DECLARATION", "=", "11", ";", "int", "IMPORT_CONTAINER", "=", "12", ";", "int", "IMPORT_DECLARATION", "=", "13", ";", "int", "LOCAL_VARIABLE", "=", "14", ";", "int", "TYPE_PARAMETER", "=", "15", ";", "int", "ANNOTATION", "=", "16", ";", "boolean", "exists", "(", ")", ";", "IJavaElement", "getAncestor", "(", "int", "ancestorType", ")", ";", "String", "getAttachedJavadoc", "(", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IResource", "getCorrespondingResource", "(", ")", "throws", "JavaModelException", ";", "String", "getElementName", "(", ")", ";", "int", "getElementType", "(", ")", ";", "String", "getHandleIdentifier", "(", ")", ";", "IJavaModel", "getJavaModel", "(", ")", ";", "IJavaProject", "getJavaProject", "(", ")", ";", "IOpenable", "getOpenable", "(", ")", ";", "IJavaElement", "getParent", "(", ")", ";", "IPath", "getPath", "(", ")", ";", "IJavaElement", "getPrimaryElement", "(", ")", ";", "IResource", "getResource", "(", ")", ";", "ISchedulingRule", "getSchedulingRule", "(", ")", ";", "IResource", "getUnderlyingResource", "(", ")", "throws", "JavaModelException", ";", "boolean", "isReadOnly", "(", ")", ";", "boolean", "isStructureKnown", "(", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,138
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ";", "public", "interface", "ITerminalSymbols", "{", "int", "TokenNameWHITESPACE", "=", "1000", ";", "int", "TokenNameCOMMENT_LINE", "=", "1001", ";", "int", "TokenNameCOMMENT_BLOCK", "=", "1002", ";", "int", "TokenNameCOMMENT_JAVADOC", "=", "1003", ";", "int", "TokenNameIdentifier", "=", "5", ";", "int", "TokenNameabstract", "=", "98", ";", "int", "TokenNameassert", "=", "118", ";", "int", "TokenNameboolean", "=", "18", ";", "int", "TokenNamebreak", "=", "119", ";", "int", "TokenNamebyte", "=", "19", ";", "int", "TokenNamecase", "=", "211", ";", "int", "TokenNamecatch", "=", "225", ";", "int", "TokenNamechar", "=", "20", ";", "int", "TokenNameclass", "=", "165", ";", "int", "TokenNamecontinue", "=", "120", ";", "int", "TokenNamedefault", "=", "212", ";", "int", "TokenNamedo", "=", "121", ";", "int", "TokenNamedouble", "=", "21", ";", "int", "TokenNameelse", "=", "213", ";", "int", "TokenNameextends", "=", "243", ";", "int", "TokenNamefalse", "=", "37", ";", "int", "TokenNamefinal", "=", "99", ";", "int", "TokenNamefinally", "=", "226", ";", "int", "TokenNamefloat", "=", "22", ";", "int", "TokenNamefor", "=", "122", ";", "int", "TokenNameif", "=", "123", ";", "int", "TokenNameimplements", "=", "268", ";", "int", "TokenNameimport", "=", "191", ";", "int", "TokenNameinstanceof", "=", "65", ";", "int", "TokenNameint", "=", "23", ";", "int", "TokenNameinterface", "=", "180", ";", "int", "TokenNamelong", "=", "24", ";", "int", "TokenNamenative", "=", "100", ";", "int", "TokenNamenew", "=", "32", ";", "int", "TokenNamenull", "=", "38", ";", "int", "TokenNamepackage", "=", "214", ";", "int", "TokenNameprivate", "=", "101", ";", "int", "TokenNameprotected", "=", "102", ";", "int", "TokenNamepublic", "=", "103", ";", "int", "TokenNamereturn", "=", "124", ";", "int", "TokenNameshort", "=", "25", ";", "int", "TokenNamestatic", "=", "94", ";", "int", "TokenNamestrictfp", "=", "104", ";", "int", "TokenNamesuper", "=", "33", ";", "int", "TokenNameswitch", "=", "125", ";", "int", "TokenNamesynchronized", "=", "85", ";", "int", "TokenNamethis", "=", "34", ";", "int", "TokenNamethrow", "=", "126", ";", "int", "TokenNamethrows", "=", "227", ";", "int", "TokenNametransient", "=", "105", ";", "int", "TokenNametrue", "=", "39", ";", "int", "TokenNametry", "=", "127", ";", "int", "TokenNamevoid", "=", "26", ";", "int", "TokenNamevolatile", "=", "106", ";", "int", "TokenNamewhile", "=", "117", ";", "int", "TokenNameIntegerLiteral", "=", "40", ";", "int", "TokenNameLongLiteral", "=", "41", ";", "int", "TokenNameFloatingPointLiteral", "=", "42", ";", "int", "TokenNameDoubleLiteral", "=", "43", ";", "int", "TokenNameCharacterLiteral", "=", "44", ";", "int", "TokenNameStringLiteral", "=", "45", ";", "int", "TokenNamePLUS_PLUS", "=", "1", ";", "int", "TokenNameMINUS_MINUS", "=", "2", ";", "int", "TokenNameEQUAL_EQUAL", "=", "35", ";", "int", "TokenNameLESS_EQUAL", "=", "66", ";", "int", "TokenNameGREATER_EQUAL", "=", "67", ";", "int", "TokenNameNOT_EQUAL", "=", "36", ";", "int", "TokenNameLEFT_SHIFT", "=", "14", ";", "int", "TokenNameRIGHT_SHIFT", "=", "11", ";", "int", "TokenNameUNSIGNED_RIGHT_SHIFT", "=", "12", ";", "int", "TokenNamePLUS_EQUAL", "=", "168", ";", "int", "TokenNameMINUS_EQUAL", "=", "169", ";", "int", "TokenNameMULTIPLY_EQUAL", "=", "170", ";", "int", "TokenNameDIVIDE_EQUAL", "=", "171", ";", "int", "TokenNameAND_EQUAL", "=", "172", ";", "int", "TokenNameOR_EQUAL", "=", "173", ";", "int", "TokenNameXOR_EQUAL", "=", "174", ";", "int", "TokenNameREMAINDER_EQUAL", "=", "175", ";", "int", "TokenNameLEFT_SHIFT_EQUAL", "=", "176", ";", "int", "TokenNameRIGHT_SHIFT_EQUAL", "=", "177", ";", "int", "TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL", "=", "178", ";", "int", "TokenNameOR_OR", "=", "80", ";", "int", "TokenNameAND_AND", "=", "79", ";", "int", "TokenNamePLUS", "=", "3", ";", "int", "TokenNameMINUS", "=", "4", ";", "int", "TokenNameNOT", "=", "71", ";", "int", "TokenNameREMAINDER", "=", "9", ";", "int", "TokenNameXOR", "=", "63", ";", "int", "TokenNameAND", "=", "62", ";", "int", "TokenNameMULTIPLY", "=", "8", ";", "int", "TokenNameOR", "=", "70", ";", "int", "TokenNameTWIDDLE", "=", "72", ";", "int", "TokenNameDIVIDE", "=", "10", ";", "int", "TokenNameGREATER", "=", "68", ";", "int", "TokenNameLESS", "=", "69", ";", "int", "TokenNameLPAREN", "=", "7", ";", "int", "TokenNameRPAREN", "=", "86", ";", "int", "TokenNameLBRACE", "=", "110", ";", "int", "TokenNameRBRACE", "=", "95", ";", "int", "TokenNameLBRACKET", "=", "15", ";", "int", "TokenNameRBRACKET", "=", "166", ";", "int", "TokenNameSEMICOLON", "=", "64", ";", "int", "TokenNameQUESTION", "=", "81", ";", "int", "TokenNameCOLON", "=", "154", ";", "int", "TokenNameCOMMA", "=", "90", ";", "int", "TokenNameDOT", "=", "6", ";", "int", "TokenNameEQUAL", "=", "167", ";", "int", "TokenNameEOF", "=", "158", ";", "int", "TokenNameERROR", "=", "309", ";", "int", "TokenNameenum", "=", "400", ";", "int", "TokenNameAT", "=", "401", ";", "int", "TokenNameELLIPSIS", "=", "402", ";", "int", "TokenNameconst", "=", "403", ";", "int", "TokenNamegoto", "=", "404", ";", "}", "</s>" ]
5,139
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaProject", ";", "public", "abstract", "class", "CompilationParticipant", "{", "public", "final", "static", "int", "READY_FOR_BUILD", "=", "1", ";", "public", "final", "static", "int", "NEEDS_FULL_BUILD", "=", "2", ";", "public", "int", "aboutToBuild", "(", "IJavaProject", "project", ")", "{", "return", "READY_FOR_BUILD", ";", "}", "public", "void", "buildFinished", "(", "IJavaProject", "project", ")", "{", "}", "public", "void", "buildStarting", "(", "BuildContext", "[", "]", "files", ",", "boolean", "isBatch", ")", "{", "}", "public", "void", "cleanStarting", "(", "IJavaProject", "project", ")", "{", "}", "public", "boolean", "isActive", "(", "IJavaProject", "project", ")", "{", "return", "false", ";", "}", "public", "boolean", "isAnnotationProcessor", "(", ")", "{", "return", "false", ";", "}", "public", "void", "processAnnotations", "(", "BuildContext", "[", "]", "files", ")", "{", "}", "public", "void", "reconcile", "(", "ReconcileContext", "context", ")", "{", "}", "}", "</s>" ]
5,140
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElementDelta", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaModelMarker", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "AST", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "ASTParser", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "CompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "JavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "ReconcileWorkingCopyOperation", ";", "public", "class", "ReconcileContext", "{", "private", "ReconcileWorkingCopyOperation", "operation", ";", "private", "CompilationUnit", "workingCopy", ";", "public", "ReconcileContext", "(", "ReconcileWorkingCopyOperation", "operation", ",", "CompilationUnit", "workingCopy", ")", "{", "this", ".", "operation", "=", "operation", ";", "this", ".", "workingCopy", "=", "workingCopy", ";", "}", "public", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "CompilationUnit", "getAST3", "(", ")", "throws", "JavaModelException", "{", "if", "(", "this", ".", "operation", ".", "astLevel", "!=", "AST", ".", "JLS3", "||", "!", "this", ".", "operation", ".", "resolveBindings", ")", "{", "ASTParser", "parser", "=", "ASTParser", ".", "newParser", "(", "AST", ".", "JLS3", ")", ";", "parser", ".", "setCompilerOptions", "(", "this", ".", "workingCopy", ".", "getJavaProject", "(", ")", ".", "getOptions", "(", "true", ")", ")", ";", "if", "(", "JavaProject", ".", "hasJavaNature", "(", "this", ".", "workingCopy", ".", "getJavaProject", "(", ")", ".", "getProject", "(", ")", ")", ")", "parser", ".", "setResolveBindings", "(", "true", ")", ";", "parser", ".", "setStatementsRecovery", "(", "(", "this", ".", "operation", ".", "reconcileFlags", "&", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ")", "!=", "0", ")", ";", "parser", ".", "setBindingsRecovery", "(", "(", "this", ".", "operation", ".", "reconcileFlags", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ")", ";", "parser", ".", "setSource", "(", "this", ".", "workingCopy", ")", ";", "parser", ".", "setIgnoreMethodBodies", "(", "(", "this", ".", "operation", ".", "reconcileFlags", "&", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ")", ";", "return", "(", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "CompilationUnit", ")", "parser", ".", "createAST", "(", "this", ".", "operation", ".", "progressMonitor", ")", ";", "}", "return", "this", ".", "operation", ".", "makeConsistent", "(", "this", ".", "workingCopy", ")", ";", "}", "public", "int", "getASTLevel", "(", ")", "{", "return", "this", ".", "operation", ".", "astLevel", ";", "}", "public", "boolean", "isResolvingBindings", "(", ")", "{", "return", "this", ".", "operation", ".", "resolveBindings", ";", "}", "public", "int", "getReconcileFlags", "(", ")", "{", "return", "this", ".", "operation", ".", "reconcileFlags", ";", "}", "public", "IJavaElementDelta", "getDelta", "(", ")", "{", "return", "this", ".", "operation", ".", "deltaBuilder", ".", "delta", ";", "}", "public", "CategorizedProblem", "[", "]", "getProblems", "(", "String", "markerType", ")", "{", "if", "(", "this", ".", "operation", ".", "problems", "==", "null", ")", "return", "null", ";", "return", "(", "CategorizedProblem", "[", "]", ")", "this", ".", "operation", ".", "problems", ".", "get", "(", "markerType", ")", ";", "}", "public", "ICompilationUnit", "getWorkingCopy", "(", ")", "{", "return", "this", ".", "workingCopy", ";", "}", "public", "void", "resetAST", "(", ")", "{", "this", ".", "operation", ".", "ast", "=", "null", ";", "putProblems", "(", "IJavaModelMarker", ".", "JAVA_MODEL_PROBLEM_MARKER", ",", "null", ")", ";", "putProblems", "(", "IJavaModelMarker", ".", "TASK_MARKER", ",", "null", ")", ";", "}", "public", "void", "putProblems", "(", "String", "markerType", ",", "CategorizedProblem", "[", "]", "problems", ")", "{", "if", "(", "this", ".", "operation", ".", "problems", "==", "null", ")", "this", ".", "operation", ".", "problems", "=", "new", "HashMap", "(", ")", ";", "this", ".", "operation", ".", "problems", ".", "put", "(", "markerType", ",", "problems", ")", ";", "}", "}", "</s>" ]
5,141
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "public", "interface", "IScanner", "{", "char", "[", "]", "getCurrentTokenSource", "(", ")", ";", "char", "[", "]", "getRawTokenSource", "(", ")", ";", "int", "getCurrentTokenStartPosition", "(", ")", ";", "int", "getCurrentTokenEndPosition", "(", ")", ";", "int", "getLineStart", "(", "int", "lineNumber", ")", ";", "int", "getLineEnd", "(", "int", "lineNumber", ")", ";", "int", "[", "]", "getLineEnds", "(", ")", ";", "int", "getLineNumber", "(", "int", "charPosition", ")", ";", "int", "getNextToken", "(", ")", "throws", "InvalidInputException", ";", "char", "[", "]", "getSource", "(", ")", ";", "void", "resetTo", "(", "int", "startPosition", ",", "int", "endPosition", ")", ";", "void", "setSource", "(", "char", "[", "]", "source", ")", ";", "}", "</s>" ]
5,142
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IFile", ";", "public", "class", "BuildContext", "{", "public", "char", "[", "]", "getContents", "(", ")", "{", "return", "null", ";", "}", "public", "IFile", "getFile", "(", ")", "{", "return", "null", ";", "}", "public", "boolean", "hasAnnotations", "(", ")", "{", "return", "false", ";", "}", "public", "void", "recordAddedGeneratedFiles", "(", "IFile", "[", "]", "addedGeneratedFiles", ")", "{", "}", "public", "void", "recordDeletedGeneratedFiles", "(", "IFile", "[", "]", "deletedGeneratedFiles", ")", "{", "}", "public", "void", "recordDependencies", "(", "String", "[", "]", "typeNameDependencies", ")", "{", "}", "public", "void", "recordNewProblems", "(", "CategorizedProblem", "[", "]", "newProblems", ")", "{", "}", "}", "</s>" ]
5,143
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IParent", "{", "IJavaElement", "[", "]", "getChildren", "(", ")", "throws", "JavaModelException", ";", "boolean", "hasChildren", "(", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,144
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMField", "extends", "IDOMMember", "{", "public", "String", "getInitializer", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "String", "getType", "(", ")", ";", "public", "void", "setInitializer", "(", "String", "initializer", ")", ";", "public", "void", "setName", "(", "String", "name", ")", "throws", "IllegalArgumentException", ";", "public", "void", "setType", "(", "String", "typeName", ")", "throws", "IllegalArgumentException", ";", "}", "</s>" ]
5,145
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMPackage", "extends", "IDOMNode", "{", "public", "String", "getName", "(", ")", ";", "public", "void", "setName", "(", "String", "name", ")", ";", "}", "</s>" ]
5,146
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMFactory", "{", "public", "IDOMCompilationUnit", "createCompilationUnit", "(", ")", ";", "public", "IDOMCompilationUnit", "createCompilationUnit", "(", "char", "[", "]", "sourceCode", ",", "String", "name", ")", ";", "public", "IDOMCompilationUnit", "createCompilationUnit", "(", "String", "sourceCode", ",", "String", "name", ")", ";", "public", "IDOMField", "createField", "(", ")", ";", "public", "IDOMField", "createField", "(", "String", "sourceCode", ")", ";", "public", "IDOMImport", "createImport", "(", ")", ";", "public", "IDOMImport", "createImport", "(", "String", "sourceCode", ")", ";", "public", "IDOMInitializer", "createInitializer", "(", ")", ";", "public", "IDOMInitializer", "createInitializer", "(", "String", "sourceCode", ")", ";", "public", "IDOMMethod", "createMethod", "(", ")", ";", "public", "IDOMMethod", "createMethod", "(", "String", "sourceCode", ")", ";", "public", "IDOMPackage", "createPackage", "(", ")", ";", "public", "IDOMPackage", "createPackage", "(", "String", "sourceCode", ")", ";", "public", "IDOMType", "createType", "(", ")", ";", "public", "IDOMType", "createClass", "(", ")", ";", "public", "IDOMType", "createInterface", "(", ")", ";", "public", "IDOMType", "createType", "(", "String", "sourceCode", ")", ";", "}", "</s>" ]
5,147
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMMethod", "extends", "IDOMMember", "{", "public", "void", "addException", "(", "String", "exceptionType", ")", "throws", "IllegalArgumentException", ";", "public", "void", "addParameter", "(", "String", "type", ",", "String", "name", ")", "throws", "IllegalArgumentException", ";", "public", "String", "getBody", "(", ")", ";", "public", "void", "setDefault", "(", "String", "defaultValue", ")", ";", "public", "String", "getDefault", "(", ")", ";", "public", "String", "[", "]", "getExceptions", "(", ")", ";", "String", "[", "]", "getTypeParameters", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "String", "[", "]", "getParameterNames", "(", ")", ";", "public", "String", "[", "]", "getParameterTypes", "(", ")", ";", "public", "String", "getReturnType", "(", ")", ";", "public", "boolean", "isConstructor", "(", ")", ";", "public", "void", "setBody", "(", "String", "body", ")", ";", "public", "void", "setConstructor", "(", "boolean", "b", ")", ";", "public", "void", "setExceptions", "(", "String", "[", "]", "exceptionTypes", ")", ";", "void", "setTypeParameters", "(", "String", "[", "]", "typeParameters", ")", ";", "public", "void", "setName", "(", "String", "name", ")", "throws", "IllegalArgumentException", ";", "public", "void", "setParameters", "(", "String", "[", "]", "types", ",", "String", "[", "]", "names", ")", "throws", "IllegalArgumentException", ";", "public", "void", "setReturnType", "(", "String", "type", ")", "throws", "IllegalArgumentException", ";", "}", "</s>" ]
5,148
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMType", "extends", "IDOMMember", "{", "public", "void", "addSuperInterface", "(", "String", "interfaceName", ")", "throws", "IllegalArgumentException", ";", "String", "[", "]", "getTypeParameters", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "String", "getSuperclass", "(", ")", ";", "public", "String", "[", "]", "getSuperInterfaces", "(", ")", ";", "public", "boolean", "isClass", "(", ")", ";", "boolean", "isEnum", "(", ")", ";", "boolean", "isAnnotation", "(", ")", ";", "public", "void", "setClass", "(", "boolean", "b", ")", ";", "public", "void", "setEnum", "(", "boolean", "b", ")", ";", "public", "void", "setAnnotation", "(", "boolean", "b", ")", ";", "void", "setTypeParameters", "(", "String", "[", "]", "typeParameters", ")", ";", "public", "void", "setName", "(", "String", "name", ")", "throws", "IllegalArgumentException", ";", "public", "void", "setSuperclass", "(", "String", "superclassName", ")", ";", "public", "void", "setSuperInterfaces", "(", "String", "[", "]", "interfaceNames", ")", ";", "}", "</s>" ]
5,149
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMMember", "extends", "IDOMNode", "{", "public", "String", "getComment", "(", ")", ";", "public", "int", "getFlags", "(", ")", ";", "public", "void", "setComment", "(", "String", "comment", ")", ";", "public", "void", "setFlags", "(", "int", "flags", ")", ";", "}", "</s>" ]
5,150
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "class", "DOMException", "extends", "RuntimeException", "{", "private", "static", "final", "long", "serialVersionUID", "=", "2536853590795032028L", ";", "public", "DOMException", "(", ")", "{", "}", "public", "DOMException", "(", "String", "message", ")", "{", "super", "(", "message", ")", ";", "}", "}", "</s>" ]
5,151
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "import", "java", ".", "util", ".", "Enumeration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "public", "interface", "IDOMNode", "extends", "Cloneable", "{", "public", "static", "int", "COMPILATION_UNIT", "=", "1", ";", "public", "static", "int", "PACKAGE", "=", "2", ";", "public", "static", "int", "IMPORT", "=", "3", ";", "public", "static", "int", "TYPE", "=", "4", ";", "public", "static", "int", "FIELD", "=", "5", ";", "public", "static", "int", "METHOD", "=", "6", ";", "public", "static", "int", "INITIALIZER", "=", "7", ";", "public", "void", "addChild", "(", "IDOMNode", "child", ")", "throws", "DOMException", ",", "IllegalArgumentException", ";", "public", "boolean", "canHaveChildren", "(", ")", ";", "public", "Object", "clone", "(", ")", ";", "public", "char", "[", "]", "getCharacters", "(", ")", ";", "public", "IDOMNode", "getChild", "(", "String", "name", ")", ";", "public", "Enumeration", "getChildren", "(", ")", ";", "public", "String", "getContents", "(", ")", ";", "public", "IDOMNode", "getFirstChild", "(", ")", ";", "public", "IJavaElement", "getJavaElement", "(", "IJavaElement", "parent", ")", "throws", "IllegalArgumentException", ";", "public", "String", "getName", "(", ")", ";", "public", "IDOMNode", "getNextNode", "(", ")", ";", "public", "int", "getNodeType", "(", ")", ";", "public", "IDOMNode", "getParent", "(", ")", ";", "public", "IDOMNode", "getPreviousNode", "(", ")", ";", "public", "void", "insertSibling", "(", "IDOMNode", "sibling", ")", "throws", "DOMException", ",", "IllegalArgumentException", ";", "public", "boolean", "isAllowableChild", "(", "IDOMNode", "node", ")", ";", "public", "boolean", "isSignatureEqual", "(", "IDOMNode", "node", ")", ";", "public", "void", "remove", "(", ")", ";", "public", "void", "setName", "(", "String", "name", ")", ";", "}", "</s>" ]
5,152
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMImport", "extends", "IDOMNode", "{", "public", "String", "getName", "(", ")", ";", "public", "boolean", "isOnDemand", "(", ")", ";", "int", "getFlags", "(", ")", ";", "void", "setFlags", "(", "int", "flags", ")", ";", "public", "void", "setName", "(", "String", "name", ")", ";", "}", "</s>" ]
5,153
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMInitializer", "extends", "IDOMMember", "{", "public", "String", "getBody", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "void", "setBody", "(", "String", "body", ")", ";", "public", "void", "setName", "(", "String", "name", ")", ";", "}", "</s>" ]
5,154
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "jdom", ".", "*", ";", "public", "class", "DOMFactory", "implements", "IDOMFactory", "{", "String", "lineSeparator", ";", "public", "DOMFactory", "(", ")", "{", "this", ".", "lineSeparator", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ".", "getLineSeparator", "(", "null", ",", "null", ")", ";", "}", "public", "IDOMCompilationUnit", "createCompilationUnit", "(", ")", "{", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createCompilationUnit", "(", ")", ";", "}", "public", "IDOMCompilationUnit", "createCompilationUnit", "(", "char", "[", "]", "sourceCode", ",", "String", "name", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "SimpleDOMBuilder", "(", ")", ")", ".", "createCompilationUnit", "(", "sourceCode", ",", "name", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "IDOMCompilationUnit", "createCompilationUnit", "(", "String", "sourceCode", ",", "String", "name", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "SimpleDOMBuilder", "(", ")", ")", ".", "createCompilationUnit", "(", "sourceCode", ".", "toCharArray", "(", ")", ",", "name", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "IDOMField", "createField", "(", ")", "{", "return", "createField", "(", "\"\"", "+", "this", ".", "lineSeparator", ")", ";", "}", "public", "IDOMField", "createField", "(", "String", "sourceCode", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createField", "(", "sourceCode", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "IDOMImport", "createImport", "(", ")", "{", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createImport", "(", ")", ";", "}", "public", "IDOMImport", "createImport", "(", "String", "sourceCode", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createImport", "(", "sourceCode", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "IDOMInitializer", "createInitializer", "(", ")", "{", "return", "createInitializer", "(", "\"static", "{}\"", "+", "this", ".", "lineSeparator", ")", ";", "}", "public", "IDOMInitializer", "createInitializer", "(", "String", "sourceCode", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createInitializer", "(", "sourceCode", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "IDOMMethod", "createMethod", "(", ")", "{", "return", "createMethod", "(", "\"\"", "+", "this", ".", "lineSeparator", "+", "\"}\"", "+", "this", ".", "lineSeparator", ")", ";", "}", "public", "IDOMMethod", "createMethod", "(", "String", "sourceCode", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createMethod", "(", "sourceCode", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "IDOMPackage", "createPackage", "(", ")", "{", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createPackage", "(", ")", ";", "}", "public", "IDOMPackage", "createPackage", "(", "String", "sourceCode", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createPackage", "(", "sourceCode", ".", "toCharArray", "(", ")", ")", ";", "}", "public", "IDOMType", "createType", "(", ")", "{", "return", "createType", "(", "\"\"", "+", "this", ".", "lineSeparator", "+", "\"}\"", "+", "this", ".", "lineSeparator", ")", ";", "}", "public", "IDOMType", "createClass", "(", ")", "{", "return", "createType", "(", "\"\"", "+", "this", ".", "lineSeparator", "+", "\"}\"", "+", "this", ".", "lineSeparator", ")", ";", "}", "public", "IDOMType", "createInterface", "(", ")", "{", "return", "createType", "(", "\"\"", "+", "this", ".", "lineSeparator", "+", "\"}\"", "+", "this", ".", "lineSeparator", ")", ";", "}", "public", "IDOMType", "createType", "(", "String", "sourceCode", ")", "{", "if", "(", "sourceCode", "==", "null", ")", "{", "return", "null", ";", "}", "return", "(", "new", "DOMBuilder", "(", ")", ")", ".", "createType", "(", "sourceCode", ".", "toCharArray", "(", ")", ")", ";", "}", "}", "</s>" ]
5,155
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "jdom", ";", "public", "interface", "IDOMCompilationUnit", "extends", "IDOMNode", "{", "public", "String", "getHeader", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "void", "setHeader", "(", "String", "comment", ")", ";", "public", "void", "setName", "(", "String", "name", ")", ";", "}", "</s>" ]
5,156
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "final", "class", "CompletionFlags", "{", "public", "static", "final", "int", "Default", "=", "0x0000", ";", "public", "static", "final", "int", "StaticImport", "=", "0x0001", ";", "private", "CompletionFlags", "(", ")", "{", "}", "public", "static", "boolean", "isStaticImport", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "StaticImport", ")", "!=", "0", ";", "}", "}", "</s>" ]
5,157
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "IPackageFragment", "extends", "IParent", ",", "IJavaElement", ",", "IOpenable", ",", "ISourceManipulation", "{", "public", "static", "final", "String", "DEFAULT_PACKAGE_NAME", "=", "\"\"", ";", "boolean", "containsJavaResources", "(", ")", "throws", "JavaModelException", ";", "ICompilationUnit", "createCompilationUnit", "(", "String", "name", ",", "String", "contents", ",", "boolean", "force", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IClassFile", "getClassFile", "(", "String", "name", ")", ";", "IClassFile", "[", "]", "getClassFiles", "(", ")", "throws", "JavaModelException", ";", "ICompilationUnit", "getCompilationUnit", "(", "String", "name", ")", ";", "ICompilationUnit", "[", "]", "getCompilationUnits", "(", ")", "throws", "JavaModelException", ";", "ICompilationUnit", "[", "]", "getCompilationUnits", "(", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "String", "getElementName", "(", ")", ";", "int", "getKind", "(", ")", "throws", "JavaModelException", ";", "Object", "[", "]", "getNonJavaResources", "(", ")", "throws", "JavaModelException", ";", "boolean", "hasSubpackages", "(", ")", "throws", "JavaModelException", ";", "boolean", "isDefaultPackage", "(", ")", ";", "}", "</s>" ]
5,158
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IProblem", ";", "public", "interface", "IProblemRequestor", "{", "void", "acceptProblem", "(", "IProblem", "problem", ")", ";", "void", "beginReporting", "(", ")", ";", "void", "endReporting", "(", ")", ";", "boolean", "isActive", "(", ")", ";", "}", "</s>" ]
5,159
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "public", "final", "class", "Flags", "{", "public", "static", "final", "int", "AccDefault", "=", "ClassFileConstants", ".", "AccDefault", ";", "public", "static", "final", "int", "AccPublic", "=", "ClassFileConstants", ".", "AccPublic", ";", "public", "static", "final", "int", "AccPrivate", "=", "ClassFileConstants", ".", "AccPrivate", ";", "public", "static", "final", "int", "AccProtected", "=", "ClassFileConstants", ".", "AccProtected", ";", "public", "static", "final", "int", "AccStatic", "=", "ClassFileConstants", ".", "AccStatic", ";", "public", "static", "final", "int", "AccFinal", "=", "ClassFileConstants", ".", "AccFinal", ";", "public", "static", "final", "int", "AccSynchronized", "=", "ClassFileConstants", ".", "AccSynchronized", ";", "public", "static", "final", "int", "AccVolatile", "=", "ClassFileConstants", ".", "AccVolatile", ";", "public", "static", "final", "int", "AccTransient", "=", "ClassFileConstants", ".", "AccTransient", ";", "public", "static", "final", "int", "AccNative", "=", "ClassFileConstants", ".", "AccNative", ";", "public", "static", "final", "int", "AccInterface", "=", "ClassFileConstants", ".", "AccInterface", ";", "public", "static", "final", "int", "AccAbstract", "=", "ClassFileConstants", ".", "AccAbstract", ";", "public", "static", "final", "int", "AccStrictfp", "=", "ClassFileConstants", ".", "AccStrictfp", ";", "public", "static", "final", "int", "AccSuper", "=", "ClassFileConstants", ".", "AccSuper", ";", "public", "static", "final", "int", "AccSynthetic", "=", "ClassFileConstants", ".", "AccSynthetic", ";", "public", "static", "final", "int", "AccDeprecated", "=", "ClassFileConstants", ".", "AccDeprecated", ";", "public", "static", "final", "int", "AccBridge", "=", "ClassFileConstants", ".", "AccBridge", ";", "public", "static", "final", "int", "AccVarargs", "=", "ClassFileConstants", ".", "AccVarargs", ";", "public", "static", "final", "int", "AccEnum", "=", "ClassFileConstants", ".", "AccEnum", ";", "public", "static", "final", "int", "AccAnnotation", "=", "ClassFileConstants", ".", "AccAnnotation", ";", "private", "Flags", "(", ")", "{", "}", "public", "static", "boolean", "isAbstract", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccAbstract", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isDeprecated", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccDeprecated", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isFinal", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccFinal", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isInterface", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccInterface", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isNative", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccNative", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isPackageDefault", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "(", "AccPublic", "|", "AccPrivate", "|", "AccProtected", ")", ")", "==", "0", ";", "}", "public", "static", "boolean", "isPrivate", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccPrivate", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isProtected", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccProtected", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isPublic", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccPublic", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isStatic", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccStatic", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isSuper", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccSuper", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isStrictfp", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccStrictfp", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isSynchronized", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccSynchronized", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isSynthetic", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccSynthetic", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isTransient", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccTransient", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isVolatile", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccVolatile", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isBridge", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccBridge", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isVarargs", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccVarargs", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isEnum", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccEnum", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isAnnotation", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "AccAnnotation", ")", "!=", "0", ";", "}", "public", "static", "String", "toString", "(", "int", "flags", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "if", "(", "isPublic", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"public", "\"", ")", ";", "if", "(", "isProtected", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"protected", "\"", ")", ";", "if", "(", "isPrivate", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"private", "\"", ")", ";", "if", "(", "isStatic", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"static", "\"", ")", ";", "if", "(", "isAbstract", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"abstract", "\"", ")", ";", "if", "(", "isFinal", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"final", "\"", ")", ";", "if", "(", "isNative", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"native", "\"", ")", ";", "if", "(", "isSynchronized", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"\"", ")", ";", "if", "(", "isTransient", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"transient", "\"", ")", ";", "if", "(", "isVolatile", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"volatile", "\"", ")", ";", "if", "(", "isStrictfp", "(", "flags", ")", ")", "sb", ".", "append", "(", "\"strictfp", "\"", ")", ";", "int", "len", "=", "sb", ".", "length", "(", ")", ";", "if", "(", "len", "==", "0", ")", "return", "\"\"", ";", "sb", ".", "setLength", "(", "len", "-", "1", ")", ";", "return", "sb", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
5,160
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "ISourceReference", "{", "boolean", "exists", "(", ")", ";", "String", "getSource", "(", ")", "throws", "JavaModelException", ";", "ISourceRange", "getSourceRange", "(", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,161
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "IPackageFragmentRoot", "extends", "IParent", ",", "IJavaElement", ",", "IOpenable", "{", "int", "K_SOURCE", "=", "1", ";", "int", "K_BINARY", "=", "2", ";", "String", "DEFAULT_PACKAGEROOT_PATH", "=", "\"\"", ";", "int", "NO_RESOURCE_MODIFICATION", "=", "1", ";", "int", "ORIGINATING_PROJECT_CLASSPATH", "=", "2", ";", "int", "OTHER_REFERRING_PROJECTS_CLASSPATH", "=", "4", ";", "int", "DESTINATION_PROJECT_CLASSPATH", "=", "8", ";", "int", "REPLACE", "=", "16", ";", "void", "attachSource", "(", "IPath", "sourcePath", ",", "IPath", "rootPath", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "copy", "(", "IPath", "destination", ",", "int", "updateResourceFlags", ",", "int", "updateModelFlags", ",", "IClasspathEntry", "sibling", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IPackageFragment", "createPackageFragment", "(", "String", "name", ",", "boolean", "force", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "delete", "(", "int", "updateResourceFlags", ",", "int", "updateModelFlags", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "int", "getKind", "(", ")", "throws", "JavaModelException", ";", "Object", "[", "]", "getNonJavaResources", "(", ")", "throws", "JavaModelException", ";", "IPackageFragment", "getPackageFragment", "(", "String", "packageName", ")", ";", "IClasspathEntry", "getRawClasspathEntry", "(", ")", "throws", "JavaModelException", ";", "IClasspathEntry", "getResolvedClasspathEntry", "(", ")", "throws", "JavaModelException", ";", "IPath", "getSourceAttachmentPath", "(", ")", "throws", "JavaModelException", ";", "IPath", "getSourceAttachmentRootPath", "(", ")", "throws", "JavaModelException", ";", "public", "boolean", "isArchive", "(", ")", ";", "boolean", "isExternal", "(", ")", ";", "void", "move", "(", "IPath", "destination", ",", "int", "updateResourceFlags", ",", "int", "updateModelFlags", ",", "IClasspathEntry", "sibling", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,162
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResourceDelta", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "CompilationUnit", ";", "public", "interface", "IJavaElementDelta", "{", "public", "int", "ADDED", "=", "1", ";", "public", "int", "REMOVED", "=", "2", ";", "public", "int", "CHANGED", "=", "4", ";", "public", "int", "F_CONTENT", "=", "0x000001", ";", "public", "int", "F_MODIFIERS", "=", "0x000002", ";", "public", "int", "F_CHILDREN", "=", "0x000008", ";", "public", "int", "F_MOVED_FROM", "=", "0x000010", ";", "public", "int", "F_MOVED_TO", "=", "0x000020", ";", "public", "int", "F_ADDED_TO_CLASSPATH", "=", "0x000040", ";", "public", "int", "F_REMOVED_FROM_CLASSPATH", "=", "0x000080", ";", "public", "int", "F_CLASSPATH_REORDER", "=", "0x000100", ";", "public", "int", "F_REORDER", "=", "0x000100", ";", "public", "int", "F_OPENED", "=", "0x000200", ";", "public", "int", "F_CLOSED", "=", "0x000400", ";", "public", "int", "F_SUPER_TYPES", "=", "0x000800", ";", "public", "int", "F_SOURCEATTACHED", "=", "0x001000", ";", "public", "int", "F_SOURCEDETACHED", "=", "0x002000", ";", "public", "int", "F_FINE_GRAINED", "=", "0x004000", ";", "public", "int", "F_ARCHIVE_CONTENT_CHANGED", "=", "0x008000", ";", "public", "int", "F_PRIMARY_WORKING_COPY", "=", "0x010000", ";", "public", "int", "F_CLASSPATH_CHANGED", "=", "0x020000", ";", "public", "int", "F_PRIMARY_RESOURCE", "=", "0x040000", ";", "public", "int", "F_AST_AFFECTED", "=", "0x080000", ";", "public", "int", "F_CATEGORIES", "=", "0x100000", ";", "public", "int", "F_RESOLVED_CLASSPATH_CHANGED", "=", "0x200000", ";", "public", "int", "F_ANNOTATIONS", "=", "0x400000", ";", "public", "IJavaElementDelta", "[", "]", "getAddedChildren", "(", ")", ";", "public", "IJavaElementDelta", "[", "]", "getAffectedChildren", "(", ")", ";", "public", "IJavaElementDelta", "[", "]", "getAnnotationDeltas", "(", ")", ";", "public", "CompilationUnit", "getCompilationUnitAST", "(", ")", ";", "public", "IJavaElementDelta", "[", "]", "getChangedChildren", "(", ")", ";", "public", "IJavaElement", "getElement", "(", ")", ";", "public", "int", "getFlags", "(", ")", ";", "public", "int", "getKind", "(", ")", ";", "public", "IJavaElement", "getMovedFromElement", "(", ")", ";", "public", "IJavaElement", "getMovedToElement", "(", ")", ";", "public", "IJavaElementDelta", "[", "]", "getRemovedChildren", "(", ")", ";", "public", "IResourceDelta", "[", "]", "getResourceDeltas", "(", ")", ";", "}", "</s>" ]
5,163
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "codeassist", ".", "InternalCompletionProposal", ";", "public", "class", "CompletionProposal", "{", "public", "static", "final", "int", "ANONYMOUS_CLASS_DECLARATION", "=", "1", ";", "public", "static", "final", "int", "FIELD_REF", "=", "2", ";", "public", "static", "final", "int", "KEYWORD", "=", "3", ";", "public", "static", "final", "int", "LABEL_REF", "=", "4", ";", "public", "static", "final", "int", "LOCAL_VARIABLE_REF", "=", "5", ";", "public", "static", "final", "int", "METHOD_REF", "=", "6", ";", "public", "static", "final", "int", "METHOD_DECLARATION", "=", "7", ";", "public", "static", "final", "int", "PACKAGE_REF", "=", "8", ";", "public", "static", "final", "int", "TYPE_REF", "=", "9", ";", "public", "static", "final", "int", "VARIABLE_DECLARATION", "=", "10", ";", "public", "static", "final", "int", "POTENTIAL_METHOD_DECLARATION", "=", "11", ";", "public", "static", "final", "int", "METHOD_NAME_REFERENCE", "=", "12", ";", "public", "static", "final", "int", "ANNOTATION_ATTRIBUTE_REF", "=", "13", ";", "public", "static", "final", "int", "JAVADOC_FIELD_REF", "=", "14", ";", "public", "static", "final", "int", "JAVADOC_METHOD_REF", "=", "15", ";", "public", "static", "final", "int", "JAVADOC_TYPE_REF", "=", "16", ";", "public", "static", "final", "int", "JAVADOC_VALUE_REF", "=", "17", ";", "public", "static", "final", "int", "JAVADOC_PARAM_REF", "=", "18", ";", "public", "static", "final", "int", "JAVADOC_BLOCK_TAG", "=", "19", ";", "public", "static", "final", "int", "JAVADOC_INLINE_TAG", "=", "20", ";", "public", "static", "final", "int", "FIELD_IMPORT", "=", "21", ";", "public", "static", "final", "int", "METHOD_IMPORT", "=", "22", ";", "public", "static", "final", "int", "TYPE_IMPORT", "=", "23", ";", "public", "static", "final", "int", "METHOD_REF_WITH_CASTED_RECEIVER", "=", "24", ";", "public", "static", "final", "int", "FIELD_REF_WITH_CASTED_RECEIVER", "=", "25", ";", "public", "static", "final", "int", "CONSTRUCTOR_INVOCATION", "=", "26", ";", "public", "static", "final", "int", "ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION", "=", "27", ";", "protected", "static", "final", "int", "FIRST_KIND", "=", "ANONYMOUS_CLASS_DECLARATION", ";", "protected", "static", "final", "int", "LAST_KIND", "=", "ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION", ";", "public", "static", "CompletionProposal", "create", "(", "int", "kind", ",", "int", "completionOffset", ")", "{", "return", "new", "InternalCompletionProposal", "(", "kind", ",", "completionOffset", ")", ";", "}", "public", "int", "getAdditionalFlags", "(", ")", "{", "return", "-", "1", ";", "}", "public", "void", "setAdditionalFlags", "(", "int", "additionalFlags", ")", "{", "}", "public", "int", "getKind", "(", ")", "{", "return", "-", "1", ";", "}", "public", "int", "getCompletionLocation", "(", ")", "{", "return", "-", "1", ";", "}", "public", "int", "getTokenStart", "(", ")", "{", "return", "-", "1", ";", "}", "public", "int", "getTokenEnd", "(", ")", "{", "return", "-", "1", ";", "}", "public", "void", "setTokenRange", "(", "int", "startIndex", ",", "int", "endIndex", ")", "{", "}", "public", "char", "[", "]", "getCompletion", "(", ")", "{", "return", "null", ";", "}", "public", "void", "setCompletion", "(", "char", "[", "]", "completion", ")", "{", "}", "public", "int", "getReplaceStart", "(", ")", "{", "return", "-", "1", ";", "}", "public", "int", "getReplaceEnd", "(", ")", "{", "return", "-", "1", ";", "}", "public", "void", "setReplaceRange", "(", "int", "startIndex", ",", "int", "endIndex", ")", "{", "}", "public", "int", "getRelevance", "(", ")", "{", "return", "-", "1", ";", "}", "public", "void", "setRelevance", "(", "int", "rating", ")", "{", "}", "public", "char", "[", "]", "getDeclarationSignature", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getDeclarationKey", "(", ")", "{", "return", "null", ";", "}", "public", "void", "setDeclarationSignature", "(", "char", "[", "]", "signature", ")", "{", "}", "public", "void", "setDeclarationKey", "(", "char", "[", "]", "key", ")", "{", "}", "public", "char", "[", "]", "getName", "(", ")", "{", "return", "null", ";", "}", "public", "void", "setName", "(", "char", "[", "]", "name", ")", "{", "}", "public", "char", "[", "]", "getSignature", "(", ")", "{", "return", "null", ";", "}", "public", "char", "[", "]", "getKey", "(", ")", "{", "return", "null", ";", "}", "public", "void", "setSignature", "(", "char", "[", "]", "signature", ")", "{", "}", "public", "void", "setKey", "(", "char", "[", "]", "key", ")", "{", "}", "public", "int", "getFlags", "(", ")", "{", "return", "-", "1", ";", "}", "public", "void", "setFlags", "(", "int", "flags", ")", "{", "}", "public", "CompletionProposal", "[", "]", "getRequiredProposals", "(", ")", "{", "return", "null", ";", "}", "public", "void", "setRequiredProposals", "(", "CompletionProposal", "[", "]", "proposals", ")", "{", "}", "public", "char", "[", "]", "[", "]", "findParameterNames", "(", "IProgressMonitor", "monitor", ")", "{", "return", "null", ";", "}", "public", "void", "setParameterNames", "(", "char", "[", "]", "[", "]", "parameterNames", ")", "{", "}", "public", "int", "getAccessibility", "(", ")", "{", "return", "-", "1", ";", "}", "public", "boolean", "isConstructor", "(", ")", "{", "return", "false", ";", "}", "public", "char", "[", "]", "getReceiverSignature", "(", ")", "{", "return", "null", ";", "}", "public", "int", "getReceiverStart", "(", ")", "{", "return", "-", "1", ";", "}", "public", "int", "getReceiverEnd", "(", ")", "{", "return", "-", "1", ";", "}", "public", "void", "setReceiverSignature", "(", "char", "[", "]", "signature", ")", "{", "}", "public", "void", "setReceiverRange", "(", "int", "startIndex", ",", "int", "endIndex", ")", "{", "}", "}", "</s>" ]
5,164
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "codehaus", ".", "jdt", ".", "groovy", ".", "integration", ".", "LanguageSupportFactory", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "BufferManager", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "CompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "DefaultWorkingCopyOwner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "ExternalJavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "PackageFragment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "PackageFragmentRoot", ";", "public", "abstract", "class", "WorkingCopyOwner", "{", "public", "static", "void", "setPrimaryBufferProvider", "(", "WorkingCopyOwner", "primaryBufferProvider", ")", "{", "DefaultWorkingCopyOwner", ".", "PRIMARY", ".", "primaryBufferProvider", "=", "primaryBufferProvider", ";", "}", "public", "IBuffer", "createBuffer", "(", "ICompilationUnit", "workingCopy", ")", "{", "return", "BufferManager", ".", "createBuffer", "(", "workingCopy", ")", ";", "}", "public", "IProblemRequestor", "getProblemRequestor", "(", "ICompilationUnit", "workingCopy", ")", "{", "return", "null", ";", "}", "public", "String", "findSource", "(", "String", "typeName", ",", "String", "packageName", ")", "{", "return", "null", ";", "}", "public", "boolean", "isPackage", "(", "String", "[", "]", "pkg", ")", "{", "return", "false", ";", "}", "public", "final", "ICompilationUnit", "newWorkingCopy", "(", "String", "name", ",", "IClasspathEntry", "[", "]", "classpath", ",", "IProblemRequestor", "problemRequestor", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", "{", "ExternalJavaProject", "project", "=", "new", "ExternalJavaProject", "(", "classpath", ")", ";", "IPackageFragment", "parent", "=", "(", "(", "PackageFragmentRoot", ")", "project", ".", "getPackageFragmentRoot", "(", "project", ".", "getProject", "(", ")", ")", ")", ".", "getPackageFragment", "(", "CharOperation", ".", "NO_STRINGS", ")", ";", "CompilationUnit", "result", "=", "LanguageSupportFactory", ".", "newCompilationUnit", "(", "(", "PackageFragment", ")", "parent", ",", "name", ",", "this", ")", ";", "result", ".", "becomeWorkingCopy", "(", "problemRequestor", ",", "monitor", ")", ";", "return", "result", ";", "}", "public", "final", "ICompilationUnit", "newWorkingCopy", "(", "String", "name", ",", "IClasspathEntry", "[", "]", "classpath", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", "{", "ExternalJavaProject", "project", "=", "new", "ExternalJavaProject", "(", "classpath", ")", ";", "IPackageFragment", "parent", "=", "(", "(", "PackageFragmentRoot", ")", "project", ".", "getPackageFragmentRoot", "(", "project", ".", "getProject", "(", ")", ")", ")", ".", "getPackageFragment", "(", "CharOperation", ".", "NO_STRINGS", ")", ";", "CompilationUnit", "result", "=", "LanguageSupportFactory", ".", "newCompilationUnit", "(", "(", "PackageFragment", ")", "parent", ",", "name", ",", "this", ")", ";", "result", ".", "becomeWorkingCopy", "(", "getProblemRequestor", "(", "result", ")", ",", "monitor", ")", ";", "return", "result", ";", "}", "}", "</s>" ]
5,165
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResource", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IWorkspace", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "IJavaModel", "extends", "IJavaElement", ",", "IOpenable", ",", "IParent", "{", "boolean", "contains", "(", "IResource", "resource", ")", ";", "void", "copy", "(", "IJavaElement", "[", "]", "elements", ",", "IJavaElement", "[", "]", "containers", ",", "IJavaElement", "[", "]", "siblings", ",", "String", "[", "]", "renamings", ",", "boolean", "replace", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "delete", "(", "IJavaElement", "[", "]", "elements", ",", "boolean", "force", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IJavaProject", "getJavaProject", "(", "String", "name", ")", ";", "IJavaProject", "[", "]", "getJavaProjects", "(", ")", "throws", "JavaModelException", ";", "Object", "[", "]", "getNonJavaResources", "(", ")", "throws", "JavaModelException", ";", "IWorkspace", "getWorkspace", "(", ")", ";", "void", "move", "(", "IJavaElement", "[", "]", "elements", ",", "IJavaElement", "[", "]", "containers", ",", "IJavaElement", "[", "]", "siblings", ",", "String", "[", "]", "renamings", ",", "boolean", "replace", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "refreshExternalArchives", "(", "IJavaElement", "[", "]", "elementsScope", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "rename", "(", "IJavaElement", "[", "]", "elements", ",", "IJavaElement", "[", "]", "destinations", ",", "String", "[", "]", "names", ",", "boolean", "replace", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,166
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IClasspathAttribute", "{", "String", "JAVADOC_LOCATION_ATTRIBUTE_NAME", "=", "\"\"", ";", "String", "OPTIONAL", "=", "\"optional\"", ";", "String", "getName", "(", ")", ";", "String", "getValue", "(", ")", ";", "}", "</s>" ]
5,167
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "ScannerHelper", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "INamingRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "InternalNamingConventions", ";", "public", "final", "class", "NamingConventions", "{", "static", "class", "NamingRequestor", "implements", "INamingRequestor", "{", "private", "final", "static", "int", "SIZE", "=", "10", ";", "private", "char", "[", "]", "[", "]", "firstPrefixAndFirstSuffixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "firstPrefixAndFirstSuffixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "firstPrefixAndSuffixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "firstPrefixAndSuffixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "prefixAndFirstSuffixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "prefixAndFirstSuffixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "prefixAndSuffixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "prefixAndSuffixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "firstPrefixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "firstPrefixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "prefixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "prefixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "firstSuffixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "firstSuffixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "suffixResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "suffixResultsCount", "=", "0", ";", "private", "char", "[", "]", "[", "]", "otherResults", "=", "new", "char", "[", "SIZE", "]", "[", "]", ";", "private", "int", "otherResultsCount", "=", "0", ";", "public", "void", "acceptNameWithoutPrefixAndSuffix", "(", "char", "[", "]", "name", ",", "int", "reusedCharacters", ")", "{", "int", "length", "=", "this", ".", "otherResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "otherResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "otherResults", ",", "0", ",", "this", ".", "otherResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "otherResults", "[", "this", ".", "otherResultsCount", "++", "]", "=", "name", ";", "}", "public", "void", "acceptNameWithPrefix", "(", "char", "[", "]", "name", ",", "boolean", "isFirstPrefix", ",", "int", "reusedCharacters", ")", "{", "if", "(", "isFirstPrefix", ")", "{", "int", "length", "=", "this", ".", "firstPrefixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "firstPrefixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "firstPrefixResults", ",", "0", ",", "this", ".", "firstPrefixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "firstPrefixResults", "[", "this", ".", "firstPrefixResultsCount", "++", "]", "=", "name", ";", "}", "else", "{", "int", "length", "=", "this", ".", "prefixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "prefixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "prefixResults", ",", "0", ",", "this", ".", "prefixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "prefixResults", "[", "this", ".", "prefixResultsCount", "++", "]", "=", "name", ";", "}", "}", "public", "void", "acceptNameWithPrefixAndSuffix", "(", "char", "[", "]", "name", ",", "boolean", "isFirstPrefix", ",", "boolean", "isFirstSuffix", ",", "int", "reusedCharacters", ")", "{", "if", "(", "isFirstPrefix", "&&", "isFirstSuffix", ")", "{", "int", "length", "=", "this", ".", "firstPrefixAndFirstSuffixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "firstPrefixAndFirstSuffixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "firstPrefixAndFirstSuffixResults", ",", "0", ",", "this", ".", "firstPrefixAndFirstSuffixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "firstPrefixAndFirstSuffixResults", "[", "this", ".", "firstPrefixAndFirstSuffixResultsCount", "++", "]", "=", "name", ";", "}", "else", "if", "(", "isFirstPrefix", ")", "{", "int", "length", "=", "this", ".", "firstPrefixAndSuffixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "firstPrefixAndSuffixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "firstPrefixAndSuffixResults", ",", "0", ",", "this", ".", "firstPrefixAndSuffixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "firstPrefixAndSuffixResults", "[", "this", ".", "firstPrefixAndSuffixResultsCount", "++", "]", "=", "name", ";", "}", "else", "if", "(", "isFirstSuffix", ")", "{", "int", "length", "=", "this", ".", "prefixAndFirstSuffixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "prefixAndFirstSuffixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "prefixAndFirstSuffixResults", ",", "0", ",", "this", ".", "prefixAndFirstSuffixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "prefixAndFirstSuffixResults", "[", "this", ".", "prefixAndFirstSuffixResultsCount", "++", "]", "=", "name", ";", "}", "else", "{", "int", "length", "=", "this", ".", "prefixAndSuffixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "prefixAndSuffixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "prefixAndSuffixResults", ",", "0", ",", "this", ".", "prefixAndSuffixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "prefixAndSuffixResults", "[", "this", ".", "prefixAndSuffixResultsCount", "++", "]", "=", "name", ";", "}", "}", "public", "void", "acceptNameWithSuffix", "(", "char", "[", "]", "name", ",", "boolean", "isFirstSuffix", ",", "int", "reusedCharacters", ")", "{", "if", "(", "isFirstSuffix", ")", "{", "int", "length", "=", "this", ".", "firstSuffixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "firstSuffixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "firstSuffixResults", ",", "0", ",", "this", ".", "firstSuffixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "firstSuffixResults", "[", "this", ".", "firstSuffixResultsCount", "++", "]", "=", "name", ";", "}", "else", "{", "int", "length", "=", "this", ".", "suffixResults", ".", "length", ";", "if", "(", "length", "==", "this", ".", "suffixResultsCount", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "suffixResults", ",", "0", ",", "this", ".", "suffixResults", "=", "new", "char", "[", "length", "*", "2", "]", "[", "]", ",", "0", ",", "length", ")", ";", "}", "this", ".", "suffixResults", "[", "this", ".", "suffixResultsCount", "++", "]", "=", "name", ";", "}", "}", "public", "char", "[", "]", "[", "]", "getResults", "(", ")", "{", "int", "count", "=", "this", ".", "firstPrefixAndFirstSuffixResultsCount", "+", "this", ".", "firstPrefixAndSuffixResultsCount", "+", "this", ".", "prefixAndFirstSuffixResultsCount", "+", "this", ".", "prefixAndSuffixResultsCount", "+", "this", ".", "firstPrefixResultsCount", "+", "this", ".", "prefixResultsCount", "+", "this", ".", "firstSuffixResultsCount", "+", "this", ".", "suffixResultsCount", "+", "this", ".", "otherResultsCount", ";", "char", "[", "]", "[", "]", "results", "=", "new", "char", "[", "count", "]", "[", "]", ";", "int", "index", "=", "0", ";", "System", ".", "arraycopy", "(", "this", ".", "firstPrefixAndFirstSuffixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "firstPrefixAndFirstSuffixResultsCount", ")", ";", "index", "+=", "this", ".", "firstPrefixAndFirstSuffixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "firstPrefixAndSuffixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "firstPrefixAndSuffixResultsCount", ")", ";", "index", "+=", "this", ".", "firstPrefixAndSuffixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "prefixAndFirstSuffixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "prefixAndFirstSuffixResultsCount", ")", ";", "index", "+=", "this", ".", "prefixAndFirstSuffixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "prefixAndSuffixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "prefixAndSuffixResultsCount", ")", ";", "index", "+=", "this", ".", "prefixAndSuffixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "firstPrefixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "firstPrefixResultsCount", ")", ";", "index", "+=", "this", ".", "firstPrefixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "prefixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "prefixResultsCount", ")", ";", "index", "+=", "this", ".", "prefixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "firstSuffixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "firstSuffixResultsCount", ")", ";", "index", "+=", "this", ".", "firstSuffixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "suffixResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "suffixResultsCount", ")", ";", "index", "+=", "this", ".", "suffixResultsCount", ";", "System", ".", "arraycopy", "(", "this", ".", "otherResults", ",", "0", ",", "results", ",", "index", ",", "this", ".", "otherResultsCount", ")", ";", "return", "results", ";", "}", "}", "private", "static", "final", "char", "[", "]", "GETTER_BOOL_NAME", "=", "\"is\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "GETTER_NAME", "=", "\"get\"", ".", "toCharArray", "(", ")", ";", "private", "static", "final", "char", "[", "]", "SETTER_NAME", "=", "\"set\"", ".", "toCharArray", "(", ")", ";", "public", "static", "final", "int", "VK_STATIC_FIELD", "=", "InternalNamingConventions", ".", "VK_STATIC_FIELD", ";", "public", "static", "final", "int", "VK_INSTANCE_FIELD", "=", "InternalNamingConventions", ".", "VK_INSTANCE_FIELD", ";", "public", "static", "final", "int", "VK_STATIC_FINAL_FIELD", "=", "InternalNamingConventions", ".", "VK_STATIC_FINAL_FIELD", ";", "public", "static", "final", "int", "VK_PARAMETER", "=", "InternalNamingConventions", ".", "VK_PARAMETER", ";", "public", "static", "final", "int", "VK_LOCAL", "=", "InternalNamingConventions", ".", "VK_LOCAL", ";", "public", "static", "final", "int", "BK_NAME", "=", "InternalNamingConventions", ".", "BK_SIMPLE_NAME", ";", "public", "static", "final", "int", "BK_TYPE_NAME", "=", "InternalNamingConventions", ".", "BK_SIMPLE_TYPE_NAME", ";", "private", "static", "String", "[", "]", "convertCharsToString", "(", "char", "[", "]", "[", "]", "c", ")", "{", "int", "length", "=", "c", "==", "null", "?", "0", ":", "c", ".", "length", ";", "String", "[", "]", "s", "=", "new", "String", "[", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "s", "[", "i", "]", "=", "String", ".", "valueOf", "(", "c", "[", "i", "]", ")", ";", "}", "return", "s", ";", "}", "private", "static", "char", "[", "]", "[", "]", "convertStringToChars", "(", "String", "[", "]", "s", ")", "{", "int", "length", "=", "s", "==", "null", "?", "0", ":", "s", ".", "length", ";", "char", "[", "]", "[", "]", "c", "=", "new", "char", "[", "length", "]", "[", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "if", "(", "s", "[", "i", "]", "==", "null", ")", "{", "c", "[", "i", "]", "=", "CharOperation", ".", "NO_CHAR", ";", "}", "else", "{", "c", "[", "i", "]", "=", "s", "[", "i", "]", ".", "toCharArray", "(", ")", ";", "}", "}", "return", "c", ";", "}", "public", "static", "char", "[", "]", "removePrefixAndSuffixForArgumentName", "(", "IJavaProject", "javaProject", ",", "char", "[", "]", "argumentName", ")", "{", "return", "InternalNamingConventions", ".", "removeVariablePrefixAndSuffix", "(", "VK_PARAMETER", ",", "javaProject", ",", "argumentName", ")", ";", "}", "public", "static", "String", "removePrefixAndSuffixForArgumentName", "(", "IJavaProject", "javaProject", ",", "String", "argumentName", ")", "{", "return", "String", ".", "valueOf", "(", "removePrefixAndSuffixForArgumentName", "(", "javaProject", ",", "argumentName", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "removePrefixAndSuffixForFieldName", "(", "IJavaProject", "javaProject", ",", "char", "[", "]", "fieldName", ",", "int", "modifiers", ")", "{", "return", "InternalNamingConventions", ".", "removeVariablePrefixAndSuffix", "(", "Flags", ".", "isStatic", "(", "modifiers", ")", "?", "VK_STATIC_FIELD", ":", "VK_INSTANCE_FIELD", ",", "javaProject", ",", "fieldName", ")", ";", "}", "public", "static", "String", "removePrefixAndSuffixForFieldName", "(", "IJavaProject", "javaProject", ",", "String", "fieldName", ",", "int", "modifiers", ")", "{", "return", "String", ".", "valueOf", "(", "removePrefixAndSuffixForFieldName", "(", "javaProject", ",", "fieldName", ".", "toCharArray", "(", ")", ",", "modifiers", ")", ")", ";", "}", "public", "static", "char", "[", "]", "removePrefixAndSuffixForLocalVariableName", "(", "IJavaProject", "javaProject", ",", "char", "[", "]", "localName", ")", "{", "return", "InternalNamingConventions", ".", "removeVariablePrefixAndSuffix", "(", "VK_LOCAL", ",", "javaProject", ",", "localName", ")", ";", "}", "public", "static", "String", "removePrefixAndSuffixForLocalVariableName", "(", "IJavaProject", "javaProject", ",", "String", "localName", ")", "{", "return", "String", ".", "valueOf", "(", "removePrefixAndSuffixForLocalVariableName", "(", "javaProject", ",", "localName", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "public", "static", "String", "getBaseName", "(", "int", "variableKind", ",", "String", "variableName", ",", "IJavaProject", "javaProject", ")", "{", "return", "String", ".", "valueOf", "(", "InternalNamingConventions", ".", "getBaseName", "(", "variableKind", ",", "javaProject", ",", "variableName", ".", "toCharArray", "(", ")", ",", "true", ")", ")", ";", "}", "private", "static", "int", "getFieldVariableKind", "(", "int", "modifiers", ")", "{", "if", "(", "Flags", ".", "isStatic", "(", "modifiers", ")", ")", "{", "if", "(", "Flags", ".", "isFinal", "(", "modifiers", ")", ")", "{", "return", "VK_STATIC_FINAL_FIELD", ";", "}", "return", "VK_STATIC_FIELD", ";", "}", "return", "VK_INSTANCE_FIELD", ";", "}", "private", "static", "char", "[", "]", "suggestAccessorName", "(", "IJavaProject", "project", ",", "char", "[", "]", "fieldName", ",", "int", "modifiers", ")", "{", "char", "[", "]", "name", "=", "InternalNamingConventions", ".", "getBaseName", "(", "getFieldVariableKind", "(", "modifiers", ")", ",", "project", ",", "fieldName", ",", "false", ")", ";", "if", "(", "name", ".", "length", ">", "0", "&&", "ScannerHelper", ".", "isLowerCase", "(", "name", "[", "0", "]", ")", ")", "{", "if", "(", "name", ".", "length", "==", "1", "||", "!", "ScannerHelper", ".", "isUpperCase", "(", "name", "[", "1", "]", ")", ")", "{", "name", "[", "0", "]", "=", "ScannerHelper", ".", "toUpperCase", "(", "name", "[", "0", "]", ")", ";", "}", "}", "return", "name", ";", "}", "public", "static", "char", "[", "]", "[", "]", "suggestArgumentNames", "(", "IJavaProject", "javaProject", ",", "char", "[", "]", "packageName", ",", "char", "[", "]", "qualifiedTypeName", ",", "int", "dim", ",", "char", "[", "]", "[", "]", "excludedNames", ")", "{", "if", "(", "qualifiedTypeName", "==", "null", "||", "qualifiedTypeName", ".", "length", "==", "0", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "char", "[", "]", "typeName", "=", "CharOperation", ".", "lastSegment", "(", "qualifiedTypeName", ",", "'.'", ")", ";", "NamingRequestor", "requestor", "=", "new", "NamingRequestor", "(", ")", ";", "InternalNamingConventions", ".", "suggestVariableNames", "(", "VK_PARAMETER", ",", "BK_TYPE_NAME", ",", "typeName", ",", "javaProject", ",", "dim", ",", "null", ",", "excludedNames", ",", "true", ",", "requestor", ")", ";", "return", "requestor", ".", "getResults", "(", ")", ";", "}", "public", "static", "String", "[", "]", "suggestArgumentNames", "(", "IJavaProject", "javaProject", ",", "String", "packageName", ",", "String", "qualifiedTypeName", ",", "int", "dim", ",", "String", "[", "]", "excludedNames", ")", "{", "return", "convertCharsToString", "(", "suggestArgumentNames", "(", "javaProject", ",", "packageName", ".", "toCharArray", "(", ")", ",", "qualifiedTypeName", ".", "toCharArray", "(", ")", ",", "dim", ",", "convertStringToChars", "(", "excludedNames", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "[", "]", "suggestFieldNames", "(", "IJavaProject", "javaProject", ",", "char", "[", "]", "packageName", ",", "char", "[", "]", "qualifiedTypeName", ",", "int", "dim", ",", "int", "modifiers", ",", "char", "[", "]", "[", "]", "excludedNames", ")", "{", "if", "(", "qualifiedTypeName", "==", "null", "||", "qualifiedTypeName", ".", "length", "==", "0", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "char", "[", "]", "typeName", "=", "CharOperation", ".", "lastSegment", "(", "qualifiedTypeName", ",", "'.'", ")", ";", "NamingRequestor", "requestor", "=", "new", "NamingRequestor", "(", ")", ";", "InternalNamingConventions", ".", "suggestVariableNames", "(", "Flags", ".", "isStatic", "(", "modifiers", ")", "?", "VK_STATIC_FIELD", ":", "VK_INSTANCE_FIELD", ",", "BK_TYPE_NAME", ",", "typeName", ",", "javaProject", ",", "dim", ",", "null", ",", "excludedNames", ",", "true", ",", "requestor", ")", ";", "return", "requestor", ".", "getResults", "(", ")", ";", "}", "public", "static", "String", "[", "]", "suggestFieldNames", "(", "IJavaProject", "javaProject", ",", "String", "packageName", ",", "String", "qualifiedTypeName", ",", "int", "dim", ",", "int", "modifiers", ",", "String", "[", "]", "excludedNames", ")", "{", "return", "convertCharsToString", "(", "suggestFieldNames", "(", "javaProject", ",", "packageName", ".", "toCharArray", "(", ")", ",", "qualifiedTypeName", ".", "toCharArray", "(", ")", ",", "dim", ",", "modifiers", ",", "convertStringToChars", "(", "excludedNames", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "suggestGetterName", "(", "IJavaProject", "project", ",", "char", "[", "]", "fieldName", ",", "int", "modifiers", ",", "boolean", "isBoolean", ",", "char", "[", "]", "[", "]", "excludedNames", ")", "{", "if", "(", "isBoolean", ")", "{", "char", "[", "]", "name", "=", "InternalNamingConventions", ".", "getBaseName", "(", "getFieldVariableKind", "(", "modifiers", ")", ",", "project", ",", "fieldName", ",", "false", ")", ";", "int", "prefixLen", "=", "GETTER_BOOL_NAME", ".", "length", ";", "if", "(", "CharOperation", ".", "prefixEquals", "(", "GETTER_BOOL_NAME", ",", "name", ")", "&&", "name", ".", "length", ">", "prefixLen", "&&", "ScannerHelper", ".", "isUpperCase", "(", "name", "[", "prefixLen", "]", ")", ")", "{", "return", "suggestNewName", "(", "name", ",", "excludedNames", ")", ";", "}", "else", "{", "return", "suggestNewName", "(", "CharOperation", ".", "concat", "(", "GETTER_BOOL_NAME", ",", "suggestAccessorName", "(", "project", ",", "fieldName", ",", "modifiers", ")", ")", ",", "excludedNames", ")", ";", "}", "}", "else", "{", "return", "suggestNewName", "(", "CharOperation", ".", "concat", "(", "GETTER_NAME", ",", "suggestAccessorName", "(", "project", ",", "fieldName", ",", "modifiers", ")", ")", ",", "excludedNames", ")", ";", "}", "}", "public", "static", "String", "suggestGetterName", "(", "IJavaProject", "project", ",", "String", "fieldName", ",", "int", "modifiers", ",", "boolean", "isBoolean", ",", "String", "[", "]", "excludedNames", ")", "{", "return", "String", ".", "valueOf", "(", "suggestGetterName", "(", "project", ",", "fieldName", ".", "toCharArray", "(", ")", ",", "modifiers", ",", "isBoolean", ",", "convertStringToChars", "(", "excludedNames", ")", ")", ")", ";", "}", "public", "static", "char", "[", "]", "[", "]", "suggestLocalVariableNames", "(", "IJavaProject", "javaProject", ",", "char", "[", "]", "packageName", ",", "char", "[", "]", "qualifiedTypeName", ",", "int", "dim", ",", "char", "[", "]", "[", "]", "excludedNames", ")", "{", "if", "(", "qualifiedTypeName", "==", "null", "||", "qualifiedTypeName", ".", "length", "==", "0", ")", "return", "CharOperation", ".", "NO_CHAR_CHAR", ";", "char", "[", "]", "typeName", "=", "CharOperation", ".", "lastSegment", "(", "qualifiedTypeName", ",", "'.'", ")", ";", "NamingRequestor", "requestor", "=", "new", "NamingRequestor", "(", ")", ";", "InternalNamingConventions", ".", "suggestVariableNames", "(", "VK_LOCAL", ",", "BK_TYPE_NAME", ",", "typeName", ",", "javaProject", ",", "dim", ",", "null", ",", "excludedNames", ",", "true", ",", "requestor", ")", ";", "return", "requestor", ".", "getResults", "(", ")", ";", "}", "public", "static", "String", "[", "]", "suggestLocalVariableNames", "(", "IJavaProject", "javaProject", ",", "String", "packageName", ",", "String", "qualifiedTypeName", ",", "int", "dim", ",", "String", "[", "]", "excludedNames", ")", "{", "return", "convertCharsToString", "(", "suggestLocalVariableNames", "(", "javaProject", ",", "packageName", ".", "toCharArray", "(", ")", ",", "qualifiedTypeName", ".", "toCharArray", "(", ")", ",", "dim", ",", "convertStringToChars", "(", "excludedNames", ")", ")", ")", ";", "}", "private", "static", "char", "[", "]", "suggestNewName", "(", "char", "[", "]", "name", ",", "char", "[", "]", "[", "]", "excludedNames", ")", "{", "if", "(", "excludedNames", "==", "null", ")", "{", "return", "name", ";", "}", "char", "[", "]", "newName", "=", "name", ";", "int", "count", "=", "2", ";", "int", "i", "=", "0", ";", "while", "(", "i", "<", "excludedNames", ".", "length", ")", "{", "if", "(", "CharOperation", ".", "equals", "(", "newName", ",", "excludedNames", "[", "i", "]", ",", "false", ")", ")", "{", "newName", "=", "CharOperation", ".", "concat", "(", "name", ",", "String", ".", "valueOf", "(", "count", "++", ")", ".", "toCharArray", "(", ")", ")", ";", "i", "=", "0", ";", "}", "else", "{", "i", "++", ";", "}", "}", "return", "newName", ";", "}", "public", "static", "char", "[", "]", "suggestSetterName", "(", "IJavaProject", "project", ",", "char", "[", "]", "fieldName", ",", "int", "modifiers", ",", "boolean", "isBoolean", ",", "char", "[", "]", "[", "]", "excludedNames", ")", "{", "if", "(", "isBoolean", ")", "{", "char", "[", "]", "name", "=", "InternalNamingConventions", ".", "getBaseName", "(", "getFieldVariableKind", "(", "modifiers", ")", ",", "project", ",", "fieldName", ",", "false", ")", ";", "int", "prefixLen", "=", "GETTER_BOOL_NAME", ".", "length", ";", "if", "(", "CharOperation", ".", "prefixEquals", "(", "GETTER_BOOL_NAME", ",", "name", ")", "&&", "name", ".", "length", ">", "prefixLen", "&&", "ScannerHelper", ".", "isUpperCase", "(", "name", "[", "prefixLen", "]", ")", ")", "{", "name", "=", "CharOperation", ".", "subarray", "(", "name", ",", "prefixLen", ",", "name", ".", "length", ")", ";", "return", "suggestNewName", "(", "CharOperation", ".", "concat", "(", "SETTER_NAME", ",", "suggestAccessorName", "(", "project", ",", "name", ",", "modifiers", ")", ")", ",", "excludedNames", ")", ";", "}", "else", "{", "return", "suggestNewName", "(", "CharOperation", ".", "concat", "(", "SETTER_NAME", ",", "suggestAccessorName", "(", "project", ",", "fieldName", ",", "modifiers", ")", ")", ",", "excludedNames", ")", ";", "}", "}", "else", "{", "return", "suggestNewName", "(", "CharOperation", ".", "concat", "(", "SETTER_NAME", ",", "suggestAccessorName", "(", "project", ",", "fieldName", ",", "modifiers", ")", ")", ",", "excludedNames", ")", ";", "}", "}", "public", "static", "String", "suggestSetterName", "(", "IJavaProject", "project", ",", "String", "fieldName", ",", "int", "modifiers", ",", "boolean", "isBoolean", ",", "String", "[", "]", "excludedNames", ")", "{", "return", "String", ".", "valueOf", "(", "suggestSetterName", "(", "project", ",", "fieldName", ".", "toCharArray", "(", ")", ",", "modifiers", ",", "isBoolean", ",", "convertStringToChars", "(", "excludedNames", ")", ")", ")", ";", "}", "public", "static", "String", "[", "]", "suggestVariableNames", "(", "int", "variableKind", ",", "int", "baseNameKind", ",", "String", "baseName", ",", "IJavaProject", "javaProject", ",", "int", "dim", ",", "String", "[", "]", "excluded", ",", "boolean", "evaluateDefault", ")", "{", "NamingRequestor", "requestor", "=", "new", "NamingRequestor", "(", ")", ";", "InternalNamingConventions", ".", "suggestVariableNames", "(", "variableKind", ",", "baseNameKind", ",", "baseName", ".", "toCharArray", "(", ")", ",", "javaProject", ",", "dim", ",", "null", ",", "convertStringToChars", "(", "excluded", ")", ",", "evaluateDefault", ",", "requestor", ")", ";", "return", "convertCharsToString", "(", "requestor", ".", "getResults", "(", ")", ")", ";", "}", "private", "NamingConventions", "(", ")", "{", "}", "}", "</s>" ]
5,168
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "IOpenable", "{", "public", "void", "close", "(", ")", "throws", "JavaModelException", ";", "public", "String", "findRecommendedLineSeparator", "(", ")", "throws", "JavaModelException", ";", "public", "IBuffer", "getBuffer", "(", ")", "throws", "JavaModelException", ";", "boolean", "hasUnsavedChanges", "(", ")", "throws", "JavaModelException", ";", "boolean", "isConsistent", "(", ")", "throws", "JavaModelException", ";", "boolean", "isOpen", "(", ")", ";", "void", "makeConsistent", "(", "IProgressMonitor", "progress", ")", "throws", "JavaModelException", ";", "public", "void", "open", "(", "IProgressMonitor", "progress", ")", "throws", "JavaModelException", ";", "public", "void", "save", "(", "IProgressMonitor", "progress", ",", "boolean", "force", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,169
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "public", "interface", "IClasspathEntry", "{", "int", "CPE_LIBRARY", "=", "1", ";", "int", "CPE_PROJECT", "=", "2", ";", "int", "CPE_SOURCE", "=", "3", ";", "int", "CPE_VARIABLE", "=", "4", ";", "int", "CPE_CONTAINER", "=", "5", ";", "boolean", "combineAccessRules", "(", ")", ";", "IAccessRule", "[", "]", "getAccessRules", "(", ")", ";", "int", "getContentKind", "(", ")", ";", "int", "getEntryKind", "(", ")", ";", "IPath", "[", "]", "getExclusionPatterns", "(", ")", ";", "IClasspathAttribute", "[", "]", "getExtraAttributes", "(", ")", ";", "IPath", "[", "]", "getInclusionPatterns", "(", ")", ";", "IPath", "getOutputLocation", "(", ")", ";", "IPath", "getPath", "(", ")", ";", "IPath", "getSourceAttachmentPath", "(", ")", ";", "IPath", "getSourceAttachmentRootPath", "(", ")", ";", "IClasspathEntry", "getReferencingEntry", "(", ")", ";", "boolean", "isExported", "(", ")", ";", "IClasspathEntry", "getResolvedEntry", "(", ")", ";", "}", "</s>" ]
5,170
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "java", ".", "io", ".", "InputStream", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "public", "interface", "IType", "extends", "IMember", ",", "IAnnotatable", "{", "void", "codeComplete", "(", "char", "[", "]", "snippet", ",", "int", "insertion", ",", "int", "position", ",", "char", "[", "]", "[", "]", "localVariableTypeNames", ",", "char", "[", "]", "[", "]", "localVariableNames", ",", "int", "[", "]", "localVariableModifiers", ",", "boolean", "isStatic", ",", "ICompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "char", "[", "]", "snippet", ",", "int", "insertion", ",", "int", "position", ",", "char", "[", "]", "[", "]", "localVariableTypeNames", ",", "char", "[", "]", "[", "]", "localVariableNames", ",", "int", "[", "]", "localVariableModifiers", ",", "boolean", "isStatic", ",", "ICompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "char", "[", "]", "snippet", ",", "int", "insertion", ",", "int", "position", ",", "char", "[", "]", "[", "]", "localVariableTypeNames", ",", "char", "[", "]", "[", "]", "localVariableNames", ",", "int", "[", "]", "localVariableModifiers", ",", "boolean", "isStatic", ",", "CompletionRequestor", "requestor", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "char", "[", "]", "snippet", ",", "int", "insertion", ",", "int", "position", ",", "char", "[", "]", "[", "]", "localVariableTypeNames", ",", "char", "[", "]", "[", "]", "localVariableNames", ",", "int", "[", "]", "localVariableModifiers", ",", "boolean", "isStatic", ",", "CompletionRequestor", "requestor", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "char", "[", "]", "snippet", ",", "int", "insertion", ",", "int", "position", ",", "char", "[", "]", "[", "]", "localVariableTypeNames", ",", "char", "[", "]", "[", "]", "localVariableNames", ",", "int", "[", "]", "localVariableModifiers", ",", "boolean", "isStatic", ",", "CompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "void", "codeComplete", "(", "char", "[", "]", "snippet", ",", "int", "insertion", ",", "int", "position", ",", "char", "[", "]", "[", "]", "localVariableTypeNames", ",", "char", "[", "]", "[", "]", "localVariableNames", ",", "int", "[", "]", "localVariableModifiers", ",", "boolean", "isStatic", ",", "CompletionRequestor", "requestor", ",", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IField", "createField", "(", "String", "contents", ",", "IJavaElement", "sibling", ",", "boolean", "force", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IInitializer", "createInitializer", "(", "String", "contents", ",", "IJavaElement", "sibling", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IMethod", "createMethod", "(", "String", "contents", ",", "IJavaElement", "sibling", ",", "boolean", "force", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IType", "createType", "(", "String", "contents", ",", "IJavaElement", "sibling", ",", "boolean", "force", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "IMethod", "[", "]", "findMethods", "(", "IMethod", "method", ")", ";", "IJavaElement", "[", "]", "getChildrenForCategory", "(", "String", "category", ")", "throws", "JavaModelException", ";", "String", "getElementName", "(", ")", ";", "IField", "getField", "(", "String", "name", ")", ";", "IField", "[", "]", "getFields", "(", ")", "throws", "JavaModelException", ";", "String", "getFullyQualifiedName", "(", ")", ";", "String", "getFullyQualifiedName", "(", "char", "enclosingTypeSeparator", ")", ";", "String", "getFullyQualifiedParameterizedName", "(", ")", "throws", "JavaModelException", ";", "IInitializer", "getInitializer", "(", "int", "occurrenceCount", ")", ";", "IInitializer", "[", "]", "getInitializers", "(", ")", "throws", "JavaModelException", ";", "String", "getKey", "(", ")", ";", "IMethod", "getMethod", "(", "String", "name", ",", "String", "[", "]", "parameterTypeSignatures", ")", ";", "IMethod", "[", "]", "getMethods", "(", ")", "throws", "JavaModelException", ";", "IPackageFragment", "getPackageFragment", "(", ")", ";", "String", "getSuperclassName", "(", ")", "throws", "JavaModelException", ";", "String", "getSuperclassTypeSignature", "(", ")", "throws", "JavaModelException", ";", "String", "[", "]", "getSuperInterfaceTypeSignatures", "(", ")", "throws", "JavaModelException", ";", "String", "[", "]", "getSuperInterfaceNames", "(", ")", "throws", "JavaModelException", ";", "String", "[", "]", "getTypeParameterSignatures", "(", ")", "throws", "JavaModelException", ";", "ITypeParameter", "[", "]", "getTypeParameters", "(", ")", "throws", "JavaModelException", ";", "IType", "getType", "(", "String", "name", ")", ";", "ITypeParameter", "getTypeParameter", "(", "String", "name", ")", ";", "String", "getTypeQualifiedName", "(", ")", ";", "String", "getTypeQualifiedName", "(", "char", "enclosingTypeSeparator", ")", ";", "IType", "[", "]", "getTypes", "(", ")", "throws", "JavaModelException", ";", "boolean", "isAnonymous", "(", ")", "throws", "JavaModelException", ";", "boolean", "isClass", "(", ")", "throws", "JavaModelException", ";", "boolean", "isEnum", "(", ")", "throws", "JavaModelException", ";", "boolean", "isInterface", "(", ")", "throws", "JavaModelException", ";", "boolean", "isAnnotation", "(", ")", "throws", "JavaModelException", ";", "boolean", "isLocal", "(", ")", "throws", "JavaModelException", ";", "boolean", "isMember", "(", ")", "throws", "JavaModelException", ";", "boolean", "isResolved", "(", ")", ";", "ITypeHierarchy", "loadTypeHierachy", "(", "InputStream", "input", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newSupertypeHierarchy", "(", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newSupertypeHierarchy", "(", "ICompilationUnit", "[", "]", "workingCopies", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newSupertypeHierarchy", "(", "IWorkingCopy", "[", "]", "workingCopies", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newSupertypeHierarchy", "(", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newTypeHierarchy", "(", "IJavaProject", "project", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newTypeHierarchy", "(", "IJavaProject", "project", ",", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newTypeHierarchy", "(", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newTypeHierarchy", "(", "ICompilationUnit", "[", "]", "workingCopies", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newTypeHierarchy", "(", "IWorkingCopy", "[", "]", "workingCopies", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "ITypeHierarchy", "newTypeHierarchy", "(", "WorkingCopyOwner", "owner", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", ";", "String", "[", "]", "[", "]", "resolveType", "(", "String", "typeName", ")", "throws", "JavaModelException", ";", "String", "[", "]", "[", "]", "resolveType", "(", "String", "typeName", ",", "WorkingCopyOwner", "owner", ")", "throws", "JavaModelException", ";", "}", "</s>" ]
5,171
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IStorage", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "public", "interface", "IJarEntryResource", "extends", "IStorage", "{", "IJarEntryResource", "[", "]", "getChildren", "(", ")", ";", "IPath", "getFullPath", "(", ")", ";", "Object", "getParent", "(", ")", ";", "IPackageFragmentRoot", "getPackageFragmentRoot", "(", ")", ";", "boolean", "isFile", "(", ")", ";", "}", "</s>" ]
5,172
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IMarker", ";", "public", "interface", "ICodeCompletionRequestor", "{", "void", "acceptClass", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "className", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptError", "(", "IMarker", "marker", ")", ";", "void", "acceptField", "(", "char", "[", "]", "declaringTypePackageName", ",", "char", "[", "]", "declaringTypeName", ",", "char", "[", "]", "name", ",", "char", "[", "]", "typePackageName", ",", "char", "[", "]", "typeName", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptInterface", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "interfaceName", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptKeyword", "(", "char", "[", "]", "keywordName", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptLabel", "(", "char", "[", "]", "labelName", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptLocalVariable", "(", "char", "[", "]", "name", ",", "char", "[", "]", "typePackageName", ",", "char", "[", "]", "typeName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptMethod", "(", "char", "[", "]", "declaringTypePackageName", ",", "char", "[", "]", "declaringTypeName", ",", "char", "[", "]", "selector", ",", "char", "[", "]", "[", "]", "parameterPackageNames", ",", "char", "[", "]", "[", "]", "parameterTypeNames", ",", "char", "[", "]", "returnTypePackageName", ",", "char", "[", "]", "returnTypeName", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptModifier", "(", "char", "[", "]", "modifierName", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptPackage", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "completionName", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "void", "acceptType", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "typeName", ",", "char", "[", "]", "completionName", ",", "int", "completionStart", ",", "int", "completionEnd", ")", ";", "}", "</s>" ]
5,173
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IAnnotation", "extends", "IJavaElement", ",", "ISourceReference", "{", "String", "getElementName", "(", ")", ";", "IMemberValuePair", "[", "]", "getMemberValuePairs", "(", ")", "throws", "JavaModelException", ";", "ISourceRange", "getNameRange", "(", ")", "throws", "JavaModelException", ";", "int", "getOccurrenceCount", "(", ")", ";", "}", "</s>" ]
5,174
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "java", ".", "util", ".", "Hashtable", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "ProblemReporter", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Messages", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "public", "class", "CorrectionEngine", "{", "protected", "int", "correctionStart", ";", "protected", "int", "correctionEnd", ";", "protected", "int", "prefixLength", ";", "protected", "ICompilationUnit", "compilationUnit", ";", "protected", "ICorrectionRequestor", "correctionRequestor", ";", "protected", "static", "final", "int", "CLASSES", "=", "0x00000001", ";", "protected", "static", "final", "int", "INTERFACES", "=", "0x00000002", ";", "protected", "static", "final", "int", "IMPORT", "=", "0x00000004", ";", "protected", "static", "final", "int", "METHOD", "=", "0x00000008", ";", "protected", "static", "final", "int", "FIELD", "=", "0x00000010", ";", "protected", "static", "final", "int", "LOCAL", "=", "0x00000020", ";", "protected", "int", "filter", ";", "public", "CorrectionEngine", "(", "Map", "setting", ")", "{", "}", "public", "void", "computeCorrections", "(", "IMarker", "marker", ",", "ICompilationUnit", "targetUnit", ",", "int", "positionOffset", ",", "ICorrectionRequestor", "requestor", ")", "throws", "JavaModelException", "{", "IJavaElement", "element", "=", "targetUnit", "==", "null", "?", "JavaCore", ".", "create", "(", "marker", ".", "getResource", "(", ")", ")", ":", "targetUnit", ";", "if", "(", "!", "(", "element", "instanceof", "ICompilationUnit", ")", ")", "return", ";", "ICompilationUnit", "unit", "=", "(", "ICompilationUnit", ")", "element", ";", "int", "id", "=", "marker", ".", "getAttribute", "(", "IJavaModelMarker", ".", "ID", ",", "-", "1", ")", ";", "String", "[", "]", "args", "=", "Util", ".", "getProblemArgumentsFromMarker", "(", "marker", ".", "getAttribute", "(", "IJavaModelMarker", ".", "ARGUMENTS", ",", "\"\"", ")", ")", ";", "int", "start", "=", "marker", ".", "getAttribute", "(", "IMarker", ".", "CHAR_START", ",", "-", "1", ")", ";", "int", "end", "=", "marker", ".", "getAttribute", "(", "IMarker", ".", "CHAR_END", ",", "-", "1", ")", ";", "computeCorrections", "(", "unit", ",", "id", ",", "start", "+", "positionOffset", ",", "end", "+", "positionOffset", ",", "args", ",", "requestor", ")", ";", "}", "public", "void", "computeCorrections", "(", "IProblem", "problem", ",", "ICompilationUnit", "targetUnit", ",", "ICorrectionRequestor", "requestor", ")", "throws", "JavaModelException", "{", "if", "(", "requestor", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "Messages", ".", "correction_nullUnit", ")", ";", "}", "this", ".", "computeCorrections", "(", "targetUnit", ",", "problem", ".", "getID", "(", ")", ",", "problem", ".", "getSourceStart", "(", ")", ",", "problem", ".", "getSourceEnd", "(", ")", ",", "problem", ".", "getArguments", "(", ")", ",", "requestor", ")", ";", "}", "private", "void", "computeCorrections", "(", "ICompilationUnit", "unit", ",", "int", "id", ",", "int", "start", ",", "int", "end", ",", "String", "[", "]", "arguments", ",", "ICorrectionRequestor", "requestor", ")", "{", "if", "(", "id", "==", "-", "1", "||", "arguments", "==", "null", "||", "start", "==", "-", "1", "||", "end", "==", "-", "1", ")", "return", ";", "if", "(", "requestor", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "Messages", ".", "correction_nullRequestor", ")", ";", "}", "this", ".", "correctionRequestor", "=", "requestor", ";", "this", ".", "correctionStart", "=", "start", ";", "this", ".", "correctionEnd", "=", "end", ";", "this", ".", "compilationUnit", "=", "unit", ";", "String", "argument", "=", "null", ";", "try", "{", "switch", "(", "id", ")", "{", "case", "IProblem", ".", "ImportNotFound", ":", "this", ".", "filter", "=", "IMPORT", ";", "argument", "=", "arguments", "[", "0", "]", ";", "break", ";", "case", "IProblem", ".", "UndefinedType", ":", "this", ".", "filter", "=", "CLASSES", "|", "INTERFACES", ";", "argument", "=", "arguments", "[", "0", "]", ";", "break", ";", "case", "IProblem", ".", "UndefinedMethod", ":", "this", ".", "filter", "=", "METHOD", ";", "argument", "=", "arguments", "[", "1", "]", ";", "break", ";", "case", "IProblem", ".", "UndefinedField", ":", "this", ".", "filter", "=", "FIELD", ";", "argument", "=", "arguments", "[", "0", "]", ";", "break", ";", "case", "IProblem", ".", "UndefinedName", ":", "case", "IProblem", ".", "UnresolvedVariable", ":", "this", ".", "filter", "=", "FIELD", "|", "LOCAL", ";", "argument", "=", "arguments", "[", "0", "]", ";", "break", ";", "}", "}", "catch", "(", "ArrayIndexOutOfBoundsException", "e", ")", "{", "return", ";", "}", "if", "(", "argument", "!=", "null", ")", "{", "correct", "(", "argument", ".", "toCharArray", "(", ")", ")", ";", "}", "}", "private", "void", "correct", "(", "char", "[", "]", "argument", ")", "{", "try", "{", "String", "source", "=", "this", ".", "compilationUnit", ".", "getSource", "(", ")", ";", "Map", "currentProjectOptions", "=", "this", ".", "compilationUnit", ".", "getJavaProject", "(", ")", ".", "getOptions", "(", "true", ")", ";", "long", "sourceLevel", "=", "CompilerOptions", ".", "versionToJdkLevel", "(", "currentProjectOptions", ".", "get", "(", "JavaCore", ".", "COMPILER_SOURCE", ")", ")", ";", "long", "complianceLevel", "=", "CompilerOptions", ".", "versionToJdkLevel", "(", "currentProjectOptions", ".", "get", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ")", ")", ";", "Scanner", "scanner", "=", "new", "Scanner", "(", "false", ",", "false", ",", "false", ",", "sourceLevel", ",", "complianceLevel", ",", "null", ",", "null", ",", "true", ")", ";", "scanner", ".", "setSource", "(", "source", ".", "toCharArray", "(", ")", ")", ";", "scanner", ".", "resetTo", "(", "this", ".", "correctionStart", ",", "this", ".", "correctionEnd", ")", ";", "int", "token", "=", "0", ";", "char", "[", "]", "argumentSource", "=", "CharOperation", ".", "NO_CHAR", ";", "while", "(", "true", ")", "{", "token", "=", "scanner", ".", "getNextToken", "(", ")", ";", "if", "(", "token", "==", "TerminalTokens", ".", "TokenNameEOF", ")", "return", ";", "char", "[", "]", "tokenSource", "=", "scanner", ".", "getCurrentTokenSource", "(", ")", ";", "argumentSource", "=", "CharOperation", ".", "concat", "(", "argumentSource", ",", "tokenSource", ")", ";", "if", "(", "!", "CharOperation", ".", "prefixEquals", "(", "argumentSource", ",", "argument", ")", ")", "return", ";", "if", "(", "CharOperation", ".", "equals", "(", "argument", ",", "argumentSource", ")", ")", "{", "this", ".", "correctionStart", "=", "scanner", ".", "startPosition", ";", "this", ".", "correctionEnd", "=", "scanner", ".", "currentPosition", ";", "this", ".", "prefixLength", "=", "CharOperation", ".", "lastIndexOf", "(", "'.'", ",", "argument", ")", "+", "1", ";", "break", ";", "}", "}", "int", "completionPosition", "=", "this", ".", "correctionStart", ";", "scanner", ".", "resetTo", "(", "completionPosition", ",", "this", ".", "correctionEnd", ")", ";", "int", "position", "=", "completionPosition", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "if", "(", "scanner", ".", "getNextCharAsJavaIdentifierPart", "(", ")", ")", "{", "completionPosition", "=", "position", ";", "position", "=", "scanner", ".", "currentPosition", ";", "}", "else", "{", "break", ";", "}", "}", "Hashtable", "oldOptions", "=", "JavaCore", ".", "getOptions", "(", ")", ";", "try", "{", "Hashtable", "options", "=", "new", "Hashtable", "(", "oldOptions", ")", ";", "options", ".", "put", "(", "JavaCore", ".", "CODEASSIST_CAMEL_CASE_MATCH", ",", "JavaCore", ".", "DISABLED", ")", ";", "JavaCore", ".", "setOptions", "(", "options", ")", ";", "this", ".", "compilationUnit", ".", "codeComplete", "(", "completionPosition", ",", "this", ".", "completionRequestor", ")", ";", "}", "finally", "{", "JavaCore", ".", "setOptions", "(", "oldOptions", ")", ";", "}", "}", "catch", "(", "JavaModelException", "e", ")", "{", "return", ";", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "return", ";", "}", "}", "protected", "CompletionRequestor", "completionRequestor", "=", "new", "CompletionRequestor", "(", ")", "{", "public", "void", "accept", "(", "CompletionProposal", "proposal", ")", "{", "switch", "(", "proposal", ".", "getKind", "(", ")", ")", "{", "case", "CompletionProposal", ".", "TYPE_REF", ":", "int", "flags", "=", "proposal", ".", "getFlags", "(", ")", ";", "if", "(", "!", "(", "Flags", ".", "isEnum", "(", "flags", ")", "||", "Flags", ".", "isAnnotation", "(", "flags", ")", ")", ")", "{", "if", "(", "(", "CorrectionEngine", ".", "this", ".", "filter", "&", "(", "CLASSES", "|", "INTERFACES", ")", ")", "!=", "0", ")", "{", "char", "[", "]", "completionName", "=", "proposal", ".", "getCompletion", "(", ")", ";", "CorrectionEngine", ".", "this", ".", "correctionRequestor", ".", "acceptClass", "(", "proposal", ".", "getDeclarationSignature", "(", ")", ",", "Signature", ".", "getSignatureSimpleName", "(", "proposal", ".", "getSignature", "(", ")", ")", ",", "CharOperation", ".", "subarray", "(", "completionName", ",", "CorrectionEngine", ".", "this", ".", "prefixLength", ",", "completionName", ".", "length", ")", ",", "proposal", ".", "getFlags", "(", ")", ",", "CorrectionEngine", ".", "this", ".", "correctionStart", ",", "CorrectionEngine", ".", "this", ".", "correctionEnd", ")", ";", "}", "else", "if", "(", "(", "CorrectionEngine", ".", "this", ".", "filter", "&", "IMPORT", ")", "!=", "0", ")", "{", "char", "[", "]", "packageName", "=", "proposal", ".", "getDeclarationSignature", "(", ")", ";", "char", "[", "]", "className", "=", "Signature", ".", "getSignatureSimpleName", "(", "proposal", ".", "getSignature", "(", ")", ")", ";", "char", "[", "]", "fullName", "=", "CharOperation", ".", "concat", "(", "packageName", ",", "className", ",", "'.'", ")", ";", "CorrectionEngine", ".", "this", ".", "correctionRequestor", ".", "acceptClass", "(", "packageName", ",", "className", ",", "CharOperation", ".", "subarray", "(", "fullName", ",", "CorrectionEngine", ".", "this", ".", "prefixLength", ",", "fullName", ".", "length", ")", ",", "proposal", ".", "getFlags", "(", ")", ",", "CorrectionEngine", ".", "this", ".", "correctionStart", ",", "CorrectionEngine", ".", "this", ".", "correctionEnd", ")", ";", "}", "}", "break", ";", "case", "CompletionProposal", ".", "FIELD_REF", ":", "if", "(", "(", "CorrectionEngine", ".", "this", ".", "filter", "&", "FIELD", ")", "!=", "0", ")", "{", "char", "[", "]", "declaringSignature", "=", "proposal", ".", "getDeclarationSignature", "(", ")", ";", "char", "[", "]", "signature", "=", "proposal", ".", "getSignature", "(", ")", ";", "CorrectionEngine", ".", "this", ".", "correctionRequestor", ".", "acceptField", "(", "Signature", ".", "getSignatureQualifier", "(", "declaringSignature", ")", ",", "Signature", ".", "getSignatureSimpleName", "(", "declaringSignature", ")", ",", "proposal", ".", "getName", "(", ")", ",", "Signature", ".", "getSignatureQualifier", "(", "signature", ")", ",", "Signature", ".", "getSignatureSimpleName", "(", "signature", ")", ",", "proposal", ".", "getName", "(", ")", ",", "proposal", ".", "getFlags", "(", ")", ",", "CorrectionEngine", ".", "this", ".", "correctionStart", ",", "CorrectionEngine", ".", "this", ".", "correctionEnd", ")", ";", "}", "break", ";", "case", "CompletionProposal", ".", "LOCAL_VARIABLE_REF", ":", "if", "(", "(", "CorrectionEngine", ".", "this", ".", "filter", "&", "LOCAL", ")", "!=", "0", ")", "{", "char", "[", "]", "signature", "=", "proposal", ".", "getSignature", "(", ")", ";", "CorrectionEngine", ".", "this", ".", "correctionRequestor", ".", "acceptLocalVariable", "(", "proposal", ".", "getName", "(", ")", ",", "Signature", ".", "getSignatureQualifier", "(", "signature", ")", ",", "Signature", ".", "getSignatureSimpleName", "(", "signature", ")", ",", "proposal", ".", "getFlags", "(", ")", ",", "CorrectionEngine", ".", "this", ".", "correctionStart", ",", "CorrectionEngine", ".", "this", ".", "correctionEnd", ")", ";", "}", "break", ";", "case", "CompletionProposal", ".", "METHOD_REF", ":", "if", "(", "(", "CorrectionEngine", ".", "this", ".", "filter", "&", "METHOD", ")", "!=", "0", ")", "{", "char", "[", "]", "declaringSignature", "=", "proposal", ".", "getDeclarationSignature", "(", ")", ";", "char", "[", "]", "signature", "=", "proposal", ".", "getSignature", "(", ")", ";", "char", "[", "]", "[", "]", "parameterTypeSignatures", "=", "Signature", ".", "getParameterTypes", "(", "signature", ")", ";", "int", "length", "=", "parameterTypeSignatures", ".", "length", ";", "char", "[", "]", "[", "]", "parameterPackageNames", "=", "new", "char", "[", "length", "]", "[", "]", ";", "char", "[", "]", "[", "]", "parameterTypeNames", "=", "new", "char", "[", "length", "]", "[", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "parameterPackageNames", "[", "i", "]", "=", "Signature", ".", "getSignatureQualifier", "(", "parameterTypeSignatures", "[", "i", "]", ")", ";", "parameterTypeNames", "[", "i", "]", "=", "Signature", ".", "getSignatureSimpleName", "(", "parameterTypeSignatures", "[", "i", "]", ")", ";", "}", "char", "[", "]", "returnTypeSignature", "=", "Signature", ".", "getReturnType", "(", "signature", ")", ";", "CorrectionEngine", ".", "this", ".", "correctionRequestor", ".", "acceptMethod", "(", "Signature", ".", "getSignatureQualifier", "(", "declaringSignature", ")", ",", "Signature", ".", "getSignatureSimpleName", "(", "declaringSignature", ")", ",", "proposal", ".", "getName", "(", ")", ",", "parameterPackageNames", ",", "parameterTypeNames", ",", "proposal", ".", "findParameterNames", "(", "null", ")", ",", "Signature", ".", "getSignatureQualifier", "(", "returnTypeSignature", ")", ",", "Signature", ".", "getSignatureSimpleName", "(", "returnTypeSignature", ")", ",", "proposal", ".", "getName", "(", ")", ",", "proposal", ".", "getFlags", "(", ")", ",", "CorrectionEngine", ".", "this", ".", "correctionStart", ",", "CorrectionEngine", ".", "this", ".", "correctionEnd", ")", ";", "}", "break", ";", "case", "CompletionProposal", ".", "PACKAGE_REF", ":", "if", "(", "(", "CorrectionEngine", ".", "this", ".", "filter", "&", "(", "CLASSES", "|", "INTERFACES", "|", "IMPORT", ")", ")", "!=", "0", ")", "{", "char", "[", "]", "packageName", "=", "proposal", ".", "getDeclarationSignature", "(", ")", ";", "CorrectionEngine", ".", "this", ".", "correctionRequestor", ".", "acceptPackage", "(", "packageName", ",", "CharOperation", ".", "subarray", "(", "packageName", ",", "CorrectionEngine", ".", "this", ".", "prefixLength", ",", "packageName", ".", "length", ")", ",", "CorrectionEngine", ".", "this", ".", "correctionStart", ",", "CorrectionEngine", ".", "this", ".", "correctionEnd", ")", ";", "}", "break", ";", "}", "}", "}", ";", "public", "static", "String", "[", "]", "getAllWarningTokens", "(", ")", "{", "return", "CompilerOptions", ".", "warningTokens", ";", "}", "public", "static", "String", "[", "]", "getProblemArguments", "(", "IMarker", "problemMarker", ")", "{", "String", "argumentsString", "=", "problemMarker", ".", "getAttribute", "(", "IJavaModelMarker", ".", "ARGUMENTS", ",", "null", ")", ";", "return", "Util", ".", "getProblemArgumentsFromMarker", "(", "argumentsString", ")", ";", "}", "public", "static", "String", "getWarningToken", "(", "int", "problemID", ")", "{", "int", "irritant", "=", "ProblemReporter", ".", "getIrritant", "(", "problemID", ")", ";", "if", "(", "irritant", "!=", "0", ")", "{", "return", "CompilerOptions", ".", "warningTokenFromIrritant", "(", "irritant", ")", ";", "}", "return", "null", ";", "}", "}", "</s>" ]
5,175
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "ISourceRange", "{", "int", "getLength", "(", ")", ";", "int", "getOffset", "(", ")", ";", "}", "</s>" ]
5,176
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "abstract", "class", "ClasspathVariableInitializer", "{", "public", "ClasspathVariableInitializer", "(", ")", "{", "}", "public", "abstract", "void", "initialize", "(", "String", "variable", ")", ";", "}", "</s>" ]
5,177
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IPackageDeclaration", "extends", "IJavaElement", ",", "ISourceReference", ",", "IAnnotatable", "{", "String", "getElementName", "(", ")", ";", "}", "</s>" ]
5,178
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "java", ".", "io", ".", "File", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "io", ".", "InputStream", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "java", ".", "util", ".", "zip", ".", "ZipEntry", ";", "import", "java", ".", "util", ".", "zip", ".", "ZipFile", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IFile", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IScanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "ITerminalSymbols", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "formatter", ".", "CodeFormatter", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "formatter", ".", "DefaultCodeFormatterConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ".", "ClassFileBytesDisassembler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ".", "ClassFormatException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ".", "IClassFileReader", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "SuffixConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "JarPackageFragmentRoot", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "JavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "JavaModelManager", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "PackageFragment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "ClassFileReader", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Disassembler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "PublicScanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "formatter", ".", "DefaultCodeFormatter", ";", "public", "class", "ToolFactory", "{", "public", "static", "final", "int", "M_FORMAT_NEW", "=", "new", "Integer", "(", "0", ")", ".", "intValue", "(", ")", ";", "public", "static", "final", "int", "M_FORMAT_EXISTING", "=", "new", "Integer", "(", "1", ")", ".", "intValue", "(", ")", ";", "public", "static", "ICodeFormatter", "createCodeFormatter", "(", ")", "{", "Plugin", "jdtCorePlugin", "=", "JavaCore", ".", "getPlugin", "(", ")", ";", "if", "(", "jdtCorePlugin", "==", "null", ")", "return", "null", ";", "IExtensionPoint", "extension", "=", "jdtCorePlugin", ".", "getDescriptor", "(", ")", ".", "getExtensionPoint", "(", "JavaModelManager", ".", "FORMATTER_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", "++", ")", "{", "try", "{", "Object", "execExt", "=", "configElements", "[", "j", "]", ".", "createExecutableExtension", "(", "\"class\"", ")", ";", "if", "(", "execExt", "instanceof", "ICodeFormatter", ")", "{", "return", "(", "ICodeFormatter", ")", "execExt", ";", "}", "}", "catch", "(", "CoreException", "e", ")", "{", "}", "}", "}", "}", "return", "createDefaultCodeFormatter", "(", "null", ")", ";", "}", "public", "static", "CodeFormatter", "createCodeFormatter", "(", "Map", "options", ")", "{", "return", "createCodeFormatter", "(", "options", ",", "M_FORMAT_NEW", ")", ";", "}", "public", "static", "CodeFormatter", "createCodeFormatter", "(", "Map", "options", ",", "int", "mode", ")", "{", "if", "(", "options", "==", "null", ")", "options", "=", "JavaCore", ".", "getOptions", "(", ")", ";", "Map", "currentOptions", "=", "new", "HashMap", "(", "options", ")", ";", "if", "(", "mode", "==", "M_FORMAT_NEW", ")", "{", "currentOptions", ".", "put", "(", "DefaultCodeFormatterConstants", ".", "FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN", ",", "DefaultCodeFormatterConstants", ".", "TRUE", ")", ";", "currentOptions", ".", "put", "(", "DefaultCodeFormatterConstants", ".", "FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN", ",", "DefaultCodeFormatterConstants", ".", "FALSE", ")", ";", "currentOptions", ".", "put", "(", "DefaultCodeFormatterConstants", ".", "FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN", ",", "DefaultCodeFormatterConstants", ".", "FALSE", ")", ";", "}", "return", "new", "DefaultCodeFormatter", "(", "currentOptions", ")", ";", "}", "public", "static", "ClassFileBytesDisassembler", "createDefaultClassFileBytesDisassembler", "(", ")", "{", "return", "new", "Disassembler", "(", ")", ";", "}", "public", "static", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ".", "IClassFileDisassembler", "createDefaultClassFileDisassembler", "(", ")", "{", "class", "DeprecatedDisassembler", "extends", "Disassembler", "implements", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ".", "IClassFileDisassembler", "{", "}", "return", "new", "DeprecatedDisassembler", "(", ")", ";", "}", "public", "static", "IClassFileReader", "createDefaultClassFileReader", "(", "IClassFile", "classfile", ",", "int", "decodingFlag", ")", "{", "IPackageFragmentRoot", "root", "=", "(", "IPackageFragmentRoot", ")", "classfile", ".", "getAncestor", "(", "IJavaElement", ".", "PACKAGE_FRAGMENT_ROOT", ")", ";", "if", "(", "root", "!=", "null", ")", "{", "try", "{", "if", "(", "root", "instanceof", "JarPackageFragmentRoot", ")", "{", "String", "archiveName", "=", "null", ";", "ZipFile", "jar", "=", "null", ";", "try", "{", "jar", "=", "(", "(", "JarPackageFragmentRoot", ")", "root", ")", ".", "getJar", "(", ")", ";", "archiveName", "=", "jar", ".", "getName", "(", ")", ";", "}", "finally", "{", "JavaModelManager", ".", "getJavaModelManager", "(", ")", ".", "closeZipFile", "(", "jar", ")", ";", "}", "PackageFragment", "packageFragment", "=", "(", "PackageFragment", ")", "classfile", ".", "getParent", "(", ")", ";", "String", "classFileName", "=", "classfile", ".", "getElementName", "(", ")", ";", "String", "entryName", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ".", "concatWith", "(", "packageFragment", ".", "names", ",", "classFileName", ",", "'/'", ")", ";", "return", "createDefaultClassFileReader", "(", "archiveName", ",", "entryName", ",", "decodingFlag", ")", ";", "}", "else", "{", "InputStream", "in", "=", "null", ";", "try", "{", "in", "=", "(", "(", "IFile", ")", "(", "(", "JavaElement", ")", "classfile", ")", ".", "resource", "(", ")", ")", ".", "getContents", "(", ")", ";", "return", "createDefaultClassFileReader", "(", "in", ",", "decodingFlag", ")", ";", "}", "finally", "{", "if", "(", "in", "!=", "null", ")", "try", "{", "in", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "}", "}", "}", "}", "catch", "(", "CoreException", "e", ")", "{", "}", "}", "return", "null", ";", "}", "public", "static", "IClassFileReader", "createDefaultClassFileReader", "(", "InputStream", "stream", ",", "int", "decodingFlag", ")", "{", "try", "{", "return", "new", "ClassFileReader", "(", "Util", ".", "getInputStreamAsByteArray", "(", "stream", ",", "-", "1", ")", ",", "decodingFlag", ")", ";", "}", "catch", "(", "ClassFormatException", "e", ")", "{", "return", "null", ";", "}", "catch", "(", "IOException", "e", ")", "{", "return", "null", ";", "}", "}", "public", "static", "IClassFileReader", "createDefaultClassFileReader", "(", "String", "fileName", ",", "int", "decodingFlag", ")", "{", "try", "{", "return", "new", "ClassFileReader", "(", "Util", ".", "getFileByteContent", "(", "new", "File", "(", "fileName", ")", ")", ",", "decodingFlag", ")", ";", "}", "catch", "(", "ClassFormatException", "e", ")", "{", "return", "null", ";", "}", "catch", "(", "IOException", "e", ")", "{", "return", "null", ";", "}", "}", "public", "static", "IClassFileReader", "createDefaultClassFileReader", "(", "String", "zipFileName", ",", "String", "zipEntryName", ",", "int", "decodingFlag", ")", "{", "ZipFile", "zipFile", "=", "null", ";", "try", "{", "if", "(", "JavaModelManager", ".", "ZIP_ACCESS_VERBOSE", ")", "{", "System", ".", "out", ".", "println", "(", "\"(\"", "+", "Thread", ".", "currentThread", "(", ")", "+", "\"\"", "+", "zipFileName", ")", ";", "}", "zipFile", "=", "new", "ZipFile", "(", "zipFileName", ")", ";", "ZipEntry", "zipEntry", "=", "zipFile", ".", "getEntry", "(", "zipEntryName", ")", ";", "if", "(", "zipEntry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "!", "zipEntryName", ".", "toLowerCase", "(", ")", ".", "endsWith", "(", "SuffixConstants", ".", "SUFFIX_STRING_class", ")", ")", "{", "return", "null", ";", "}", "byte", "classFileBytes", "[", "]", "=", "Util", ".", "getZipEntryByteContent", "(", "zipEntry", ",", "zipFile", ")", ";", "return", "new", "ClassFileReader", "(", "classFileBytes", ",", "decodingFlag", ")", ";", "}", "catch", "(", "ClassFormatException", "e", ")", "{", "return", "null", ";", "}", "catch", "(", "IOException", "e", ")", "{", "return", "null", ";", "}", "finally", "{", "if", "(", "zipFile", "!=", "null", ")", "{", "try", "{", "zipFile", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "}", "}", "}", "}", "public", "static", "ICodeFormatter", "createDefaultCodeFormatter", "(", "Map", "options", ")", "{", "if", "(", "options", "==", "null", ")", "options", "=", "JavaCore", ".", "getOptions", "(", ")", ";", "return", "new", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "formatter", ".", "old", ".", "CodeFormatter", "(", "options", ")", ";", "}", "public", "static", "IScanner", "createScanner", "(", "boolean", "tokenizeComments", ",", "boolean", "tokenizeWhiteSpace", ",", "boolean", "assertMode", ",", "boolean", "recordLineSeparator", ")", "{", "long", "complianceLevelValue", "=", "CompilerOptions", ".", "versionToJdkLevel", "(", "JavaCore", ".", "getOption", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ")", ")", ";", "if", "(", "complianceLevelValue", "==", "0", ")", "complianceLevelValue", "=", "ClassFileConstants", ".", "JDK1_4", ";", "PublicScanner", "scanner", "=", "new", "PublicScanner", "(", "tokenizeComments", ",", "tokenizeWhiteSpace", ",", "false", ",", "assertMode", "?", "ClassFileConstants", ".", "JDK1_4", ":", "ClassFileConstants", ".", "JDK1_3", ",", "complianceLevelValue", ",", "null", ",", "null", ",", "true", ")", ";", "scanner", ".", "recordLineSeparator", "=", "recordLineSeparator", ";", "return", "scanner", ";", "}", "public", "static", "IScanner", "createScanner", "(", "boolean", "tokenizeComments", ",", "boolean", "tokenizeWhiteSpace", ",", "boolean", "recordLineSeparator", ",", "String", "sourceLevel", ")", "{", "long", "complianceLevelValue", "=", "CompilerOptions", ".", "versionToJdkLevel", "(", "JavaCore", ".", "getOption", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ")", ")", ";", "if", "(", "complianceLevelValue", "==", "0", ")", "complianceLevelValue", "=", "ClassFileConstants", ".", "JDK1_4", ";", "long", "sourceLevelValue", "=", "CompilerOptions", ".", "versionToJdkLevel", "(", "sourceLevel", ")", ";", "if", "(", "sourceLevelValue", "==", "0", ")", "sourceLevelValue", "=", "ClassFileConstants", ".", "JDK1_3", ";", "PublicScanner", "scanner", "=", "new", "PublicScanner", "(", "tokenizeComments", ",", "tokenizeWhiteSpace", ",", "false", ",", "sourceLevelValue", ",", "complianceLevelValue", ",", "null", ",", "null", ",", "true", ")", ";", "scanner", ".", "recordLineSeparator", "=", "recordLineSeparator", ";", "return", "scanner", ";", "}", "public", "static", "IScanner", "createScanner", "(", "boolean", "tokenizeComments", ",", "boolean", "tokenizeWhiteSpace", ",", "boolean", "recordLineSeparator", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "PublicScanner", "scanner", "=", "null", ";", "long", "sourceLevelValue", "=", "CompilerOptions", ".", "versionToJdkLevel", "(", "sourceLevel", ")", ";", "if", "(", "sourceLevelValue", "==", "0", ")", "sourceLevelValue", "=", "ClassFileConstants", ".", "JDK1_3", ";", "long", "complianceLevelValue", "=", "CompilerOptions", ".", "versionToJdkLevel", "(", "complianceLevel", ")", ";", "if", "(", "complianceLevelValue", "==", "0", ")", "complianceLevelValue", "=", "ClassFileConstants", ".", "JDK1_4", ";", "scanner", "=", "new", "PublicScanner", "(", "tokenizeComments", ",", "tokenizeWhiteSpace", ",", "false", ",", "sourceLevelValue", ",", "complianceLevelValue", ",", "null", ",", "null", ",", "true", ")", ";", "scanner", ".", "recordLineSeparator", "=", "recordLineSeparator", ";", "return", "scanner", ";", "}", "}", "</s>" ]
5,179
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IProblem", ";", "public", "abstract", "class", "CompletionRequestor", "{", "private", "int", "ignoreSet", "=", "0", ";", "private", "String", "[", "]", "favoriteReferences", ";", "private", "int", "requiredProposalAllowSet", "[", "]", "=", "null", ";", "private", "boolean", "requireExtendedContext", "=", "false", ";", "public", "CompletionRequestor", "(", ")", "{", "this", "(", "false", ")", ";", "}", "public", "CompletionRequestor", "(", "boolean", "ignoreAll", ")", "{", "this", ".", "ignoreSet", "=", "ignoreAll", "?", "0xffffffff", ":", "0x00000000", ";", "}", "public", "boolean", "isIgnored", "(", "int", "completionProposalKind", ")", "{", "if", "(", "completionProposalKind", "<", "CompletionProposal", ".", "FIRST_KIND", "||", "completionProposalKind", ">", "CompletionProposal", ".", "LAST_KIND", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "completionProposalKind", ")", ";", "}", "return", "0", "!=", "(", "this", ".", "ignoreSet", "&", "(", "1", "<<", "completionProposalKind", ")", ")", ";", "}", "public", "void", "setIgnored", "(", "int", "completionProposalKind", ",", "boolean", "ignore", ")", "{", "if", "(", "completionProposalKind", "<", "CompletionProposal", ".", "FIRST_KIND", "||", "completionProposalKind", ">", "CompletionProposal", ".", "LAST_KIND", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "completionProposalKind", ")", ";", "}", "if", "(", "ignore", ")", "{", "this", ".", "ignoreSet", "|=", "(", "1", "<<", "completionProposalKind", ")", ";", "}", "else", "{", "this", ".", "ignoreSet", "&=", "~", "(", "1", "<<", "completionProposalKind", ")", ";", "}", "}", "public", "boolean", "isAllowingRequiredProposals", "(", "int", "proposalKind", ",", "int", "requiredProposalKind", ")", "{", "if", "(", "proposalKind", "<", "CompletionProposal", ".", "FIRST_KIND", "||", "proposalKind", ">", "CompletionProposal", ".", "LAST_KIND", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "requiredProposalKind", ")", ";", "}", "if", "(", "requiredProposalKind", "<", "CompletionProposal", ".", "FIRST_KIND", "||", "requiredProposalKind", ">", "CompletionProposal", ".", "LAST_KIND", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "requiredProposalKind", ")", ";", "}", "if", "(", "this", ".", "requiredProposalAllowSet", "==", "null", ")", "return", "false", ";", "return", "0", "!=", "(", "this", ".", "requiredProposalAllowSet", "[", "proposalKind", "]", "&", "(", "1", "<<", "requiredProposalKind", ")", ")", ";", "}", "public", "void", "setAllowsRequiredProposals", "(", "int", "proposalKind", ",", "int", "requiredProposalKind", ",", "boolean", "allow", ")", "{", "if", "(", "proposalKind", "<", "CompletionProposal", ".", "FIRST_KIND", "||", "proposalKind", ">", "CompletionProposal", ".", "LAST_KIND", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "requiredProposalKind", ")", ";", "}", "if", "(", "requiredProposalKind", "<", "CompletionProposal", ".", "FIRST_KIND", "||", "requiredProposalKind", ">", "CompletionProposal", ".", "LAST_KIND", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "requiredProposalKind", ")", ";", "}", "if", "(", "this", ".", "requiredProposalAllowSet", "==", "null", ")", "{", "this", ".", "requiredProposalAllowSet", "=", "new", "int", "[", "CompletionProposal", ".", "LAST_KIND", "+", "1", "]", ";", "}", "if", "(", "allow", ")", "{", "this", ".", "requiredProposalAllowSet", "[", "proposalKind", "]", "|=", "(", "1", "<<", "requiredProposalKind", ")", ";", "}", "else", "{", "this", ".", "requiredProposalAllowSet", "[", "proposalKind", "]", "&=", "~", "(", "1", "<<", "requiredProposalKind", ")", ";", "}", "}", "public", "String", "[", "]", "getFavoriteReferences", "(", ")", "{", "return", "this", ".", "favoriteReferences", ";", "}", "public", "void", "setFavoriteReferences", "(", "String", "[", "]", "favoriteImports", ")", "{", "this", ".", "favoriteReferences", "=", "favoriteImports", ";", "}", "public", "void", "beginReporting", "(", ")", "{", "}", "public", "void", "endReporting", "(", ")", "{", "}", "public", "void", "completionFailure", "(", "IProblem", "problem", ")", "{", "}", "public", "abstract", "void", "accept", "(", "CompletionProposal", "proposal", ")", ";", "public", "void", "acceptContext", "(", "CompletionContext", "context", ")", "{", "}", "public", "boolean", "isExtendedContextRequired", "(", ")", "{", "return", "this", ".", "requireExtendedContext", ";", "}", "public", "void", "setRequireExtendedContext", "(", "boolean", "require", ")", "{", "this", ".", "requireExtendedContext", "=", "require", ";", "}", "}", "</s>" ]
5,180
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IMethod", "extends", "IMember", ",", "IAnnotatable", "{", "IMemberValuePair", "getDefaultValue", "(", ")", "throws", "JavaModelException", ";", "String", "getElementName", "(", ")", ";", "String", "[", "]", "getExceptionTypes", "(", ")", "throws", "JavaModelException", ";", "String", "[", "]", "getTypeParameterSignatures", "(", ")", "throws", "JavaModelException", ";", "ITypeParameter", "[", "]", "getTypeParameters", "(", ")", "throws", "JavaModelException", ";", "int", "getNumberOfParameters", "(", ")", ";", "String", "getKey", "(", ")", ";", "String", "[", "]", "getParameterNames", "(", ")", "throws", "JavaModelException", ";", "String", "[", "]", "getParameterTypes", "(", ")", ";", "String", "[", "]", "getRawParameterNames", "(", ")", "throws", "JavaModelException", ";", "String", "getReturnType", "(", ")", "throws", "JavaModelException", ";", "String", "getSignature", "(", ")", "throws", "JavaModelException", ";", "ITypeParameter", "getTypeParameter", "(", "String", "name", ")", ";", "boolean", "isConstructor", "(", ")", "throws", "JavaModelException", ";", "boolean", "isMainMethod", "(", ")", "throws", "JavaModelException", ";", "boolean", "isResolved", "(", ")", ";", "boolean", "isSimilar", "(", "IMethod", "method", ")", ";", "}", "</s>" ]
5,181
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "ICorrectionRequestor", "{", "void", "acceptClass", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "className", ",", "char", "[", "]", "correctionName", ",", "int", "modifiers", ",", "int", "correctionStart", ",", "int", "correctionEnd", ")", ";", "void", "acceptField", "(", "char", "[", "]", "declaringTypePackageName", ",", "char", "[", "]", "declaringTypeName", ",", "char", "[", "]", "name", ",", "char", "[", "]", "typePackageName", ",", "char", "[", "]", "typeName", ",", "char", "[", "]", "correctionName", ",", "int", "modifiers", ",", "int", "correctionStart", ",", "int", "correctionEnd", ")", ";", "void", "acceptInterface", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "interfaceName", ",", "char", "[", "]", "correctionName", ",", "int", "modifiers", ",", "int", "correctionStart", ",", "int", "correctionEnd", ")", ";", "void", "acceptLocalVariable", "(", "char", "[", "]", "name", ",", "char", "[", "]", "typePackageName", ",", "char", "[", "]", "typeName", ",", "int", "modifiers", ",", "int", "correctionStart", ",", "int", "correctionEnd", ")", ";", "void", "acceptMethod", "(", "char", "[", "]", "declaringTypePackageName", ",", "char", "[", "]", "declaringTypeName", ",", "char", "[", "]", "selector", ",", "char", "[", "]", "[", "]", "parameterPackageNames", ",", "char", "[", "]", "[", "]", "parameterTypeNames", ",", "char", "[", "]", "[", "]", "parameterNames", ",", "char", "[", "]", "returnTypePackageName", ",", "char", "[", "]", "returnTypeName", ",", "char", "[", "]", "correctionName", ",", "int", "modifiers", ",", "int", "correctionStart", ",", "int", "correctionEnd", ")", ";", "void", "acceptPackage", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "correctionName", ",", "int", "correctionStart", ",", "int", "correctionEnd", ")", ";", "}", "</s>" ]
5,182
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IProblem", ";", "public", "class", "CompletionRequestorAdapter", "implements", "ICompletionRequestor", "{", "public", "void", "acceptAnonymousType", "(", "char", "[", "]", "superTypePackageName", ",", "char", "[", "]", "superTypeName", ",", "char", "[", "]", "[", "]", "parameterPackageNames", ",", "char", "[", "]", "[", "]", "parameterTypeNames", ",", "char", "[", "]", "[", "]", "parameterNames", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptClass", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "className", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptError", "(", "IProblem", "error", ")", "{", "}", "public", "void", "acceptField", "(", "char", "[", "]", "declaringTypePackageName", ",", "char", "[", "]", "declaringTypeName", ",", "char", "[", "]", "name", ",", "char", "[", "]", "typePackageName", ",", "char", "[", "]", "typeName", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptInterface", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "interfaceName", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptKeyword", "(", "char", "[", "]", "keywordName", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptLabel", "(", "char", "[", "]", "labelName", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptLocalVariable", "(", "char", "[", "]", "name", ",", "char", "[", "]", "typePackageName", ",", "char", "[", "]", "typeName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptMethod", "(", "char", "[", "]", "declaringTypePackageName", ",", "char", "[", "]", "declaringTypeName", ",", "char", "[", "]", "selector", ",", "char", "[", "]", "[", "]", "parameterPackageNames", ",", "char", "[", "]", "[", "]", "parameterTypeNames", ",", "char", "[", "]", "[", "]", "parameterNames", ",", "char", "[", "]", "returnTypePackageName", ",", "char", "[", "]", "returnTypeName", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptMethodDeclaration", "(", "char", "[", "]", "declaringTypePackageName", ",", "char", "[", "]", "declaringTypeName", ",", "char", "[", "]", "selector", ",", "char", "[", "]", "[", "]", "parameterPackageNames", ",", "char", "[", "]", "[", "]", "parameterTypeNames", ",", "char", "[", "]", "[", "]", "parameterNames", ",", "char", "[", "]", "returnTypePackageName", ",", "char", "[", "]", "returnTypeName", ",", "char", "[", "]", "completionName", ",", "int", "modifiers", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptModifier", "(", "char", "[", "]", "modifierName", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptPackage", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "completionName", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptType", "(", "char", "[", "]", "packageName", ",", "char", "[", "]", "typeName", ",", "char", "[", "]", "completionName", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "public", "void", "acceptVariableName", "(", "char", "[", "]", "typePackageName", ",", "char", "[", "]", "typeName", ",", "char", "[", "]", "name", ",", "char", "[", "]", "completionName", ",", "int", "completionStart", ",", "int", "completionEnd", ",", "int", "relevance", ")", "{", "}", "}", "</s>" ]
5,183
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "interface", "IImportDeclaration", "extends", "IJavaElement", ",", "ISourceReference", ",", "ISourceManipulation", "{", "String", "getElementName", "(", ")", ";", "int", "getFlags", "(", ")", "throws", "JavaModelException", ";", "boolean", "isOnDemand", "(", ")", ";", "}", "</s>" ]
5,184
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "public", "final", "class", "SourceRange", "implements", "ISourceRange", "{", "public", "static", "boolean", "isAvailable", "(", "ISourceRange", "range", ")", "{", "return", "range", "!=", "null", "&&", "range", ".", "getOffset", "(", ")", "!=", "-", "1", ";", "}", "private", "int", "offset", ";", "private", "int", "length", ";", "public", "SourceRange", "(", "int", "offset", ",", "int", "length", ")", "{", "this", ".", "offset", "=", "offset", ";", "this", ".", "length", "=", "length", ";", "}", "public", "boolean", "equals", "(", "Object", "obj", ")", "{", "if", "(", "!", "(", "obj", "instanceof", "ISourceRange", ")", ")", "return", "false", ";", "ISourceRange", "sourceRange", "=", "(", "ISourceRange", ")", "obj", ";", "return", "sourceRange", ".", "getOffset", "(", ")", "==", "this", ".", "offset", "&&", "sourceRange", ".", "getLength", "(", ")", "==", "this", ".", "length", ";", "}", "public", "int", "getLength", "(", ")", "{", "return", "this", ".", "length", ";", "}", "public", "int", "getOffset", "(", ")", "{", "return", "this", ".", "offset", ";", "}", "public", "int", "hashCode", "(", ")", "{", "return", "this", ".", "length", "^", "this", ".", "offset", ";", "}", "public", "String", "toString", "(", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "\"[offset=\"", ")", ";", "buffer", ".", "append", "(", "this", ".", "offset", ")", ";", "buffer", ".", "append", "(", "\",", "length=\"", ")", ";", "buffer", ".", "append", "(", "this", ".", "length", ")", ";", "buffer", ".", "append", "(", "\"]\"", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
5,185
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ";", "import", "java", ".", "util", ".", "StringTokenizer", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IResource", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IWorkspace", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "ResourcesPlugin", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IStatus", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "Status", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "ScannerHelper", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Messages", ";", "public", "final", "class", "JavaConventions", "{", "private", "static", "final", "char", "DOT", "=", "'.'", ";", "private", "static", "final", "String", "PACKAGE_INFO", "=", "new", "String", "(", "TypeConstants", ".", "PACKAGE_INFO_NAME", ")", ";", "private", "static", "final", "Scanner", "SCANNER", "=", "new", "Scanner", "(", "false", ",", "true", ",", "false", ",", "ClassFileConstants", ".", "JDK1_3", ",", "null", ",", "null", ",", "true", ")", ";", "private", "JavaConventions", "(", ")", "{", "}", "public", "static", "boolean", "isOverlappingRoots", "(", "IPath", "rootPath1", ",", "IPath", "rootPath2", ")", "{", "if", "(", "rootPath1", "==", "null", "||", "rootPath2", "==", "null", ")", "{", "return", "false", ";", "}", "return", "rootPath1", ".", "isPrefixOf", "(", "rootPath2", ")", "||", "rootPath2", ".", "isPrefixOf", "(", "rootPath1", ")", ";", "}", "private", "static", "synchronized", "char", "[", "]", "scannedIdentifier", "(", "String", "id", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "if", "(", "id", "==", "null", ")", "{", "return", "null", ";", "}", "SCANNER", ".", "sourceLevel", "=", "sourceLevel", "==", "null", "?", "ClassFileConstants", ".", "JDK1_3", ":", "CompilerOptions", ".", "versionToJdkLevel", "(", "sourceLevel", ")", ";", "SCANNER", ".", "complianceLevel", "=", "complianceLevel", "==", "null", "?", "ClassFileConstants", ".", "JDK1_3", ":", "CompilerOptions", ".", "versionToJdkLevel", "(", "complianceLevel", ")", ";", "try", "{", "SCANNER", ".", "setSource", "(", "id", ".", "toCharArray", "(", ")", ")", ";", "int", "token", "=", "SCANNER", ".", "scanIdentifier", "(", ")", ";", "if", "(", "token", "!=", "TerminalTokens", ".", "TokenNameIdentifier", ")", "return", "null", ";", "if", "(", "SCANNER", ".", "currentPosition", "==", "SCANNER", ".", "eofPosition", ")", "{", "try", "{", "return", "SCANNER", ".", "getCurrentIdentifierSource", "(", ")", ";", "}", "catch", "(", "ArrayIndexOutOfBoundsException", "e", ")", "{", "return", "null", ";", "}", "}", "else", "{", "return", "null", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "return", "null", ";", "}", "}", "public", "static", "IStatus", "validateCompilationUnitName", "(", "String", "name", ")", "{", "return", "validateCompilationUnitName", "(", "name", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateCompilationUnitName", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_unit_nullName", ",", "null", ")", ";", "}", "if", "(", "!", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ".", "isJavaLikeFileName", "(", "name", ")", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_unit_notJavaName", ",", "null", ")", ";", "}", "String", "identifier", ";", "int", "index", ";", "index", "=", "name", ".", "lastIndexOf", "(", "'.'", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_unit_notJavaName", ",", "null", ")", ";", "}", "identifier", "=", "name", ".", "substring", "(", "0", ",", "index", ")", ";", "if", "(", "!", "identifier", ".", "equals", "(", "PACKAGE_INFO", ")", ")", "{", "IStatus", "status", "=", "validateIdentifier", "(", "identifier", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "if", "(", "!", "status", ".", "isOK", "(", ")", ")", "{", "return", "status", ";", "}", "}", "IStatus", "status", "=", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ".", "validateName", "(", "name", ",", "IResource", ".", "FILE", ")", ";", "if", "(", "!", "status", ".", "isOK", "(", ")", ")", "{", "return", "status", ";", "}", "return", "JavaModelStatus", ".", "VERIFIED_OK", ";", "}", "public", "static", "IStatus", "validateClassFileName", "(", "String", "name", ")", "{", "return", "validateClassFileName", "(", "name", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateClassFileName", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_classFile_nullName", ",", "null", ")", ";", "}", "if", "(", "!", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ".", "isClassFileName", "(", "name", ")", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_classFile_notClassFileName", ",", "null", ")", ";", "}", "String", "identifier", ";", "int", "index", ";", "index", "=", "name", ".", "lastIndexOf", "(", "'.'", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_classFile_notClassFileName", ",", "null", ")", ";", "}", "identifier", "=", "name", ".", "substring", "(", "0", ",", "index", ")", ";", "if", "(", "!", "identifier", ".", "equals", "(", "PACKAGE_INFO", ")", ")", "{", "IStatus", "status", "=", "validateIdentifier", "(", "identifier", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "if", "(", "!", "status", ".", "isOK", "(", ")", ")", "{", "return", "status", ";", "}", "}", "IStatus", "status", "=", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ".", "validateName", "(", "name", ",", "IResource", ".", "FILE", ")", ";", "if", "(", "!", "status", ".", "isOK", "(", ")", ")", "{", "return", "status", ";", "}", "return", "JavaModelStatus", ".", "VERIFIED_OK", ";", "}", "public", "static", "IStatus", "validateFieldName", "(", "String", "name", ")", "{", "return", "validateIdentifier", "(", "name", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateFieldName", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "return", "validateIdentifier", "(", "name", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "}", "public", "static", "IStatus", "validateIdentifier", "(", "String", "id", ")", "{", "return", "validateIdentifier", "(", "id", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateIdentifier", "(", "String", "id", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "if", "(", "scannedIdentifier", "(", "id", ",", "sourceLevel", ",", "complianceLevel", ")", "!=", "null", ")", "{", "return", "JavaModelStatus", ".", "VERIFIED_OK", ";", "}", "else", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "bind", "(", "Messages", ".", "convention_illegalIdentifier", ",", "id", ")", ",", "null", ")", ";", "}", "}", "public", "static", "IStatus", "validateImportDeclaration", "(", "String", "name", ")", "{", "return", "validateImportDeclaration", "(", "name", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateImportDeclaration", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "length", "(", ")", "==", "0", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_import_nullImport", ",", "null", ")", ";", "}", "if", "(", "name", ".", "charAt", "(", "name", ".", "length", "(", ")", "-", "1", ")", "==", "'*'", ")", "{", "if", "(", "name", ".", "charAt", "(", "name", ".", "length", "(", ")", "-", "2", ")", "==", "'.'", ")", "{", "return", "validatePackageName", "(", "name", ".", "substring", "(", "0", ",", "name", ".", "length", "(", ")", "-", "2", ")", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "}", "else", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_import_unqualifiedImport", ",", "null", ")", ";", "}", "}", "return", "validatePackageName", "(", "name", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "}", "public", "static", "IStatus", "validateJavaTypeName", "(", "String", "name", ")", "{", "return", "validateJavaTypeName", "(", "name", ",", "JavaCore", ".", "VERSION_1_3", ",", "JavaCore", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateJavaTypeName", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_type_nullName", ",", "null", ")", ";", "}", "String", "trimmed", "=", "name", ".", "trim", "(", ")", ";", "if", "(", "!", "name", ".", "equals", "(", "trimmed", ")", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_type_nameWithBlanks", ",", "null", ")", ";", "}", "int", "index", "=", "name", ".", "lastIndexOf", "(", "'.'", ")", ";", "char", "[", "]", "scannedID", ";", "if", "(", "index", "==", "-", "1", ")", "{", "scannedID", "=", "scannedIdentifier", "(", "name", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "}", "else", "{", "String", "pkg", "=", "name", ".", "substring", "(", "0", ",", "index", ")", ".", "trim", "(", ")", ";", "IStatus", "status", "=", "validatePackageName", "(", "pkg", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "if", "(", "!", "status", ".", "isOK", "(", ")", ")", "{", "return", "status", ";", "}", "String", "type", "=", "name", ".", "substring", "(", "index", "+", "1", ")", ".", "trim", "(", ")", ";", "scannedID", "=", "scannedIdentifier", "(", "type", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "}", "if", "(", "scannedID", "!=", "null", ")", "{", "IStatus", "status", "=", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ".", "validateName", "(", "new", "String", "(", "scannedID", ")", ",", "IResource", ".", "FILE", ")", ";", "if", "(", "!", "status", ".", "isOK", "(", ")", ")", "{", "return", "status", ";", "}", "if", "(", "CharOperation", ".", "contains", "(", "'$'", ",", "scannedID", ")", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "WARNING", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_type_dollarName", ",", "null", ")", ";", "}", "if", "(", "(", "scannedID", ".", "length", ">", "0", "&&", "ScannerHelper", ".", "isLowerCase", "(", "scannedID", "[", "0", "]", ")", ")", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "WARNING", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_type_lowercaseName", ",", "null", ")", ";", "}", "return", "JavaModelStatus", ".", "VERIFIED_OK", ";", "}", "else", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "bind", "(", "Messages", ".", "convention_type_invalidName", ",", "name", ")", ",", "null", ")", ";", "}", "}", "public", "static", "IStatus", "validateMethodName", "(", "String", "name", ")", "{", "return", "validateMethodName", "(", "name", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateMethodName", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "return", "validateIdentifier", "(", "name", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "}", "public", "static", "IStatus", "validatePackageName", "(", "String", "name", ")", "{", "return", "validatePackageName", "(", "name", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validatePackageName", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_package_nullName", ",", "null", ")", ";", "}", "int", "length", ";", "if", "(", "(", "length", "=", "name", ".", "length", "(", ")", ")", "==", "0", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_package_emptyName", ",", "null", ")", ";", "}", "if", "(", "name", ".", "charAt", "(", "0", ")", "==", "DOT", "||", "name", ".", "charAt", "(", "length", "-", "1", ")", "==", "DOT", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_package_dotName", ",", "null", ")", ";", "}", "if", "(", "CharOperation", ".", "isWhitespace", "(", "name", ".", "charAt", "(", "0", ")", ")", "||", "CharOperation", ".", "isWhitespace", "(", "name", ".", "charAt", "(", "name", ".", "length", "(", ")", "-", "1", ")", ")", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_package_nameWithBlanks", ",", "null", ")", ";", "}", "int", "dot", "=", "0", ";", "while", "(", "dot", "!=", "-", "1", "&&", "dot", "<", "length", "-", "1", ")", "{", "if", "(", "(", "dot", "=", "name", ".", "indexOf", "(", "DOT", ",", "dot", "+", "1", ")", ")", "!=", "-", "1", "&&", "dot", "<", "length", "-", "1", "&&", "name", ".", "charAt", "(", "dot", "+", "1", ")", "==", "DOT", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_package_consecutiveDotsName", ",", "null", ")", ";", "}", "}", "IWorkspace", "workspace", "=", "ResourcesPlugin", ".", "getWorkspace", "(", ")", ";", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "name", ",", "\".\"", ")", ";", "boolean", "firstToken", "=", "true", ";", "IStatus", "warningStatus", "=", "null", ";", "while", "(", "st", ".", "hasMoreTokens", "(", ")", ")", "{", "String", "typeName", "=", "st", ".", "nextToken", "(", ")", ";", "typeName", "=", "typeName", ".", "trim", "(", ")", ";", "char", "[", "]", "scannedID", "=", "scannedIdentifier", "(", "typeName", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "if", "(", "scannedID", "==", "null", ")", "{", "return", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "bind", "(", "Messages", ".", "convention_illegalIdentifier", ",", "typeName", ")", ",", "null", ")", ";", "}", "IStatus", "status", "=", "workspace", ".", "validateName", "(", "new", "String", "(", "scannedID", ")", ",", "IResource", ".", "FOLDER", ")", ";", "if", "(", "!", "status", ".", "isOK", "(", ")", ")", "{", "return", "status", ";", "}", "if", "(", "firstToken", "&&", "scannedID", ".", "length", ">", "0", "&&", "ScannerHelper", ".", "isUpperCase", "(", "scannedID", "[", "0", "]", ")", ")", "{", "if", "(", "warningStatus", "==", "null", ")", "{", "warningStatus", "=", "new", "Status", "(", "IStatus", ".", "WARNING", ",", "JavaCore", ".", "PLUGIN_ID", ",", "-", "1", ",", "Messages", ".", "convention_package_uppercaseName", ",", "null", ")", ";", "}", "}", "firstToken", "=", "false", ";", "}", "if", "(", "warningStatus", "!=", "null", ")", "{", "return", "warningStatus", ";", "}", "return", "JavaModelStatus", ".", "VERIFIED_OK", ";", "}", "public", "static", "IJavaModelStatus", "validateClasspath", "(", "IJavaProject", "javaProject", ",", "IClasspathEntry", "[", "]", "rawClasspath", ",", "IPath", "projectOutputLocation", ")", "{", "return", "ClasspathEntry", ".", "validateClasspath", "(", "javaProject", ",", "rawClasspath", ",", "projectOutputLocation", ")", ";", "}", "public", "static", "IJavaModelStatus", "validateClasspathEntry", "(", "IJavaProject", "project", ",", "IClasspathEntry", "entry", ",", "boolean", "checkSourceAttachment", ")", "{", "return", "ClasspathEntry", ".", "validateClasspathEntry", "(", "project", ",", "entry", ",", "checkSourceAttachment", ",", "false", ")", ";", "}", "public", "static", "IStatus", "validateTypeVariableName", "(", "String", "name", ")", "{", "return", "validateIdentifier", "(", "name", ",", "CompilerOptions", ".", "VERSION_1_3", ",", "CompilerOptions", ".", "VERSION_1_3", ")", ";", "}", "public", "static", "IStatus", "validateTypeVariableName", "(", "String", "name", ",", "String", "sourceLevel", ",", "String", "complianceLevel", ")", "{", "return", "validateIdentifier", "(", "name", ",", "sourceLevel", ",", "complianceLevel", ")", ";", "}", "}", "</s>" ]
5,186
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IClassFileDisassembler", "{", "int", "DETAILED", "=", "1", ";", "int", "DEFAULT", "=", "2", ";", "String", "disassemble", "(", "IClassFileReader", "classFileReader", ",", "String", "lineSeparator", ")", ";", "String", "disassemble", "(", "IClassFileReader", "classFileReader", ",", "String", "lineSeparator", ",", "int", "mode", ")", ";", "}", "</s>" ]
5,187
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IVerificationTypeInfo", "{", "public", "static", "final", "int", "ITEM_TOP", "=", "0", ";", "public", "static", "final", "int", "ITEM_INTEGER", "=", "1", ";", "public", "static", "final", "int", "ITEM_FLOAT", "=", "2", ";", "public", "static", "final", "int", "ITEM_DOUBLE", "=", "3", ";", "public", "static", "final", "int", "ITEM_LONG", "=", "4", ";", "public", "static", "final", "int", "ITEM_NULL", "=", "5", ";", "public", "static", "final", "int", "ITEM_UNINITIALIZED_THIS", "=", "6", ";", "public", "static", "final", "int", "ITEM_OBJECT", "=", "7", ";", "public", "static", "final", "int", "ITEM_UNINITIALIZED", "=", "8", ";", "int", "getTag", "(", ")", ";", "int", "getOffset", "(", ")", ";", "int", "getConstantPoolIndex", "(", ")", ";", "char", "[", "]", "getClassTypeName", "(", ")", ";", "}", "</s>" ]
5,188
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IRuntimeInvisibleAnnotationsAttribute", "extends", "IClassFileAttribute", "{", "int", "getAnnotationsNumber", "(", ")", ";", "IAnnotation", "[", "]", "getAnnotations", "(", ")", ";", "}", "</s>" ]
5,189
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "import", "java", ".", "io", ".", "File", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "util", ".", "Enumeration", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "LinkedHashSet", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "java", ".", "util", ".", "PropertyResourceBundle", ";", "import", "java", ".", "util", ".", "Set", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IFile", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IFolder", ";", "import", "org", ".", "eclipse", ".", "core", ".", "resources", ".", "IProject", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "CoreException", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IPath", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IClasspathEntry", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaCore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "public", "class", "CompilerUtils", "{", "public", "static", "final", "int", "IsGrails", "=", "0x0001", ";", "public", "static", "void", "configureOptionsBasedOnNature", "(", "CompilerOptions", "compilerOptions", ",", "IJavaProject", "javaProject", ")", "{", "IProject", "project", "=", "javaProject", ".", "getProject", "(", ")", ";", "try", "{", "if", "(", "isGroovyNaturedProject", "(", "project", ")", ")", "{", "compilerOptions", ".", "storeAnnotations", "=", "true", ";", "compilerOptions", ".", "buildGroovyFiles", "=", "2", ";", "setGroovyClasspath", "(", "compilerOptions", ",", "javaProject", ")", ";", "if", "(", "isProbablyGrailsProject", "(", "project", ")", ")", "{", "compilerOptions", ".", "groovyFlags", "=", "IsGrails", ";", "}", "else", "{", "compilerOptions", ".", "groovyFlags", "=", "0", ";", "}", "}", "else", "{", "compilerOptions", ".", "buildGroovyFiles", "=", "1", ";", "compilerOptions", ".", "groovyFlags", "=", "0", ";", "}", "}", "catch", "(", "CoreException", "e", ")", "{", "compilerOptions", ".", "buildGroovyFiles", "=", "1", ";", "compilerOptions", ".", "groovyFlags", "=", "0", ";", "}", "}", "public", "static", "void", "configureOptionsBasedOnNature", "(", "Map", "optionMap", ",", "IJavaProject", "javaProject", ")", "{", "IProject", "project", "=", "javaProject", ".", "getProject", "(", ")", ";", "try", "{", "if", "(", "isGroovyNaturedProject", "(", "project", ")", ")", "{", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_BuildGroovyFiles", ",", "CompilerOptions", ".", "ENABLED", ")", ";", "setGroovyClasspath", "(", "optionMap", ",", "javaProject", ")", ";", "if", "(", "isProbablyGrailsProject", "(", "project", ")", ")", "{", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_GroovyFlags", ",", "Integer", ".", "toString", "(", "IsGrails", ")", ")", ";", "}", "else", "{", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_GroovyFlags", ",", "\"0\"", ")", ";", "}", "}", "else", "{", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_BuildGroovyFiles", ",", "CompilerOptions", ".", "DISABLED", ")", ";", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_GroovyFlags", ",", "\"0\"", ")", ";", "}", "}", "catch", "(", "CoreException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_BuildGroovyFiles", ",", "CompilerOptions", ".", "DISABLED", ")", ";", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_GroovyFlags", ",", "\"0\"", ")", ";", "}", "}", "private", "static", "boolean", "isProbablyGrailsProject", "(", "IProject", "project", ")", "{", "try", "{", "IFolder", "folder", "=", "project", ".", "getFolder", "(", "\"grails-app\"", ")", ";", "return", "folder", ".", "exists", "(", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "false", ";", "}", "}", "public", "static", "void", "setGroovyClasspath", "(", "CompilerOptions", "compilerOptions", ",", "IJavaProject", "javaProject", ")", "{", "Map", "newOptions", "=", "new", "HashMap", "(", ")", ";", "setGroovyClasspath", "(", "newOptions", ",", "javaProject", ")", ";", "compilerOptions", ".", "groovyProjectName", "=", "javaProject", ".", "getProject", "(", ")", ".", "getName", "(", ")", ";", "if", "(", "!", "newOptions", ".", "isEmpty", "(", ")", ")", "{", "compilerOptions", ".", "set", "(", "newOptions", ")", ";", "}", "}", "public", "static", "void", "setGroovyClasspath", "(", "Map", "optionMap", ",", "IJavaProject", "javaProject", ")", "{", "IFile", "file", "=", "javaProject", ".", "getProject", "(", ")", ".", "getFile", "(", "\"\"", ")", ";", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "try", "{", "PropertyResourceBundle", "prb", "=", "new", "PropertyResourceBundle", "(", "file", ".", "getContents", "(", ")", ")", ";", "Enumeration", "e", "=", "prb", ".", "getKeys", "(", ")", ";", "while", "(", "e", ".", "hasMoreElements", "(", ")", ")", "{", "String", "k", "=", "(", "String", ")", "e", ".", "nextElement", "(", ")", ";", "String", "v", "=", "(", "String", ")", "prb", ".", "getObject", "(", "k", ")", ";", "v", "=", "fixup", "(", "v", ",", "javaProject", ")", ";", "if", "(", "k", ".", "equals", "(", "CompilerOptions", ".", "OPTIONG_GroovyClassLoaderPath", ")", ")", "{", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_GroovyClassLoaderPath", ",", "v", ")", ";", "}", "}", "}", "catch", "(", "IOException", "ioe", ")", "{", "System", ".", "err", ".", "println", "(", "\"\"", ")", ";", "ioe", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "CoreException", "ce", ")", "{", "System", ".", "err", ".", "println", "(", "\"\"", ")", ";", "ce", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "System", ".", "err", ".", "println", "(", "\"\"", ")", ";", "t", ".", "printStackTrace", "(", ")", ";", "}", "}", "else", "{", "try", "{", "String", "classpath", "=", "calculateClasspath", "(", "javaProject", ")", ";", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_GroovyClassLoaderPath", ",", "classpath", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "System", ".", "err", ".", "println", "(", "\"\"", ")", ";", "t", ".", "printStackTrace", "(", ")", ";", "}", "}", "optionMap", ".", "put", "(", "CompilerOptions", ".", "OPTIONG_GroovyProjectName", ",", "javaProject", ".", "getProject", "(", ")", ".", "getName", "(", ")", ")", ";", "}", "private", "static", "String", "fixup", "(", "String", "someString", ",", "IJavaProject", "javaProject", ")", "{", "if", "(", "someString", ".", "startsWith", "(", "\"%projhome%\"", ")", ")", "{", "someString", "=", "javaProject", ".", "getProject", "(", ")", ".", "getLocation", "(", ")", ".", "toOSString", "(", ")", "+", "File", ".", "separator", "+", "someString", ".", "substring", "(", "\"%projhome%\"", ".", "length", "(", ")", ")", ";", "}", "if", "(", "someString", ".", "equals", "(", "\"\"", ")", ")", "{", "someString", "=", "calculateClasspath", "(", "javaProject", ")", ";", "}", "return", "someString", ";", "}", "private", "static", "boolean", "isGroovyNaturedProject", "(", "IProject", "project", ")", "throws", "CoreException", "{", "return", "project", ".", "hasNature", "(", "\"\"", ")", ";", "}", "private", "static", "String", "pathToString", "(", "IPath", "path", ",", "IProject", "project", ")", "{", "String", "realLocation", "=", "null", ";", "if", "(", "path", "!=", "null", ")", "{", "String", "prefix", "=", "path", ".", "segment", "(", "0", ")", ";", "if", "(", "prefix", ".", "equals", "(", "project", ".", "getName", "(", ")", ")", ")", "{", "if", "(", "path", ".", "segmentCount", "(", ")", "==", "1", ")", "{", "IPath", "rawPath", "=", "project", ".", "getRawLocation", "(", ")", ";", "if", "(", "rawPath", "==", "null", ")", "{", "System", ".", "err", ".", "println", "(", "\"\"", "+", "project", ")", ";", "}", "else", "{", "realLocation", "=", "project", ".", "getRawLocation", "(", ")", ".", "toOSString", "(", ")", ";", "}", "}", "else", "{", "realLocation", "=", "project", ".", "getFile", "(", "path", ".", "removeFirstSegments", "(", "1", ")", ")", ".", "getRawLocation", "(", ")", ".", "toOSString", "(", ")", ";", "}", "}", "else", "{", "realLocation", "=", "path", ".", "toOSString", "(", ")", ";", "}", "}", "return", "realLocation", ";", "}", "public", "static", "String", "calculateClasspath", "(", "IJavaProject", "javaProject", ")", "{", "try", "{", "Set", "accumulatedPathEntries", "=", "new", "LinkedHashSet", "(", ")", ";", "IProject", "project", "=", "javaProject", ".", "getProject", "(", ")", ";", "String", "projectName", "=", "project", ".", "getName", "(", ")", ";", "IPath", "defaultOutputPath", "=", "javaProject", ".", "getOutputLocation", "(", ")", ";", "String", "defaultOutputLocation", "=", "pathToString", "(", "defaultOutputPath", ",", "project", ")", ";", "IClasspathEntry", "[", "]", "cpes", "=", "javaProject", ".", "getResolvedClasspath", "(", "true", ")", ";", "if", "(", "cpes", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "cpes", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "IClasspathEntry", "cpe", "=", "cpes", "[", "i", "]", ";", "if", "(", "cpe", ".", "getEntryKind", "(", ")", "==", "IClasspathEntry", ".", "CPE_SOURCE", ")", "{", "continue", ";", "}", "IPath", "cpePath", "=", "cpe", ".", "getPath", "(", ")", ";", "String", "pathElement", "=", "null", ";", "String", "segmentZero", "=", "cpePath", ".", "segment", "(", "0", ")", ";", "if", "(", "segmentZero", ".", "equals", "(", "projectName", ")", ")", "{", "pathElement", "=", "project", ".", "getFile", "(", "cpePath", ".", "removeFirstSegments", "(", "1", ")", ")", ".", "getRawLocation", "(", ")", ".", "toOSString", "(", ")", ";", "}", "else", "{", "if", "(", "cpe", ".", "getEntryKind", "(", ")", "==", "IClasspathEntry", ".", "CPE_LIBRARY", ")", "{", "try", "{", "IProject", "iproject", "=", "project", ".", "getWorkspace", "(", ")", ".", "getRoot", "(", ")", ".", "getProject", "(", "segmentZero", ")", ";", "if", "(", "iproject", "!=", "null", ")", "{", "IFile", "ifile", "=", "iproject", ".", "getFile", "(", "cpePath", ".", "removeFirstSegments", "(", "1", ")", ")", ";", "IPath", "ipath", "=", "(", "ifile", "==", "null", "?", "null", ":", "ifile", ".", "getRawLocation", "(", ")", ")", ";", "pathElement", "=", "(", "ipath", "==", "null", "?", "null", ":", "ipath", ".", "toOSString", "(", ")", ")", ";", "}", "}", "catch", "(", "Throwable", "t", ")", "{", "t", ".", "printStackTrace", "(", ")", ";", "}", "}", "if", "(", "cpe", ".", "getEntryKind", "(", ")", "==", "IClasspathEntry", ".", "CPE_PROJECT", ")", "{", "computeDependenciesFromProject", "(", "project", ",", "segmentZero", ",", "accumulatedPathEntries", ")", ";", "}", "else", "{", "if", "(", "pathElement", "==", "null", ")", "{", "pathElement", "=", "cpe", ".", "getPath", "(", ")", ".", "toOSString", "(", ")", ";", "}", "}", "}", "if", "(", "pathElement", "!=", "null", ")", "{", "accumulatedPathEntries", ".", "add", "(", "pathElement", ")", ";", "}", "}", "accumulatedPathEntries", ".", "add", "(", "defaultOutputLocation", ")", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "Iterator", "iter", "=", "accumulatedPathEntries", ".", "iterator", "(", ")", ";", "while", "(", "iter", ".", "hasNext", "(", ")", ")", "{", "sb", ".", "append", "(", "(", "String", ")", "iter", ".", "next", "(", ")", ")", ";", "sb", ".", "append", "(", "File", ".", "pathSeparator", ")", ";", "}", "String", "classpath", "=", "sb", ".", "toString", "(", ")", ";", "return", "classpath", ";", "}", "}", "catch", "(", "JavaModelException", "jme", ")", "{", "System", ".", "err", ".", "println", "(", "\"\"", "+", "javaProject", ".", "getProject", "(", ")", ".", "getName", "(", ")", "+", "\":\"", ")", ";", "jme", ".", "printStackTrace", "(", ")", ";", "}", "return", "\"\"", ";", "}", "private", "static", "void", "computeDependenciesFromProject", "(", "IProject", "baseProject", ",", "String", "otherProject", ",", "Set", "accumulatedPathEntries", ")", "throws", "JavaModelException", "{", "IProject", "iproject", "=", "baseProject", ".", "getWorkspace", "(", ")", ".", "getRoot", "(", ")", ".", "getProject", "(", "otherProject", ")", ";", "IJavaProject", "ijp", "=", "JavaCore", ".", "create", "(", "iproject", ")", ";", "accumulatedPathEntries", ".", "add", "(", "pathToString", "(", "ijp", ".", "getOutputLocation", "(", ")", ",", "iproject", ")", ")", ";", "IClasspathEntry", "[", "]", "cpes", "=", "ijp", ".", "getResolvedClasspath", "(", "true", ")", ";", "if", "(", "cpes", "!=", "null", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "cpes", ".", "length", ";", "j", "++", ")", "{", "IClasspathEntry", "cpe", "=", "cpes", "[", "j", "]", ";", "if", "(", "cpe", ".", "getEntryKind", "(", ")", "==", "IClasspathEntry", ".", "CPE_SOURCE", ")", "{", "continue", ";", "}", "if", "(", "cpe", ".", "isExported", "(", ")", ")", "{", "IPath", "cpePath", "=", "cpes", "[", "j", "]", ".", "getPath", "(", ")", ";", "String", "segmentZero", "=", "cpePath", ".", "segment", "(", "0", ")", ";", "if", "(", "segmentZero", "!=", "null", "&&", "segmentZero", ".", "equals", "(", "otherProject", ")", ")", "{", "accumulatedPathEntries", ".", "add", "(", "iproject", ".", "getFile", "(", "cpePath", ".", "removeFirstSegments", "(", "1", ")", ")", ".", "getRawLocation", "(", ")", ".", "toOSString", "(", ")", ")", ";", "}", "else", "{", "if", "(", "cpe", ".", "getEntryKind", "(", ")", "==", "IClasspathEntry", ".", "CPE_PROJECT", ")", "{", "computeDependenciesFromProject", "(", "baseProject", ",", "segmentZero", ",", "accumulatedPathEntries", ")", ";", "}", "else", "{", "String", "otherPathElement", "=", "null", ";", "if", "(", "segmentZero", "!=", "null", "&&", "segmentZero", ".", "equals", "(", "iproject", ".", "getName", "(", ")", ")", ")", "{", "otherPathElement", "=", "iproject", ".", "getFile", "(", "cpePath", ".", "removeFirstSegments", "(", "1", ")", ")", ".", "getRawLocation", "(", ")", ".", "toOSString", "(", ")", ";", "}", "else", "{", "otherPathElement", "=", "cpePath", ".", "toOSString", "(", ")", ";", "}", "accumulatedPathEntries", ".", "add", "(", "otherPathElement", ")", ";", "}", "}", "}", "}", "}", "}", "}", "</s>" ]
5,190
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IMethodInfo", "{", "char", "[", "]", "getDescriptor", "(", ")", ";", "int", "getDescriptorIndex", "(", ")", ";", "int", "getAccessFlags", "(", ")", ";", "char", "[", "]", "getName", "(", ")", ";", "int", "getNameIndex", "(", ")", ";", "boolean", "isClinit", "(", ")", ";", "boolean", "isConstructor", "(", ")", ";", "boolean", "isSynthetic", "(", ")", ";", "boolean", "isDeprecated", "(", ")", ";", "ICodeAttribute", "getCodeAttribute", "(", ")", ";", "IExceptionAttribute", "getExceptionAttribute", "(", ")", ";", "int", "getAttributeCount", "(", ")", ";", "IClassFileAttribute", "[", "]", "getAttributes", "(", ")", ";", "}", "</s>" ]
5,191
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IExceptionTableEntry", "{", "int", "getStartPC", "(", ")", ";", "int", "getEndPC", "(", ")", ";", "int", "getHandlerPC", "(", ")", ";", "int", "getCatchTypeIndex", "(", ")", ";", "char", "[", "]", "getCatchType", "(", ")", ";", "}", "</s>" ]
5,192
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IClassFileAttribute", "{", "int", "getAttributeNameIndex", "(", ")", ";", "char", "[", "]", "getAttributeName", "(", ")", ";", "long", "getAttributeLength", "(", ")", ";", "}", "</s>" ]
5,193
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IConstantPoolConstant", "{", "int", "CONSTANT_Class", "=", "7", ";", "int", "CONSTANT_Fieldref", "=", "9", ";", "int", "CONSTANT_Methodref", "=", "10", ";", "int", "CONSTANT_InterfaceMethodref", "=", "11", ";", "int", "CONSTANT_String", "=", "8", ";", "int", "CONSTANT_Integer", "=", "3", ";", "int", "CONSTANT_Float", "=", "4", ";", "int", "CONSTANT_Long", "=", "5", ";", "int", "CONSTANT_Double", "=", "6", ";", "int", "CONSTANT_NameAndType", "=", "12", ";", "int", "CONSTANT_Utf8", "=", "1", ";", "int", "CONSTANT_Methodref_SIZE", "=", "5", ";", "int", "CONSTANT_Class_SIZE", "=", "3", ";", "int", "CONSTANT_Double_SIZE", "=", "9", ";", "int", "CONSTANT_Fieldref_SIZE", "=", "5", ";", "int", "CONSTANT_Float_SIZE", "=", "5", ";", "int", "CONSTANT_Integer_SIZE", "=", "5", ";", "int", "CONSTANT_InterfaceMethodref_SIZE", "=", "5", ";", "int", "CONSTANT_Long_SIZE", "=", "9", ";", "int", "CONSTANT_String_SIZE", "=", "3", ";", "int", "CONSTANT_Utf8_SIZE", "=", "3", ";", "int", "CONSTANT_NameAndType_SIZE", "=", "5", ";", "}", "</s>" ]
5,194
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IRuntimeVisibleAnnotationsAttribute", "extends", "IClassFileAttribute", "{", "int", "getAnnotationsNumber", "(", ")", ";", "IAnnotation", "[", "]", "getAnnotations", "(", ")", ";", "}", "</s>" ]
5,195
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IInnerClassesAttribute", "extends", "IClassFileAttribute", "{", "int", "getNumberOfClasses", "(", ")", ";", "IInnerClassesAttributeEntry", "[", "]", "getInnerClassAttributesEntries", "(", ")", ";", "}", "</s>" ]
5,196
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "ISignatureAttribute", "extends", "IClassFileAttribute", "{", "int", "getSignatureIndex", "(", ")", ";", "char", "[", "]", "getSignature", "(", ")", ";", "}", "</s>" ]
5,197
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IStackMapFrame", "{", "int", "getFrameType", "(", ")", ";", "int", "getOffsetDelta", "(", ")", ";", "int", "getNumberOfLocals", "(", ")", ";", "IVerificationTypeInfo", "[", "]", "getLocals", "(", ")", ";", "int", "getNumberOfStackItems", "(", ")", ";", "IVerificationTypeInfo", "[", "]", "getStackItems", "(", ")", ";", "}", "</s>" ]
5,198
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "interface", "IAnnotationDefaultAttribute", "extends", "IClassFileAttribute", "{", "IAnnotationComponentValue", "getMemberValue", "(", ")", ";", "}", "</s>" ]
5,199
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ";", "public", "class", "ClassFormatException", "extends", "Exception", "{", "public", "static", "final", "int", "ERROR_MALFORMED_UTF8", "=", "1", ";", "public", "static", "final", "int", "ERROR_TRUNCATED_INPUT", "=", "2", ";", "public", "static", "final", "int", "INVALID_CONSTANT_POOL_ENTRY", "=", "3", ";", "public", "static", "final", "int", "TOO_MANY_BYTES", "=", "4", ";", "public", "static", "final", "int", "INVALID_ARGUMENTS_FOR_INVOKEINTERFACE", "=", "5", ";", "public", "static", "final", "int", "INVALID_BYTECODE", "=", "6", ";", "public", "static", "final", "int", "INVALID_TAG_CONSTANT", "=", "7", ";", "public", "static", "final", "int", "INVALID_MAGIC_NUMBER", "=", "8", ";", "private", "static", "final", "long", "serialVersionUID", "=", "6582900558320612988L", ";", "public", "ClassFormatException", "(", "int", "errorID", ")", "{", "}", "public", "ClassFormatException", "(", "String", "message", ")", "{", "super", "(", "message", ")", ";", "}", "public", "ClassFormatException", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "super", "(", "message", ",", "cause", ")", ";", "}", "}", "</s>" ]