docstring_tokens
list | code_tokens
list |
---|---|
[
"a",
"sensible",
"definition",
"of",
"{",
"@",
"link",
"#",
"clear",
"}",
"in",
"terms",
"of",
"the",
"{",
"@",
"code",
"iterator",
"}",
"method",
"of",
"{",
"@",
"link",
"#",
"entry",
"set",
"}",
"if",
"you",
"override",
"{",
"@",
"link",
"#",
"entry",
"set",
"}",
",",
"you",
"may",
"wish",
"to",
"override",
"{",
"@",
"link",
"#",
"clear",
"}",
"to",
"forward",
"to",
"this",
"implementation"
]
| [
"protected",
"void",
"standard",
"clear",
"(",
")",
"{",
"iterators",
"clear",
"(",
"entry",
"set",
"(",
")",
"iterator",
"(",
")",
")",
";",
"}"
]
|
[
"sets",
"whether",
"the",
"player",
"should",
"pause",
"automatically",
"when",
"audio",
"is",
"rerouted",
"from",
"a",
"headset",
"to",
"device",
"speakers",
"see",
"the",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"developer",
"android",
"comguidetopicsmedia",
"-",
"appsvolume",
"-",
"and",
"-",
"earphones",
"#",
"becoming",
"-",
"noisy",
"\"",
">",
"audio",
"becoming",
"noisy",
"documentation",
"for",
"more",
"information"
]
| [
"public",
"builder",
"set",
"handle",
"audio",
"becoming",
"noisy",
"(",
"boolean",
"handle",
"audio",
"becoming",
"noisy",
")",
"{",
"assertions",
"check",
"state",
"(",
"!",
"build",
"called",
")",
";",
"this",
"handle",
"audio",
"becoming",
"noisy",
"=",
"handle",
"audio",
"becoming",
"noisy",
";",
"return",
"this",
";",
"}"
]
|
[
"sets",
"the",
"<",
"code",
">",
"integer",
"item",
"<",
"code",
">",
"property"
]
| [
"public",
"void",
"set",
"integer",
"item",
"(",
"integer",
"integer",
"item",
")",
"{",
"this",
"integer",
"item",
"=",
"integer",
"item",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}",
"all",
"values",
"are",
"rendered",
"in",
"their",
"unsigned",
"form"
]
| [
"public",
"string",
"to",
"string",
"(",
"long",
"number",
",",
"int",
"radix",
")",
"{",
"switch",
"(",
"radix",
")",
"{",
"case",
"2",
":",
"return",
"long",
"to",
"binary",
"string",
"(",
"number",
")",
"+",
"\"",
"b",
"\"",
";",
"case",
"8",
":",
"return",
"long",
"to",
"octal",
"string",
"(",
"number",
")",
"+",
"\"",
"o",
"\"",
";",
"case",
"10",
":",
"return",
"long",
"to",
"unsigned",
"string",
"(",
"number",
")",
";",
"case",
"16",
":",
"return",
"long",
"to",
"hex",
"string",
"(",
"number",
")",
"+",
"\"",
"h",
"\"",
";",
"}",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"unsupported",
"radix",
"\"",
")",
";",
"}"
]
|
[
"adds",
"the",
"given",
"value",
"to",
"the",
"dataset"
]
| [
"public",
"void",
"add",
"(",
"double",
"value",
")",
"{",
"if",
"(",
"count",
"=",
"=",
"0",
")",
"{",
"count",
"=",
"1",
";",
"mean",
"=",
"value",
";",
"min",
"=",
"value",
";",
"max",
"=",
"value",
";",
"if",
"(",
"!",
"is",
"finite",
"(",
"value",
")",
")",
"{",
"sum",
"of",
"squares",
"of",
"deltas",
"=",
"na",
"n",
";",
"}",
"}",
"else",
"{",
"count",
"+",
"+",
";",
"if",
"(",
"is",
"finite",
"(",
"value",
")",
"&",
"&",
"is",
"finite",
"(",
"mean",
")",
")",
"{",
"/",
"/",
"art",
"of",
"computer",
"programming",
"vol",
"2",
",",
"knuth",
",",
"4",
"2",
"2",
",",
"(",
"15",
")",
"and",
"(",
"16",
")",
"double",
"delta",
"=",
"value",
"-",
"mean",
";",
"mean",
"+",
"=",
"delta",
"/",
"count",
";",
"sum",
"of",
"squares",
"of",
"deltas",
"+",
"=",
"delta",
"*",
"(",
"value",
"-",
"mean",
")",
";",
"}",
"else",
"{",
"mean",
"=",
"calculate",
"new",
"mean",
"non",
"finite",
"(",
"mean",
",",
"value",
")",
";",
"sum",
"of",
"squares",
"of",
"deltas",
"=",
"na",
"n",
";",
"}",
"min",
"=",
"math",
"min",
"(",
"min",
",",
"value",
")",
";",
"max",
"=",
"math",
"max",
"(",
"max",
",",
"value",
")",
";",
"}",
"}"
]
|
[
"finds",
"the",
"specified",
"attribute",
"in",
"the",
"target"
]
| [
"public",
"attribute",
"find",
"attribute",
"(",
"string",
"attribute",
"name",
")",
"{",
"/",
"/",
"what",
"'",
"s",
"the",
"target",
"?",
"return",
"target",
"attribute",
"!",
"=",
"null",
"?",
"find",
"attribute",
"(",
"target",
"attribute",
"u",
"2attributes",
"count",
",",
"target",
"attribute",
"attributes",
",",
"attribute",
"name",
")",
":",
"target",
"member",
"!",
"=",
"null",
"?",
"find",
"attribute",
"(",
"target",
"member",
"u",
"2attributes",
"count",
",",
"target",
"member",
"attributes",
",",
"attribute",
"name",
")",
":",
"find",
"attribute",
"(",
"target",
"class",
"u",
"2attributes",
"count",
",",
"target",
"class",
"attributes",
",",
"attribute",
"name",
")",
";",
"}"
]
|
[
"get",
"the",
"configured",
"{",
"@",
"link",
"jdbc",
"template",
"}"
]
| [
"public",
"jdbc",
"template",
"get",
"jdbc",
"template",
"(",
")",
"{",
"return",
"this",
"jdbc",
"template",
";",
"}"
]
|
[
"returns",
"an",
"array",
"of",
"four",
"bogus",
"elements",
"that",
"will",
"always",
"be",
"too",
"high",
"or",
"too",
"low",
"for",
"the",
"display",
"this",
"includes",
"two",
"values",
"for",
"each",
"extreme",
"this",
"method",
"(",
"dangerously",
")",
"assume",
"that",
"the",
"strings",
"{",
"@",
"code",
"\"",
"!",
"!",
"a",
"\"",
"}",
"and",
"{",
"@",
"code",
"\"",
"~",
"~",
"z",
"\"",
"}",
"will",
"work",
"for",
"this",
"purpose",
",",
"which",
"may",
"cause",
"problems",
"for",
"navigable",
"maps",
"with",
"non",
"-",
"string",
"or",
"unicode",
"generators"
]
| [
"private",
"list",
"<",
"string",
">",
"get",
"extreme",
"values",
"(",
")",
"{",
"list",
"<",
"string",
">",
"result",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"result",
"add",
"(",
"\"",
"!",
"!",
"a",
"\"",
")",
";",
"result",
"add",
"(",
"\"",
"!",
"!",
"b",
"\"",
")",
";",
"result",
"add",
"(",
"\"",
"~",
"~",
"y",
"\"",
")",
";",
"result",
"add",
"(",
"\"",
"~",
"~",
"z",
"\"",
")",
";",
"return",
"result",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"float",
"'"
]
| [
"public",
"void",
"float",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"float",
"}"
]
|
[
"obtain",
"a",
"{",
"@",
"link",
"start",
"and",
"stop",
"latch",
"}",
"that",
"can",
"be",
"used",
"to",
"wait",
"until",
"the",
"expected",
"number",
"of",
"restarts",
"has",
"been",
"completed"
]
| [
"public",
"start",
"and",
"stop",
"latch",
"expected",
"restarts",
"(",
"int",
"expected",
"restarts",
")",
"{",
"return",
"expected",
"restarts",
"(",
"expected",
"restarts",
",",
"expected",
"restarts",
")",
";",
"}"
]
|
[
"this",
"method",
"will",
"return",
"a",
"single",
"allocation",
"tag",
"it",
"should",
"be",
"called",
"after",
"validating",
"the",
"tags",
"by",
"calling",
"{",
"@",
"link",
"#",
"validate",
"source",
"tags",
"}"
]
| [
"protected",
"string",
"get",
"valid",
"source",
"tag",
"(",
"set",
"<",
"string",
">",
"source",
"tags",
")",
"{",
"return",
"source",
"tags",
"iterator",
"(",
")",
"next",
"(",
")",
";",
"}"
]
|
[
"template",
"method",
"subclasses",
"must",
"implement",
"this",
"the",
"contract",
"is",
"the",
"same",
"as",
"for",
"{",
"@",
"code",
"handle",
"request",
"}"
]
| [
"protected",
"abstract",
"model",
"and",
"view",
"handle",
"request",
"internal",
"(",
"http",
"servlet",
"request",
"request",
",",
"http",
"servlet",
"response",
"response",
")",
"throws",
"exception",
";"
]
|
[
"example",
"from",
"docs"
]
| [
"public",
"void",
"test",
"skip",
"to",
"first",
"discarding",
"(",
")",
"throws",
"exception",
"{",
"list",
"<",
"stream",
"record",
"<",
"event",
">",
">",
"stream",
"events",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"event",
"a",
"=",
"new",
"event",
"(",
"1",
",",
"\"",
"a",
"\"",
",",
"0",
"0",
")",
";",
"event",
"b",
"=",
"new",
"event",
"(",
"2",
",",
"\"",
"b",
"\"",
",",
"0",
"0",
")",
";",
"event",
"c",
"1",
"=",
"new",
"event",
"(",
"3",
",",
"\"",
"c",
"1",
"\"",
",",
"0",
"0",
")",
";",
"event",
"c",
"2",
"=",
"new",
"event",
"(",
"4",
",",
"\"",
"c",
"2",
"\"",
",",
"0",
"0",
")",
";",
"event",
"c",
"3",
"=",
"new",
"event",
"(",
"5",
",",
"\"",
"c",
"3",
"\"",
",",
"0",
"0",
")",
";",
"event",
"d",
"=",
"new",
"event",
"(",
"6",
",",
"\"",
"d",
"\"",
",",
"0",
"0",
")",
";",
"stream",
"events",
"add",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"a",
")",
")",
";",
"stream",
"events",
"add",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"b",
")",
")",
";",
"stream",
"events",
"add",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"c",
"1",
")",
")",
";",
"stream",
"events",
"add",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"c",
"2",
")",
")",
";",
"stream",
"events",
"add",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"c",
"3",
")",
")",
";",
"stream",
"events",
"add",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"d",
")",
")",
";",
"pattern",
"<",
"event",
",",
"?",
">",
"pattern",
"=",
"pattern",
"<",
"event",
">",
"begin",
"(",
"\"",
"a",
"or",
"c",
"\"",
",",
"after",
"match",
"skip",
"strategy",
"skip",
"to",
"first",
"(",
"\"",
"c",
"*",
"\"",
")",
")",
"where",
"(",
"new",
"simple",
"condition",
"<",
"event",
">",
"(",
")",
"{",
"@",
"override",
"public",
"boolean",
"filter",
"(",
"event",
"value",
")",
"throws",
"exception",
"{",
"return",
"value",
"get",
"name",
"(",
")",
"contains",
"(",
"\"",
"a",
"\"",
")",
"|",
"|",
"value",
"get",
"name",
"(",
")",
"contains",
"(",
"\"",
"c",
"\"",
")",
";",
"}",
"}",
")",
"followed",
"by",
"(",
"\"",
"b",
"or",
"c",
"\"",
")",
"where",
"(",
"new",
"simple",
"condition",
"<",
"event",
">",
"(",
")",
"{",
"@",
"override",
"public",
"boolean",
"filter",
"(",
"event",
"value",
")",
"throws",
"exception",
"{",
"return",
"value",
"get",
"name",
"(",
")",
"contains",
"(",
"\"",
"b",
"\"",
")",
"|",
"|",
"value",
"get",
"name",
"(",
")",
"contains",
"(",
"\"",
"c",
"\"",
")",
";",
"}",
"}",
")",
"followed",
"by",
"(",
"\"",
"c",
"*",
"\"",
")",
"where",
"(",
"new",
"simple",
"condition",
"<",
"event",
">",
"(",
")",
"{",
"@",
"override",
"public",
"boolean",
"filter",
"(",
"event",
"value",
")",
"throws",
"exception",
"{",
"return",
"value",
"get",
"name",
"(",
")",
"contains",
"(",
"\"",
"c",
"\"",
")",
";",
"}",
"}",
")",
"one",
"or",
"more",
"(",
")",
"greedy",
"(",
")",
"followed",
"by",
"(",
"\"",
"d",
"\"",
")",
"where",
"(",
"new",
"simple",
"condition",
"<",
"event",
">",
"(",
")",
"{",
"@",
"override",
"public",
"boolean",
"filter",
"(",
"event",
"value",
")",
"throws",
"exception",
"{",
"return",
"value",
"get",
"name",
"(",
")",
"contains",
"(",
"\"",
"d",
"\"",
")",
";",
"}",
"}",
")",
";",
"n",
"f",
"a",
"test",
"harness",
"nfa",
"test",
"harness",
"=",
"n",
"f",
"a",
"test",
"harness",
"for",
"pattern",
"(",
"pattern",
")",
"build",
"(",
")",
";",
"list",
"<",
"list",
"<",
"event",
">",
">",
"resulting",
"patterns",
"=",
"nfa",
"test",
"harness",
"feed",
"records",
"(",
"stream",
"events",
")",
";",
"compare",
"patterns",
"(",
"resulting",
"patterns",
",",
"lists",
"new",
"array",
"list",
"(",
"lists",
"new",
"array",
"list",
"(",
"a",
",",
"b",
",",
"c",
"1",
",",
"c",
"2",
",",
"c",
"3",
",",
"d",
")",
",",
"lists",
"new",
"array",
"list",
"(",
"c",
"1",
",",
"c",
"2",
",",
"c",
"3",
",",
"d",
")",
")",
")",
";",
"}"
]
|
[
"the",
"list",
"of",
"array",
"elements",
"<",
"code",
">",
"repeated",
"aapt",
"pb",
"array",
"element",
"element",
"=",
"1",
";",
"<",
"code",
">"
]
| [
"public",
"builder",
"add",
"element",
"(",
"int",
"index",
",",
"com",
"android",
"aapt",
"resources",
"array",
"element",
"value",
")",
"{",
"copy",
"on",
"write",
"(",
")",
";",
"instance",
"add",
"element",
"(",
"index",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"number",
"item",
"'"
]
| [
"public",
"void",
"number",
"item",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"number",
"item",
"}"
]
|
[
"hashes",
"the",
"4",
"bytes",
"located",
"at",
"index",
",",
"shifting",
"the",
"resulting",
"hash",
"into",
"the",
"appropriate",
"range",
"for",
"our",
"hash",
"table"
]
| [
"private",
"static",
"int",
"hash",
"(",
"byte",
"buf",
"in",
",",
"int",
"index",
",",
"int",
"shift",
")",
"{",
"return",
"in",
"get",
"int",
"(",
"index",
")",
"*",
"0x",
"1e",
"3",
"5a",
"7bd",
">",
">",
">",
"shift",
";",
"}"
]
|
[
"conditionally",
"sets",
"the",
"count",
"of",
"an",
"element",
"to",
"a",
"new",
"value",
",",
"as",
"described",
"in",
"{",
"@",
"link",
"#",
"set",
"count",
"(",
"object",
",",
"int",
")",
"}",
",",
"provided",
"that",
"the",
"element",
"has",
"the",
"expected",
"current",
"count",
"if",
"the",
"current",
"count",
"is",
"not",
"{",
"@",
"code",
"old",
"count",
"}",
",",
"no",
"change",
"is",
"made"
]
| [
"boolean",
"set",
"count",
"(",
"e",
"element",
",",
"int",
"old",
"count",
",",
"int",
"new",
"count",
")",
";",
"/",
"/",
"views"
]
|
[
"get",
"just",
"symbol"
]
| [
"public",
"just",
"symbol",
"enum",
"get",
"just",
"symbol",
"(",
")",
"{",
"return",
"just",
"symbol",
";",
"}"
]
|
[
"returns",
"the",
"g",
"task",
"monitor",
"that",
"will",
"be",
"used",
"for",
"this",
"task"
]
| [
"public",
"g",
"task",
"monitor",
"get",
"task",
"monitor",
"(",
")",
"{",
"return",
"monitor",
";",
"}"
]
|
[
"adds",
"the",
"flags",
"that",
"apply",
"to",
"the",
"given",
"{",
"@",
"code",
"action",
"}",
"to",
"{",
"@",
"code",
"command",
"line",
"}"
]
| [
"private",
"void",
"expand",
"command",
"line",
"(",
"string",
"action",
",",
"cc",
"toolchain",
"variables",
"variables",
",",
"set",
"<",
"string",
">",
"enabled",
"feature",
"names",
",",
"@",
"nullable",
"artifact",
"expander",
"expander",
",",
"list",
"<",
"string",
">",
"command",
"line",
")",
"throws",
"expansion",
"exception",
"{",
"for",
"(",
"string",
"variable",
":",
"expand",
"if",
"all",
"available",
")",
"{",
"if",
"(",
"!",
"variables",
"is",
"available",
"(",
"variable",
",",
"expander",
")",
")",
"{",
"return",
";",
"}",
"}",
"if",
"(",
"!",
"is",
"with",
"features",
"satisfied",
"(",
"with",
"feature",
"sets",
",",
"enabled",
"feature",
"names",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"actions",
"contains",
"(",
"action",
")",
")",
"{",
"return",
";",
"}",
"for",
"(",
"flag",
"group",
"flag",
"group",
":",
"flag",
"groups",
")",
"{",
"flag",
"group",
"expand",
"command",
"line",
"(",
"variables",
",",
"expander",
",",
"command",
"line",
")",
";",
"}",
"}"
]
|
[
"formats",
"a",
"call",
"stack",
"as",
"a",
"comma",
"-",
"separated",
"list",
"of",
"file",
":",
"function",
":",
"line",
"elements"
]
| [
"private",
"static",
"string",
"sample",
"to",
"callstack",
"(",
"profile",
"profile",
",",
"sample",
"sample",
")",
"{",
"string",
"builder",
"buf",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"for",
"(",
"long",
"location",
"id",
":",
"sample",
"get",
"location",
"id",
"list",
"(",
")",
")",
"{",
"com",
"google",
"perftools",
"profiles",
"profile",
"proto",
"location",
"location",
"=",
"profile",
"get",
"location",
"(",
"(",
"int",
")",
"location",
"id",
"-",
"1",
")",
";",
"assert",
"that",
"(",
"location",
"get",
"line",
"list",
"(",
")",
")",
"has",
"size",
"(",
"1",
")",
";",
"long",
"function",
"id",
"=",
"location",
"get",
"line",
"(",
"0",
")",
"get",
"function",
"id",
"(",
")",
";",
"long",
"line",
"=",
"location",
"get",
"line",
"(",
"0",
")",
"get",
"line",
"(",
")",
";",
"function",
"function",
"=",
"profile",
"get",
"function",
"(",
"(",
"int",
")",
"function",
"id",
"-",
"1",
")",
";",
"long",
"file",
"id",
"=",
"function",
"get",
"filename",
"(",
")",
";",
"long",
"method",
"id",
"=",
"function",
"get",
"name",
"(",
")",
";",
"string",
"file",
"=",
"profile",
"get",
"string",
"table",
"(",
"(",
"int",
")",
"file",
"id",
")",
";",
"string",
"method",
"=",
"profile",
"get",
"string",
"table",
"(",
"(",
"int",
")",
"method",
"id",
")",
";",
"if",
"(",
"buf",
"length",
"(",
")",
">",
"0",
")",
"{",
"buf",
"append",
"(",
"\"",
",",
"\"",
")",
";",
"}",
"buf",
"append",
"(",
"string",
"format",
"(",
"\"",
"%",
"s",
":",
"%",
"s",
":",
"%",
"d",
"\"",
",",
"file",
",",
"method",
",",
"line",
")",
")",
";",
"}",
"return",
"buf",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"sets",
"the",
"<",
"code",
">",
"namespace",
"wrapped",
"array",
"<",
"code",
">",
"property"
]
| [
"public",
"void",
"set",
"namespace",
"wrapped",
"array",
"(",
"list",
"<",
"integer",
">",
"namespace",
"wrapped",
"array",
")",
"{",
"this",
"namespace",
"wrapped",
"array",
"=",
"namespace",
"wrapped",
"array",
";",
"}"
]
|
[
"transitions",
"from",
"the",
"color",
"at",
"the",
"time",
"this",
"action",
"starts",
"to",
"the",
"specified",
"color"
]
| [
"static",
"public",
"color",
"action",
"color",
"(",
"color",
"color",
",",
"float",
"duration",
")",
"{",
"return",
"color",
"(",
"color",
",",
"duration",
",",
"null",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"string",
"to",
"string",
"(",
")",
"{",
"string",
"buffer",
"sb",
"=",
"new",
"string",
"buffer",
"(",
"50",
")",
";",
"if",
"(",
"source",
"file",
"!",
"=",
"null",
")",
"{",
"sb",
"append",
"(",
"source",
"file",
"to",
"human",
"(",
")",
")",
";",
"sb",
"append",
"(",
"\"",
":",
"\"",
")",
";",
"}",
"if",
"(",
"line",
">",
"=",
"0",
")",
"{",
"sb",
"append",
"(",
"line",
")",
";",
"}",
"sb",
"append",
"(",
"'",
"@",
"'",
")",
";",
"if",
"(",
"address",
"<",
"0",
")",
"{",
"sb",
"append",
"(",
"\"",
"?",
"?",
"?",
"?",
"\"",
")",
";",
"}",
"else",
"{",
"sb",
"append",
"(",
"hex",
"u",
"2",
"(",
"address",
")",
")",
";",
"}",
"return",
"sb",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"returns",
"{",
"@",
"code",
"n",
"!",
"}",
",",
"that",
"is",
",",
"the",
"product",
"of",
"the",
"first",
"{",
"@",
"code",
"n",
"}",
"positive",
"integers",
",",
"{",
"@",
"code",
"1",
"}",
"if",
"{",
"@",
"code",
"n",
"=",
"=",
"0",
"}",
",",
"or",
"{",
"@",
"link",
"integer",
"#",
"max",
"value",
"}",
"if",
"the",
"result",
"does",
"not",
"fit",
"in",
"a",
"{",
"@",
"code",
"int",
"}"
]
| [
"public",
"static",
"int",
"factorial",
"(",
"int",
"n",
")",
"{",
"check",
"non",
"negative",
"(",
"\"",
"n",
"\"",
",",
"n",
")",
";",
"return",
"(",
"n",
"<",
"factorials",
"length",
")",
"?",
"factorials",
"[",
"n",
"]",
":",
"integer",
"max",
"value",
";",
"}"
]
|
[
"does",
"the",
"user",
"want",
"a",
"final",
"sync",
"at",
"close",
"?"
]
| [
"public",
"static",
"boolean",
"get",
"final",
"sync",
"(",
"job",
"context",
"job",
")",
"{",
"return",
"job",
"get",
"configuration",
"(",
")",
"get",
"boolean",
"(",
"tera",
"sort",
"config",
"keys",
"final",
"sync",
"attribute",
"key",
"(",
")",
",",
"tera",
"sort",
"config",
"keys",
"default",
"final",
"sync",
"attribute",
")",
";",
"}"
]
|
[
"dynamically",
"register",
"an",
"additional",
"cache",
"with",
"this",
"manager"
]
| [
"protected",
"final",
"void",
"add",
"cache",
"(",
"cache",
"cache",
")",
"{",
"string",
"name",
"=",
"cache",
"get",
"name",
"(",
")",
";",
"synchronized",
"(",
"this",
"cache",
"map",
")",
"{",
"if",
"(",
"this",
"cache",
"map",
"put",
"(",
"name",
",",
"decorate",
"cache",
"(",
"cache",
")",
")",
"=",
"=",
"null",
")",
"{",
"update",
"cache",
"names",
"(",
"name",
")",
";",
"}",
"}",
"}"
]
|
[
"gets",
"the",
"{",
"@",
"link",
"standard",
"socket",
"options",
"#",
"ip",
"multicast",
"ttl",
"}",
"option"
]
| [
"int",
"get",
"time",
"to",
"live",
"(",
")",
";"
]
|
[
"returns",
"{",
"@",
"code",
"max",
"thread",
"count",
"}"
]
| [
"public",
"int",
"get",
"max",
"thread",
"count",
"(",
")",
"{",
"return",
"max",
"thread",
"count",
";",
"}"
]
|
[
"we",
"need",
"to",
"distinguish",
"two",
"scenarios",
":",
"1",
")",
"the",
"file",
"is",
"still",
"in",
"the",
"current",
"file",
"directory",
",",
"it",
"has",
"been",
"modified",
"before",
"while",
"it",
"is",
"included",
"in",
"some",
"snapshot",
"2",
")",
"the",
"file",
"is",
"not",
"in",
"the",
"current",
"file",
"directory",
"(",
"deleted",
")",
",",
"but",
"it",
"is",
"in",
"some",
"snapshot",
",",
"thus",
"we",
"still",
"keep",
"this",
"inode",
"for",
"both",
"scenarios",
"the",
"file",
"has",
"snapshot",
"feature",
"we",
"set",
"{",
"@",
"link",
"#",
"is",
"current",
"file",
"deleted",
"}",
"to",
"true",
"for",
"2",
")"
]
| [
"public",
"void",
"delete",
"current",
"file",
"(",
")",
"{",
"is",
"current",
"file",
"deleted",
"=",
"true",
";",
"}"
]
|
[
"test",
"that",
"zone",
"creation",
"is",
"correctly",
"governed",
"by",
"a",
"c",
"ls"
]
| [
"public",
"void",
"test",
"create",
"encryption",
"zone",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"create",
"a",
"test",
"key",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"create",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"management",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
")",
";",
"assert",
"true",
"(",
"\"",
"exception",
"during",
"key",
"creation",
"\"",
",",
"create",
"key",
"(",
"real",
"ugi",
",",
"key1",
",",
"conf",
")",
")",
";",
"}",
"finally",
"{",
"teardown",
"(",
")",
";",
"}",
"/",
"/",
"we",
"tear",
"everything",
"down",
"and",
"then",
"restart",
"it",
"with",
"the",
"a",
"c",
"ls",
"we",
"want",
"to",
"/",
"/",
"test",
"so",
"that",
"there",
"'",
"s",
"no",
"contamination",
"from",
"the",
"a",
"c",
"ls",
"needed",
"for",
"setup",
"/",
"/",
"to",
"make",
"that",
"work",
",",
"we",
"have",
"to",
"tell",
"the",
"setup",
"(",
")",
"method",
"not",
"to",
"create",
"a",
"/",
"/",
"new",
"kms",
"directory",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"correct",
"config",
"with",
"whitelist",
"acl",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone1",
")",
";",
"assert",
"true",
"(",
"\"",
"exception",
"during",
"zone",
"creation",
"with",
"correct",
"config",
"using",
"\"",
"+",
"\"",
"whitelist",
"key",
"a",
"c",
"ls",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone1",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone1",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"correct",
"config",
"with",
"default",
"acl",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"default",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"default",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone2",
")",
";",
"assert",
"true",
"(",
"\"",
"exception",
"during",
"zone",
"creation",
"with",
"correct",
"config",
"using",
"\"",
"+",
"\"",
"default",
"key",
"a",
"c",
"ls",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone2",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone2",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"denied",
"because",
"the",
"key",
"acl",
"set",
"ignores",
"the",
"default",
"acl",
"set",
"for",
"key",
"1",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"default",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"default",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"key",
"authorization",
"key",
"provider",
"key",
"acl",
"+",
"key1",
"+",
"\"",
"decrypt",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone3",
")",
";",
"assert",
"false",
"(",
"\"",
"allowed",
"creation",
"of",
"zone",
"when",
"default",
"key",
"a",
"c",
"ls",
"should",
"have",
"\"",
"+",
"\"",
"been",
"overridden",
"by",
"key",
"acl",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone3",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone3",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"correct",
"config",
"with",
"blacklist",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"blacklist",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone3",
")",
";",
"assert",
"false",
"(",
"\"",
"allowed",
"zone",
"creation",
"of",
"zone",
"with",
"blacklisted",
"get",
"metadata",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone3",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone3",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"correct",
"config",
"with",
"blacklist",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"blacklist",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone3",
")",
";",
"assert",
"false",
"(",
"\"",
"allowed",
"zone",
"creation",
"of",
"zone",
"with",
"blacklisted",
"generate",
"eek",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone3",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone3",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"missing",
"kms",
"acl",
"but",
"works",
"because",
"defaults",
"for",
"kms",
"a",
"c",
"ls",
"are",
"fully",
"/",
"/",
"permissive",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone3",
")",
";",
"assert",
"true",
"(",
"\"",
"exception",
"during",
"zone",
"creation",
"with",
"default",
"kms",
"a",
"c",
"ls",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone3",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone3",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"missing",
"get",
"metadata",
"kms",
"acl",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"\"",
"\"",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone4",
")",
";",
"assert",
"false",
"(",
"\"",
"allowed",
"zone",
"creation",
"without",
"get",
"metadata",
"kms",
"acl",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone4",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone4",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"missing",
"get",
"metadata",
"kms",
"acl",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"\"",
"\"",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone4",
")",
";",
"assert",
"false",
"(",
"\"",
"allowed",
"zone",
"creation",
"without",
"generate",
"eek",
"kms",
"acl",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone4",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone4",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"missing",
"read",
"key",
"acl",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone4",
")",
";",
"assert",
"false",
"(",
"\"",
"allowed",
"zone",
"creation",
"without",
"read",
"acl",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone4",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone4",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"/",
"/",
"missing",
"generate",
"eek",
"key",
"acl",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"get",
"metadata",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"config",
"prefix",
"+",
"\"",
"acl",
"generate",
"eek",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"conf",
"set",
"(",
"k",
"m",
"s",
"configuration",
"whitelist",
"key",
"acl",
"prefix",
"+",
"\"",
"read",
"\"",
",",
"real",
"ugi",
"get",
"user",
"name",
"(",
")",
")",
";",
"try",
"{",
"setup",
"(",
"conf",
",",
"false",
")",
";",
"fs",
"mkdirs",
"(",
"zone4",
")",
";",
"assert",
"false",
"(",
"\"",
"allowed",
"zone",
"creation",
"without",
"generate",
"eek",
"acl",
"\"",
",",
"create",
"encryption",
"zone",
"(",
"real",
"ugi",
",",
"key1",
",",
"zone4",
")",
")",
";",
"}",
"finally",
"{",
"fs",
"delete",
"(",
"zone4",
",",
"true",
")",
";",
"teardown",
"(",
")",
";",
"}",
"}"
]
|
[
"a",
"passthrough",
"copy",
"operation",
"suitable",
"for",
"immutable",
"types",
",",
"including",
"numbers"
]
| [
"public",
"static",
"<",
"e",
"extends",
"serializable",
">",
"e",
"passthrough",
"fn",
"(",
"e",
"src",
")",
"{",
"return",
"src",
";",
"}"
]
|
[
"returns",
"the",
"given",
"collection",
"if",
"not",
"null",
",",
"an",
"empty",
"collection",
"(",
"a",
"set",
")",
"otherwise",
"this",
"is",
"useful",
"for",
"clients",
"avoid",
"null",
"checks"
]
| [
"public",
"static",
"<",
"t",
">",
"collection",
"<",
"t",
">",
"non",
"null",
"(",
"collection",
"<",
"t",
">",
"c",
")",
"{",
"return",
"as",
"collection",
"(",
"c",
")",
";",
"}"
]
|
[
"define",
"the",
"name",
"of",
"this",
"even",
"resolver"
]
| [
"default",
"string",
"get",
"name",
"(",
")",
"{",
"return",
"this",
"get",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
";",
"}"
]
|
[
"sets",
"whether",
"the",
"subtitle",
"button",
"is",
"shown"
]
| [
"public",
"void",
"set",
"show",
"subtitle",
"button",
"(",
"boolean",
"show",
"subtitle",
"button",
")",
"{",
"assertions",
"check",
"state",
"not",
"null",
"(",
"controller",
")",
";",
"controller",
"set",
"show",
"subtitle",
"button",
"(",
"show",
"subtitle",
"button",
")",
";",
"}"
]
|
[
"checks",
"if",
"the",
"specified",
"collectionarrayiterator",
"is",
"empty",
"this",
"method",
"can",
"handles",
"objects",
"as",
"follows",
"collection",
"-",
"via",
"collection",
"is",
"empty",
"map",
"-",
"via",
"map",
"is",
"empty",
"array",
"-",
"using",
"array",
"size",
"iterator",
"-",
"via",
"has",
"next",
"enumeration",
"-",
"via",
"has",
"more",
"elements",
"note",
":",
"this",
"method",
"is",
"named",
"to",
"avoid",
"clashing",
"with",
"{",
"@",
"link",
"#",
"is",
"empty",
"(",
"collection",
")",
"}"
]
| [
"public",
"static",
"boolean",
"size",
"is",
"empty",
"(",
"object",
"object",
")",
"{",
"if",
"(",
"object",
"=",
"=",
"null",
")",
"return",
"true",
";",
"if",
"(",
"object",
"instanceof",
"collection",
")",
"{",
"return",
"(",
"(",
"collection",
")",
"object",
")",
"is",
"empty",
"(",
")",
";",
"}",
"else",
"if",
"(",
"object",
"instanceof",
"map",
")",
"{",
"return",
"(",
"(",
"map",
")",
"object",
")",
"is",
"empty",
"(",
")",
";",
"}",
"else",
"if",
"(",
"object",
"instanceof",
"object",
"[",
"]",
")",
"{",
"return",
"(",
"(",
"object",
"[",
"]",
")",
"object",
")",
"length",
"=",
"=",
"0",
";",
"}",
"else",
"if",
"(",
"object",
"instanceof",
"iterator",
")",
"{",
"return",
"!",
"(",
"(",
"iterator",
")",
"object",
")",
"has",
"next",
"(",
")",
";",
"}",
"else",
"if",
"(",
"object",
"instanceof",
"enumeration",
")",
"{",
"return",
"!",
"(",
"(",
"enumeration",
")",
"object",
")",
"has",
"more",
"elements",
"(",
")",
";",
"}",
"else",
"{",
"try",
"{",
"return",
"array",
"get",
"length",
"(",
"object",
")",
"=",
"=",
"0",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"ex",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"unsupported",
"object",
"type",
":",
"\"",
"+",
"object",
"get",
"class",
"(",
")",
"get",
"name",
"(",
")",
")",
";",
"}",
"}",
"}"
]
|
[
"get",
"the",
"categorization",
"analyzer",
"structured",
"as",
"a",
"generic",
"map",
"this",
"can",
"be",
"used",
"to",
"provide",
"the",
"structure",
"that",
"the",
"x",
"content",
"serialization",
"but",
"as",
"a",
"java",
"map",
"rather",
"than",
"text",
"since",
"it",
"is",
"created",
"by",
"round",
"-",
"tripping",
"through",
"text",
"it",
"is",
"not",
"particularly",
"efficient",
"and",
"is",
"expected",
"to",
"be",
"used",
"only",
"rarely"
]
| [
"public",
"map",
"<",
"string",
",",
"object",
">",
"as",
"map",
"(",
"named",
"x",
"content",
"registry",
"x",
"content",
"registry",
")",
"throws",
"i",
"o",
"exception",
"{",
"string",
"str",
"rep",
"=",
"strings",
"to",
"string",
"(",
"this",
")",
";",
"x",
"content",
"parser",
"parser",
"=",
"json",
"x",
"content",
"json",
"x",
"content",
"create",
"parser",
"(",
"x",
"content",
"registry",
",",
"logging",
"deprecation",
"handler",
"instance",
",",
"str",
"rep",
")",
";",
"return",
"parser",
"map",
"ordered",
"(",
")",
";",
"}"
]
|
[
"gets",
"the",
"post",
"response"
]
| [
"public",
"static",
"response",
"get",
"post",
"response",
"(",
"final",
"string",
"url",
",",
"final",
"map",
"<",
"string",
",",
"string",
">",
"attributes",
")",
"{",
"return",
"new",
"default",
"response",
"(",
"response",
"type",
"post",
",",
"url",
",",
"attributes",
")",
";",
"}"
]
|
[
"called",
"when",
"the",
"user",
"stops",
"moving",
"the",
"scrubber"
]
| [
"void",
"on",
"scrub",
"stop",
"(",
"time",
"bar",
"time",
"bar",
",",
"long",
"position",
",",
"boolean",
"canceled",
")",
";"
]
|
[
"returns",
"the",
"immutable",
"list",
"of",
"include",
"directories",
"to",
"be",
"added",
"with",
"\"",
"-",
"isystem",
"\"",
"(",
"possibly",
"empty",
"but",
"never",
"null",
")",
"this",
"includes",
"the",
"include",
"dirs",
"from",
"the",
"transitive",
"deps",
"closure",
"of",
"the",
"target",
"this",
"list",
"does",
"not",
"contain",
"duplicates",
"all",
"fragments",
"are",
"either",
"absolute",
"or",
"relative",
"to",
"the",
"exec",
"root",
"(",
"see",
"{",
"@",
"link",
"com",
"google",
"devtools",
"build",
"lib",
"analysis",
"blaze",
"directories",
"#",
"get",
"exec",
"root",
"(",
"string",
")",
"}",
")"
]
| [
"public",
"immutable",
"list",
"<",
"path",
"fragment",
">",
"get",
"system",
"include",
"dirs",
"(",
")",
"{",
"return",
"command",
"line",
"cc",
"compilation",
"context",
"system",
"include",
"dirs",
";",
"}"
]
|
[
"this",
"method",
"removes",
"duplicated",
"points",
"and",
"coplanar",
"points",
"on",
"vertical",
"lines",
"(",
"vertical",
"lines",
"do",
"not",
"cross",
"the",
"dateline",
")"
]
| [
"private",
"static",
"line",
"string",
"builder",
"filter",
"ring",
"(",
"line",
"string",
"builder",
"linear",
"ring",
")",
"{",
"int",
"num",
"points",
"=",
"linear",
"ring",
"coordinates",
"size",
"(",
")",
";",
"list",
"<",
"coordinate",
">",
"coordinates",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"coordinates",
"add",
"(",
"linear",
"ring",
"coordinates",
"get",
"(",
"0",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"num",
"points",
"-",
"1",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
"-",
"1",
")",
"x",
"=",
"=",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
")",
"x",
")",
"{",
"if",
"(",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
"-",
"1",
")",
"y",
"=",
"=",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
")",
"y",
")",
"{",
"/",
"/",
"same",
"point",
"continue",
";",
"}",
"if",
"(",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
"-",
"1",
")",
"x",
"=",
"=",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
"+",
"1",
")",
"x",
"&",
"&",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
"-",
"1",
")",
"y",
">",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
")",
"y",
"!",
"=",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
"+",
"1",
")",
"y",
">",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
")",
"y",
")",
"{",
"/",
"/",
"coplanar",
"continue",
";",
"}",
"}",
"coordinates",
"add",
"(",
"linear",
"ring",
"coordinates",
"get",
"(",
"i",
")",
")",
";",
"}",
"coordinates",
"add",
"(",
"linear",
"ring",
"coordinates",
"get",
"(",
"num",
"points",
"-",
"1",
")",
")",
";",
"return",
"new",
"line",
"string",
"builder",
"(",
"coordinates",
")",
";",
"}"
]
|
[
"returns",
"a",
"fresh",
"{",
"@",
"link",
"map",
"maker",
"internal",
"map",
"}",
"with",
"{",
"@",
"link",
"map",
"maker",
"dummy",
"}",
"values",
"but",
"otherwise",
"as",
"specified",
"by",
"the",
"given",
"{",
"@",
"code",
"builder",
"}",
"the",
"returned",
"{",
"@",
"link",
"map",
"maker",
"internal",
"map",
"}",
"will",
"be",
"optimized",
"to",
"saved",
"memory",
"since",
"{",
"@",
"link",
"map",
"maker",
"dummy",
"}",
"is",
"a",
"singleton",
",",
"we",
"don",
"'",
"t",
"need",
"to",
"store",
"any",
"values",
"at",
"all",
"because",
"of",
"this",
"optimization",
",",
"{",
"@",
"code",
"build",
"get",
"value",
"strength",
"(",
")",
"}",
"must",
"be",
"{",
"@",
"link",
"strength",
"#",
"strong",
"}",
"this",
"method",
"is",
"intended",
"to",
"only",
"be",
"used",
"by",
"the",
"internal",
"implementation",
"of",
"{",
"@",
"link",
"interners",
"}",
",",
"since",
"a",
"map",
"of",
"dummy",
"values",
"is",
"the",
"exact",
"use",
"case",
"there"
]
| [
"static",
"<",
"k",
">",
"map",
"maker",
"internal",
"map",
"<",
"k",
",",
"dummy",
",",
"?",
"extends",
"internal",
"entry",
"<",
"k",
",",
"dummy",
",",
"?",
">",
",",
"?",
">",
"create",
"with",
"dummy",
"values",
"(",
"map",
"maker",
"builder",
")",
"{",
"if",
"(",
"builder",
"get",
"key",
"strength",
"(",
")",
"=",
"=",
"strength",
"strong",
"&",
"&",
"builder",
"get",
"value",
"strength",
"(",
")",
"=",
"=",
"strength",
"strong",
")",
"{",
"return",
"new",
"map",
"maker",
"internal",
"map",
"<",
">",
"(",
"builder",
",",
"strong",
"key",
"dummy",
"value",
"entry",
"helper",
"<",
"k",
">",
"instance",
"(",
")",
")",
";",
"}",
"if",
"(",
"builder",
"get",
"key",
"strength",
"(",
")",
"=",
"=",
"strength",
"weak",
"&",
"&",
"builder",
"get",
"value",
"strength",
"(",
")",
"=",
"=",
"strength",
"strong",
")",
"{",
"return",
"new",
"map",
"maker",
"internal",
"map",
"<",
">",
"(",
"builder",
",",
"weak",
"key",
"dummy",
"value",
"entry",
"helper",
"<",
"k",
">",
"instance",
"(",
")",
")",
";",
"}",
"if",
"(",
"builder",
"get",
"value",
"strength",
"(",
")",
"=",
"=",
"strength",
"weak",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"map",
"cannot",
"have",
"both",
"weak",
"and",
"dummy",
"values",
"\"",
")",
";",
"}",
"throw",
"new",
"assertion",
"error",
"(",
")",
";",
"}"
]
|
[
"set",
"whether",
"or",
"not",
"trailing",
"slashes",
"should",
"be",
"stripped",
"from",
"the",
"uri",
"when",
"generating",
"the",
"view",
"name",
"default",
"is",
"\"",
"true",
"\""
]
| [
"public",
"void",
"set",
"strip",
"trailing",
"slash",
"(",
"boolean",
"strip",
"trailing",
"slash",
")",
"{",
"this",
"strip",
"trailing",
"slash",
"=",
"strip",
"trailing",
"slash",
";",
"}"
]
|
[
"a",
"convenience",
"method",
"to",
"start",
"a",
"builder",
"using",
"the",
"given",
"task",
"the",
"{",
"@",
"link",
"#",
"set",
"title",
"(",
"string",
")",
"title",
"}",
"of",
"the",
"task",
"will",
"be",
"the",
"value",
"of",
"{",
"@",
"link",
"task",
"#",
"get",
"task",
"title",
"(",
")",
"}",
"this",
"method",
"allows",
"for",
"a",
"more",
"attractive",
"fluent",
"api",
"usage",
"than",
"does",
"the",
"constructor",
"(",
"see",
"the",
"javadoc",
"header",
")"
]
| [
"public",
"static",
"task",
"builder",
"with",
"task",
"(",
"task",
"t",
")",
"{",
"return",
"new",
"task",
"builder",
"(",
"t",
"get",
"task",
"title",
"(",
")",
",",
"t",
")",
";",
"}"
]
|
[
"fetch",
"range",
"index",
"that",
"the",
"database",
"name",
"from",
"connection",
"url",
"if",
"h2",
"database",
"running",
"with",
"file",
"mode"
]
| [
"private",
"int",
"[",
"]",
"fetch",
"database",
"name",
"range",
"index",
"from",
"u",
"r",
"l",
"for",
"h",
"2",
"file",
"mode",
"(",
")",
"{",
"int",
"file",
"label",
"index",
"=",
"url",
"index",
"of",
"(",
"file",
"mode",
"flag",
")",
";",
"int",
"parameter",
"label",
"index",
"=",
"url",
"index",
"of",
"(",
"\"",
";",
"\"",
",",
"file",
"label",
"index",
")",
";",
"if",
"(",
"parameter",
"label",
"index",
"=",
"=",
"-",
"1",
")",
"{",
"parameter",
"label",
"index",
"=",
"url",
"length",
"(",
")",
";",
"}",
"if",
"(",
"file",
"label",
"index",
"!",
"=",
"-",
"1",
")",
"{",
"return",
"new",
"int",
"[",
"]",
"{",
"file",
"label",
"index",
"+",
"file",
"mode",
"flag",
"length",
"(",
")",
"+",
"1",
",",
"parameter",
"label",
"index",
"}",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}"
]
|
[
"this",
"resets",
"the",
"overlay",
"!"
]
| [
"public",
"void",
"set",
"floor",
"(",
"floor",
"type",
")",
"{",
"this",
"floor",
"=",
"type",
";",
"this",
"overlay",
"=",
"(",
"floor",
")",
"blocks",
"air",
";",
"recache",
"(",
")",
";",
"if",
"(",
"build",
"!",
"=",
"null",
")",
"{",
"build",
"on",
"proximity",
"update",
"(",
")",
";",
"}",
"}"
]
|
[
"consider",
"using",
"{",
"@",
"link",
"#",
"add",
"(",
"int",
")",
"}",
"instead",
"for",
"primitive",
"int",
"values"
]
| [
"public",
"void",
"add",
"(",
"integer",
"value",
")",
"{",
"local",
"value",
"+",
"=",
"value",
";",
"}"
]
|
[
"return",
"the",
"maximum",
"number",
"of",
"entries",
"for",
"this",
"template",
"'",
"s",
"sql",
"cache"
]
| [
"public",
"int",
"get",
"cache",
"limit",
"(",
")",
"{",
"return",
"this",
"parsed",
"sql",
"cache",
"size",
"limit",
"(",
")",
";",
"}"
]
|
[
"determines",
"if",
"a",
"given",
"service",
"config",
"choice",
"applies",
",",
"and",
"if",
"so",
",",
"returns",
"it"
]
| [
"static",
"map",
"<",
"string",
",",
"?",
">",
"maybe",
"choose",
"service",
"config",
"(",
"map",
"<",
"string",
",",
"?",
">",
"choice",
",",
"random",
"random",
",",
"string",
"hostname",
")",
"{",
"for",
"(",
"map",
"entry",
"<",
"string",
",",
"?",
">",
"entry",
":",
"choice",
"entry",
"set",
"(",
")",
")",
"{",
"verify",
"verify",
"(",
"service",
"config",
"choice",
"keys",
"contains",
"(",
"entry",
"get",
"key",
"(",
")",
")",
",",
"\"",
"bad",
"key",
":",
"%",
"s",
"\"",
",",
"entry",
")",
";",
"}",
"list",
"<",
"string",
">",
"client",
"languages",
"=",
"get",
"client",
"languages",
"from",
"choice",
"(",
"choice",
")",
";",
"if",
"(",
"client",
"languages",
"!",
"=",
"null",
"&",
"&",
"!",
"client",
"languages",
"is",
"empty",
"(",
")",
")",
"{",
"boolean",
"java",
"present",
"=",
"false",
";",
"for",
"(",
"string",
"lang",
":",
"client",
"languages",
")",
"{",
"if",
"(",
"\"",
"java",
"\"",
"equals",
"ignore",
"case",
"(",
"lang",
")",
")",
"{",
"java",
"present",
"=",
"true",
";",
"break",
";",
"}",
"}",
"if",
"(",
"!",
"java",
"present",
")",
"{",
"return",
"null",
";",
"}",
"}",
"double",
"percentage",
"=",
"get",
"percentage",
"from",
"choice",
"(",
"choice",
")",
";",
"if",
"(",
"percentage",
"!",
"=",
"null",
")",
"{",
"int",
"pct",
"=",
"percentage",
"int",
"value",
"(",
")",
";",
"verify",
"verify",
"(",
"pct",
">",
"=",
"0",
"&",
"&",
"pct",
"<",
"=",
"100",
",",
"\"",
"bad",
"percentage",
":",
"%",
"s",
"\"",
",",
"percentage",
")",
";",
"if",
"(",
"random",
"next",
"int",
"(",
"100",
")",
">",
"=",
"pct",
")",
"{",
"return",
"null",
";",
"}",
"}",
"list",
"<",
"string",
">",
"client",
"hostnames",
"=",
"get",
"hostnames",
"from",
"choice",
"(",
"choice",
")",
";",
"if",
"(",
"client",
"hostnames",
"!",
"=",
"null",
"&",
"&",
"!",
"client",
"hostnames",
"is",
"empty",
"(",
")",
")",
"{",
"boolean",
"hostname",
"present",
"=",
"false",
";",
"for",
"(",
"string",
"client",
"hostname",
":",
"client",
"hostnames",
")",
"{",
"if",
"(",
"client",
"hostname",
"equals",
"(",
"hostname",
")",
")",
"{",
"hostname",
"present",
"=",
"true",
";",
"break",
";",
"}",
"}",
"if",
"(",
"!",
"hostname",
"present",
")",
"{",
"return",
"null",
";",
"}",
"}",
"map",
"<",
"string",
",",
"?",
">",
"sc",
"=",
"json",
"util",
"get",
"object",
"(",
"choice",
",",
"service",
"config",
"choice",
"service",
"config",
"key",
")",
";",
"if",
"(",
"sc",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"verify",
"exception",
"(",
"string",
"format",
"(",
"\"",
"key",
"'",
"%",
"s",
"'",
"missing",
"in",
"'",
"%",
"s",
"'",
"\"",
",",
"choice",
",",
"service",
"config",
"choice",
"service",
"config",
"key",
")",
")",
";",
"}",
"return",
"sc",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"byte",
"[",
"]",
"get",
"bytes",
"(",
"string",
"column",
"label",
")",
"throws",
"s",
"q",
"l",
"exception",
"{",
"return",
"null",
";",
"}"
]
|
[
"return",
"true",
"iff",
"the",
"{",
"@",
"code",
"stat",
"}",
"of",
"{",
"@",
"code",
"path",
"}",
"resulted",
"in",
"an",
"{",
"@",
"code",
"enoent",
"}",
"or",
"{",
"@",
"code",
"enotdir",
"}",
"error"
]
| [
"protected",
"file",
"status",
"stat",
"if",
"found",
"(",
"path",
"path",
",",
"boolean",
"follow",
"symlinks",
")",
"throws",
"i",
"o",
"exception",
"{",
"string",
"name",
"=",
"path",
"get",
"path",
"string",
"(",
")",
";",
"long",
"start",
"time",
"=",
"profiler",
"nano",
"time",
"maybe",
"(",
")",
";",
"try",
"{",
"errno",
"file",
"status",
"stat",
"=",
"follow",
"symlinks",
"?",
"native",
"posix",
"files",
"errno",
"stat",
"(",
"name",
")",
":",
"native",
"posix",
"files",
"errno",
"lstat",
"(",
"name",
")",
";",
"if",
"(",
"!",
"stat",
"has",
"error",
"(",
")",
")",
"{",
"return",
"new",
"unix",
"file",
"status",
"(",
"stat",
")",
";",
"}",
"int",
"errno",
"=",
"stat",
"get",
"errno",
"(",
")",
";",
"if",
"(",
"errno",
"=",
"=",
"errno",
"file",
"status",
"enoent",
"|",
"|",
"errno",
"=",
"=",
"errno",
"file",
"status",
"enotdir",
")",
"{",
"return",
"null",
";",
"}",
"/",
"/",
"this",
"should",
"not",
"return",
"-",
"-",
"we",
"are",
"calling",
"stat",
"here",
"just",
"to",
"throw",
"the",
"proper",
"exception",
"/",
"/",
"however",
",",
"since",
"there",
"may",
"be",
"transient",
"io",
"errors",
",",
"we",
"cannot",
"guarantee",
"that",
"an",
"exception",
"will",
"/",
"/",
"be",
"thrown",
"/",
"/",
"todo",
"(",
"bazel",
"-",
"team",
")",
":",
"extract",
"the",
"exception",
"-",
"construction",
"code",
"and",
"make",
"it",
"visible",
"separately",
"in",
"/",
"/",
"filesystem",
"utils",
"to",
"avoid",
"having",
"to",
"do",
"a",
"duplicate",
"stat",
"call",
"return",
"stat",
"(",
"path",
",",
"follow",
"symlinks",
")",
";",
"}",
"finally",
"{",
"profiler",
"log",
"simple",
"task",
"(",
"start",
"time",
",",
"profiler",
"task",
"vfs",
"stat",
",",
"name",
")",
";",
"}",
"}"
]
|
[
"name",
"of",
"the",
"pet"
]
| [
"public",
"string",
"get",
"a",
"t",
"t",
"n",
"a",
"m",
"e",
"(",
")",
"{",
"return",
"att",
"name",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"file",
"'"
]
| [
"public",
"void",
"file",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"file",
"}"
]
|
[
"creates",
"an",
"xml",
"item",
"this",
"route",
"creates",
"an",
"xml",
"item"
]
| [
"public",
"void",
"create",
"xml",
"item",
"(",
"xml",
"item",
"xml",
"item",
",",
"handler",
"<",
"async",
"result",
"<",
"void",
">",
">",
"result",
"handler",
")",
"{",
"create",
"xml",
"item",
"(",
"xml",
"item",
",",
"null",
",",
"result",
"handler",
")",
";",
"}"
]
|
[
"add",
"memory",
"reference",
"to",
"dynamic",
"table",
"value",
"and",
"return",
"the",
"referenced",
"address",
"specified",
"by",
"the",
"value"
]
| [
"private",
"address",
"add",
"dynamic",
"memory",
"reference",
"(",
"elf",
"dynamic",
"elf",
"dynamic",
",",
"data",
"value",
"data",
",",
"boolean",
"defined",
"memory",
"only",
",",
"string",
"label",
")",
"throws",
"invalid",
"input",
"exception",
"{",
"scalar",
"value",
"=",
"value",
"data",
"get",
"scalar",
"(",
"0",
")",
";",
"if",
"(",
"value",
"=",
"=",
"null",
"|",
"|",
"value",
"get",
"unsigned",
"value",
"(",
")",
"=",
"=",
"0",
")",
"{",
"return",
"null",
";",
"}",
"address",
"ref",
"addr",
"=",
"get",
"default",
"address",
"(",
"elf",
"adjust",
"address",
"for",
"prelink",
"(",
"value",
"get",
"value",
"(",
")",
")",
")",
";",
"if",
"(",
"!",
"defined",
"memory",
"only",
"|",
"|",
"memory",
"get",
"block",
"(",
"ref",
"addr",
")",
"!",
"=",
"null",
")",
"{",
"program",
"get",
"reference",
"manager",
"(",
")",
"add",
"memory",
"reference",
"(",
"value",
"data",
"get",
"address",
"(",
")",
",",
"ref",
"addr",
",",
"ref",
"type",
"data",
",",
"source",
"type",
"analysis",
",",
"0",
")",
";",
"if",
"(",
"label",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"add",
"label",
"if",
"a",
"non",
"-",
"default",
"label",
"does",
"not",
"exist",
"symbol",
"[",
"]",
"symbols",
"=",
"program",
"get",
"symbol",
"table",
"(",
")",
"get",
"symbols",
"(",
"ref",
"addr",
")",
";",
"if",
"(",
"symbols",
"length",
"=",
"=",
"0",
"|",
"|",
"symbols",
"[",
"0",
"]",
"get",
"source",
"(",
")",
"=",
"=",
"source",
"type",
"default",
")",
"{",
"create",
"symbol",
"(",
"ref",
"addr",
",",
"\"",
"\"",
"+",
"label",
",",
"false",
",",
"false",
",",
"null",
")",
";",
"}",
"}",
"}",
"return",
"ref",
"addr",
";",
"}"
]
|
[
"returns",
"an",
"{",
"@",
"link",
"endpoint",
"pair",
"}",
"representing",
"the",
"endpoints",
"of",
"an",
"edge",
"in",
"{",
"@",
"code",
"network",
"}"
]
| [
"static",
"<",
"n",
">",
"endpoint",
"pair",
"<",
"n",
">",
"of",
"(",
"network",
"<",
"?",
",",
"?",
">",
"network",
",",
"n",
"node",
"u",
",",
"n",
"node",
"v",
")",
"{",
"return",
"network",
"is",
"directed",
"(",
")",
"?",
"ordered",
"(",
"node",
"u",
",",
"node",
"v",
")",
":",
"unordered",
"(",
"node",
"u",
",",
"node",
"v",
")",
";",
"}"
]
|
[
"wrap",
"the",
"response",
"exception",
"in",
"an",
"exception",
"that",
"'",
"ll",
"preserve",
"its",
"status",
"code",
"if",
"possible",
"so",
"we",
"can",
"send",
"it",
"back",
"to",
"the",
"user",
"we",
"might",
"not",
"have",
"a",
"constant",
"for",
"the",
"status",
"code",
"so",
"in",
"that",
"case",
"we",
"just",
"use",
"500",
"instead",
"we",
"also",
"extract",
"make",
"sure",
"to",
"include",
"the",
"response",
"body",
"in",
"the",
"message",
"so",
"the",
"user",
"can",
"figure",
"out",
"why",
"the",
"remote",
"elasticsearch",
"service",
"threw",
"the",
"error",
"back",
"to",
"us"
]
| [
"static",
"elasticsearch",
"status",
"exception",
"wrap",
"exception",
"to",
"preserve",
"status",
"(",
"int",
"status",
"code",
",",
"@",
"nullable",
"http",
"entity",
"entity",
",",
"exception",
"cause",
")",
"{",
"rest",
"status",
"status",
"=",
"rest",
"status",
"from",
"code",
"(",
"status",
"code",
")",
";",
"string",
"message",
"prefix",
"=",
"\"",
"\"",
";",
"if",
"(",
"status",
"=",
"=",
"null",
")",
"{",
"message",
"prefix",
"=",
"\"",
"couldn",
"'",
"t",
"extract",
"status",
"[",
"\"",
"+",
"status",
"code",
"+",
"\"",
"]",
"\"",
";",
"status",
"=",
"rest",
"status",
"internal",
"server",
"error",
";",
"}",
"try",
"{",
"return",
"new",
"elasticsearch",
"status",
"exception",
"(",
"message",
"prefix",
"+",
"body",
"message",
"(",
"entity",
")",
",",
"status",
",",
"cause",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ioe",
")",
"{",
"elasticsearch",
"status",
"exception",
"e",
"=",
"new",
"elasticsearch",
"status",
"exception",
"(",
"message",
"prefix",
"+",
"\"",
"failed",
"to",
"extract",
"body",
"\"",
",",
"status",
",",
"cause",
")",
";",
"e",
"add",
"suppressed",
"(",
"ioe",
")",
";",
"return",
"e",
";",
"}",
"}"
]
|
[
"general",
"-",
"purpose",
"http",
"put",
"command",
"to",
"the",
"httpfs",
"server"
]
| [
"private",
"void",
"delete",
"cmd",
"(",
"string",
"filename",
",",
"string",
"message",
",",
"string",
"command",
",",
"string",
"params",
",",
"boolean",
"expect",
"o",
"k",
")",
"throws",
"exception",
"{",
"string",
"user",
"=",
"hadoop",
"users",
"conf",
"test",
"helper",
"get",
"hadoop",
"users",
"(",
")",
"[",
"0",
"]",
";",
"string",
"out",
"msg",
"=",
"message",
"+",
"\"",
"(",
"\"",
"+",
"command",
"+",
"\"",
")",
"\"",
";",
"/",
"/",
"remove",
"leading",
"/",
"from",
"filename",
"if",
"(",
"filename",
"char",
"at",
"(",
"0",
")",
"=",
"=",
"'",
"/",
"'",
")",
"{",
"filename",
"=",
"filename",
"substring",
"(",
"1",
")",
";",
"}",
"string",
"path",
"ops",
"=",
"message",
"format",
"format",
"(",
"\"",
"/",
"webhdfs",
"/",
"v",
"1",
"/",
"{",
"0",
"}",
"?",
"user",
"name",
"=",
"{",
"1",
"}",
"{",
"2",
"}",
"{",
"3",
"}",
"&",
"op",
"=",
"{",
"4",
"}",
"\"",
",",
"filename",
",",
"user",
",",
"(",
"params",
"=",
"=",
"null",
")",
"?",
"\"",
"\"",
":",
"\"",
"&",
"\"",
",",
"(",
"params",
"=",
"=",
"null",
")",
"?",
"\"",
"\"",
":",
"params",
",",
"command",
")",
";",
"url",
"url",
"=",
"new",
"url",
"(",
"test",
"jetty",
"helper",
"get",
"jetty",
"u",
"r",
"l",
"(",
")",
",",
"path",
"ops",
")",
";",
"http",
"u",
"r",
"l",
"connection",
"conn",
"=",
"(",
"http",
"u",
"r",
"l",
"connection",
")",
"url",
"open",
"connection",
"(",
")",
";",
"conn",
"set",
"request",
"method",
"(",
"\"",
"delete",
"\"",
")",
";",
"conn",
"connect",
"(",
")",
";",
"int",
"resp",
"=",
"conn",
"get",
"response",
"code",
"(",
")",
";",
"if",
"(",
"expect",
"o",
"k",
")",
"{",
"assert",
"assert",
"equals",
"(",
"out",
"msg",
",",
"http",
"u",
"r",
"l",
"connection",
"http",
"ok",
",",
"resp",
")",
";",
"}",
"else",
"{",
"assert",
"assert",
"equals",
"(",
"out",
"msg",
",",
"http",
"u",
"r",
"l",
"connection",
"http",
"forbidden",
",",
"resp",
")",
";",
"}",
"}"
]
|
[
"parse",
"a",
"uri",
"into",
"the",
"required",
"command",
"action",
"and",
"parameter"
]
| [
"public",
"static",
"control",
"command",
"parse",
"uri",
"(",
"string",
"command",
"uri",
")",
"{",
"if",
"(",
"command",
"uri",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"command",
"uri",
"can",
"'",
"t",
"be",
"null",
"\"",
")",
";",
"}",
"if",
"(",
"!",
"command",
"uri",
"starts",
"with",
"(",
"endpoint",
"prefix",
")",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"missing",
"required",
"prefix",
":",
"\"",
"+",
"endpoint",
"prefix",
")",
";",
"}",
"string",
"uri",
"=",
"command",
"uri",
"substring",
"(",
"endpoint",
"prefix",
"length",
"(",
")",
")",
";",
"string",
"name",
";",
"string",
"param",
";",
"int",
"separator",
"index",
"=",
"uri",
"index",
"of",
"(",
"'",
"/",
"'",
")",
";",
"if",
"(",
"separator",
"index",
"<",
"0",
")",
"{",
"name",
"=",
"uri",
";",
"param",
"=",
"null",
";",
"}",
"else",
"{",
"name",
"=",
"uri",
"substring",
"(",
"0",
",",
"separator",
"index",
")",
";",
"param",
"=",
"uri",
"substring",
"(",
"separator",
"index",
"+",
"1",
")",
";",
"}",
"return",
"new",
"control",
"command",
"(",
"action",
"value",
"of",
"(",
"name",
"to",
"upper",
"case",
"(",
")",
")",
",",
"param",
")",
";",
"}"
]
|
[
"gets",
"update",
"values"
]
| [
"list",
"<",
"object",
">",
"get",
"update",
"values",
"(",
")",
";"
]
|
[
"test",
"the",
"property",
"'",
"small",
"snake",
"'"
]
| [
"public",
"void",
"small",
"snake",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"small",
"snake",
"}"
]
|
[
"returns",
"whether",
"the",
"given",
"internal",
"type",
"is",
"an",
"array",
"type"
]
| [
"public",
"static",
"boolean",
"is",
"internal",
"array",
"type",
"(",
"string",
"internal",
"type",
")",
"{",
"return",
"internal",
"type",
"length",
"(",
")",
">",
"1",
"&",
"&",
"internal",
"type",
"char",
"at",
"(",
"0",
")",
"=",
"=",
"class",
"constants",
"type",
"array",
";",
"}"
]
|
[
"a",
"general",
"purpose",
"utility",
"function",
"to",
"invoke",
"runtime",
"cost",
"-",
"based",
"optimizer",
"(",
"right",
"now",
"there",
"is",
"only",
"one",
"plan",
"optimizer",
"which",
"determines",
"if",
"the",
"probe",
"and",
"build",
"side",
"of",
"a",
"join",
"node",
"should",
"be",
"swapped",
"based",
"on",
"the",
"statistics",
"of",
"the",
"temporary",
"table",
"holding",
"materialized",
"exchange",
"outputs",
"from",
"finished",
"children",
"sections",
")"
]
| [
"private",
"streaming",
"plan",
"section",
"try",
"cost",
"based",
"optimize",
"(",
"streaming",
"plan",
"section",
"section",
")",
"{",
"/",
"/",
"no",
"need",
"to",
"do",
"runtime",
"optimization",
"if",
"no",
"materialized",
"exchange",
"data",
"is",
"utilized",
"by",
"the",
"section",
"if",
"(",
"!",
"is",
"runtime",
"optimizer",
"enabled",
"(",
"session",
")",
"|",
"|",
"section",
"get",
"children",
"(",
")",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"section",
";",
"}",
"/",
"/",
"apply",
"runtime",
"optimization",
"on",
"each",
"streaming",
"sub",
"plan",
"and",
"generate",
"optimized",
"new",
"fragments",
"map",
"<",
"plan",
"fragment",
",",
"plan",
"fragment",
">",
"old",
"to",
"new",
"fragment",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"stream",
"(",
"for",
"tree",
"(",
"streaming",
"sub",
"plan",
":",
":",
"get",
"children",
")",
"depth",
"first",
"pre",
"order",
"(",
"section",
"get",
"plan",
"(",
")",
")",
")",
"for",
"each",
"(",
"current",
"sub",
"plan",
"-",
">",
"{",
"optional",
"<",
"plan",
"fragment",
">",
"new",
"plan",
"fragment",
"=",
"perform",
"runtime",
"optimizations",
"(",
"current",
"sub",
"plan",
")",
";",
"if",
"(",
"new",
"plan",
"fragment",
"is",
"present",
"(",
")",
")",
"{",
"plan",
"checker",
"validate",
"plan",
"fragment",
"(",
"new",
"plan",
"fragment",
"get",
"(",
")",
"get",
"root",
"(",
")",
",",
"session",
",",
"metadata",
",",
"sql",
"parser",
",",
"variable",
"allocator",
"get",
"types",
"(",
")",
",",
"warning",
"collector",
")",
";",
"old",
"to",
"new",
"fragment",
"put",
"(",
"current",
"sub",
"plan",
"get",
"fragment",
"(",
")",
",",
"new",
"plan",
"fragment",
"get",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"/",
"/",
"early",
"exit",
"when",
"no",
"stage",
"'",
"s",
"fragment",
"is",
"changed",
"if",
"(",
"old",
"to",
"new",
"fragment",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"section",
";",
"}",
"old",
"to",
"new",
"fragment",
"for",
"each",
"(",
"(",
"old",
"fragment",
",",
"new",
"fragment",
")",
"-",
">",
"runtime",
"optimized",
"stages",
"add",
"(",
"get",
"stage",
"id",
"(",
"old",
"fragment",
"get",
"id",
"(",
")",
")",
")",
")",
";",
"/",
"/",
"update",
"sub",
"plan",
"so",
"that",
"get",
"stage",
"info",
"will",
"reflect",
"the",
"latest",
"optimized",
"plan",
"when",
"query",
"is",
"finished",
"update",
"plan",
"(",
"old",
"to",
"new",
"fragment",
")",
";",
"/",
"/",
"rebuild",
"and",
"update",
"entries",
"of",
"the",
"stage",
"executions",
"map",
"update",
"stage",
"executions",
"(",
"section",
",",
"old",
"to",
"new",
"fragment",
")",
";",
"log",
"debug",
"(",
"\"",
"invoked",
"cbo",
"during",
"runtime",
",",
"optimized",
"stage",
"i",
"ds",
":",
"\"",
"+",
"old",
"to",
"new",
"fragment",
"key",
"set",
"(",
")",
"stream",
"(",
")",
"map",
"(",
"plan",
"fragment",
":",
":",
"get",
"id",
")",
"map",
"(",
"plan",
"fragment",
"id",
":",
":",
"to",
"string",
")",
"collect",
"(",
"collectors",
"joining",
"(",
"\"",
",",
"\"",
")",
")",
")",
";",
"return",
"section",
";",
"}"
]
|
[
"returns",
"the",
"number",
"of",
"term",
"buckets",
"per",
"shard",
"that",
"are",
"currently",
"configured"
]
| [
"public",
"int",
"shard",
"size",
"(",
")",
"{",
"return",
"bucket",
"count",
"thresholds",
"get",
"shard",
"size",
"(",
")",
";",
"}"
]
|
[
"set",
"function",
"to",
"non",
"-",
"returning"
]
| [
"private",
"void",
"set",
"function",
"non",
"returning",
"(",
"program",
"cp",
",",
"address",
"entry",
")",
"{",
"function",
"func",
"=",
"cp",
"get",
"function",
"manager",
"(",
")",
"get",
"function",
"at",
"(",
"entry",
")",
";",
"if",
"(",
"func",
"=",
"=",
"null",
")",
"{",
"create",
"function",
"cmd",
"create",
"function",
"cmd",
"=",
"new",
"create",
"function",
"cmd",
"(",
"entry",
")",
";",
"create",
"function",
"cmd",
"apply",
"to",
"(",
"cp",
")",
";",
"func",
"=",
"cp",
"get",
"function",
"manager",
"(",
")",
"get",
"function",
"at",
"(",
"entry",
")",
";",
"if",
"(",
"func",
"=",
"=",
"null",
")",
"{",
"return",
";",
"}",
"}",
"/",
"/",
"if",
"func",
"is",
"null",
",",
"create",
"one",
"at",
"entry",
"func",
"set",
"no",
"return",
"(",
"true",
")",
";",
"}"
]
|
[
"returns",
"the",
"appropriate",
"{",
"@",
"code",
"new",
"-",
"array",
"}",
"rop",
"for",
"the",
"given",
"type",
"the",
"result",
"is",
"a",
"shared",
"instance"
]
| [
"public",
"static",
"rop",
"op",
"new",
"array",
"(",
"type",
"bearer",
"array",
"type",
")",
"{",
"type",
"type",
"=",
"array",
"type",
"get",
"type",
"(",
")",
";",
"type",
"element",
"type",
"=",
"type",
"get",
"component",
"type",
"(",
")",
";",
"switch",
"(",
"element",
"type",
"get",
"basic",
"type",
"(",
")",
")",
"{",
"case",
"type",
"bt",
"int",
":",
"return",
"new",
"array",
"int",
";",
"case",
"type",
"bt",
"long",
":",
"return",
"new",
"array",
"long",
";",
"case",
"type",
"bt",
"float",
":",
"return",
"new",
"array",
"float",
";",
"case",
"type",
"bt",
"double",
":",
"return",
"new",
"array",
"double",
";",
"case",
"type",
"bt",
"boolean",
":",
"return",
"new",
"array",
"boolean",
";",
"case",
"type",
"bt",
"byte",
":",
"return",
"new",
"array",
"byte",
";",
"case",
"type",
"bt",
"char",
":",
"return",
"new",
"array",
"char",
";",
"case",
"type",
"bt",
"short",
":",
"return",
"new",
"array",
"short",
";",
"case",
"type",
"bt",
"object",
":",
"{",
"return",
"new",
"rop",
"(",
"reg",
"ops",
"new",
"array",
",",
"type",
",",
"std",
"type",
"list",
"int",
",",
"exceptions",
"list",
"error",
"negative",
"array",
"size",
"exception",
",",
"\"",
"new",
"-",
"array",
"-",
"object",
"\"",
")",
";",
"}",
"}",
"return",
"throw",
"bad",
"type",
"(",
"type",
")",
";",
"}"
]
|
[
"moves",
"the",
"plugin",
"directory",
"into",
"its",
"final",
"destination"
]
| [
"private",
"void",
"move",
"plugin",
"(",
"path",
"tmp",
"root",
",",
"path",
"destination",
")",
"throws",
"i",
"o",
"exception",
"{",
"files",
"move",
"(",
"tmp",
"root",
",",
"destination",
",",
"standard",
"copy",
"option",
"atomic",
"move",
")",
";",
"files",
"walk",
"file",
"tree",
"(",
"destination",
",",
"new",
"simple",
"file",
"visitor",
"<",
"path",
">",
"(",
")",
"{",
"@",
"override",
"public",
"file",
"visit",
"result",
"visit",
"file",
"(",
"final",
"path",
"file",
",",
"final",
"basic",
"file",
"attributes",
"attrs",
")",
"throws",
"i",
"o",
"exception",
"{",
"final",
"string",
"parent",
"dir",
"name",
"=",
"file",
"get",
"parent",
"(",
")",
"get",
"file",
"name",
"(",
")",
"to",
"string",
"(",
")",
";",
"if",
"(",
"\"",
"bin",
"\"",
"equals",
"(",
"parent",
"dir",
"name",
")",
"/",
"/",
"\"",
"mac",
"o",
"s",
"\"",
"is",
"an",
"alternative",
"to",
"\"",
"bin",
"\"",
"on",
"mac",
"o",
"s",
"|",
"|",
"(",
"constants",
"mac",
"os",
"x",
"&",
"&",
"\"",
"mac",
"o",
"s",
"\"",
"equals",
"(",
"parent",
"dir",
"name",
")",
")",
")",
"{",
"set",
"file",
"attributes",
"(",
"file",
",",
"bin",
"files",
"perms",
")",
";",
"}",
"else",
"{",
"set",
"file",
"attributes",
"(",
"file",
",",
"plugin",
"files",
"perms",
")",
";",
"}",
"return",
"file",
"visit",
"result",
"continue",
";",
"}",
"@",
"override",
"public",
"file",
"visit",
"result",
"post",
"visit",
"directory",
"(",
"final",
"path",
"dir",
",",
"final",
"i",
"o",
"exception",
"exc",
")",
"throws",
"i",
"o",
"exception",
"{",
"set",
"file",
"attributes",
"(",
"dir",
",",
"plugin",
"dir",
"perms",
")",
";",
"return",
"file",
"visit",
"result",
"continue",
";",
"}",
"}",
")",
";",
"}"
]
|
[
"initialize",
"transaction",
"synchronization",
"as",
"appropriate"
]
| [
"private",
"void",
"prepare",
"synchronization",
"(",
"transaction",
"synchronization",
"manager",
"synchronization",
"manager",
",",
"generic",
"reactive",
"transaction",
"status",
",",
"transaction",
"definition",
"definition",
")",
"{",
"if",
"(",
"status",
"is",
"new",
"synchronization",
"(",
")",
")",
"{",
"synchronization",
"manager",
"set",
"actual",
"transaction",
"active",
"(",
"status",
"has",
"transaction",
"(",
")",
")",
";",
"synchronization",
"manager",
"set",
"current",
"transaction",
"isolation",
"level",
"(",
"definition",
"get",
"isolation",
"level",
"(",
")",
"!",
"=",
"transaction",
"definition",
"isolation",
"default",
"?",
"definition",
"get",
"isolation",
"level",
"(",
")",
":",
"null",
")",
";",
"synchronization",
"manager",
"set",
"current",
"transaction",
"read",
"only",
"(",
"definition",
"is",
"read",
"only",
"(",
")",
")",
";",
"synchronization",
"manager",
"set",
"current",
"transaction",
"name",
"(",
"definition",
"get",
"name",
"(",
")",
")",
";",
"synchronization",
"manager",
"init",
"synchronization",
"(",
")",
";",
"}",
"}"
]
|
[
"verifies",
"that",
"the",
"installation",
"folder",
"is",
"not",
"empty",
"and",
"contains",
"a",
"folder",
"with",
"the",
"given",
"name"
]
| [
"private",
"void",
"check",
"dirty",
"install",
"(",
"string",
"name",
")",
"{",
"resource",
"file",
"[",
"]",
"files",
"=",
"g",
"layout",
"get",
"extension",
"installation",
"dirs",
"(",
")",
"get",
"(",
"0",
")",
"list",
"files",
"(",
")",
";",
"assert",
"true",
"(",
"files",
"length",
">",
"=",
"1",
")",
";",
"assert",
"true",
"(",
"files",
"[",
"0",
"]",
"get",
"name",
"(",
")",
"equals",
"(",
"name",
")",
")",
";",
"}"
]
|
[
"close",
"the",
"given",
"connection",
",",
"obtained",
"from",
"the",
"given",
"connection",
"factory",
",",
"if",
"it",
"is",
"not",
"managed",
"externally",
"(",
"that",
"is",
",",
"not",
"bound",
"to",
"the",
"thread",
")"
]
| [
"public",
"static",
"void",
"release",
"connection",
"(",
"@",
"nullable",
"connection",
"con",
",",
"@",
"nullable",
"connection",
"factory",
"cf",
")",
"{",
"try",
"{",
"do",
"release",
"connection",
"(",
"con",
",",
"cf",
")",
";",
"}",
"catch",
"(",
"resource",
"exception",
"ex",
")",
"{",
"logger",
"debug",
"(",
"\"",
"could",
"not",
"close",
"cci",
"connection",
"\"",
",",
"ex",
")",
";",
"}",
"catch",
"(",
"throwable",
"ex",
")",
"{",
"/",
"/",
"we",
"don",
"'",
"t",
"trust",
"the",
"cci",
"driver",
":",
"it",
"might",
"throw",
"runtime",
"exception",
"or",
"error",
"logger",
"debug",
"(",
"\"",
"unexpected",
"exception",
"on",
"closing",
"cci",
"connection",
"\"",
",",
"ex",
")",
";",
"}",
"}"
]
|
[
"returns",
"the",
"most",
"natural",
"java",
"object",
"that",
"represents",
"the",
"actual",
"value",
",",
"like",
"boolean",
",",
"string",
",",
"etc"
]
| [
"public",
"object",
"get",
"value",
"(",
")",
"{",
"return",
"null",
";",
"}"
]
|
[
"sets",
"the",
"maximum",
"number",
"of",
"components",
"in",
"the",
"cumulation",
"buffer",
"if",
"the",
"number",
"of",
"the",
"components",
"in",
"the",
"cumulation",
"buffer",
"exceeds",
"this",
"value",
",",
"the",
"components",
"of",
"the",
"cumulation",
"buffer",
"are",
"consolidated",
"into",
"a",
"single",
"component",
",",
"involving",
"memory",
"copies",
"the",
"default",
"value",
"of",
"this",
"property",
"is",
"{",
"@",
"value",
"#",
"default",
"max",
"compositebuffer",
"components",
"}",
"and",
"its",
"minimum",
"allowed",
"value",
"is",
"{",
"@",
"code",
"2",
"}"
]
| [
"public",
"final",
"void",
"set",
"max",
"cumulation",
"buffer",
"components",
"(",
"int",
"max",
"cumulation",
"buffer",
"components",
")",
"{",
"if",
"(",
"max",
"cumulation",
"buffer",
"components",
"<",
"2",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"max",
"cumulation",
"buffer",
"components",
":",
"\"",
"+",
"max",
"cumulation",
"buffer",
"components",
"+",
"\"",
"(",
"expected",
":",
">",
"=",
"2",
")",
"\"",
")",
";",
"}",
"if",
"(",
"ctx",
"=",
"=",
"null",
")",
"{",
"this",
"max",
"cumulation",
"buffer",
"components",
"=",
"max",
"cumulation",
"buffer",
"components",
";",
"}",
"else",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"decoder",
"properties",
"cannot",
"be",
"changed",
"once",
"the",
"decoder",
"is",
"added",
"to",
"a",
"pipeline",
"\"",
")",
";",
"}",
"}"
]
|
[
"returns",
"whether",
"to",
"work",
"around",
"problems",
"with",
"passthrough",
"audio",
"tracks",
"see",
"[",
"internal",
":",
"b",
"1",
"8",
"8",
"9",
"9",
"6",
"2",
"0",
",",
"b",
"1",
"9",
"1",
"8",
"7",
"5",
"7",
"3",
",",
"b",
"2",
"1",
"1",
"4",
"5",
"3",
"5",
"3",
"]"
]
| [
"private",
"static",
"boolean",
"needs",
"passthrough",
"workarounds",
"(",
"@",
"c",
"encoding",
"int",
"output",
"encoding",
")",
"{",
"return",
"util",
"sdk",
"int",
"<",
"23",
"&",
"&",
"(",
"output",
"encoding",
"=",
"=",
"c",
"encoding",
"ac3",
"|",
"|",
"output",
"encoding",
"=",
"=",
"c",
"encoding",
"e",
"ac3",
")",
";",
"}"
]
|
[
"check",
"if",
"compilation",
"may",
"be",
"required",
"if",
"a",
"stored",
"script",
"is",
"used",
",",
"we",
"cannot",
"tell",
"at",
"this",
"stage",
",",
"so",
"we",
"always",
"assume",
"that",
"stored",
"scripts",
"require",
"compilation",
"if",
"an",
"inline",
"script",
"is",
"used",
",",
"we",
"checked",
"for",
"the",
"mustache",
"opening",
"brackets"
]
| [
"public",
"boolean",
"may",
"require",
"compilation",
"(",
")",
"{",
"return",
"may",
"require",
"compilation",
";",
"}"
]
|
[
"parses",
"each",
"instruction",
"in",
"the",
"array",
",",
"in",
"order"
]
| [
"public",
"void",
"for",
"each",
"(",
"visitor",
"visitor",
")",
"{",
"int",
"sz",
"=",
"bytes",
"size",
"(",
")",
";",
"int",
"at",
"=",
"0",
";",
"while",
"(",
"at",
"<",
"sz",
")",
"{",
"/",
"*",
"*",
"don",
"'",
"t",
"record",
"the",
"previous",
"offset",
"here",
",",
"so",
"that",
"we",
"get",
"to",
"see",
"the",
"*",
"raw",
"code",
"that",
"initializes",
"the",
"array",
"*",
"/",
"at",
"+",
"=",
"parse",
"instruction",
"(",
"at",
",",
"visitor",
")",
";",
"}",
"}"
]
|
[
"concatenates",
"the",
"passed",
"prefix",
"string",
"and",
"the",
"string"
]
| [
"public",
"builder",
"add",
"prefixed",
"(",
"@",
"compile",
"time",
"constant",
"string",
"prefix",
",",
"@",
"nullable",
"string",
"arg",
")",
"{",
"return",
"add",
"prefixed",
"internal",
"(",
"prefix",
",",
"arg",
")",
";",
"}"
]
|
[
"creates",
"a",
"raw",
"type",
"such",
"as",
"{",
"@",
"code",
"raw",
"(",
"'",
"org",
"my",
"class",
"'",
",",
"'",
"s",
"w",
"3",
"djsds",
"'",
")",
"}"
]
| [
"rel",
"data",
"type",
"create",
"raw",
"type",
"(",
"string",
"class",
"name",
",",
"string",
"serializer",
"string",
")",
";"
]
|
[
"return",
"a",
"representation",
"of",
"the",
"non",
"-",
"hidden",
"specified",
"options",
",",
"as",
"a",
"list",
"of",
"string",
"no",
"escaping",
"is",
"done"
]
| [
"public",
"static",
"list",
"<",
"string",
">",
"as",
"argument",
"list",
"(",
"iterable",
"<",
"parsed",
"option",
"description",
">",
"options",
"list",
")",
"{",
"immutable",
"list",
"builder",
"<",
"string",
">",
"builder",
"=",
"immutable",
"list",
"builder",
"(",
")",
";",
"for",
"(",
"parsed",
"option",
"description",
"option",
":",
"options",
"list",
")",
"{",
"if",
"(",
"option",
"is",
"hidden",
"(",
")",
")",
"{",
"continue",
";",
"}",
"builder",
"add",
"(",
"option",
"get",
"canonical",
"form",
"(",
")",
")",
";",
"}",
"return",
"builder",
"build",
"(",
")",
";",
"}"
]
|
[
"convert",
"operand",
"value",
"to",
"string",
"using",
"registered",
"converter",
"or",
"using",
"{",
"@",
"code",
"to",
"string",
"}",
"method"
]
| [
"private",
"static",
"string",
"convert",
"typed",
"value",
"to",
"string",
"(",
"typed",
"value",
"value",
",",
"expression",
"state",
"state",
")",
"{",
"type",
"converter",
"type",
"converter",
"=",
"state",
"get",
"evaluation",
"context",
"(",
")",
"get",
"type",
"converter",
"(",
")",
";",
"type",
"descriptor",
"type",
"descriptor",
"=",
"type",
"descriptor",
"value",
"of",
"(",
"string",
"class",
")",
";",
"if",
"(",
"type",
"converter",
"can",
"convert",
"(",
"value",
"get",
"type",
"descriptor",
"(",
")",
",",
"type",
"descriptor",
")",
")",
"{",
"return",
"string",
"value",
"of",
"(",
"type",
"converter",
"convert",
"value",
"(",
"value",
"get",
"value",
"(",
")",
",",
"value",
"get",
"type",
"descriptor",
"(",
")",
",",
"type",
"descriptor",
")",
")",
";",
"}",
"return",
"string",
"value",
"of",
"(",
"value",
"get",
"value",
"(",
")",
")",
";",
"}"
]
|
[
"write",
"this",
"spill",
"record",
"to",
"the",
"location",
"provided"
]
| [
"public",
"void",
"write",
"to",
"file",
"(",
"path",
"loc",
",",
"job",
"conf",
"job",
")",
"throws",
"i",
"o",
"exception",
"{",
"write",
"to",
"file",
"(",
"loc",
",",
"job",
",",
"new",
"pure",
"java",
"crc",
"3",
"2",
"(",
")",
")",
";",
"}"
]
|
[
"exit",
"a",
"parse",
"tree",
"produced",
"by",
"{",
"@",
"link",
"sql",
"base",
"parser",
"#",
"order",
"by",
"}"
]
| [
"void",
"exit",
"order",
"by",
"(",
"sql",
"base",
"parser",
"order",
"by",
"context",
"ctx",
")",
";"
]
|
[
"provides",
"a",
"convenient",
"method",
"for",
"modifying",
"the",
"current",
"program",
",",
"handling",
"the",
"transaction",
"logic",
"this",
"method",
"is",
"calls",
"{",
"@",
"link",
"#",
"tx",
"(",
"program",
",",
"exceptional",
"callback",
")",
"}",
",",
"but",
"helps",
"with",
"semantics"
]
| [
"public",
"static",
"<",
"e",
"extends",
"exception",
">",
"void",
"modify",
"program",
"(",
"program",
"p",
",",
"exceptional",
"callback",
"<",
"e",
">",
"c",
")",
"{",
"tx",
"(",
"p",
",",
"c",
")",
";",
"}"
]
|
[
"test",
"a",
"cluster",
"with",
"even",
"distribution",
",",
"then",
"a",
"new",
"empty",
"node",
"is",
"added",
"to",
"the",
"cluster"
]
| [
"public",
"void",
"test",
"fsck",
"(",
")",
"throws",
"exception",
"{",
"final",
"configuration",
"conf",
"=",
"create",
"conf",
"(",
")",
";",
"run",
"test",
"(",
"3",
",",
"1",
",",
"conf",
")",
";",
"}"
]
|
[
"adds",
"the",
"given",
"value",
"to",
"the",
"configuration",
"object",
"the",
"main",
"key",
"of",
"the",
"config",
"option",
"will",
"be",
"used",
"to",
"map",
"the",
"value"
]
| [
"public",
"void",
"set",
"integer",
"(",
"config",
"option",
"<",
"integer",
">",
"key",
",",
"int",
"value",
")",
"{",
"set",
"value",
"internal",
"(",
"key",
"key",
"(",
")",
",",
"value",
")",
";",
"}"
]
|
[
"resolve",
"the",
"supplied",
"request",
"and",
"request",
"path",
"to",
"a",
"{",
"@",
"link",
"resource",
"}",
"that",
"exists",
"under",
"one",
"of",
"the",
"given",
"resource",
"locations"
]
| [
"mono",
"<",
"resource",
">",
"resolve",
"resource",
"(",
"@",
"nullable",
"server",
"web",
"exchange",
"exchange",
",",
"string",
"request",
"path",
",",
"list",
"<",
"?",
"extends",
"resource",
">",
"locations",
",",
"resource",
"resolver",
"chain",
"chain",
")",
";"
]
|
[
"returns",
"the",
"number",
"of",
"times",
"the",
"current",
"thread",
"has",
"entered",
"this",
"monitor",
"in",
"excess",
"of",
"the",
"number",
"of",
"times",
"it",
"has",
"left",
"returns",
"0",
"if",
"the",
"current",
"thread",
"is",
"not",
"occupying",
"this",
"monitor"
]
| [
"public",
"int",
"get",
"occupied",
"depth",
"(",
")",
"{",
"return",
"lock",
"get",
"hold",
"count",
"(",
")",
";",
"}"
]
|
[
"creates",
"a",
"new",
"{",
"@",
"link",
"ssl",
"handler",
"}",
"if",
"{",
"@",
"link",
"ssl",
"provider",
"#",
"openssl",
"refcnt",
"}",
"is",
"used",
"then",
"the",
"returned",
"{",
"@",
"link",
"ssl",
"handler",
"}",
"will",
"release",
"the",
"engine",
"that",
"is",
"wrapped",
"if",
"the",
"returned",
"{",
"@",
"link",
"ssl",
"handler",
"}",
"is",
"not",
"inserted",
"into",
"a",
"pipeline",
"then",
"you",
"may",
"leak",
"native",
"memory",
"!",
"<",
"b",
">",
"beware",
"<",
"b",
">",
":",
"the",
"underlying",
"generated",
"{",
"@",
"link",
"s",
"s",
"l",
"engine",
"}",
"won",
"'",
"t",
"have",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"wiki",
"openssl",
"orgindex",
"php",
"hostname",
"validation",
"\"",
">",
"hostname",
"verification",
"enabled",
"by",
"default",
"if",
"you",
"create",
"{",
"@",
"link",
"ssl",
"handler",
"}",
"for",
"the",
"client",
"side",
"and",
"want",
"proper",
"security",
",",
"we",
"advice",
"that",
"you",
"configure",
"the",
"{",
"@",
"link",
"s",
"s",
"l",
"engine",
"}",
"(",
"see",
"{",
"@",
"link",
"javax",
"net",
"ssl",
"s",
"s",
"l",
"parameters",
"#",
"set",
"endpoint",
"identification",
"algorithm",
"(",
"string",
")",
"}",
")",
":",
"s",
"s",
"l",
"engine",
"ssl",
"engine",
"=",
"ssl",
"handler",
"engine",
"(",
")",
";",
"s",
"s",
"l",
"parameters",
"ssl",
"parameters",
"=",
"ssl",
"engine",
"get",
"s",
"s",
"l",
"parameters",
"(",
")",
";",
"only",
"available",
"since",
"java",
"7",
"ssl",
"parameters",
"set",
"endpoint",
"identification",
"algorithm",
"(",
"\"",
"https",
"\"",
")",
";",
"ssl",
"engine",
"set",
"s",
"s",
"l",
"parameters",
"(",
"ssl",
"parameters",
")",
";",
"the",
"underlying",
"{",
"@",
"link",
"s",
"s",
"l",
"engine",
"}",
"may",
"not",
"follow",
"the",
"restrictions",
"imposed",
"by",
"the",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"docs",
"oracle",
"comjavase",
"7docsapijavaxnetssl",
"s",
"s",
"l",
"engine",
"html",
"\"",
">",
"s",
"s",
"l",
"engine",
"javadocs",
"which",
"limits",
"wrapunwrap",
"to",
"operate",
"on",
"a",
"single",
"ssltls",
"packet"
]
| [
"public",
"ssl",
"handler",
"new",
"handler",
"(",
"byte",
"buf",
"allocator",
"alloc",
",",
"executor",
"delegated",
"task",
"executor",
")",
"{",
"return",
"new",
"handler",
"(",
"alloc",
",",
"start",
"tls",
",",
"delegated",
"task",
"executor",
")",
";",
"}"
]
|
[
"return",
"the",
"minimum",
"deadline",
"of",
"{",
"@",
"code",
"this",
"}",
"or",
"an",
"other",
"deadline",
"they",
"must",
"be",
"created",
"using",
"the",
"same",
"{",
"@",
"link",
"ticker",
"}"
]
| [
"public",
"deadline",
"minimum",
"(",
"deadline",
"other",
")",
"{",
"check",
"ticker",
"(",
"other",
")",
";",
"return",
"is",
"before",
"(",
"other",
")",
"?",
"this",
":",
"other",
";",
"}"
]
|
[
"given",
"the",
"map",
"of",
"variables",
",",
"expands",
"this",
"template",
"into",
"a",
"uri",
"the",
"map",
"keys",
"represent",
"variable",
"names",
",",
"the",
"map",
"values",
"variable",
"values",
"the",
"order",
"of",
"variables",
"is",
"not",
"significant",
"example",
":",
"<",
"pre",
"class",
"=",
"\"",
"code",
"\"",
">",
"uri",
"template",
"template",
"=",
"new",
"uri",
"template",
"(",
"\"",
"https",
":",
"example",
"comhotels",
"{",
"hotel",
"}",
"bookings",
"{",
"booking",
"}",
"\"",
")",
";",
"map",
"&",
"lt",
";",
"string",
",",
"string",
"&",
"gt",
";",
"uri",
"variables",
"=",
"new",
"hash",
"map",
"&",
"lt",
";",
"string",
",",
"string",
"&",
"gt",
";",
"(",
")",
";",
"uri",
"variables",
"put",
"(",
"\"",
"booking",
"\"",
",",
"\"",
"42",
"\"",
")",
";",
"uri",
"variables",
"put",
"(",
"\"",
"hotel",
"\"",
",",
"\"",
"rest",
"&",
"relax",
"\"",
")",
";",
"system",
"out",
"println",
"(",
"template",
"expand",
"(",
"uri",
"variables",
")",
")",
";",
"will",
"print",
":",
"<",
"blockquote",
">",
"{",
"@",
"code",
"https",
":",
"example",
"comhotels",
"rest",
"%",
"20",
"%",
"26",
"%",
"2",
"0",
"relaxbookings",
"4",
"2",
"}",
"<",
"blockquote",
">"
]
| [
"public",
"uri",
"expand",
"(",
"map",
"<",
"string",
",",
"?",
">",
"uri",
"variables",
")",
"{",
"uri",
"components",
"expanded",
"components",
"=",
"this",
"uri",
"components",
"expand",
"(",
"uri",
"variables",
")",
";",
"uri",
"components",
"encoded",
"components",
"=",
"expanded",
"components",
"encode",
"(",
")",
";",
"return",
"encoded",
"components",
"to",
"uri",
"(",
")",
";",
"}"
]
|
[
"reset",
"the",
"callback",
"client",
"of",
"gateway",
"server",
"with",
"the",
"given",
"callback",
"listening",
"address",
"and",
"callback",
"listening",
"port",
"after",
"the",
"callback",
"server",
"started"
]
| [
"public",
"static",
"void",
"reset",
"callback",
"client",
"(",
"string",
"callback",
"server",
"listening",
"address",
",",
"int",
"callback",
"server",
"listening",
"port",
")",
"throws",
"unknown",
"host",
"exception",
",",
"invocation",
"target",
"exception",
",",
"no",
"such",
"method",
"exception",
",",
"illegal",
"access",
"exception",
",",
"no",
"such",
"field",
"exception",
"{",
"gateway",
"server",
"=",
"get",
"gateway",
"server",
"(",
")",
";",
"gateway",
"server",
"reset",
"callback",
"client",
"(",
"inet",
"address",
"get",
"by",
"name",
"(",
"callback",
"server",
"listening",
"address",
")",
",",
"callback",
"server",
"listening",
"port",
")",
";",
"reset",
"callback",
"client",
"executor",
"service",
"(",
"gateway",
"server",
")",
";",
"}"
]
|
[
"the",
"{",
"@",
"link",
"connection",
"factory",
"}",
"for",
"the",
"database",
"to",
"populate",
"when",
"this",
"component",
"is",
"initialized",
"and",
"to",
"clean",
"up",
"when",
"this",
"component",
"is",
"shut",
"down",
"this",
"property",
"is",
"mandatory",
"with",
"no",
"default",
"provided"
]
| [
"public",
"void",
"set",
"connection",
"factory",
"(",
"connection",
"factory",
"connection",
"factory",
")",
"{",
"this",
"connection",
"factory",
"=",
"connection",
"factory",
";",
"}"
]
|
[
"tests",
"that",
"any",
"item",
"failure",
"in",
"the",
"listener",
"callbacks",
"is",
"rethrown",
"on",
"an",
"immediately",
"following",
"invoke",
"call"
]
| [
"public",
"void",
"test",
"item",
"failure",
"rethrown",
"on",
"invoke",
"(",
")",
"throws",
"throwable",
"{",
"final",
"dummy",
"elasticsearch",
"sink",
"<",
"string",
">",
"sink",
"=",
"new",
"dummy",
"elasticsearch",
"sink",
"<",
">",
"(",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
",",
"new",
"simple",
"sink",
"function",
"<",
"string",
">",
"(",
")",
",",
"new",
"no",
"op",
"failure",
"handler",
"(",
")",
")",
";",
"final",
"one",
"input",
"stream",
"operator",
"test",
"harness",
"<",
"string",
",",
"object",
">",
"test",
"harness",
"=",
"new",
"one",
"input",
"stream",
"operator",
"test",
"harness",
"<",
">",
"(",
"new",
"stream",
"sink",
"<",
">",
"(",
"sink",
")",
")",
";",
"test",
"harness",
"open",
"(",
")",
";",
"/",
"/",
"setup",
"the",
"next",
"bulk",
"request",
",",
"and",
"its",
"mock",
"item",
"failures",
"sink",
"set",
"mock",
"item",
"failures",
"list",
"for",
"next",
"bulk",
"item",
"responses",
"(",
"collections",
"singleton",
"list",
"(",
"new",
"exception",
"(",
"\"",
"artificial",
"failure",
"for",
"record",
"\"",
")",
")",
")",
";",
"test",
"harness",
"process",
"element",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"\"",
"msg",
"\"",
")",
")",
";",
"verify",
"(",
"sink",
"get",
"mock",
"bulk",
"processor",
"(",
")",
",",
"times",
"(",
"1",
")",
")",
"add",
"(",
"any",
"(",
"index",
"request",
"class",
")",
")",
";",
"/",
"/",
"manually",
"execute",
"the",
"next",
"bulk",
"request",
"sink",
"manual",
"bulk",
"request",
"with",
"all",
"pending",
"requests",
"(",
")",
";",
"try",
"{",
"test",
"harness",
"process",
"element",
"(",
"new",
"stream",
"record",
"<",
">",
"(",
"\"",
"next",
"msg",
"\"",
")",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"/",
"/",
"the",
"invoke",
"should",
"have",
"failed",
"with",
"the",
"failure",
"assert",
"assert",
"true",
"(",
"e",
"get",
"cause",
"(",
")",
"get",
"message",
"(",
")",
"contains",
"(",
"\"",
"artificial",
"failure",
"for",
"record",
"\"",
")",
")",
";",
"/",
"/",
"test",
"succeeded",
"return",
";",
"}",
"assert",
"fail",
"(",
")",
";",
"}"
]
|
[
"model",
"tests",
"for",
"dog"
]
| [
"public",
"void",
"test",
"dog",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"dog",
"}"
]
|
[
"test",
"compatibility",
"of",
"job",
"history",
"parser",
"with",
"2",
"0",
"3",
"-",
"alpha",
"history",
"files"
]
| [
"public",
"void",
"test",
"task",
"attempt",
"unsuccessful",
"completion",
"without",
"counters",
"2",
"0",
"3",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"path",
"hist",
"path",
"=",
"new",
"path",
"(",
"get",
"class",
"(",
")",
"get",
"class",
"loader",
"(",
")",
"get",
"resource",
"(",
"\"",
"job",
"2",
"0",
"3",
"-",
"alpha",
"-",
"failed",
"jhist",
"\"",
")",
"get",
"file",
"(",
")",
")",
";",
"job",
"history",
"parser",
"parser",
"=",
"new",
"job",
"history",
"parser",
"(",
"file",
"system",
"get",
"local",
"(",
"new",
"configuration",
"(",
")",
")",
",",
"hist",
"path",
")",
";",
"job",
"info",
"job",
"info",
"=",
"parser",
"parse",
"(",
")",
";",
"log",
"info",
"(",
"\"",
"job",
"info",
":",
"\"",
"+",
"job",
"info",
"get",
"jobname",
"(",
")",
"+",
"\"",
"\"",
"+",
"job",
"info",
"get",
"succeeded",
"maps",
"(",
")",
"+",
"\"",
"\"",
"+",
"job",
"info",
"get",
"total",
"maps",
"(",
")",
"+",
"\"",
"\"",
"+",
"job",
"info",
"get",
"job",
"id",
"(",
")",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"the",
"node",
"is",
"in",
"maintenance"
]
| [
"public",
"boolean",
"is",
"in",
"maintenance",
"(",
")",
"{",
"return",
"admin",
"state",
"=",
"=",
"admin",
"states",
"in",
"maintenance",
";",
"}"
]
|
[
"a",
"finder",
"which",
"returns",
"the",
"first",
"element",
"matched",
"-",
"such",
"as",
"if",
"you",
"have",
"multiple",
"elements",
"which",
"match",
"the",
"finder",
"(",
"such",
"as",
"multiple",
"links",
"with",
"the",
"same",
"text",
"on",
"a",
"page",
"etc",
")"
]
| [
"public",
"static",
"finder",
"<",
"web",
"element",
",",
"web",
"driver",
">",
"first",
"(",
"final",
"finder",
"<",
"web",
"element",
",",
"web",
"driver",
">",
"finder",
")",
"{",
"return",
"new",
"base",
"finder",
"<",
"web",
"element",
",",
"web",
"driver",
">",
"(",
")",
"{",
"@",
"override",
"public",
"collection",
"<",
"web",
"element",
">",
"find",
"from",
"(",
"web",
"driver",
"context",
")",
"{",
"collection",
"<",
"web",
"element",
">",
"collection",
"=",
"super",
"find",
"from",
"(",
"context",
")",
";",
"if",
"(",
"!",
"collection",
"is",
"empty",
"(",
")",
")",
"{",
"iterator",
"<",
"web",
"element",
">",
"iter",
"=",
"collection",
"iterator",
"(",
")",
";",
"iter",
"has",
"next",
"(",
")",
";",
"return",
"collections",
"singleton",
"list",
"(",
"iter",
"next",
"(",
")",
")",
";",
"}",
"return",
"collection",
";",
"}",
"@",
"override",
"protected",
"collection",
"<",
"web",
"element",
">",
"extract",
"from",
"(",
"web",
"driver",
"context",
")",
"{",
"return",
"finder",
"find",
"from",
"(",
"context",
")",
";",
"}",
"@",
"override",
"protected",
"void",
"describe",
"target",
"to",
"(",
"description",
"description",
")",
"{",
"description",
"append",
"text",
"(",
"\"",
"first",
"\"",
")",
";",
"finder",
"describe",
"to",
"(",
"description",
")",
";",
"}",
"}",
";",
"}"
]
|
[
"read",
"the",
"record",
"field",
"data",
"from",
"the",
"specified",
"buffer",
"and",
"offset"
]
| [
"public",
"void",
"read",
"(",
"buffer",
"buf",
",",
"int",
"offset",
")",
"throws",
"i",
"o",
"exception",
"{",
"for",
"(",
"field",
"field",
"value",
":",
"field",
"values",
")",
"{",
"offset",
"=",
"field",
"value",
"read",
"(",
"buf",
",",
"offset",
")",
";",
"}",
"dirty",
"=",
"false",
";",
"}"
]
|
[
"unzip",
"the",
"file"
]
| [
"public",
"static",
"list",
"<",
"file",
">",
"unzip",
"file",
"(",
"final",
"string",
"zip",
"file",
"path",
",",
"final",
"string",
"dest",
"dir",
"path",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"unzip",
"file",
"by",
"keyword",
"(",
"zip",
"file",
"path",
",",
"dest",
"dir",
"path",
",",
"null",
")",
";",
"}"
]
|
[
"test",
"case",
"for",
"deleting",
"a",
"sub",
"process"
]
| [
"public",
"void",
"test",
"two",
"sub",
"processes",
"(",
")",
"{",
"process",
"instance",
"process",
"instance",
"=",
"runtime",
"service",
"start",
"process",
"instance",
"by",
"key",
"(",
"\"",
"call",
"two",
"sub",
"processes",
"\"",
")",
";",
"list",
"<",
"process",
"instance",
">",
"instance",
"list",
"=",
"runtime",
"service",
"create",
"process",
"instance",
"query",
"(",
")",
"list",
"(",
")",
";",
"assert",
"that",
"(",
"instance",
"list",
")",
"is",
"not",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"instance",
"list",
")",
"has",
"size",
"(",
"3",
")",
";",
"list",
"<",
"task",
">",
"task",
"list",
"=",
"task",
"service",
"create",
"task",
"query",
"(",
")",
"list",
"(",
")",
";",
"assert",
"that",
"(",
"task",
"list",
")",
"is",
"not",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"task",
"list",
")",
"has",
"size",
"(",
"2",
")",
";",
"runtime",
"service",
"delete",
"process",
"instance",
"(",
"process",
"instance",
"get",
"id",
"(",
")",
",",
"\"",
"test",
"cascading",
"\"",
")",
";",
"instance",
"list",
"=",
"runtime",
"service",
"create",
"process",
"instance",
"query",
"(",
")",
"list",
"(",
")",
";",
"assert",
"that",
"(",
"instance",
"list",
")",
"is",
"not",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"instance",
"list",
")",
"has",
"size",
"(",
"0",
")",
";",
"task",
"list",
"=",
"task",
"service",
"create",
"task",
"query",
"(",
")",
"list",
"(",
")",
";",
"assert",
"that",
"(",
"task",
"list",
")",
"is",
"not",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"task",
"list",
")",
"has",
"size",
"(",
"0",
")",
";",
"}"
]
|
[
"old",
"replica",
"of",
"the",
"block",
"should",
"not",
"be",
"accepted",
"as",
"valid",
"for",
"appendread"
]
| [
"public",
"void",
"test",
"failed",
"append",
"block",
"rejection",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"hdfs",
"configuration",
"(",
")",
";",
"conf",
"set",
"(",
"\"",
"dfs",
"client",
"block",
"write",
"replace",
"-",
"datanode",
"-",
"on",
"-",
"failure",
"enable",
"\"",
",",
"\"",
"false",
"\"",
")",
";",
"file",
"builder",
"base",
"dir",
"=",
"new",
"file",
"(",
"generic",
"test",
"utils",
"get",
"randomized",
"temp",
"path",
"(",
")",
")",
";",
"mini",
"d",
"f",
"s",
"cluster",
"cluster",
"=",
"new",
"mini",
"d",
"f",
"s",
"cluster",
"builder",
"(",
"conf",
",",
"builder",
"base",
"dir",
")",
"num",
"data",
"nodes",
"(",
"3",
")",
"build",
"(",
")",
";",
"distributed",
"file",
"system",
"fs",
"=",
"null",
";",
"try",
"{",
"fs",
"=",
"cluster",
"get",
"file",
"system",
"(",
")",
";",
"path",
"path",
"=",
"new",
"path",
"(",
"\"",
"/",
"test",
"\"",
")",
";",
"f",
"s",
"data",
"output",
"stream",
"out",
"=",
"fs",
"create",
"(",
"path",
")",
";",
"out",
"write",
"bytes",
"(",
"\"",
"hello",
"\\",
"n",
"\"",
")",
";",
"out",
"close",
"(",
")",
";",
"/",
"/",
"stop",
"one",
"datanode",
"data",
"node",
"properties",
"dn",
"prop",
"=",
"cluster",
"stop",
"data",
"node",
"(",
"0",
")",
";",
"string",
"dn",
"address",
"=",
"dn",
"prop",
"datanode",
"get",
"xfer",
"address",
"(",
")",
"to",
"string",
"(",
")",
";",
"if",
"(",
"dn",
"address",
"starts",
"with",
"(",
"\"",
"/",
"\"",
")",
")",
"{",
"dn",
"address",
"=",
"dn",
"address",
"substring",
"(",
"1",
")",
";",
"}",
"/",
"/",
"append",
"again",
"to",
"bump",
"genstamps",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"2",
";",
"i",
"+",
"+",
")",
"{",
"out",
"=",
"fs",
"append",
"(",
"path",
")",
";",
"out",
"write",
"bytes",
"(",
"\"",
"helloagain",
"\\",
"n",
"\"",
")",
";",
"out",
"close",
"(",
")",
";",
"}",
"/",
"/",
"re",
"-",
"open",
"and",
"make",
"the",
"block",
"state",
"as",
"underconstruction",
"out",
"=",
"fs",
"append",
"(",
"path",
")",
";",
"cluster",
"restart",
"data",
"node",
"(",
"dn",
"prop",
",",
"true",
")",
";",
"/",
"/",
"wait",
"till",
"the",
"block",
"report",
"comes",
"thread",
"sleep",
"(",
"2000",
")",
";",
"/",
"/",
"check",
"the",
"block",
"locations",
",",
"this",
"should",
"not",
"contain",
"restarted",
"datanode",
"block",
"location",
"[",
"]",
"locations",
"=",
"fs",
"get",
"file",
"block",
"locations",
"(",
"path",
",",
"0",
",",
"long",
"max",
"value",
")",
";",
"string",
"[",
"]",
"names",
"=",
"locations",
"[",
"0",
"]",
"get",
"names",
"(",
")",
";",
"for",
"(",
"string",
"node",
":",
"names",
")",
"{",
"if",
"(",
"node",
"equals",
"(",
"dn",
"address",
")",
")",
"{",
"fail",
"(",
"\"",
"failed",
"append",
"should",
"not",
"be",
"present",
"in",
"latest",
"block",
"locations",
"\"",
")",
";",
"}",
"}",
"out",
"close",
"(",
")",
";",
"}",
"finally",
"{",
"i",
"o",
"utils",
"close",
"stream",
"(",
"fs",
")",
";",
"cluster",
"shutdown",
"(",
")",
";",
"}",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.