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mlvdXIuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi40YzUxYTA4Ci0tLSAvZGV2L251bGwKKysrIGIvcGx1Z2lucy9vcmcuZWNsaXBzZS5qc3Quc2VydmVyLnRvbWNhdC5jb3JlL3RvbWNhdGNvcmUvb3JnL2VjbGlwc2UvanN0L3NlcnZlci90b21jYXQvY29yZS9JVG9tY2F0U2VydmVyQmVoYXZpb3VyLmphdmEKQEAgLTAsMCArMSw0NSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIENvcHlyaWdodCAoYykgMjAwNCBJQk0gQ29ycG9yYXRpb24gYW5kIG90aGVycy4KKyAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMKKyAqIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIENvbW1vbiBQdWJsaWMgTGljZW5zZSB2MS4wCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9jcGwtdjEwLmh0bWwKK6AqCisgKiBDb250cmlidXRvcnM6CisgKiAgICBJQk0gLSBJbml0aWFsIEFQSSBhbmQgaW1wbGVtZW50YXRpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworcGFja2FnZSBvcmcuZWNsaXBzZS5qc3Quc2VydmVyLnRvbWNhdC5jb3JlOworCitpbXBvcnQgb3JnLmVjbGlwc2UuY29yZS5ydW50aW1lLkNvcmVFeGNlcHRpb247CitpbXBvcnQgb3JnLmVjbGlwc2UuY29yZS5ydW50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CAtMCwwICsxLDM2NSBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIENvcHlyaWdodCAoYykgMjAwMywgMjAwNCBJQk0gQ29ycG9yYXRpb24gYW5kIG90aGVycy4KKyAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMKKyAqIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIENvbW1vbiBQdWJsaWMgTGljZW5zZSB2MS4wCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9jcGwtdjEwLmh0bWwKK6AqCisgKiBDb250cmlidXRvcnM6CisgKiAgICBJQk0gLSBJbml0aWFsIEFQSSBhbmQgaW1wbGVtZW50YXRpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworcGFja2FnZSBvcmcuZWNsaXBzZS5qc3Quc2VydmVyLnRvbWNhdC5jb3JlLmludGVybmFsOworCitpbXBvcnQgamF2YS5pby5GaWxlOworaW1wb3J0IGphdmEudXRpbC5BcnJheUxpc3Q7CitpbXBvcnQgamF2YS51dGlsLkl0ZXJhdG9yOworaW1wb3J0IGphdmEudXRpbC5MaXN0OworCitpbXBvcnQgb3JnLmVjbGlwc2UuY29yZS5ydW50aW1lLio7CitpbXBvcnQgb3JnLmVjbGlwc2UuZGVidWcuY29yZS4qOworaW1wb3J0IG9yZy5lY2xpcHNlLmRlYnVnLmNvcmUubW9kZWwuSVByb2Nlc3M7CitpbXBvcnQgb3JnLmVjbGlwc2UuamR0LmxhdW5jaGluZy5JSmF2YU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