id
int32 0
12.9k
| code
sequencelengths 2
264k
|
---|---|
1,300 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"command",
".",
"webxml",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"Jdt",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"ValidateCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"validateXmlErrors",
"(",
")",
"{",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
"}",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"3",
",",
"results",
".",
"size",
"(",
")",
")",
";",
"String",
"file",
"=",
"Eclim",
".",
"resolveFile",
"(",
"Jdt",
".",
"TEST_PROJECT",
",",
"TEST_FILE",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"error",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"line\"",
")",
",",
"12",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"column\"",
")",
",",
"1",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"warning\"",
")",
",",
"false",
")",
";",
"error",
"=",
"results",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
"+",
"\"\"",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"line\"",
")",
",",
"22",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"column\"",
")",
",",
"1",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"warning\"",
")",
",",
"false",
")",
";",
"error",
"=",
"results",
".",
"get",
"(",
"2",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"line\"",
")",
",",
"32",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"column\"",
")",
",",
"1",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"warning\"",
")",
",",
"false",
")",
";",
"}",
"}",
"</s>"
] |
1,301 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"command",
".",
"doc",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"Jdt",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"DocSearchCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"elementSearch",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"Jdt",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"String",
">",
"results",
"=",
"(",
"List",
"<",
"String",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-n\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"68\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
",",
"\"-l\"",
",",
"\"4\"",
",",
"\"-x\"",
",",
"\"declarations\"",
"}",
")",
";",
"normalize",
"(",
"results",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"0",
")",
",",
"\"\"",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"patternSearch",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"Jdt",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"String",
">",
"results",
"=",
"(",
"List",
"<",
"String",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-n\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-p\"",
",",
"\"ArrayList\"",
"}",
")",
";",
"normalize",
"(",
"results",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"0",
")",
",",
"\"\"",
"+",
"\"\"",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"1",
")",
",",
"\"\"",
"+",
"\"\"",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"methodSearch",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"Jdt",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"String",
">",
"results",
"=",
"(",
"List",
"<",
"String",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-n\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-p\"",
",",
"\"\"",
",",
"\"-t\"",
",",
"\"method\"",
"}",
")",
";",
"normalize",
"(",
"results",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"0",
")",
",",
"\"\"",
"+",
"\"\"",
")",
";",
"}",
"private",
"void",
"normalize",
"(",
"List",
"<",
"String",
">",
"results",
")",
"{",
"for",
"(",
"int",
"ii",
"=",
"0",
";",
"ii",
"<",
"results",
".",
"size",
"(",
")",
";",
"ii",
"++",
")",
"{",
"results",
".",
"set",
"(",
"ii",
",",
"results",
".",
"get",
"(",
"ii",
")",
".",
"replaceAll",
"(",
"\"\"",
",",
"\"\"",
")",
")",
";",
"}",
"}",
"}",
"</s>"
] |
1,302 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"command",
".",
"doc",
";",
"import",
"java",
".",
"util",
".",
"regex",
".",
"Pattern",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"Jdt",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"CommentCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"private",
"static",
"final",
"Pattern",
"COMMENT_1",
"=",
"Pattern",
".",
"compile",
"(",
"\"\\\\s+/\\\\*\\\\*n\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\\\\s+",
"\\\\*/\"",
")",
";",
"private",
"static",
"final",
"Pattern",
"COMMENT_2",
"=",
"Pattern",
".",
"compile",
"(",
"\"\\\\s+/\\\\*\\\\*n\"",
"+",
"\"\\\\s+",
"\\\\*n\"",
"+",
"\"\\\\s+",
"\\\\*n\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\\\\s+",
"\\\\*n\"",
"+",
"\"\"",
"+",
"\"\\\\s+",
"\\\\*/\"",
")",
";",
"@",
"Test",
"public",
"void",
"method1",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"Jdt",
".",
"TEST_PROJECT",
")",
")",
";",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"158\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"String",
"contents",
"=",
"Eclim",
".",
"fileToString",
"(",
"Jdt",
".",
"TEST_PROJECT",
",",
"TEST_FILE",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"COMMENT_1",
".",
"matcher",
"(",
"contents",
")",
".",
"find",
"(",
")",
")",
";",
"}",
"@",
"Test",
"public",
"void",
"method2",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"Jdt",
".",
"TEST_PROJECT",
")",
")",
";",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"58\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"String",
"contents",
"=",
"Eclim",
".",
"fileToString",
"(",
"Jdt",
".",
"TEST_PROJECT",
",",
"TEST_FILE",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"'\"",
"+",
"COMMENT_2",
"+",
"\"'\"",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"'\"",
"+",
"contents",
".",
"substring",
"(",
"56",
",",
"158",
")",
"+",
"\"'\"",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"COMMENT_2",
".",
"matcher",
"(",
"contents",
")",
".",
"find",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
1,303 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"command",
".",
"doc",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"Jdt",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"GetElementDocCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"executeLocalElements",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"255\"",
",",
"\"-l\"",
",",
"\"11\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
",",
"result",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
"links",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"result",
".",
"get",
"(",
"\"links\"",
")",
";",
"assertEquals",
"(",
"0",
",",
"links",
".",
"size",
"(",
")",
")",
";",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"275\"",
",",
"\"-l\"",
",",
"\"11\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
",",
"result",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"links",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"result",
".",
"get",
"(",
"\"links\"",
")",
";",
"assertEquals",
"(",
"2",
",",
"links",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"TestPreview\"",
",",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"assertEquals",
"(",
"\"String\"",
",",
"links",
".",
"get",
"(",
"1",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"1",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"300\"",
",",
"\"-l\"",
",",
"\"4\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
"+",
"\"\"",
",",
"result",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"links",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"result",
".",
"get",
"(",
"\"links\"",
")",
";",
"assertEquals",
"(",
"3",
",",
"links",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"String\"",
",",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"assertEquals",
"(",
"\"TestPreview\"",
",",
"links",
".",
"get",
"(",
"1",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"1",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"assertEquals",
"(",
"\"String\"",
",",
"links",
".",
"get",
"(",
"2",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"2",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-u\"",
",",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"href\"",
")",
"}",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"String",
"text",
"=",
"(",
"String",
")",
"result",
".",
"get",
"(",
"\"text\"",
")",
";",
"assertTrue",
"(",
"text",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"executeJdkElements",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"169\"",
",",
"\"-l\"",
",",
"\"4\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"String",
"text",
"=",
"(",
"String",
")",
"result",
".",
"get",
"(",
"\"text\"",
")",
";",
"int",
"index",
"=",
"0",
";",
"if",
"(",
"text",
".",
"indexOf",
"(",
"\"\"",
")",
"!=",
"-",
"1",
")",
"{",
"index",
"=",
"2",
";",
"assertEquals",
"(",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
",",
"result",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
"links",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"result",
".",
"get",
"(",
"\"links\"",
")",
";",
"assertEquals",
"(",
"3",
",",
"links",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"links",
".",
"get",
"(",
"2",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"2",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"}",
"else",
"{",
"index",
"=",
"1",
";",
"assertEquals",
"(",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
",",
"result",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
"links",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"result",
".",
"get",
"(",
"\"links\"",
")",
";",
"assertEquals",
"(",
"3",
",",
"links",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"links",
".",
"get",
"(",
"1",
")",
".",
"get",
"(",
"\"text\"",
")",
")",
";",
"assertTrue",
"(",
"links",
".",
"get",
"(",
"1",
")",
".",
"get",
"(",
"\"href\"",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"}",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
"links",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"result",
".",
"get",
"(",
"\"links\"",
")",
";",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-u\"",
",",
"links",
".",
"get",
"(",
"index",
")",
".",
"get",
"(",
"\"href\"",
")",
"}",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"text",
"=",
"(",
"String",
")",
"result",
".",
"get",
"(",
"\"text\"",
")",
";",
"assertTrue",
"(",
"text",
".",
"startsWith",
"(",
"\"\"",
")",
")",
";",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"574\"",
",",
"\"-l\"",
",",
"\"3\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"2",
",",
"result",
".",
"size",
"(",
")",
")",
";",
"text",
"=",
"(",
"String",
")",
"result",
".",
"get",
"(",
"\"text\"",
")",
";",
"assertTrue",
"(",
"text",
".",
"startsWith",
"(",
"\"\"",
"+",
"\"\"",
")",
")",
";",
"}",
"}",
"</s>"
] |
1,304 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"command",
".",
"hierarchy",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
".",
"Jdt",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"HierarchyCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"test",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"Jdt",
".",
"TEST_PROJECT",
")",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"1\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"children",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"result",
".",
"get",
"(",
"\"children\"",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"child",
"=",
"children",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"subChildren",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
";",
"child",
"=",
"subChildren",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"child",
"=",
"subChildren",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"child",
"=",
"subChildren",
".",
"get",
"(",
"2",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"child",
"=",
"children",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"child",
"=",
"children",
".",
"get",
"(",
"2",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"children",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
";",
"child",
"=",
"children",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"testNested",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"967\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"children",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"result",
".",
"get",
"(",
"\"children\"",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"child",
"=",
"children",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"child",
"=",
"children",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"children",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
";",
"child",
"=",
"children",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"child",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"child",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"Jdt",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"1075\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"name\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"qualified\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"(",
"(",
"List",
"<",
"Object",
">",
")",
"result",
".",
"get",
"(",
"\"children\"",
")",
")",
".",
"size",
"(",
")",
",",
"0",
")",
";",
"}",
"}",
"</s>"
] |
1,305 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"jdt",
";",
"public",
"class",
"Jdt",
"{",
"public",
"static",
"final",
"String",
"TEST_PROJECT",
"=",
"\"\"",
";",
"}",
"</s>"
] |
1,306 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"ant",
";",
"public",
"class",
"Ant",
"{",
"public",
"static",
"final",
"String",
"TEST_PROJECT",
"=",
"\"\"",
";",
"}",
"</s>"
] |
1,307 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"ant",
".",
"command",
".",
"complete",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"ant",
".",
"Ant",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"CodeCompleteCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"build.xml\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"completeProperty",
"(",
")",
"{",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ant_complete\"",
",",
"\"-p\"",
",",
"Ant",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"220\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"Test",
"Value\"",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"completeTarget",
"(",
")",
"{",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ant_complete\"",
",",
"\"-p\"",
",",
"Ant",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"234\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"7",
",",
"results",
".",
"size",
"(",
")",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"0",
")",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"java\"",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"1",
")",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"javac\"",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"2",
")",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"javacc\"",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"3",
")",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"javadoc\"",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"4",
")",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"javadoc2\"",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"5",
")",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"javah\"",
")",
";",
"assertEquals",
"(",
"results",
".",
"get",
"(",
"6",
")",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"javaresource\"",
")",
";",
"}",
"}",
"</s>"
] |
1,308 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"ant",
".",
"command",
".",
"validate",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"ant",
".",
"Ant",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"ValidateCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"build.xml\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"execute",
"(",
")",
"{",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ant_validate\"",
",",
"\"-p\"",
",",
"Ant",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
"}",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"error",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"filename\"",
")",
",",
"Eclim",
".",
"resolveFile",
"(",
"Ant",
".",
"TEST_PROJECT",
",",
"TEST_FILE",
")",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"line\"",
")",
",",
"5",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"column\"",
")",
",",
"2",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"warning\"",
")",
",",
"false",
")",
";",
"}",
"}",
"</s>"
] |
1,309 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"public",
"class",
"TestLinked",
"{",
"public",
"void",
"test",
"(",
")",
"{",
"ArrayList",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
";",
"}",
"public",
"void",
"testAnother",
"(",
")",
"{",
"ArrayList",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
"a",
"(",
")",
";",
"}",
"}",
"</s>"
] |
1,310 | [
"<s>",
"package",
"com",
".",
"eclim",
".",
"test",
";",
"public",
"class",
"TestCom",
"{",
"}",
"</s>"
] |
1,311 | [
"<s>",
"package",
"net",
".",
"eclim",
".",
"test",
";",
"public",
"class",
"TestNet",
"{",
"public",
"static",
"final",
"String",
"FOO",
"=",
"\"foo\"",
";",
"public",
"static",
"final",
"String",
"BAR",
"=",
"\"foo\"",
";",
"}",
"</s>"
] |
1,312 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"correct",
";",
"public",
"class",
"TestCorrectVUnit",
"{",
"private",
"ArrayList",
"list",
";",
"}",
"</s>"
] |
1,313 | [
"<s>",
"package",
"org",
".",
"test",
";",
"public",
"class",
"TestCorrectPackage",
"{",
"}",
"</s>"
] |
1,314 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"correct",
";",
"public",
"class",
"TestCorrect",
"{",
"private",
"ArrayList",
"list",
";",
"}",
"</s>"
] |
1,315 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"format",
";",
"public",
"class",
"TestFormatVUnit",
"{",
"public",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"if",
"(",
"true",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"}",
"}",
"}",
"</s>"
] |
1,316 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"src",
";",
"public",
"class",
"TestCheckstyle",
"{",
"public",
"void",
"test",
"(",
")",
"throws",
"TestException",
"{",
"}",
"public",
"void",
"test",
"(",
"String",
"arg1",
",",
"String",
"arg2",
")",
"{",
"ArrayList",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"}",
"</s>"
] |
1,317 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"src",
";",
"public",
"class",
"TestCheckstyleVUnit",
"{",
"public",
"void",
"test",
"(",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"test",
"(",
"String",
"arg1",
",",
"String",
"arg2",
")",
"{",
"}",
"}",
"</s>"
] |
1,318 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestSrc",
"{",
"public",
"void",
"test",
"(",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
"a",
"(",
")",
";",
"}",
"}",
"</s>"
] |
1,319 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"src",
";",
"public",
"class",
"TestException",
"extends",
"RuntimeException",
"{",
"}",
"</s>"
] |
1,320 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"src",
";",
"public",
"class",
"TestPrototype",
"{",
"public",
"final",
"void",
"test",
"(",
")",
"{",
"}",
"public",
"String",
"testAnother",
"(",
"String",
"blah",
")",
"throws",
"Exception",
"{",
"return",
"\"\"",
":",
"}",
"}",
"</s>"
] |
1,321 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"src",
";",
"public",
"class",
"TestPrototypeVUnit",
"{",
"public",
"final",
"void",
"test",
"(",
")",
"{",
"}",
"public",
"String",
"testAnother",
"(",
"String",
"blah",
")",
"throws",
"Exception",
"{",
"return",
"\"\"",
":",
"}",
"}",
"</s>"
] |
1,322 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"format",
";",
"public",
"class",
"TestFormat",
"{",
"public",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"if",
"(",
"true",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"}",
"}",
"}",
"</s>"
] |
1,323 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestSrcVUnit",
"{",
"public",
"void",
"test",
"(",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
"a",
"(",
")",
";",
"}",
"}",
"</s>"
] |
1,324 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"include",
";",
"public",
"class",
"TestImportVUnit",
"{",
"private",
"String",
"string",
"private",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"Pattern",
"pattern",
";",
"}",
"</s>"
] |
1,325 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"include",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"static",
"net",
".",
"eclim",
".",
"test",
".",
"TestNet",
".",
"FOO",
";",
"import",
"javax",
".",
"swing",
".",
"JComponent",
";",
"import",
"static",
"net",
".",
"eclim",
".",
"test",
".",
"TestNet",
".",
"BAR",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"TestImportOrganizeVUnit",
"{",
"private",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"Pattern",
"pattern",
";",
"private",
"JComponent",
"jcomponent",
";",
"private",
"JTree",
"jtree",
";",
"private",
"SynchronousQueue",
"queue",
";",
"private",
"JList",
"jlist",
";",
"private",
"AWTError",
"awterror",
";",
"private",
"Map",
"map",
"=",
"new",
"HashMap",
"(",
")",
";",
"private",
"TestBean",
"testbean",
";",
"private",
"String",
"FOOBAR",
"=",
"FOO",
"+",
"BAR",
";",
"}",
"</s>"
] |
1,326 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"include",
";",
"import",
"static",
"java",
".",
"lang",
".",
"Math",
".",
"PI",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"public",
"class",
"TestImportOrganize",
"{",
"private",
"List",
"list",
";",
"private",
"ArrayList",
"alist",
";",
"private",
"FooBar",
"bar",
";",
"private",
"Pattern",
"pattern",
";",
"private",
"Map",
"map",
";",
"private",
"Entry",
"entry",
";",
"}",
"</s>"
] |
1,327 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"include",
";",
"public",
"class",
"TestImport",
"{",
"private",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"private",
"Pattern",
"pattern",
";",
"private",
"File",
"file",
";",
"}",
"</s>"
] |
1,328 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"search",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestSearch",
"{",
"private",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"public",
"void",
"test",
"(",
")",
"{",
"list",
".",
"add",
"(",
"\"blah\"",
")",
";",
"}",
"}",
"</s>"
] |
1,329 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"search",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestSearchVUnit",
"{",
"private",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"public",
"void",
"test",
"(",
")",
"{",
"list",
".",
"add",
"(",
"\"blah\"",
")",
";",
"}",
"}",
"</s>"
] |
1,330 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"move",
".",
"p3",
";",
"public",
"class",
"TestMove",
"{",
"}",
"</s>"
] |
1,331 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"move",
".",
"p1",
";",
"public",
"class",
"TestMove",
"{",
"}",
"</s>"
] |
1,332 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"move",
".",
"p1",
";",
"public",
"class",
"UsesMove",
"{",
"private",
"TestMove",
"move",
";",
"}",
"</s>"
] |
1,333 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"n1",
".",
"n2",
";",
"import",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"n1",
".",
"TestN1",
";",
"import",
"static",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"n1",
".",
"TestN1",
".",
"FOO",
";",
"public",
"class",
"TestN2",
"{",
"public",
"static",
"final",
"void",
"test",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"FOO",
")",
";",
"TestN1",
"test",
"=",
"new",
"TestN1",
"(",
")",
";",
"test",
".",
"testMethod",
"(",
")",
";",
"}",
"}",
"</s>"
] |
1,334 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"n1",
";",
"public",
"class",
"TestN1",
"{",
"public",
"static",
"final",
"String",
"FOO",
"=",
"\"value\"",
";",
"public",
"void",
"testMethod",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
1,335 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"vn1",
".",
"vn2",
";",
"import",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"vn1",
".",
"TestN1VUnit",
";",
"import",
"static",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"vn1",
".",
"TestN1VUnit",
".",
"FOO",
";",
"public",
"class",
"TestN2VUnit",
"{",
"public",
"static",
"final",
"void",
"test",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"FOO",
")",
";",
"TestN1VUnit",
"test",
"=",
"new",
"TestN1VUnit",
"(",
")",
";",
"test",
".",
"testMethod",
"(",
")",
";",
"}",
"}",
"</s>"
] |
1,336 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"refactoring",
".",
"rename",
".",
"vn1",
";",
"public",
"class",
"TestN1VUnit",
"{",
"public",
"static",
"final",
"String",
"FOO",
"=",
"\"value\"",
";",
"public",
"void",
"testMethod",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
1,337 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"public",
"enum",
"TestConstructorEnum",
"{",
"ONE",
"(",
"1",
")",
",",
"TWO",
"(",
"2",
")",
",",
"THREE",
"(",
"3",
")",
";",
"private",
"final",
"int",
"number",
";",
"}",
"</s>"
] |
1,338 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"public",
"class",
"TestConstructorVUnit",
"{",
"private",
"int",
"id",
";",
"private",
"String",
"name",
";",
"}",
"</s>"
] |
1,339 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestDelegate",
"{",
"private",
"List",
"<",
"Double",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Double",
">",
"(",
")",
";",
"}",
"</s>"
] |
1,340 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"public",
"class",
"TestBean",
"{",
"private",
"String",
"name",
";",
"private",
"boolean",
"valid",
";",
"private",
"int",
"[",
"]",
"ids",
";",
"}",
"</s>"
] |
1,341 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"public",
"class",
"TestImpl",
"extends",
"HashMap",
"<",
"Integer",
",",
"String",
">",
"implements",
"Comparator",
"<",
"String",
">",
"{",
"}",
"</s>"
] |
1,342 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"public",
"class",
"TestConstructor",
"extends",
"TestConstructorSuper",
"{",
"private",
"Set",
"<",
"String",
">",
"names",
";",
"private",
"Comparator",
"c",
"=",
"new",
"Comparator",
"(",
")",
"{",
"}",
";",
"public",
"class",
"TestInner",
"{",
"private",
"String",
"subName",
";",
"}",
"}",
"</s>"
] |
1,343 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestDelegateVUnit",
"{",
"private",
"List",
"<",
"Double",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Double",
">",
"(",
")",
";",
"}",
"</s>"
] |
1,344 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"public",
"class",
"TestConstructorSuper",
"{",
"private",
"int",
"id",
";",
"private",
"String",
"name",
";",
"}",
"</s>"
] |
1,345 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"public",
"class",
"TestSubImplVUnit",
"extends",
"TestImpl",
"{",
"}",
"</s>"
] |
1,346 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"public",
"class",
"TestSubImpl",
"extends",
"TestImpl",
"{",
"}",
"</s>"
] |
1,347 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"public",
"class",
"TestImplVUnit",
"extends",
"HashMap",
"<",
"Integer",
",",
"String",
">",
"implements",
"Comparator",
"<",
"String",
">",
"{",
"}",
"</s>"
] |
1,348 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"impl",
";",
"import",
"java",
".",
"util",
".",
"Date",
";",
"public",
"class",
"TestBeanVUnit",
"{",
"private",
"String",
"name",
";",
"private",
"String",
"description",
";",
"private",
"Date",
"date",
";",
"private",
"boolean",
"valid",
";",
"private",
"boolean",
"enabled",
";",
"private",
"int",
"[",
"]",
"ids",
";",
"private",
"class",
"SomeClass",
"{",
"}",
"}",
"</s>"
] |
1,349 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
";",
"public",
"class",
"TestMain",
"{",
"public",
"static",
"final",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"if",
"(",
"args",
".",
"length",
">",
"0",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"for",
"(",
"String",
"arg",
":",
"args",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"arg",
")",
";",
"}",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"}",
"}",
"}",
"</s>"
] |
1,350 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"hierarchy",
";",
"import",
"java",
".",
"awt",
".",
"Component",
";",
"import",
"java",
".",
"beans",
".",
"PropertyChangeListener",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"internal",
".",
"resources",
".",
"Container",
";",
"public",
"class",
"TestHierarchyVUnit",
"extends",
"Component",
"implements",
"Comparable",
",",
"PropertyChangeListener",
"{",
"private",
"class",
"TestNested",
"extends",
"Container",
"implements",
"Comparable",
",",
"PropertyChangeListener",
"{",
"}",
"private",
"class",
"Test",
"{",
"}",
"}",
"</s>"
] |
1,351 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"hierarchy",
";",
"import",
"java",
".",
"awt",
".",
"Component",
";",
"import",
"java",
".",
"beans",
".",
"PropertyChangeListener",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"internal",
".",
"resources",
".",
"Container",
";",
"public",
"class",
"TestHierarchy",
"extends",
"Component",
"implements",
"Comparable",
",",
"PropertyChangeListener",
"{",
"private",
"class",
"TestNested",
"extends",
"Container",
"implements",
"Comparable",
",",
"PropertyChangeListener",
"{",
"}",
"private",
"class",
"Test",
"{",
"}",
"}",
"</s>"
] |
1,352 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"doc",
";",
"public",
"class",
"TestCommentVUnit",
"{",
"public",
"String",
"test",
"(",
"int",
"_id",
",",
"String",
"_name",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"return",
"\"\"",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"_other",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
1,353 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"doc",
";",
"public",
"class",
"TestDocSearchVUnit",
"{",
"private",
"List",
"list",
";",
"}",
"</s>"
] |
1,354 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"doc",
";",
"public",
"class",
"TestDocSearch",
"{",
"private",
"List",
"list",
";",
"}",
"</s>"
] |
1,355 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"doc",
".",
"javadoc",
";",
"public",
"class",
"TestJavadoc",
"{",
"public",
"static",
"final",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"}",
"}",
"</s>"
] |
1,356 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"doc",
".",
"javadoc",
";",
"public",
"class",
"TestJavadocVUnit",
"{",
"public",
"static",
"final",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"}",
"}",
"</s>"
] |
1,357 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"doc",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"public",
"class",
"TestPreview",
"{",
"private",
"List",
"list",
";",
"private",
"Map",
"map",
";",
"public",
"static",
"final",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"TestPreview",
"p",
"=",
"new",
"TestPreview",
"(",
"args",
")",
";",
"p",
".",
"test",
"(",
")",
";",
"}",
"public",
"TestPreview",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"}",
"public",
"String",
"test",
"(",
")",
"{",
"map",
".",
"put",
"(",
"\"test\"",
",",
"\"test\"",
")",
";",
"}",
"}",
"</s>"
] |
1,358 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"doc",
";",
"public",
"class",
"TestComment",
"{",
"public",
"String",
"test",
"(",
"int",
"_id",
",",
"String",
"_name",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"return",
"\"\"",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"_other",
")",
"{",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
1,359 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"logging",
";",
"public",
"class",
"TestLoggingVUnit",
"{",
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"}",
"}",
"</s>"
] |
1,360 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"complete",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TestCompletion",
"{",
"public",
"void",
"test",
"(",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
"}",
"public",
"void",
"testAnother",
"(",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
"a",
"(",
")",
";",
"}",
"public",
"void",
"testMissingImport",
"(",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"(",
"(",
"Map",
")",
"list",
".",
"get",
"(",
"0",
")",
")",
".",
"p",
"}",
"public",
"void",
"testMissingImportStatic",
"(",
")",
"{",
"Component",
".",
"}",
"}",
"</s>"
] |
1,361 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"complete",
";",
"public",
"class",
"TestUnicode",
"{",
"public",
"void",
"test",
"(",
")",
"{",
"System",
".",
"out",
".",
"pr",
"(",
")",
";",
"}",
"public",
"static",
"final",
"void",
"main",
"(",
"String",
"[",
"]",
"_args",
")",
"{",
"System",
".",
"out",
".",
"pr",
"(",
"\"test\"",
")",
";",
"}",
"}",
"</s>"
] |
1,362 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"complete",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"public",
"class",
"TestCompletionVUnit",
"{",
"public",
"void",
"testAnother",
"(",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
"a",
"(",
")",
";",
"}",
"public",
"void",
"test",
"(",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"list",
".",
";",
"}",
"}",
"</s>"
] |
1,363 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"public",
"class",
"SomeClassVUnit",
"extends",
"SomeSuperClass",
"implements",
"Comparator",
"<",
"String",
">",
"{",
"public",
"void",
"aMethod",
"(",
")",
"{",
"}",
"public",
"void",
"aMethod",
"(",
"String",
"name",
")",
"{",
"}",
"public",
"void",
"anotherMethod",
"(",
"int",
"id",
")",
"{",
"}",
"}",
"</s>"
] |
1,364 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
";",
"public",
"class",
"Testme",
"{",
"public",
"void",
"me",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
1,365 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
".",
"run",
";",
"public",
"class",
"Foo",
"{",
"public",
"String",
"foo",
"(",
")",
"{",
"return",
"\"foo",
"called\"",
";",
"}",
"public",
"String",
"foo",
"(",
"String",
"name",
")",
"{",
"return",
"\"\"",
"+",
"name",
";",
"}",
"public",
"int",
"bar",
"(",
")",
"{",
"return",
"42",
";",
"}",
"}",
"</s>"
] |
1,366 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
".",
"run",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"public",
"class",
"FooTest",
"{",
"@",
"Test",
"public",
"void",
"foo",
"(",
")",
"{",
"Foo",
"foo",
"=",
"new",
"Foo",
"(",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"foo",
".",
"foo",
"(",
"\"test\"",
")",
")",
";",
"}",
"@",
"Test",
"public",
"void",
"fooString",
"(",
")",
"{",
"Foo",
"foo",
"=",
"new",
"Foo",
"(",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"foo",
".",
"foo",
"(",
"\"test\"",
")",
")",
";",
"}",
"@",
"Test",
"public",
"void",
"bar",
"(",
")",
"{",
"Foo",
"foo",
"=",
"new",
"Foo",
"(",
")",
";",
"assertEquals",
"(",
"42",
",",
"foo",
".",
"bar",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
1,367 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
".",
"run",
";",
"public",
"class",
"Bar",
"{",
"public",
"String",
"bar",
"(",
")",
"{",
"return",
"\"bar",
"called\"",
";",
"}",
"}",
"</s>"
] |
1,368 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
".",
"run",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"public",
"class",
"BarTest",
"{",
"@",
"Test",
"public",
"void",
"bar",
"(",
")",
"{",
"Bar",
"bar",
"=",
"new",
"Bar",
"(",
")",
";",
"assertEquals",
"(",
"\"bar",
"called\"",
",",
"bar",
".",
"bar",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
1,369 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
";",
"public",
"class",
"SomeSuperClass",
"{",
"public",
"void",
"aSuperMethod",
"(",
")",
"{",
"}",
"}",
"</s>"
] |
1,370 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"public",
"class",
"SomeClass",
"extends",
"SomeSuperClass",
"implements",
"Comparator",
"<",
"String",
">",
"{",
"public",
"void",
"aMethod",
"(",
")",
"{",
"}",
"public",
"void",
"aMethod",
"(",
"String",
"name",
")",
"{",
"}",
"public",
"void",
"anotherMethod",
"(",
"int",
"id",
")",
"{",
"}",
"}",
"</s>"
] |
1,371 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
";",
"public",
"class",
"SomeClassTest",
"{",
"}",
"</s>"
] |
1,372 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
";",
"public",
"class",
"SomeClassVUnitTest",
"{",
"}",
"</s>"
] |
1,373 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"test",
".",
"junit",
".",
"tests",
";",
"public",
"class",
"Testme",
"{",
"}",
"</s>"
] |
1,374 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
";",
"import",
"org",
".",
"eclim",
".",
"Services",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"AbstractPluginResources",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"project",
".",
"ProjectManagement",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"project",
".",
"ProjectNatureFactory",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"preference",
".",
"DltkInterpreterTypeManager",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"util",
".",
"DltkUtils",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"project",
".",
"RubyProjectManager",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"ruby",
".",
"core",
".",
"RubyNature",
";",
"public",
"class",
"PluginResources",
"extends",
"AbstractPluginResources",
"{",
"public",
"static",
"final",
"String",
"NAME",
"=",
"\"\"",
";",
"@",
"Override",
"public",
"void",
"initialize",
"(",
"String",
"name",
")",
"{",
"super",
".",
"initialize",
"(",
"name",
")",
";",
"ProjectNatureFactory",
".",
"addNature",
"(",
"\"ruby\"",
",",
"RubyNature",
".",
"NATURE_ID",
")",
";",
"ProjectManagement",
".",
"addProjectManager",
"(",
"RubyNature",
".",
"NATURE_ID",
",",
"new",
"RubyProjectManager",
"(",
")",
")",
";",
"DltkUtils",
".",
"addDltkNature",
"(",
"RubyNature",
".",
"NATURE_ID",
")",
";",
"DltkInterpreterTypeManager",
".",
"addInterpreterType",
"(",
"\"ruby\"",
",",
"RubyNature",
".",
"NATURE_ID",
",",
"\"\"",
")",
";",
"DltkInterpreterTypeManager",
".",
"addInterpreterType",
"(",
"\"jruby\"",
",",
"RubyNature",
".",
"NATURE_ID",
",",
"\"\"",
")",
";",
"}",
"protected",
"String",
"getBundleBaseName",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"}",
"</s>"
] |
1,375 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"project",
";",
"import",
"org",
".",
"eclim",
".",
"command",
".",
"CommandLine",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"project",
".",
"DltkProjectManager",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"util",
".",
"DltkUtils",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IFile",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProject",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProjectNature",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"NullProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"core",
".",
"DLTKCore",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"core",
".",
"DLTKLanguageManager",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"core",
".",
"IDLTKLanguageToolkit",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"core",
".",
"IScriptProject",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"core",
".",
"ISourceModule",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"ruby",
".",
"core",
".",
"RubyNature",
";",
"public",
"class",
"RubyProjectManager",
"extends",
"DltkProjectManager",
"{",
"public",
"void",
"create",
"(",
"IProject",
"project",
",",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"super",
".",
"create",
"(",
"project",
",",
"commandLine",
")",
";",
"IProjectNature",
"nature",
"=",
"project",
".",
"getNature",
"(",
"RubyNature",
".",
"NATURE_ID",
")",
";",
"nature",
".",
"configure",
"(",
")",
";",
"IScriptProject",
"scriptProject",
"=",
"DLTKCore",
".",
"create",
"(",
"project",
")",
";",
"scriptProject",
".",
"makeConsistent",
"(",
"null",
")",
";",
"scriptProject",
".",
"save",
"(",
"null",
",",
"false",
")",
";",
"}",
"public",
"void",
"refresh",
"(",
"IProject",
"project",
",",
"IFile",
"file",
")",
"throws",
"Exception",
"{",
"ISourceModule",
"module",
"=",
"DltkUtils",
".",
"getSourceModule",
"(",
"file",
")",
";",
"if",
"(",
"module",
"!=",
"null",
")",
"{",
"module",
".",
"makeConsistent",
"(",
"new",
"NullProgressMonitor",
"(",
")",
")",
";",
"}",
"}",
"@",
"Override",
"public",
"IDLTKLanguageToolkit",
"getLanguageToolkit",
"(",
")",
"{",
"return",
"DLTKLanguageManager",
".",
"getLanguageToolkit",
"(",
"RubyNature",
".",
"NATURE_ID",
")",
";",
"}",
"}",
"</s>"
] |
1,376 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"command",
".",
"launching",
";",
"import",
"org",
".",
"eclim",
".",
"annotation",
".",
"Command",
";",
"import",
"org",
".",
"eclim",
".",
"command",
".",
"CommandLine",
";",
"import",
"org",
".",
"eclim",
".",
"logging",
".",
"Logger",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"preference",
".",
"DltkInterpreterTypeManager",
";",
"import",
"org",
".",
"eclim",
".",
"util",
".",
"CommandExecutor",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"launching",
".",
"IInterpreterInstallType",
";",
"@",
"Command",
"(",
"name",
"=",
"\"\"",
",",
"options",
"=",
"\"\"",
"+",
"\"\"",
")",
"public",
"class",
"AddInterpreterCommand",
"extends",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"command",
".",
"launching",
".",
"AddInterpreterCommand",
"{",
"private",
"static",
"final",
"Logger",
"logger",
"=",
"Logger",
".",
"getLogger",
"(",
"AddInterpreterCommand",
".",
"class",
")",
";",
"@",
"Override",
"protected",
"IInterpreterInstallType",
"getInterpreterInstallType",
"(",
"String",
"nature",
",",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"String",
"interpreterPath",
"=",
"commandLine",
".",
"getValue",
"(",
"\"i\"",
")",
";",
"String",
"type",
"=",
"\"ruby\"",
";",
"CommandExecutor",
"process",
"=",
"CommandExecutor",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"interpreterPath",
",",
"\"--version\"",
",",
"}",
",",
"5000",
")",
";",
"if",
"(",
"process",
".",
"getReturnCode",
"(",
")",
"==",
"-",
"1",
")",
"{",
"process",
".",
"destroy",
"(",
")",
";",
"logger",
".",
"error",
"(",
"\"\"",
")",
";",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"else",
"if",
"(",
"process",
".",
"getReturnCode",
"(",
")",
">",
"0",
")",
"{",
"logger",
".",
"error",
"(",
"\"\"",
"+",
"process",
".",
"getErrorMessage",
"(",
")",
")",
";",
"throw",
"new",
"RuntimeException",
"(",
"\"ruby",
"error:",
"\"",
"+",
"process",
".",
"getErrorMessage",
"(",
")",
")",
";",
"}",
"if",
"(",
"process",
".",
"getResult",
"(",
")",
".",
"indexOf",
"(",
"\"jruby\"",
")",
"!=",
"-",
"1",
")",
"{",
"type",
"=",
"\"jruby\"",
";",
"}",
"return",
"DltkInterpreterTypeManager",
".",
"getInterpreterInstallType",
"(",
"type",
",",
"nature",
")",
";",
"}",
"}",
"</s>"
] |
1,377 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"command",
".",
"complete",
";",
"import",
"java",
".",
"util",
".",
"regex",
".",
"Matcher",
";",
"import",
"java",
".",
"util",
".",
"regex",
".",
"Pattern",
";",
"import",
"org",
".",
"eclim",
".",
"annotation",
".",
"Command",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"command",
".",
"complete",
".",
"AbstractCodeCompleteCommand",
";",
"import",
"org",
".",
"eclim",
".",
"util",
".",
"StringUtils",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"core",
".",
"ISourceModule",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"ruby",
".",
"internal",
".",
"ui",
".",
"text",
".",
"completion",
".",
"RubyCompletionProposalCollector",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"ui",
".",
"text",
".",
"completion",
".",
"IScriptCompletionProposal",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"ui",
".",
"text",
".",
"completion",
".",
"ScriptCompletionProposalCollector",
";",
"@",
"Command",
"(",
"name",
"=",
"\"\"",
",",
"options",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
")",
"public",
"class",
"CodeCompleteCommand",
"extends",
"AbstractCodeCompleteCommand",
"{",
"private",
"static",
"final",
"Pattern",
"DISPALY_TO_COMPLETION",
"=",
"Pattern",
".",
"compile",
"(",
"\"\"",
")",
";",
"private",
"static",
"final",
"Pattern",
"METHOD_WITH_ARGS",
"=",
"Pattern",
".",
"compile",
"(",
"\"\"",
")",
";",
"@",
"Override",
"protected",
"ScriptCompletionProposalCollector",
"getCompletionCollector",
"(",
"ISourceModule",
"module",
")",
"throws",
"Exception",
"{",
"return",
"new",
"RubyCompletionProposalCollector",
"(",
"module",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getCompletion",
"(",
"IScriptCompletionProposal",
"proposal",
")",
"{",
"String",
"completion",
"=",
"proposal",
".",
"getDisplayString",
"(",
")",
".",
"trim",
"(",
")",
";",
"completion",
"=",
"DISPALY_TO_COMPLETION",
".",
"matcher",
"(",
"completion",
")",
".",
"replaceFirst",
"(",
"\"$1\"",
")",
";",
"Matcher",
"matcher",
"=",
"METHOD_WITH_ARGS",
".",
"matcher",
"(",
"completion",
")",
";",
"if",
"(",
"matcher",
".",
"find",
"(",
")",
")",
"{",
"completion",
"=",
"matcher",
".",
"group",
"(",
"1",
")",
";",
"}",
"else",
"if",
"(",
"completion",
".",
"endsWith",
"(",
"\"()\"",
")",
")",
"{",
"completion",
"=",
"completion",
".",
"substring",
"(",
"0",
",",
"completion",
".",
"length",
"(",
")",
"-",
"2",
")",
";",
"}",
"return",
"completion",
";",
"}",
"@",
"Override",
"protected",
"String",
"getInfo",
"(",
"IScriptCompletionProposal",
"proposal",
")",
"{",
"return",
"StringUtils",
".",
"EMPTY",
";",
"}",
"}",
"</s>"
] |
1,378 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"command",
".",
"src",
";",
"import",
"org",
".",
"eclim",
".",
"annotation",
".",
"Command",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"command",
".",
"src",
".",
"AbstractSrcUpdateCommand",
";",
"import",
"org",
".",
"eclipse",
".",
"dltk",
".",
"ruby",
".",
"core",
".",
"RubyNature",
";",
"@",
"Command",
"(",
"name",
"=",
"\"\"",
",",
"options",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
")",
"public",
"class",
"SrcUpdateCommand",
"extends",
"AbstractSrcUpdateCommand",
"{",
"@",
"Override",
"protected",
"String",
"getNature",
"(",
")",
"{",
"return",
"RubyNature",
".",
"NATURE_ID",
";",
"}",
"}",
"</s>"
] |
1,379 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"command",
".",
"search",
";",
"import",
"org",
".",
"eclim",
".",
"annotation",
".",
"Command",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"project",
".",
"ProjectNatureFactory",
";",
"@",
"Command",
"(",
"name",
"=",
"\"ruby_search\"",
",",
"options",
"=",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
"+",
"\"\"",
")",
"public",
"class",
"SearchCommand",
"extends",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltk",
".",
"command",
".",
"search",
".",
"SearchCommand",
"{",
"@",
"Override",
"protected",
"String",
"getNature",
"(",
")",
"{",
"return",
"ProjectNatureFactory",
".",
"getNatureForAlias",
"(",
"\"ruby\"",
")",
";",
"}",
"@",
"Override",
"protected",
"String",
"getElementSeparator",
"(",
")",
"{",
"return",
"\"",
":",
"\"",
";",
"}",
"}",
"</s>"
] |
1,380 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
";",
"public",
"class",
"DltkRuby",
"{",
"public",
"static",
"final",
"String",
"TEST_PROJECT",
"=",
"\"\"",
";",
"}",
"</s>"
] |
1,381 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"command",
".",
"complete",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"DltkRuby",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"CodeCompleteCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"completeStatic",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"107\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"2",
",",
"results",
".",
"size",
"(",
")",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"ID\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"ID\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"completeStaticPrefix",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"92\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"1",
",",
"results",
".",
"size",
"(",
")",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"completeInstance",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"42\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"results",
".",
"size",
"(",
")",
">",
"25",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"testA\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"testB\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"completeInstancePrefix",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"54\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"results",
".",
"size",
"(",
")",
">=",
"2",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"results",
".",
"size",
"(",
")",
"<=",
"3",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"testA\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"testB\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"completeBuiltins",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"63\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"results",
".",
"size",
"(",
")",
">=",
"2",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"each\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"1",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"each_index\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"70\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
"}",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"1",
",",
"results",
".",
"size",
"(",
")",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"completion\"",
")",
",",
"\"times\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"menu\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"info\"",
")",
",",
"\"\"",
")",
";",
"}",
"}",
"</s>"
] |
1,382 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"command",
".",
"src",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"DltkRuby",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"SrcUpdateCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"validate",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-v\"",
"}",
")",
";",
"String",
"file",
"=",
"Eclim",
".",
"resolveFile",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"TEST_FILE",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"error",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"line\"",
")",
",",
"2",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"column\"",
")",
",",
"11",
")",
";",
"assertEquals",
"(",
"error",
".",
"get",
"(",
"\"warning\"",
")",
",",
"false",
")",
";",
"}",
"}",
"</s>"
] |
1,383 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"command",
".",
"search",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"dltkruby",
".",
"DltkRuby",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"SearchCommandTest",
"{",
"private",
"static",
"final",
"String",
"TEST_FILE",
"=",
"\"\"",
";",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"searchClass",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-p\"",
",",
"\"TestClass\"",
",",
"\"-t\"",
",",
"\"class\"",
"}",
")",
";",
"String",
"file",
"=",
"Eclim",
".",
"resolveFile",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"src/test.rb\"",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"11",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"7",
")",
";",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"23\"",
",",
"\"-l\"",
",",
"\"9\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
",",
"\"-x\"",
",",
"\"declarations\"",
"}",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"11",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"7",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"searchModule",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-p\"",
",",
"\"TestModule\"",
",",
"}",
")",
";",
"String",
"file",
"=",
"Eclim",
".",
"resolveFile",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"src/test.rb\"",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"1",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"8",
")",
";",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"69\"",
",",
"\"-l\"",
",",
"\"10\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
",",
"\"-x\"",
",",
"\"declarations\"",
"}",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"1",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"8",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"searchMethod",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-p\"",
",",
"\"testA\"",
",",
"\"-t\"",
",",
"\"method\"",
"}",
")",
";",
"String",
"file",
"=",
"Eclim",
".",
"resolveFile",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"src/test.rb\"",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"13",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"7",
")",
";",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"42\"",
",",
"\"-l\"",
",",
"\"5\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
",",
"\"-x\"",
",",
"\"declarations\"",
"}",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"13",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"7",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"searchFunction",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-p\"",
",",
"\"testFunction\"",
",",
"\"-t\"",
",",
"\"function\"",
"}",
")",
";",
"String",
"file",
"=",
"Eclim",
".",
"resolveFile",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"src/test.rb\"",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"21",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"5",
")",
";",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"104\"",
",",
"\"-l\"",
",",
"\"12\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
",",
"\"-x\"",
",",
"\"declarations\"",
"}",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"21",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"5",
")",
";",
"}",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"searchField",
"(",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"Eclim",
".",
"projectExists",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
")",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-p\"",
",",
"\"CONSTANT\"",
",",
"\"-t\"",
",",
"\"field\"",
"}",
")",
";",
"String",
"file",
"=",
"Eclim",
".",
"resolveFile",
"(",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"src/test.rb\"",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"12",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"3",
")",
";",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"ruby_search\"",
",",
"\"-n\"",
",",
"DltkRuby",
".",
"TEST_PROJECT",
",",
"\"-f\"",
",",
"TEST_FILE",
",",
"\"-o\"",
",",
"\"59\"",
",",
"\"-l\"",
",",
"\"8\"",
",",
"\"-e\"",
",",
"\"utf-8\"",
",",
"\"-x\"",
",",
"\"declarations\"",
"}",
")",
";",
"result",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"filename\"",
")",
",",
"file",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"line\"",
")",
",",
"12",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"column\"",
")",
",",
"3",
")",
";",
"}",
"}",
"</s>"
] |
1,384 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"org",
".",
"eclim",
".",
"Services",
";",
"import",
"org",
".",
"eclim",
".",
"logging",
".",
"Logger",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"AbstractPluginResources",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"preference",
".",
"OptionHandler",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"project",
".",
"AndroidProjectManager",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"preference",
".",
"Option",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"preference",
".",
"Preferences",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"preference",
".",
"Validator",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"project",
".",
"ProjectManagement",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"project",
".",
"ProjectNatureFactory",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"AdtConstants",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"AdtPlugin",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"internal",
".",
"preferences",
".",
"AdtPrefs",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"internal",
".",
"sdk",
".",
"Sdk",
";",
"public",
"class",
"PluginResources",
"extends",
"AbstractPluginResources",
"{",
"private",
"static",
"final",
"Logger",
"logger",
"=",
"Logger",
".",
"getLogger",
"(",
"PluginResources",
".",
"class",
")",
";",
"public",
"static",
"final",
"String",
"NAME",
"=",
"\"\"",
";",
"public",
"static",
"final",
"String",
"NATURE",
"=",
"AdtConstants",
".",
"NATURE_DEFAULT",
";",
"@",
"Override",
"public",
"void",
"initialize",
"(",
"String",
"name",
")",
"{",
"super",
".",
"initialize",
"(",
"name",
")",
";",
"Sdk",
".",
"getCurrent",
"(",
")",
";",
"Preferences",
".",
"addOptionHandler",
"(",
"\"\"",
",",
"new",
"OptionHandler",
"(",
")",
")",
";",
"ProjectNatureFactory",
".",
"addNature",
"(",
"\"android\"",
",",
"NATURE",
")",
";",
"ProjectManagement",
".",
"addProjectManager",
"(",
"NATURE",
",",
"new",
"AndroidProjectManager",
"(",
")",
")",
";",
"Preferences",
"preferences",
"=",
"Preferences",
".",
"getInstance",
"(",
")",
";",
"Option",
"option",
"=",
"new",
"Option",
"(",
")",
";",
"option",
".",
"setNature",
"(",
"NATURE",
")",
";",
"option",
".",
"setPath",
"(",
"\"Android\"",
")",
";",
"option",
".",
"setName",
"(",
"AdtPrefs",
".",
"PREFS_SDK_DIR",
")",
";",
"option",
".",
"setValidator",
"(",
"new",
"SdkValidator",
"(",
")",
")",
";",
"preferences",
".",
"addOption",
"(",
"option",
")",
";",
"String",
"sdkLocation",
"=",
"AdtPrefs",
".",
"getPrefs",
"(",
")",
".",
"getOsSdkFolder",
"(",
")",
";",
"if",
"(",
"sdkLocation",
"==",
"null",
"||",
"sdkLocation",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"logger",
".",
"warn",
"(",
"\"\"",
")",
";",
"}",
"else",
"if",
"(",
"!",
"new",
"File",
"(",
"sdkLocation",
")",
".",
"exists",
"(",
")",
")",
"{",
"logger",
".",
"warn",
"(",
"\"\"",
"+",
"sdkLocation",
")",
";",
"}",
"}",
"@",
"Override",
"protected",
"String",
"getBundleBaseName",
"(",
")",
"{",
"return",
"\"\"",
";",
"}",
"private",
"class",
"SdkValidator",
"extends",
"AdtPlugin",
".",
"CheckSdkErrorHandler",
"implements",
"Validator",
"{",
"private",
"String",
"message",
";",
"@",
"Override",
"public",
"boolean",
"isValid",
"(",
"Object",
"value",
")",
"{",
"message",
"=",
"null",
";",
"return",
"AdtPlugin",
".",
"getDefault",
"(",
")",
".",
"checkSdkLocationAndId",
"(",
"(",
"String",
")",
"value",
",",
"this",
")",
";",
"}",
"@",
"Override",
"public",
"String",
"getMessage",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"return",
"message",
";",
"}",
"@",
"Override",
"public",
"boolean",
"handleError",
"(",
"AdtPlugin",
".",
"CheckSdkErrorHandler",
".",
"Solution",
"solution",
",",
"String",
"message",
")",
"{",
"this",
".",
"message",
"=",
"message",
";",
"return",
"false",
";",
"}",
"@",
"Override",
"public",
"boolean",
"handleWarning",
"(",
"AdtPlugin",
".",
"CheckSdkErrorHandler",
".",
"Solution",
"solution",
",",
"String",
"message",
")",
"{",
"logger",
".",
"warn",
"(",
"message",
")",
";",
"return",
"true",
";",
"}",
"}",
"}",
"</s>"
] |
1,385 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"command",
".",
"sdk",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"org",
".",
"eclim",
".",
"annotation",
".",
"Command",
";",
"import",
"org",
".",
"eclim",
".",
"command",
".",
"CommandLine",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"command",
".",
"AbstractCommand",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"internal",
".",
"sdk",
".",
"Sdk",
";",
"import",
"com",
".",
"android",
".",
"sdklib",
".",
"IAndroidTarget",
";",
"@",
"Command",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"ListTargetsCommand",
"extends",
"AbstractCommand",
"{",
"@",
"Override",
"public",
"Object",
"execute",
"(",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"ArrayList",
"<",
"HashMap",
"<",
"String",
",",
"String",
">",
">",
"results",
"=",
"new",
"ArrayList",
"<",
"HashMap",
"<",
"String",
",",
"String",
">",
">",
"(",
")",
";",
"Sdk",
"sdk",
"=",
"Sdk",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"sdk",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"IAndroidTarget",
"[",
"]",
"targets",
"=",
"sdk",
".",
"getTargets",
"(",
")",
";",
"for",
"(",
"IAndroidTarget",
"target",
":",
"targets",
")",
"{",
"if",
"(",
"!",
"target",
".",
"isPlatform",
"(",
")",
")",
"{",
"continue",
";",
"}",
"HashMap",
"<",
"String",
",",
"String",
">",
"info",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"info",
".",
"put",
"(",
"\"name\"",
",",
"target",
".",
"getFullName",
"(",
")",
")",
";",
"info",
".",
"put",
"(",
"\"hash\"",
",",
"target",
".",
"hashString",
"(",
")",
")",
";",
"info",
".",
"put",
"(",
"\"api\"",
",",
"target",
".",
"getVersion",
"(",
")",
".",
"getApiString",
"(",
")",
")",
";",
"results",
".",
"add",
"(",
"info",
")",
";",
"}",
"return",
"results",
";",
"}",
"}",
"</s>"
] |
1,386 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"command",
".",
"sdk",
";",
"import",
"java",
".",
"lang",
".",
"reflect",
".",
"Field",
";",
"import",
"java",
".",
"text",
".",
"MessageFormat",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"org",
".",
"eclim",
".",
"annotation",
".",
"Command",
";",
"import",
"org",
".",
"eclim",
".",
"command",
".",
"CommandLine",
";",
"import",
"org",
".",
"eclim",
".",
"logging",
".",
"Logger",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"command",
".",
"AbstractCommand",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"internal",
".",
"sdk",
".",
"Sdk",
";",
"import",
"com",
".",
"android",
".",
"sdklib",
".",
"ISdkLog",
";",
"import",
"com",
".",
"android",
".",
"sdklib",
".",
"SdkManager",
";",
"@",
"Command",
"(",
"name",
"=",
"\"\"",
")",
"public",
"class",
"ReloadCommand",
"extends",
"AbstractCommand",
"implements",
"ISdkLog",
"{",
"private",
"static",
"final",
"Logger",
"logger",
"=",
"Logger",
".",
"getLogger",
"(",
"ReloadCommand",
".",
"class",
")",
";",
"@",
"Override",
"public",
"Object",
"execute",
"(",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"HashMap",
"<",
"String",
",",
"String",
">",
"result",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"Sdk",
"sdk",
"=",
"Sdk",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"sdk",
"==",
"null",
")",
"{",
"result",
".",
"put",
"(",
"\"error\"",
",",
"\"\"",
")",
";",
"}",
"else",
"{",
"Field",
"mManager",
"=",
"sdk",
".",
"getClass",
"(",
")",
".",
"getDeclaredField",
"(",
"\"mManager\"",
")",
";",
"mManager",
".",
"setAccessible",
"(",
"true",
")",
";",
"(",
"(",
"SdkManager",
")",
"mManager",
".",
"get",
"(",
"sdk",
")",
")",
".",
"reloadSdk",
"(",
"this",
")",
";",
"result",
".",
"put",
"(",
"\"message\"",
",",
"\"\"",
")",
";",
"}",
"return",
"result",
";",
"}",
"@",
"Override",
"public",
"void",
"warning",
"(",
"String",
"message",
",",
"Object",
"...",
"args",
")",
"{",
"logger",
".",
"warn",
"(",
"MessageFormat",
".",
"format",
"(",
"message",
",",
"args",
")",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"error",
"(",
"Throwable",
"throwable",
",",
"String",
"message",
",",
"Object",
"...",
"args",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"MessageFormat",
".",
"format",
"(",
"message",
",",
"args",
")",
",",
"throwable",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"printf",
"(",
"String",
"message",
",",
"Object",
"...",
"args",
")",
"{",
"logger",
".",
"info",
"(",
"MessageFormat",
".",
"format",
"(",
"message",
",",
"args",
")",
")",
";",
"}",
"}",
"</s>"
] |
1,387 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"preference",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProject",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"AdtConstants",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"internal",
".",
"preferences",
".",
"AdtPrefs",
";",
"public",
"class",
"OptionHandler",
"implements",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"preference",
".",
"OptionHandler",
"{",
"@",
"Override",
"public",
"String",
"getNature",
"(",
")",
"{",
"return",
"AdtConstants",
".",
"NATURE_DEFAULT",
";",
"}",
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getValues",
"(",
")",
"throws",
"Exception",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"values",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"values",
".",
"put",
"(",
"AdtPrefs",
".",
"PREFS_SDK_DIR",
",",
"AdtPrefs",
".",
"getPrefs",
"(",
")",
".",
"getOsSdkFolder",
"(",
")",
")",
";",
"return",
"values",
";",
"}",
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getValues",
"(",
"IProject",
"project",
")",
"throws",
"Exception",
"{",
"return",
"getValues",
"(",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setOption",
"(",
"String",
"name",
",",
"String",
"value",
")",
"throws",
"Exception",
"{",
"AdtPrefs",
"prefs",
"=",
"AdtPrefs",
".",
"getPrefs",
"(",
")",
";",
"if",
"(",
"AdtPrefs",
".",
"PREFS_SDK_DIR",
".",
"equals",
"(",
"name",
")",
")",
"{",
"prefs",
".",
"setSdkLocation",
"(",
"new",
"File",
"(",
"value",
")",
")",
";",
"}",
"prefs",
".",
"loadValues",
"(",
"null",
")",
";",
"}",
"@",
"Override",
"public",
"void",
"setOption",
"(",
"IProject",
"project",
",",
"String",
"name",
",",
"String",
"value",
")",
"throws",
"Exception",
"{",
"setOption",
"(",
"name",
",",
"value",
")",
";",
"}",
"}",
"</s>"
] |
1,388 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"project",
";",
"import",
"java",
".",
"lang",
".",
"reflect",
".",
"Method",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"cli",
".",
"GnuParser",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"cli",
".",
"OptionBuilder",
";",
"import",
"org",
".",
"eclim",
".",
"command",
".",
"CommandLine",
";",
"import",
"org",
".",
"eclim",
".",
"command",
".",
"Error",
";",
"import",
"org",
".",
"eclim",
".",
"command",
".",
"Options",
";",
"import",
"org",
".",
"eclim",
".",
"plugin",
".",
"core",
".",
"project",
".",
"ProjectManager",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IFile",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProject",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"resources",
".",
"IProjectDescription",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"NullProgressMonitor",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"AdtConstants",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"AdtPlugin",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"internal",
".",
"sdk",
".",
"Sdk",
";",
"import",
"com",
".",
"android",
".",
"ide",
".",
"eclipse",
".",
"adt",
".",
"internal",
".",
"wizards",
".",
"newproject",
".",
"NewProjectCreator",
";",
"import",
"com",
".",
"android",
".",
"sdklib",
".",
"IAndroidTarget",
";",
"import",
"com",
".",
"android",
".",
"sdklib",
".",
"SdkConstants",
";",
"public",
"class",
"AndroidProjectManager",
"implements",
"ProjectManager",
"{",
"public",
"void",
"create",
"(",
"IProject",
"project",
",",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"String",
"[",
"]",
"args",
"=",
"commandLine",
".",
"getValues",
"(",
"Options",
".",
"ARGS_OPTION",
")",
";",
"GnuParser",
"parser",
"=",
"new",
"GnuParser",
"(",
")",
";",
"org",
".",
"apache",
".",
"commons",
".",
"cli",
".",
"Options",
"options",
"=",
"new",
"org",
".",
"apache",
".",
"commons",
".",
"cli",
".",
"Options",
"(",
")",
";",
"options",
".",
"addOption",
"(",
"OptionBuilder",
".",
"hasArg",
"(",
")",
".",
"isRequired",
"(",
")",
".",
"withLongOpt",
"(",
"\"target\"",
")",
".",
"create",
"(",
")",
")",
";",
"options",
".",
"addOption",
"(",
"OptionBuilder",
".",
"hasArg",
"(",
")",
".",
"isRequired",
"(",
")",
".",
"withLongOpt",
"(",
"\"package\"",
")",
".",
"create",
"(",
")",
")",
";",
"options",
".",
"addOption",
"(",
"OptionBuilder",
".",
"hasArg",
"(",
")",
".",
"isRequired",
"(",
")",
".",
"withLongOpt",
"(",
"\"application\"",
")",
".",
"create",
"(",
")",
")",
";",
"options",
".",
"addOption",
"(",
"OptionBuilder",
".",
"hasArg",
"(",
")",
".",
"withLongOpt",
"(",
"\"activity\"",
")",
".",
"create",
"(",
")",
")",
";",
"options",
".",
"addOption",
"(",
"OptionBuilder",
".",
"withLongOpt",
"(",
"\"library\"",
")",
".",
"create",
"(",
")",
")",
";",
"org",
".",
"apache",
".",
"commons",
".",
"cli",
".",
"CommandLine",
"cli",
"=",
"parser",
".",
"parse",
"(",
"options",
",",
"args",
")",
";",
"Sdk",
"sdk",
"=",
"Sdk",
".",
"getCurrent",
"(",
")",
";",
"String",
"targetHash",
"=",
"cli",
".",
"getOptionValue",
"(",
"\"target\"",
")",
";",
"IAndroidTarget",
"target",
"=",
"sdk",
".",
"getTargetFromHashString",
"(",
"targetHash",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"put",
"(",
"\"SDK_TARGET\"",
",",
"target",
")",
";",
"parameters",
".",
"put",
"(",
"\"SRC_FOLDER\"",
",",
"SdkConstants",
".",
"FD_SOURCES",
")",
";",
"parameters",
".",
"put",
"(",
"\"\"",
",",
"true",
")",
";",
"parameters",
".",
"put",
"(",
"\"\"",
",",
"null",
")",
";",
"parameters",
".",
"put",
"(",
"\"IS_LIBRARY\"",
",",
"cli",
".",
"hasOption",
"(",
"\"library\"",
")",
")",
";",
"parameters",
".",
"put",
"(",
"\"\"",
",",
"AdtPlugin",
".",
"getOsSdkToolsFolder",
"(",
")",
")",
";",
"parameters",
".",
"put",
"(",
"\"PACKAGE\"",
",",
"cli",
".",
"getOptionValue",
"(",
"\"package\"",
")",
")",
";",
"parameters",
".",
"put",
"(",
"\"\"",
",",
"\"\"",
")",
";",
"parameters",
".",
"put",
"(",
"\"\"",
",",
"target",
".",
"getVersion",
"(",
")",
".",
"getApiString",
"(",
")",
")",
";",
"if",
"(",
"cli",
".",
"hasOption",
"(",
"\"activity\"",
")",
")",
"{",
"parameters",
".",
"put",
"(",
"\"\"",
",",
"cli",
".",
"getOptionValue",
"(",
"\"activity\"",
")",
")",
";",
"}",
"Map",
"<",
"String",
",",
"String",
">",
"dictionary",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"dictionary",
".",
"put",
"(",
"\"app_name\"",
",",
"cli",
".",
"getOptionValue",
"(",
"\"application\"",
")",
")",
";",
"IProjectDescription",
"description",
"=",
"project",
".",
"getDescription",
"(",
")",
";",
"project",
".",
"delete",
"(",
"false",
",",
"true",
",",
"null",
")",
";",
"NewProjectCreator",
"creator",
"=",
"new",
"NewProjectCreator",
"(",
"null",
",",
"null",
")",
";",
"invoke",
"(",
"creator",
",",
"\"\"",
",",
"new",
"Class",
"[",
"]",
"{",
"IProgressMonitor",
".",
"class",
",",
"IProject",
".",
"class",
",",
"IProjectDescription",
".",
"class",
",",
"Map",
".",
"class",
",",
"Map",
".",
"class",
",",
"NewProjectCreator",
".",
"ProjectPopulator",
".",
"class",
",",
"}",
",",
"new",
"NullProgressMonitor",
"(",
")",
",",
"project",
",",
"description",
",",
"parameters",
",",
"dictionary",
",",
"null",
")",
";",
"project",
".",
"getNature",
"(",
"AdtConstants",
".",
"NATURE_DEFAULT",
")",
".",
"configure",
"(",
")",
";",
"}",
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"private",
"Object",
"invoke",
"(",
"Object",
"obj",
",",
"String",
"name",
",",
"Class",
"[",
"]",
"params",
",",
"Object",
"...",
"args",
")",
"throws",
"Exception",
"{",
"Method",
"method",
"=",
"obj",
".",
"getClass",
"(",
")",
".",
"getDeclaredMethod",
"(",
"name",
",",
"params",
")",
";",
"method",
".",
"setAccessible",
"(",
"true",
")",
";",
"return",
"method",
".",
"invoke",
"(",
"obj",
",",
"args",
")",
";",
"}",
"public",
"List",
"<",
"Error",
">",
"update",
"(",
"IProject",
"project",
",",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"return",
"null",
";",
"}",
"public",
"void",
"delete",
"(",
"IProject",
"project",
",",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"refresh",
"(",
"IProject",
"project",
",",
"CommandLine",
"commandLine",
")",
"throws",
"Exception",
"{",
"}",
"public",
"void",
"refresh",
"(",
"IProject",
"project",
",",
"IFile",
"file",
")",
"throws",
"Exception",
"{",
"}",
"}",
"</s>"
] |
1,389 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"project",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"AndroidProjectManagerTest",
"{",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"create",
"(",
")",
"{",
"String",
"path",
"=",
"Eclim",
".",
"getWorkspace",
"(",
")",
"+",
"\"\"",
";",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-p\"",
",",
"\"\"",
"}",
",",
"false",
")",
";",
"Eclim",
".",
"deleteDirectory",
"(",
"new",
"File",
"(",
"path",
")",
")",
";",
"Object",
"result",
"=",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-f\"",
",",
"path",
",",
"\"-n\"",
",",
"\"android\"",
",",
"}",
",",
"false",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"result",
")",
";",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
"}",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"results",
".",
"size",
"(",
")",
">",
"0",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"target",
"=",
"results",
".",
"get",
"(",
"0",
")",
";",
"result",
"=",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-f\"",
",",
"path",
",",
"\"-n\"",
",",
"\"android\"",
",",
"\"-a\"",
",",
"\"--target\"",
",",
"target",
".",
"get",
"(",
"\"hash\"",
")",
",",
"}",
",",
"false",
")",
";",
"assertEquals",
"(",
"result",
",",
"\"\"",
")",
";",
"result",
"=",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
",",
"\"-f\"",
",",
"path",
",",
"\"-n\"",
",",
"\"android\"",
",",
"\"-a\"",
",",
"\"--target\"",
",",
"target",
".",
"get",
"(",
"\"hash\"",
")",
",",
"\"--package\"",
",",
"\"org.test\"",
",",
"\"\"",
",",
"\"\"",
",",
"\"--activity\"",
",",
"\"\"",
",",
"}",
",",
"false",
")",
";",
"assertEquals",
"(",
"\"\"",
",",
"result",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"new",
"File",
"(",
"path",
"+",
"\"\"",
")",
".",
"exists",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
1,390 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"command",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"apache",
".",
"commons",
".",
"lang",
".",
"StringUtils",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"ListTargetsCommandTest",
"{",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"execute",
"(",
")",
"{",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
"results",
"=",
"(",
"List",
"<",
"Map",
"<",
"String",
",",
"String",
">",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
"}",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"results",
".",
"size",
"(",
")",
">",
"0",
")",
";",
"for",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"result",
":",
"results",
")",
"{",
"assertTrue",
"(",
"\"\"",
",",
"result",
".",
"containsKey",
"(",
"\"name\"",
")",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"result",
".",
"containsKey",
"(",
"\"hash\"",
")",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"result",
".",
"containsKey",
"(",
"\"api\"",
")",
")",
";",
"assertTrue",
"(",
"\"\"",
",",
"StringUtils",
".",
"isNumeric",
"(",
"result",
".",
"get",
"(",
"\"api\"",
")",
")",
")",
";",
"}",
"}",
"}",
"</s>"
] |
1,391 | [
"<s>",
"package",
"org",
".",
"eclim",
".",
"plugin",
".",
"adt",
".",
"command",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclim",
".",
"Eclim",
";",
"import",
"org",
".",
"junit",
".",
"Test",
";",
"import",
"static",
"org",
".",
"junit",
".",
"Assert",
".",
"*",
";",
"public",
"class",
"ReloadCommandTest",
"{",
"@",
"Test",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"reload",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"result",
"=",
"(",
"Map",
"<",
"String",
",",
"String",
">",
")",
"Eclim",
".",
"execute",
"(",
"new",
"String",
"[",
"]",
"{",
"\"\"",
"}",
")",
";",
"assertTrue",
"(",
"result",
".",
"containsKey",
"(",
"\"message\"",
")",
")",
";",
"assertEquals",
"(",
"result",
".",
"get",
"(",
"\"message\"",
")",
",",
"\"\"",
")",
";",
"}",
"}",
"</s>"
] |
1,392 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimPlugin",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimServer",
";",
"import",
"org",
".",
"vimplugin",
".",
"editors",
".",
"VimEditor",
";",
"public",
"class",
"BufferEnter",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"final",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"String",
"argument",
"=",
"null",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"keyCommand\"",
")",
"&&",
"(",
"argument",
"=",
"ve",
".",
"getArgument",
"(",
"0",
")",
")",
".",
"startsWith",
"(",
"\"\"",
")",
")",
"{",
"String",
"filePath",
"=",
"argument",
".",
"substring",
"(",
"13",
",",
"argument",
".",
"length",
"(",
")",
"-",
"1",
")",
";",
"filePath",
"=",
"filePath",
".",
"substring",
"(",
"1",
",",
"filePath",
".",
"length",
"(",
")",
"-",
"1",
")",
";",
"VimServer",
"server",
"=",
"VimPlugin",
".",
"getDefault",
"(",
")",
".",
"getVimserver",
"(",
"ve",
".",
"getConnection",
"(",
")",
".",
"getVimID",
"(",
")",
")",
";",
"for",
"(",
"VimEditor",
"veditor",
":",
"server",
".",
"getEditors",
"(",
")",
")",
"{",
"if",
"(",
"veditor",
".",
"getBufferID",
"(",
")",
"==",
"ve",
".",
"getBufferID",
"(",
")",
"||",
"server",
".",
"isEmbedded",
"(",
")",
")",
"{",
"veditor",
".",
"setTitleTo",
"(",
"filePath",
")",
";",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
1,393 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IPath",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Path",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimConnection",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimPlugin",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimServer",
";",
"import",
"org",
".",
"vimplugin",
".",
"editors",
".",
"VimEditor",
";",
"public",
"class",
"FileClosed",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"final",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"String",
"argument",
"=",
"null",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"keyCommand\"",
")",
"&&",
"(",
"argument",
"=",
"ve",
".",
"getArgument",
"(",
"0",
")",
")",
".",
"startsWith",
"(",
"\"\\\"fileClosed",
"\"",
")",
")",
"{",
"IPath",
"filePath",
"=",
"new",
"Path",
"(",
"argument",
".",
"substring",
"(",
"12",
",",
"argument",
".",
"length",
"(",
")",
"-",
"1",
")",
")",
";",
"VimPlugin",
"plugin",
"=",
"VimPlugin",
".",
"getDefault",
"(",
")",
";",
"VimConnection",
"vc",
"=",
"ve",
".",
"getConnection",
"(",
")",
";",
"VimServer",
"server",
"=",
"plugin",
".",
"getVimserver",
"(",
"vc",
".",
"getVimID",
"(",
")",
")",
";",
"for",
"(",
"VimEditor",
"editor",
":",
"server",
".",
"getEditors",
"(",
")",
")",
"{",
"IPath",
"location",
"=",
"editor",
".",
"getSelectedFile",
"(",
")",
".",
"getRawLocation",
"(",
")",
";",
"if",
"(",
"filePath",
".",
"equals",
"(",
"location",
")",
")",
"{",
"editor",
".",
"forceDispose",
"(",
")",
";",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
1,394 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimPlugin",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimServer",
";",
"import",
"org",
".",
"vimplugin",
".",
"editors",
".",
"VimEditor",
";",
"public",
"class",
"FileOpened",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"fileOpened\"",
")",
"==",
"true",
")",
"{",
"String",
"filePath",
"=",
"ve",
".",
"getArgument",
"(",
"0",
")",
";",
"filePath",
"=",
"filePath",
".",
"substring",
"(",
"1",
",",
"filePath",
".",
"length",
"(",
")",
"-",
"1",
")",
";",
"VimServer",
"server",
"=",
"VimPlugin",
".",
"getDefault",
"(",
")",
".",
"getVimserver",
"(",
"ve",
".",
"getConnection",
"(",
")",
".",
"getVimID",
"(",
")",
")",
";",
"for",
"(",
"VimEditor",
"veditor",
":",
"server",
".",
"getEditors",
"(",
")",
")",
"{",
"if",
"(",
"veditor",
".",
"getBufferID",
"(",
")",
"==",
"ve",
".",
"getBufferID",
"(",
")",
"||",
"!",
"server",
".",
"isExternalTabbed",
"(",
")",
")",
"{",
"veditor",
".",
"setTitleTo",
"(",
"filePath",
")",
";",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
1,395 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimConnection",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"public",
"class",
"ServerStarted",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"startupDone\"",
")",
"==",
"true",
")",
"{",
"ve",
".",
"getConnection",
"(",
")",
".",
"setStartupDone",
"(",
"true",
")",
";",
"ve",
".",
"getConnection",
"(",
")",
".",
"setServerRunning",
"(",
"true",
")",
";",
"}",
"}",
"}",
"</s>"
] |
1,396 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimConnection",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimPlugin",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimServer",
";",
"import",
"org",
".",
"vimplugin",
".",
"editors",
".",
"VimEditor",
";",
"public",
"class",
"FileModified",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"modified\"",
")",
"||",
"(",
"event",
".",
"equals",
"(",
"\"keyCommand\"",
")",
"&&",
"ve",
".",
"getArgument",
"(",
"0",
")",
".",
"equals",
"(",
"\"\\\"modified\\\"\"",
")",
")",
")",
"{",
"VimPlugin",
"plugin",
"=",
"VimPlugin",
".",
"getDefault",
"(",
")",
";",
"VimConnection",
"vc",
"=",
"ve",
".",
"getConnection",
"(",
")",
";",
"VimServer",
"server",
"=",
"vc",
"!=",
"null",
"?",
"plugin",
".",
"getVimserver",
"(",
"vc",
".",
"getVimID",
"(",
")",
")",
":",
"null",
";",
"if",
"(",
"server",
"!=",
"null",
")",
"{",
"for",
"(",
"VimEditor",
"editor",
":",
"server",
".",
"getEditors",
"(",
")",
")",
"{",
"if",
"(",
"editor",
"!=",
"null",
"&&",
"editor",
".",
"getBufferID",
"(",
")",
"==",
"ve",
".",
"getBufferID",
"(",
")",
")",
"{",
"editor",
".",
"setDirty",
"(",
"true",
")",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
1,397 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimPlugin",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimServer",
";",
"import",
"org",
".",
"vimplugin",
".",
"editors",
".",
"VimEditor",
";",
"public",
"class",
"ServerDisconnect",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"disconnect\"",
")",
"||",
"event",
".",
"equals",
"(",
"\"killed\"",
")",
")",
"{",
"VimPlugin",
"plugin",
"=",
"VimPlugin",
".",
"getDefault",
"(",
")",
";",
"VimServer",
"server",
"=",
"plugin",
".",
"getVimserver",
"(",
"ve",
".",
"getConnection",
"(",
")",
".",
"getVimID",
"(",
")",
")",
";",
"for",
"(",
"final",
"VimEditor",
"veditor",
":",
"server",
".",
"getEditors",
"(",
")",
")",
"{",
"if",
"(",
"veditor",
"!=",
"null",
")",
"{",
"if",
"(",
"event",
".",
"equals",
"(",
"\"disconnect\"",
")",
"||",
"veditor",
".",
"getBufferID",
"(",
")",
"==",
"ve",
".",
"getBufferID",
"(",
")",
")",
"{",
"veditor",
".",
"forceDispose",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"event",
".",
"equals",
"(",
"\"disconnect\"",
")",
"||",
"server",
".",
"getEditors",
"(",
")",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"try",
"{",
"ve",
".",
"getConnection",
"(",
")",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"VimException",
"(",
"\"\"",
",",
"e",
")",
";",
"}",
"plugin",
".",
"stopVimServer",
"(",
"server",
".",
"getID",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
1,398 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimPlugin",
";",
"import",
"org",
".",
"vimplugin",
".",
"editors",
".",
"VimEditor",
";",
"public",
"class",
"TextRemoved",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"remove\"",
")",
"==",
"true",
")",
"{",
"int",
"offset",
"=",
"Integer",
".",
"parseInt",
"(",
"ve",
".",
"getArgument",
"(",
"0",
")",
")",
";",
"int",
"length",
"=",
"Integer",
".",
"parseInt",
"(",
"ve",
".",
"getArgument",
"(",
"1",
")",
")",
";",
"for",
"(",
"VimEditor",
"veditor",
":",
"VimPlugin",
".",
"getDefault",
"(",
")",
".",
"getVimserver",
"(",
"ve",
".",
"getConnection",
"(",
")",
".",
"getVimID",
"(",
")",
")",
".",
"getEditors",
"(",
")",
")",
"{",
"if",
"(",
"veditor",
".",
"getBufferID",
"(",
")",
"==",
"ve",
".",
"getBufferID",
"(",
")",
")",
"{",
"veditor",
".",
"removeDocumentText",
"(",
"offset",
",",
"length",
")",
";",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
1,399 | [
"<s>",
"package",
"org",
".",
"vimplugin",
".",
"listeners",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimEvent",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimException",
";",
"import",
"org",
".",
"vimplugin",
".",
"VimPlugin",
";",
"import",
"org",
".",
"vimplugin",
".",
"editors",
".",
"VimEditor",
";",
"public",
"class",
"TextInsert",
"implements",
"IVimListener",
"{",
"public",
"void",
"handleEvent",
"(",
"VimEvent",
"ve",
")",
"throws",
"VimException",
"{",
"String",
"event",
"=",
"ve",
".",
"getEvent",
"(",
")",
";",
"if",
"(",
"event",
".",
"equals",
"(",
"\"insert\"",
")",
"==",
"true",
")",
"{",
"int",
"length",
"=",
"Integer",
".",
"parseInt",
"(",
"ve",
".",
"getArgument",
"(",
"0",
")",
")",
";",
"String",
"text",
"=",
"ve",
".",
"getArgument",
"(",
"1",
")",
";",
"text",
"=",
"text",
".",
"substring",
"(",
"1",
",",
"text",
".",
"length",
"(",
")",
"-",
"1",
")",
";",
"for",
"(",
"VimEditor",
"veditor",
":",
"VimPlugin",
".",
"getDefault",
"(",
")",
".",
"getVimserver",
"(",
"ve",
".",
"getConnection",
"(",
")",
".",
"getVimID",
"(",
")",
")",
".",
"getEditors",
"(",
")",
")",
"{",
"if",
"(",
"veditor",
".",
"getBufferID",
"(",
")",
"==",
"ve",
".",
"getBufferID",
"(",
")",
")",
"{",
"veditor",
".",
"insertDocumentText",
"(",
"text",
",",
"length",
")",
";",
"}",
"}",
"}",
"}",
"}",
"</s>"
] |
Subsets and Splits