docstring_tokens
list | code_tokens
list |
---|---|
[
"find",
"the",
"fields",
"constant",
"that",
"matches",
"name",
",",
"or",
"null",
"if",
"its",
"not",
"found"
]
| [
"public",
"static",
"fields",
"find",
"by",
"name",
"(",
"string",
"name",
")",
"{",
"return",
"by",
"name",
"get",
"(",
"name",
")",
";",
"}"
]
|
[
"subscript",
"safe",
"char",
"at",
"(",
")"
]
| [
"char",
"char",
"at",
"(",
"int",
"at",
")",
"{",
"/",
"/",
"check",
"substring",
"bounds",
"if",
"(",
"(",
"at",
"<",
"0",
")",
"|",
"|",
"(",
"at",
">",
"(",
"m",
"length",
"-",
"1",
")",
")",
")",
"{",
"return",
"'",
"\\",
"0",
"'",
";",
"}",
"return",
"m",
"in",
"word",
"char",
"at",
"(",
"at",
")",
";",
"}"
]
|
[
"write",
"random",
"bytes",
"in",
"the",
"distributed",
"cache",
"files",
"that",
"will",
"be",
"used",
"by",
"all",
"simulated",
"jobs",
"of",
"current",
"gridmix",
"run",
",",
"if",
"files",
"are",
"to",
"be",
"generated",
"do",
"this",
"as",
"part",
"of",
"the",
"map",
"reduce",
"job",
"{",
"@",
"link",
"generate",
"dist",
"cache",
"data",
"#",
"job",
"name",
"}"
]
| [
"protected",
"void",
"write",
"dist",
"cache",
"data",
"(",
"configuration",
"conf",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
"{",
"int",
"file",
"count",
"=",
"conf",
"get",
"int",
"(",
"generate",
"dist",
"cache",
"data",
"gridmix",
"distcache",
"file",
"count",
",",
"-",
"1",
")",
";",
"if",
"(",
"file",
"count",
">",
"0",
")",
"{",
"/",
"/",
"generate",
"distributed",
"cache",
"files",
"final",
"gridmix",
"job",
"gen",
"dist",
"cache",
"data",
"=",
"new",
"generate",
"dist",
"cache",
"data",
"(",
"conf",
")",
";",
"log",
"info",
"(",
"\"",
"generating",
"distributed",
"cache",
"data",
"of",
"size",
"\"",
"+",
"conf",
"get",
"long",
"(",
"generate",
"dist",
"cache",
"data",
"gridmix",
"distcache",
"byte",
"count",
",",
"-",
"1",
")",
")",
";",
"launch",
"gridmix",
"job",
"(",
"gen",
"dist",
"cache",
"data",
")",
";",
"}",
"}"
]
|
[
"returns",
"true",
"if",
"the",
"inet",
"address",
"is",
"either",
"255",
"255",
"255",
"255",
"for",
"i",
"pv",
"4",
"or",
"ffff",
":",
"ffff",
":",
"ffff",
":",
"ffff",
":",
"ffff",
":",
"ffff",
":",
"ffff",
":",
"ffff",
"for",
"i",
"pv",
"6"
]
| [
"public",
"static",
"boolean",
"is",
"maximum",
"(",
"inet",
"address",
"address",
")",
"{",
"byte",
"[",
"]",
"addr",
"=",
"address",
"get",
"address",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"addr",
"length",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"addr",
"[",
"i",
"]",
"!",
"=",
"(",
"byte",
")",
"0xff",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}"
]
|
[
"utility",
"method",
"to",
"create",
"a",
"user",
"config",
"map"
]
| [
"protected",
"map",
"<",
"string",
",",
"string",
">",
"create",
"user",
"config",
"(",
"int",
"bulk",
"flush",
"max",
"actions",
",",
"string",
"cluster",
"name",
")",
"{",
"map",
"<",
"string",
",",
"string",
">",
"user",
"config",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"user",
"config",
"put",
"(",
"\"",
"cluster",
"name",
"\"",
",",
"cluster",
"name",
")",
";",
"user",
"config",
"put",
"(",
"elasticsearch",
"sink",
"base",
"config",
"key",
"bulk",
"flush",
"max",
"actions",
",",
"string",
"value",
"of",
"(",
"bulk",
"flush",
"max",
"actions",
")",
")",
";",
"user",
"config",
"put",
"(",
"\"",
"transport",
"tcp",
"connect",
"timeout",
"\"",
",",
"\"",
"5s",
"\"",
")",
";",
"return",
"user",
"config",
";",
"}"
]
|
[
"called",
"to",
"determine",
"whether",
"the",
"view",
"can",
"be",
"dismissed"
]
| [
"boolean",
"can",
"dismiss",
"(",
"object",
"token",
")",
";"
]
|
[
"leaves",
"a",
"multicast",
"group",
"on",
"a",
"specified",
"local",
"interface",
"and",
"notifies",
"the",
"{",
"@",
"link",
"channel",
"future",
"}",
"once",
"the",
"operation",
"completes"
]
| [
"channel",
"future",
"leave",
"group",
"(",
"inet",
"socket",
"address",
"multicast",
"address",
",",
"network",
"interface",
"network",
"interface",
")",
";"
]
|
[
"given",
"datanode",
"address",
"or",
"host",
"name",
",",
"returns",
"the",
"datanode",
"descriptor",
"for",
"the",
"same",
",",
"or",
"if",
"it",
"doesn",
"'",
"t",
"find",
"the",
"datanode",
",",
"it",
"looks",
"for",
"a",
"machine",
"local",
"and",
"then",
"rack",
"local",
"datanode",
",",
"if",
"a",
"rack",
"local",
"datanode",
"is",
"not",
"possible",
"either",
",",
"it",
"returns",
"the",
"datanode",
"descriptor",
"of",
"any",
"random",
"node",
"in",
"the",
"cluster"
]
| [
"datanode",
"descriptor",
"get",
"datanode",
"descriptor",
"(",
"string",
"address",
")",
"{",
"datanode",
"i",
"d",
"dn",
"id",
"=",
"parse",
"d",
"n",
"from",
"hosts",
"entry",
"(",
"address",
")",
";",
"string",
"host",
"=",
"dn",
"id",
"get",
"ip",
"addr",
"(",
")",
";",
"int",
"xfer",
"port",
"=",
"dn",
"id",
"get",
"xfer",
"port",
"(",
")",
";",
"datanode",
"descriptor",
"node",
"=",
"get",
"datanode",
"by",
"xfer",
"addr",
"(",
"host",
",",
"xfer",
"port",
")",
";",
"if",
"(",
"node",
"=",
"=",
"null",
")",
"{",
"node",
"=",
"get",
"datanode",
"by",
"host",
"(",
"host",
")",
";",
"}",
"if",
"(",
"node",
"=",
"=",
"null",
")",
"{",
"string",
"network",
"location",
"=",
"resolve",
"network",
"location",
"with",
"fall",
"back",
"to",
"default",
"location",
"(",
"dn",
"id",
")",
";",
"/",
"/",
"if",
"the",
"current",
"cluster",
"doesn",
"'",
"t",
"contain",
"the",
"node",
",",
"fallback",
"to",
"/",
"/",
"something",
"machine",
"local",
"and",
"then",
"rack",
"local",
"list",
"<",
"node",
">",
"rack",
"nodes",
"=",
"get",
"network",
"topology",
"(",
")",
"get",
"datanodes",
"in",
"rack",
"(",
"network",
"location",
")",
";",
"if",
"(",
"rack",
"nodes",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"try",
"something",
"machine",
"local",
"for",
"(",
"node",
"rack",
"node",
":",
"rack",
"nodes",
")",
"{",
"if",
"(",
"(",
"(",
"datanode",
"descriptor",
")",
"rack",
"node",
")",
"get",
"ip",
"addr",
"(",
")",
"equals",
"(",
"host",
")",
")",
"{",
"node",
"=",
"(",
"datanode",
"descriptor",
")",
"rack",
"node",
";",
"break",
";",
"}",
"}",
"/",
"/",
"try",
"something",
"rack",
"local",
"if",
"(",
"node",
"=",
"=",
"null",
"&",
"&",
"!",
"rack",
"nodes",
"is",
"empty",
"(",
")",
")",
"{",
"node",
"=",
"(",
"datanode",
"descriptor",
")",
"(",
"rack",
"nodes",
"get",
"(",
"thread",
"local",
"random",
"current",
"(",
")",
"next",
"int",
"(",
"rack",
"nodes",
"size",
"(",
")",
")",
")",
")",
";",
"}",
"}",
"/",
"/",
"if",
"we",
"can",
"'",
"t",
"even",
"choose",
"rack",
"local",
",",
"just",
"choose",
"any",
"node",
"in",
"the",
"/",
"/",
"cluster",
"if",
"(",
"node",
"=",
"=",
"null",
")",
"{",
"node",
"=",
"(",
"datanode",
"descriptor",
")",
"get",
"network",
"topology",
"(",
")",
"choose",
"random",
"(",
"node",
"base",
"root",
")",
";",
"}",
"}",
"return",
"node",
";",
"}"
]
|
[
"gets",
"the",
"selection",
"start",
"and",
"end",
"points",
"as",
"long",
"values"
]
| [
"public",
"long",
"[",
"]",
"get",
"selection",
"(",
")",
"{",
"return",
"new",
"long",
"[",
"]",
"{",
"start",
"position",
",",
"end",
"position",
"}",
";",
"}"
]
|
[
"return",
"the",
"capitalized",
"file",
"name",
"of",
"the",
"model"
]
| [
"public",
"string",
"to",
"model",
"filename",
"(",
"string",
"name",
")",
"{",
"/",
"/",
"should",
"be",
"the",
"same",
"as",
"the",
"model",
"name",
"return",
"to",
"model",
"name",
"(",
"name",
")",
";",
"}"
]
|
[
"create",
"a",
"mutable",
"long",
"integer",
"counter"
]
| [
"mutable",
"counter",
"long",
"new",
"counter",
"(",
"metrics",
"info",
"info",
",",
"long",
"i",
"val",
")",
"{",
"check",
"metric",
"name",
"(",
"info",
"name",
"(",
")",
")",
";",
"mutable",
"counter",
"long",
"ret",
"=",
"new",
"mutable",
"counter",
"long",
"(",
"info",
",",
"i",
"val",
")",
";",
"metrics",
"map",
"put",
"(",
"info",
"name",
"(",
")",
",",
"ret",
")",
";",
"return",
"ret",
";",
"}"
]
|
[
"customize",
"response",
"specification"
]
| [
"public",
"create",
"xml",
"item",
"oper",
"resp",
"spec",
"(",
"consumer",
"<",
"response",
"spec",
"builder",
">",
"resp",
"spec",
"customizer",
")",
"{",
"resp",
"spec",
"customizer",
"accept",
"(",
"resp",
"spec",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"returns",
"a",
"given",
"resource",
"from",
"a",
"given",
"test",
"case"
]
| [
"private",
"static",
"element",
"get",
"resource",
"element",
"(",
"element",
"test",
"case",
"element",
",",
"string",
"resource",
"name",
",",
"boolean",
"kill",
"younger",
"siblings",
")",
"{",
"final",
"node",
"list",
"child",
"nodes",
"=",
"test",
"case",
"element",
"get",
"child",
"nodes",
"(",
")",
";",
"element",
"found",
"=",
"null",
";",
"final",
"list",
"<",
"node",
">",
"kills",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"child",
"nodes",
"get",
"length",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"node",
"child",
"=",
"child",
"nodes",
"item",
"(",
"i",
")",
";",
"if",
"(",
"child",
"get",
"node",
"name",
"(",
")",
"equals",
"(",
"resource",
"tag",
")",
"&",
"&",
"resource",
"name",
"equals",
"(",
"(",
"(",
"element",
")",
"child",
")",
"get",
"attribute",
"(",
"resource",
"name",
"attr",
")",
")",
")",
"{",
"if",
"(",
"found",
"=",
"=",
"null",
")",
"{",
"found",
"=",
"(",
"element",
")",
"child",
";",
"}",
"else",
"if",
"(",
"kill",
"younger",
"siblings",
")",
"{",
"kills",
"add",
"(",
"child",
")",
";",
"}",
"}",
"}",
"for",
"(",
"node",
"kill",
":",
"kills",
")",
"{",
"test",
"case",
"element",
"remove",
"child",
"(",
"kill",
")",
";",
"}",
"return",
"found",
";",
"}"
]
|
[
"returns",
"a",
"string",
"representation",
"of",
"the",
"call",
"'",
"s",
"function",
"for",
"logging",
"or",
"printing",
"to",
"a",
"console"
]
| [
"public",
"string",
"get",
"function",
"name",
"(",
")",
"{",
"if",
"(",
"function",
"identifier",
"=",
"=",
"null",
")",
"{",
"return",
"function",
"definition",
"to",
"string",
"(",
")",
";",
"}",
"else",
"{",
"return",
"function",
"identifier",
"as",
"summary",
"string",
"(",
")",
";",
"}",
"}"
]
|
[
"returns",
"the",
"unbuffered",
"stream",
"with",
"the",
"value",
"for",
"{",
"@",
"code",
"index",
"}"
]
| [
"public",
"input",
"stream",
"get",
"input",
"stream",
"(",
"int",
"index",
")",
"{",
"return",
"ins",
"[",
"index",
"]",
";",
"}"
]
|
[
"set",
"the",
"read",
"timeout",
"for",
"the",
"http",
"client",
"this",
"is",
"the",
"value",
"used",
"by",
"default",
"for",
"each",
"request",
",",
"though",
"it",
"can",
"be",
"overridden",
"on",
"a",
"per",
"-",
"request",
"basis",
"with",
"a",
"request",
"interceptor"
]
| [
"public",
"api",
"client",
"set",
"read",
"timeout",
"(",
"duration",
"read",
"timeout",
")",
"{",
"this",
"read",
"timeout",
"=",
"read",
"timeout",
";",
"return",
"this",
";",
"}"
]
|
[
"returns",
"the",
"result",
"of",
"calling",
"{",
"@",
"link",
"future",
"#",
"get",
"(",
")",
"}",
"uninterruptibly",
"on",
"a",
"task",
"known",
"not",
"to",
"throw",
"a",
"checked",
"exception",
"this",
"makes",
"{",
"@",
"code",
"future",
"}",
"more",
"suitable",
"for",
"lightweight",
",",
"fast",
"-",
"running",
"tasks",
"that",
",",
"barring",
"bugs",
"in",
"the",
"code",
",",
"will",
"not",
"fail",
"this",
"gives",
"it",
"exception",
"-",
"handling",
"behavior",
"similar",
"to",
"that",
"of",
"{",
"@",
"code",
"fork",
"join",
"task",
"join",
"}",
"exceptions",
"from",
"{",
"@",
"code",
"future",
"get",
"}",
"are",
"treated",
"as",
"follows",
":",
"any",
"{",
"@",
"link",
"execution",
"exception",
"}",
"has",
"its",
"cause",
"wrapped",
"in",
"an",
"{",
"@",
"link",
"unchecked",
"execution",
"exception",
"}",
"(",
"if",
"the",
"cause",
"is",
"an",
"{",
"@",
"code",
"exception",
"}",
")",
"or",
"{",
"@",
"link",
"execution",
"error",
"}",
"(",
"if",
"the",
"cause",
"is",
"an",
"{",
"@",
"code",
"error",
"}",
")",
"any",
"{",
"@",
"link",
"interrupted",
"exception",
"}",
"causes",
"a",
"retry",
"of",
"the",
"{",
"@",
"code",
"get",
"}",
"call",
"the",
"interrupt",
"is",
"restored",
"before",
"{",
"@",
"code",
"get",
"unchecked",
"}",
"returns",
"any",
"{",
"@",
"link",
"cancellation",
"exception",
"}",
"is",
"propagated",
"untouched",
"so",
"is",
"any",
"other",
"{",
"@",
"link",
"runtime",
"exception",
"}",
"(",
"{",
"@",
"code",
"get",
"}",
"implementations",
"are",
"discouraged",
"from",
"throwing",
"such",
"exceptions",
")",
"the",
"overall",
"principle",
"is",
"to",
"eliminate",
"all",
"checked",
"exceptions",
":",
"to",
"loop",
"to",
"avoid",
"{",
"@",
"code",
"interrupted",
"exception",
"}",
",",
"to",
"pass",
"through",
"{",
"@",
"code",
"cancellation",
"exception",
"}",
",",
"and",
"to",
"wrap",
"any",
"exception",
"from",
"the",
"underlying",
"computation",
"in",
"an",
"{",
"@",
"code",
"unchecked",
"execution",
"exception",
"}",
"or",
"{",
"@",
"code",
"execution",
"error",
"}",
"for",
"an",
"uninterruptible",
"{",
"@",
"code",
"get",
"}",
"that",
"preserves",
"other",
"exceptions",
",",
"see",
"{",
"@",
"link",
"uninterruptibles",
"#",
"get",
"uninterruptibly",
"(",
"future",
")",
"}"
]
| [
"public",
"static",
"<",
"v",
">",
"v",
"get",
"unchecked",
"(",
"future",
"<",
"v",
">",
"future",
")",
"{",
"check",
"not",
"null",
"(",
"future",
")",
";",
"try",
"{",
"return",
"get",
"uninterruptibly",
"(",
"future",
")",
";",
"}",
"catch",
"(",
"execution",
"exception",
"e",
")",
"{",
"wrap",
"and",
"throw",
"unchecked",
"(",
"e",
"get",
"cause",
"(",
")",
")",
";",
"throw",
"new",
"assertion",
"error",
"(",
")",
";",
"}",
"}"
]
|
[
"model",
"tests",
"for",
"scalene",
"triangle"
]
| [
"public",
"void",
"test",
"scalene",
"triangle",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"scalene",
"triangle",
"}"
]
|
[
"gets",
"a",
"key",
"for",
"an",
"injection",
"type",
"and",
"an",
"annotation",
"strategy"
]
| [
"static",
"<",
"t",
">",
"key",
"<",
"t",
">",
"get",
"(",
"class",
"<",
"t",
">",
"type",
",",
"annotation",
"strategy",
"annotation",
"strategy",
")",
"{",
"return",
"new",
"key",
"<",
">",
"(",
"type",
",",
"annotation",
"strategy",
")",
";",
"}"
]
|
[
"sets",
"the",
"heuristic",
"costs",
"for",
"disk",
"for",
"this",
"costs",
"object"
]
| [
"public",
"void",
"set",
"heuristic",
"disk",
"cost",
"(",
"double",
"cost",
")",
"{",
"if",
"(",
"cost",
"<",
"=",
"0",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"heuristic",
"costs",
"must",
"be",
"positive",
"\"",
")",
";",
"}",
"this",
"heuristic",
"disk",
"cost",
"=",
"cost",
";",
"}"
]
|
[
"returns",
"the",
"offsets",
"of",
"symbols",
"within",
"the",
"symbol",
"table",
"gotten",
"from",
"the",
"address",
"map",
"these",
"offsets",
"to",
"point",
"to",
"the",
"size",
"field",
"of",
"the",
"symbols",
"in",
"the",
"symbol",
"table"
]
| [
"public",
"list",
"<",
"long",
">",
"get",
"address",
"map",
"symbol",
"offsets",
"(",
")",
"{",
"return",
"address",
"map",
"symbol",
"offsets",
";",
"}",
"/",
"/",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"/",
"/",
"package",
"-",
"protected",
"internals",
"/",
"/",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"=",
"="
]
|
[
"return",
"the",
"lower",
"camel",
"case",
"of",
"the",
"string"
]
| [
"public",
"string",
"lower",
"camel",
"case",
"(",
"string",
"name",
")",
"{",
"return",
"(",
"name",
"length",
"(",
")",
">",
"0",
")",
"?",
"(",
"character",
"to",
"lower",
"case",
"(",
"name",
"char",
"at",
"(",
"0",
")",
")",
"+",
"name",
"substring",
"(",
"1",
")",
")",
":",
"\"",
"\"",
";",
"}"
]
|
[
"check",
"whether",
"the",
"requested",
"resource",
"has",
"been",
"modified",
"given",
"the",
"supplied",
"last",
"-",
"modified",
"timestamp",
"(",
"as",
"determined",
"by",
"the",
"application",
")",
"this",
"will",
"also",
"transparently",
"set",
"the",
"\"",
"last",
"-",
"modified",
"\"",
"response",
"header",
"and",
"http",
"status",
"when",
"applicable",
"typical",
"usage",
":",
"<",
"pre",
"class",
"=",
"\"",
"code",
"\"",
">",
"public",
"string",
"my",
"handle",
"method",
"(",
"web",
"request",
"request",
",",
"model",
"model",
")",
"{",
"long",
"last",
"modified",
"=",
"application",
"-",
"specific",
"calculation",
"if",
"(",
"request",
"check",
"not",
"modified",
"(",
"last",
"modified",
")",
")",
"{",
"shortcut",
"exit",
"-",
"no",
"further",
"processing",
"necessary",
"return",
"null",
";",
"}",
"further",
"request",
"processing",
",",
"actually",
"building",
"content",
"model",
"add",
"attribute",
"(",
")",
";",
"return",
"\"",
"my",
"view",
"name",
"\"",
";",
"}",
"this",
"method",
"works",
"with",
"conditional",
"gethead",
"requests",
",",
"but",
"also",
"with",
"conditional",
"postputdelete",
"requests",
"note",
":",
"you",
"can",
"use",
"either",
"this",
"{",
"@",
"code",
"#",
"check",
"not",
"modified",
"(",
"long",
")",
"}",
"method",
";",
"or",
"{",
"@",
"link",
"#",
"check",
"not",
"modified",
"(",
"string",
")",
"}",
"if",
"you",
"want",
"enforce",
"both",
"a",
"strong",
"entity",
"tag",
"and",
"a",
"last",
"-",
"modified",
"value",
",",
"as",
"recommended",
"by",
"the",
"http",
"specification",
",",
"then",
"you",
"should",
"use",
"{",
"@",
"link",
"#",
"check",
"not",
"modified",
"(",
"string",
",",
"long",
")",
"}",
"if",
"the",
"\"",
"if",
"-",
"modified",
"-",
"since",
"\"",
"header",
"is",
"set",
"but",
"cannot",
"be",
"parsed",
"to",
"a",
"date",
"value",
",",
"this",
"method",
"will",
"ignore",
"the",
"header",
"and",
"proceed",
"with",
"setting",
"the",
"last",
"-",
"modified",
"timestamp",
"on",
"the",
"response"
]
| [
"boolean",
"check",
"not",
"modified",
"(",
"long",
"last",
"modified",
"timestamp",
")",
";"
]
|
[
"test",
"the",
"property",
"'",
"color",
"'"
]
| [
"public",
"void",
"color",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"color",
"}"
]
|
[
"get",
"attribute",
"number"
]
| [
"public",
"big",
"decimal",
"get",
"attribute",
"number",
"(",
")",
"{",
"return",
"attribute",
"number",
";",
"}"
]
|
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
]
| [
"private",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
]
|
[
"returns",
"the",
"data",
"output",
"to",
"which",
"the",
"client",
"input",
"is",
"written"
]
| [
"public",
"data",
"output",
"get",
"client",
"output",
"(",
")",
"{",
"return",
"client",
"out",
";",
"}"
]
|
[
"customize",
"request",
"specification"
]
| [
"public",
"create",
"users",
"with",
"array",
"input",
"oper",
"req",
"spec",
"(",
"consumer",
"<",
"request",
"spec",
"builder",
">",
"req",
"spec",
"customizer",
")",
"{",
"req",
"spec",
"customizer",
"accept",
"(",
"req",
"spec",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"append",
"to",
"an",
"existing",
"file",
"if",
"{",
"@",
"link",
"create",
"flag",
"#",
"append",
"}",
"is",
"present"
]
| [
"private",
"d",
"f",
"s",
"output",
"stream",
"primitive",
"append",
"(",
"string",
"src",
",",
"enum",
"set",
"<",
"create",
"flag",
">",
"flag",
",",
"progressable",
"progress",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"flag",
"contains",
"(",
"create",
"flag",
"append",
")",
")",
"{",
"hdfs",
"file",
"status",
"stat",
"=",
"get",
"file",
"info",
"(",
"src",
")",
";",
"if",
"(",
"stat",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"no",
"file",
"to",
"append",
"to",
"/",
"/",
"new",
"file",
"needs",
"to",
"be",
"created",
"if",
"create",
"option",
"is",
"present",
"if",
"(",
"!",
"flag",
"contains",
"(",
"create",
"flag",
"create",
")",
")",
"{",
"throw",
"new",
"file",
"not",
"found",
"exception",
"(",
"\"",
"failed",
"to",
"append",
"to",
"non",
"-",
"existent",
"file",
"\"",
"+",
"src",
"+",
"\"",
"on",
"client",
"\"",
"+",
"client",
"name",
")",
";",
"}",
"return",
"null",
";",
"}",
"return",
"call",
"append",
"(",
"src",
",",
"flag",
",",
"progress",
",",
"null",
")",
";",
"}",
"return",
"null",
";",
"}"
]
|
[
"removes",
"every",
"element",
"that",
"satisfies",
"the",
"provided",
"predicate",
"from",
"the",
"iterator",
"the",
"iterator",
"will",
"be",
"left",
"exhausted",
":",
"its",
"{",
"@",
"code",
"has",
"next",
"(",
")",
"}",
"method",
"will",
"return",
"{",
"@",
"code",
"false",
"}"
]
| [
"public",
"static",
"<",
"t",
">",
"boolean",
"remove",
"if",
"(",
"iterator",
"<",
"t",
">",
"remove",
"from",
",",
"predicate",
"<",
"?",
"super",
"t",
">",
"predicate",
")",
"{",
"check",
"not",
"null",
"(",
"predicate",
")",
";",
"boolean",
"modified",
"=",
"false",
";",
"while",
"(",
"remove",
"from",
"has",
"next",
"(",
")",
")",
"{",
"if",
"(",
"predicate",
"apply",
"(",
"remove",
"from",
"next",
"(",
")",
")",
")",
"{",
"remove",
"from",
"remove",
"(",
")",
";",
"modified",
"=",
"true",
";",
"}",
"}",
"return",
"modified",
";",
"}"
]
|
[
"called",
"after",
"the",
"notification",
"has",
"been",
"cancelled"
]
| [
"default",
"void",
"on",
"notification",
"cancelled",
"(",
"int",
"notification",
"id",
")",
"{",
"}"
]
|
[
"parses",
"and",
"returns",
"a",
"(",
"64",
"-",
"bit",
")",
"long",
"from",
"the",
"pdb",
"byte",
"reader"
]
| [
"public",
"long",
"parse",
"long",
"(",
")",
"throws",
"pdb",
"exception",
"{",
"check",
"limit",
"(",
"8",
")",
";",
"byte",
"[",
"]",
"selected",
"bytes",
"=",
"arrays",
"copy",
"of",
"range",
"(",
"bytes",
",",
"index",
",",
"index",
"+",
"8",
")",
";",
"index",
"+",
"=",
"8",
";",
"return",
"little",
"endian",
"data",
"converter",
"instance",
"get",
"long",
"(",
"selected",
"bytes",
")",
";",
"}"
]
|
[
"sets",
"an",
"optional",
"{",
"@",
"link",
"load",
"error",
"handling",
"policy",
"}"
]
| [
"media",
"source",
"factory",
"set",
"load",
"error",
"handling",
"policy",
"(",
"@",
"nullable",
"load",
"error",
"handling",
"policy",
"load",
"error",
"handling",
"policy",
")",
";"
]
|
[
"sets",
"if",
"the",
"request",
"should",
"be",
"realtime",
"or",
"near",
"-",
"realtime"
]
| [
"public",
"void",
"set",
"realtime",
"(",
"boolean",
"realtime",
")",
"{",
"this",
"realtime",
"=",
"realtime",
";",
"}"
]
|
[
"tries",
"to",
"unblock",
"one",
"or",
"more",
"waiting",
"threads",
"if",
"there",
"are",
"sufficient",
"resources",
"available"
]
| [
"private",
"synchronized",
"void",
"process",
"waiting",
"threads",
"(",
")",
"{",
"iterator",
"<",
"pair",
"<",
"resource",
"set",
",",
"count",
"down",
"latch",
">",
">",
"iterator",
"=",
"request",
"list",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
"has",
"next",
"(",
")",
")",
"{",
"pair",
"<",
"resource",
"set",
",",
"count",
"down",
"latch",
">",
"request",
"=",
"iterator",
"next",
"(",
")",
";",
"if",
"(",
"request",
"second",
"get",
"count",
"(",
")",
"!",
"=",
"0",
")",
"{",
"if",
"(",
"are",
"resources",
"available",
"(",
"request",
"first",
")",
")",
"{",
"increment",
"resources",
"(",
"request",
"first",
")",
";",
"request",
"second",
"count",
"down",
"(",
")",
";",
"iterator",
"remove",
"(",
")",
";",
"}",
"}",
"else",
"{",
"/",
"/",
"cancelled",
"by",
"other",
"side",
"iterator",
"remove",
"(",
")",
";",
"}",
"}",
"}"
]
|
[
"is",
"rows",
"equals"
]
| [
"public",
"static",
"result",
"<",
"boolean",
">",
"is",
"rows",
"equals",
"(",
"table",
"meta",
"table",
"meta",
"data",
",",
"list",
"<",
"row",
">",
"old",
"rows",
",",
"list",
"<",
"row",
">",
"new",
"rows",
")",
"{",
"if",
"(",
"!",
"collection",
"utils",
"is",
"size",
"equals",
"(",
"old",
"rows",
",",
"new",
"rows",
")",
")",
"{",
"return",
"result",
"build",
"(",
"false",
",",
"null",
")",
";",
"}",
"return",
"compare",
"rows",
"(",
"table",
"meta",
"data",
",",
"old",
"rows",
",",
"new",
"rows",
")",
";",
"}"
]
|
[
"execute",
"a",
"void",
"operation",
"with",
"the",
"default",
"retry",
"callback",
"invoked"
]
| [
"public",
"void",
"retry",
"(",
"string",
"action",
",",
"string",
"path",
",",
"boolean",
"idempotent",
",",
"void",
"operation",
"operation",
")",
"throws",
"i",
"o",
"exception",
"{",
"retry",
"(",
"action",
",",
"path",
",",
"idempotent",
",",
"retry",
"callback",
",",
"operation",
")",
";",
"}"
]
|
[
"indicate",
"that",
"the",
"level",
"of",
"indentation",
"for",
"a",
"dump",
"should",
"increase",
"or",
"decrease",
"(",
"positive",
"or",
"negative",
"argument",
",",
"respectively",
")"
]
| [
"public",
"void",
"change",
"indent",
"(",
"int",
"indent",
"delta",
")",
";"
]
|
[
"copy",
"from",
"{",
"@",
"link",
"bus",
"environment",
"post",
"processor",
"#",
"add",
"or",
"replace",
"(",
"mutable",
"property",
"sources",
",",
"map",
")",
"}"
]
| [
"private",
"void",
"add",
"or",
"replace",
"(",
"mutable",
"property",
"sources",
"property",
"sources",
",",
"map",
"<",
"string",
",",
"object",
">",
"map",
")",
"{",
"map",
"property",
"source",
"target",
"=",
"null",
";",
"if",
"(",
"property",
"sources",
"contains",
"(",
"property",
"source",
"name",
")",
")",
"{",
"property",
"source",
"<",
"?",
">",
"source",
"=",
"property",
"sources",
"get",
"(",
"property",
"source",
"name",
")",
";",
"if",
"(",
"source",
"instanceof",
"map",
"property",
"source",
")",
"{",
"target",
"=",
"(",
"map",
"property",
"source",
")",
"source",
";",
"for",
"(",
"string",
"key",
":",
"map",
"key",
"set",
"(",
")",
")",
"{",
"if",
"(",
"!",
"target",
"contains",
"property",
"(",
"key",
")",
")",
"{",
"target",
"get",
"source",
"(",
")",
"put",
"(",
"key",
",",
"map",
"get",
"(",
"key",
")",
")",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"target",
"=",
"=",
"null",
")",
"{",
"target",
"=",
"new",
"map",
"property",
"source",
"(",
"property",
"source",
"name",
",",
"map",
")",
";",
"}",
"if",
"(",
"!",
"property",
"sources",
"contains",
"(",
"property",
"source",
"name",
")",
")",
"{",
"property",
"sources",
"add",
"last",
"(",
"target",
")",
";",
"}",
"}"
]
|
[
"test",
"generate",
"xid"
]
| [
"public",
"void",
"test",
"generate",
"x",
"i",
"d",
"(",
")",
"{",
"long",
"tran",
"id",
"=",
"new",
"random",
"(",
")",
"next",
"long",
"(",
")",
";",
"xid",
"set",
"port",
"(",
"8080",
")",
";",
"xid",
"set",
"ip",
"address",
"(",
"\"",
"127",
"0",
"0",
"1",
"\"",
")",
";",
"assert",
"that",
"(",
"xid",
"generate",
"x",
"i",
"d",
"(",
"tran",
"id",
")",
")",
"is",
"equal",
"to",
"(",
"xid",
"get",
"ip",
"address",
"(",
")",
"+",
"\"",
":",
"\"",
"+",
"xid",
"get",
"port",
"(",
")",
"+",
"\"",
":",
"\"",
"+",
"tran",
"id",
")",
";",
"}"
]
|
[
"returns",
"a",
"copy",
"of",
"the",
"input",
"character",
"sequence",
"in",
"which",
"all",
"{",
"@",
"linkplain",
"#",
"is",
"upper",
"case",
"(",
"char",
")",
"uppercase",
"ascii",
"characters",
"}",
"have",
"been",
"converted",
"to",
"lowercase",
"all",
"other",
"characters",
"are",
"copied",
"without",
"modification"
]
| [
"public",
"static",
"string",
"to",
"lower",
"case",
"(",
"char",
"sequence",
"chars",
")",
"{",
"if",
"(",
"chars",
"instanceof",
"string",
")",
"{",
"return",
"to",
"lower",
"case",
"(",
"(",
"string",
")",
"chars",
")",
";",
"}",
"char",
"[",
"]",
"new",
"chars",
"=",
"new",
"char",
"[",
"chars",
"length",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"new",
"chars",
"length",
";",
"i",
"+",
"+",
")",
"{",
"new",
"chars",
"[",
"i",
"]",
"=",
"to",
"lower",
"case",
"(",
"chars",
"char",
"at",
"(",
"i",
")",
")",
";",
"}",
"return",
"string",
"value",
"of",
"(",
"new",
"chars",
")",
";",
"}"
]
|
[
"updates",
"a",
"pet",
"in",
"the",
"store",
"with",
"form",
"data"
]
| [
"public",
"void",
"update",
"pet",
"with",
"form",
"test",
"(",
")",
"throws",
"exception",
"{",
"long",
"pet",
"id",
"=",
"cache",
"get",
"long",
"(",
"\"",
"/",
"update",
"pet",
"with",
"form",
"/",
"pet",
"id",
"\"",
")",
";",
"string",
"name",
"=",
"cache",
"get",
"string",
"(",
"\"",
"/",
"update",
"pet",
"with",
"form",
"/",
"name",
"\"",
")",
";",
"string",
"status",
"=",
"cache",
"get",
"string",
"(",
"\"",
"/",
"update",
"pet",
"with",
"form",
"/",
"status",
"\"",
")",
";",
"api",
"update",
"pet",
"with",
"form",
"(",
"pet",
"id",
",",
"name",
",",
"status",
")",
";",
"}"
]
|
[
"tests",
"instantiating",
"an",
"fs",
"volume",
"spi",
"subclass"
]
| [
"public",
"void",
"test",
"instantiate",
"volume",
"impl",
"(",
")",
"throws",
"throwable",
"{",
"fs",
"volume",
"spi",
"inst",
"=",
"new",
"external",
"volume",
"impl",
"(",
")",
";",
"}"
]
|
[
"creates",
"one",
"tuple",
"representing",
"the",
"whole",
"group",
"this",
"tuple",
"is",
"later",
"used",
"to",
"create",
"a",
"summarized",
"vertex",
"for",
"each",
"group"
]
| [
"private",
"void",
"create",
"group",
"representative",
"tuple",
"(",
"k",
"vertex",
"group",
"representative",
"id",
",",
"vv",
"vertex",
"group",
"value",
",",
"long",
"vertex",
"group",
"count",
")",
"{",
"reuse",
"vertex",
"group",
"item",
"set",
"vertex",
"id",
"(",
"vertex",
"group",
"representative",
"id",
")",
";",
"reuse",
"vertex",
"group",
"item",
"set",
"vertex",
"group",
"value",
"(",
"vertex",
"group",
"value",
")",
";",
"reuse",
"vertex",
"group",
"item",
"set",
"vertex",
"group",
"count",
"(",
"vertex",
"group",
"count",
")",
";",
"}"
]
|
[
"returns",
"the",
"internal",
"items",
"array",
"if",
"modified",
",",
"{",
"@",
"link",
"#",
"set",
"items",
"(",
"array",
")",
"}",
"must",
"be",
"called",
"to",
"reflect",
"the",
"changes"
]
| [
"public",
"array",
"<",
"t",
">",
"get",
"items",
"(",
")",
"{",
"return",
"items",
";",
"}"
]
|
[
"returns",
"the",
"long",
"at",
"the",
"given",
"index"
]
| [
"public",
"long",
"get",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"longs",
"length",
")",
"{",
"return",
"longs",
"[",
"index",
"]",
";",
"}",
"return",
"0",
";",
"}"
]
|
[
"calls",
"the",
"appropriate",
"subscriber",
"method",
"based",
"on",
"the",
"type",
"of",
"the",
"notification",
"does",
"not",
"check",
"for",
"a",
"subscription",
"notification",
",",
"see",
"{",
"@",
"link",
"#",
"accept",
"full",
"(",
"object",
",",
"subscriber",
")",
"}"
]
| [
"public",
"static",
"<",
"t",
">",
"boolean",
"accept",
"(",
"object",
"o",
",",
"subscriber",
"<",
"?",
"super",
"t",
">",
"s",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"complete",
")",
"{",
"s",
"on",
"complete",
"(",
")",
";",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"o",
"instanceof",
"error",
"notification",
")",
"{",
"s",
"on",
"error",
"(",
"(",
"(",
"error",
"notification",
")",
"o",
")",
"e",
")",
";",
"return",
"true",
";",
"}",
"s",
"on",
"next",
"(",
"(",
"t",
")",
"o",
")",
";",
"return",
"false",
";",
"}"
]
|
[
"temporary",
"path",
"for",
"temp",
"files",
"generated",
"during",
"query",
"processing",
",",
"for",
"example",
",",
"sorted",
"table",
"writes"
]
| [
"public",
"optional",
"<",
"path",
">",
"get",
"temp",
"path",
"(",
")",
"{",
"return",
"temp",
"path",
";",
"}"
]
|
[
"returns",
"the",
"highlight",
"object",
"(",
"contains",
"x",
"-",
"index",
"and",
"data",
"set",
"index",
")",
"of",
"the",
"selected",
"value",
"at",
"the",
"given",
"touch",
"point",
"inside",
"the",
"combined",
"chart"
]
| [
"public",
"highlight",
"get",
"highlight",
"by",
"touch",
"point",
"(",
"float",
"x",
",",
"float",
"y",
")",
"{",
"if",
"(",
"m",
"data",
"=",
"=",
"null",
")",
"{",
"log",
"e",
"(",
"log",
"tag",
",",
"\"",
"can",
"'",
"t",
"select",
"by",
"touch",
"no",
"data",
"set",
"\"",
")",
";",
"return",
"null",
";",
"}",
"else",
"{",
"highlight",
"h",
"=",
"get",
"highlighter",
"(",
")",
"get",
"highlight",
"(",
"x",
",",
"y",
")",
";",
"if",
"(",
"h",
"=",
"=",
"null",
"|",
"|",
"!",
"is",
"highlight",
"full",
"bar",
"enabled",
"(",
")",
")",
"return",
"h",
";",
"/",
"/",
"for",
"is",
"highlight",
"full",
"bar",
"enabled",
",",
"remove",
"stack",
"index",
"return",
"new",
"highlight",
"(",
"h",
"get",
"x",
"(",
")",
",",
"h",
"get",
"y",
"(",
")",
",",
"h",
"get",
"x",
"px",
"(",
")",
",",
"h",
"get",
"y",
"px",
"(",
")",
",",
"h",
"get",
"data",
"set",
"index",
"(",
")",
",",
"-",
"1",
",",
"h",
"get",
"axis",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"deletes",
"the",
"instruction",
"at",
"the",
"given",
"offset",
",",
"popping",
"any",
"now",
"unused",
"stack",
"entries"
]
| [
"private",
"void",
"delete",
"instruction",
"(",
"clazz",
"clazz",
",",
"int",
"offset",
",",
"instruction",
"instruction",
")",
"{",
"/",
"/",
"pop",
"unneeded",
"stack",
"entries",
"if",
"necessary",
"/",
"/",
"int",
"pop",
"count",
"=",
"instruction",
"stack",
"pop",
"count",
"(",
"clazz",
")",
";",
"/",
"/",
"/",
"/",
"insert",
"pop",
"instructions",
"(",
"offset",
",",
"pop",
"count",
")",
";",
"/",
"/",
"/",
"/",
"if",
"(",
"debug",
")",
"system",
"out",
"println",
"(",
"\"",
"deleting",
"instruction",
"\"",
"+",
"instruction",
"to",
"string",
"(",
"offset",
")",
"+",
"(",
"pop",
"count",
"=",
"=",
"0",
"?",
"\"",
"\"",
":",
"\"",
"(",
"\"",
"+",
"pop",
"count",
"+",
"\"",
"pops",
")",
"\"",
")",
")",
";",
"if",
"(",
"debug",
")",
"system",
"out",
"println",
"(",
"\"",
"deleting",
"instruction",
"\"",
"+",
"instruction",
"to",
"string",
"(",
"offset",
")",
")",
";",
"code",
"attribute",
"editor",
"delete",
"instruction",
"(",
"offset",
")",
";",
"/",
"/",
"visit",
"the",
"instruction",
",",
"if",
"required",
"if",
"(",
"extra",
"instruction",
"visitor",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"note",
":",
"we",
"'",
"re",
"not",
"passing",
"the",
"right",
"arguments",
"for",
"now",
",",
"knowing",
"that",
"/",
"/",
"they",
"aren",
"'",
"t",
"used",
"anyway",
"instruction",
"accept",
"(",
"clazz",
",",
"null",
",",
"null",
",",
"offset",
",",
"extra",
"instruction",
"visitor",
")",
";",
"}",
"}"
]
|
[
"can",
"disable",
"a",
"plugin",
"without",
"dependents",
"plugins",
"and",
"jenkins",
"restart",
"after",
"it",
"if",
"-",
"restart",
"argument",
"is",
"passed"
]
| [
"public",
"void",
"restart",
"after",
"disable",
"(",
")",
"{",
"assume",
"not",
"windows",
"(",
")",
";",
"assert",
"that",
"(",
"disable",
"plugins",
"c",
"li",
"command",
"(",
"\"",
"-",
"restart",
"\"",
",",
"\"",
"dependee",
"\"",
")",
",",
"succeeded",
"(",
")",
")",
";",
"assert",
"plugin",
"disabled",
"(",
"\"",
"dependee",
"\"",
")",
";",
"assert",
"jenkins",
"in",
"quiet",
"mode",
"(",
")",
";",
"}"
]
|
[
"returns",
"iterator",
"containing",
"both",
"pcode",
"op",
"a",
"s",
"t",
"and",
"{",
"@",
"literal",
"iterator",
"<",
"pcode",
"}",
"objects"
]
| [
"public",
"iterator",
"<",
"object",
">",
"all",
"alive",
"(",
")",
"{",
"return",
"alive",
"list",
"iterator",
"(",
")",
";",
"}"
]
|
[
"get",
"a",
"{",
"@",
"link",
"reader",
"}",
"attached",
"to",
"the",
"configuration",
"resource",
"with",
"the",
"given",
"<",
"code",
">",
"name",
"<",
"code",
">"
]
| [
"public",
"reader",
"get",
"conf",
"resource",
"as",
"reader",
"(",
"string",
"name",
")",
"{",
"try",
"{",
"url",
"url",
"=",
"get",
"resource",
"(",
"name",
")",
";",
"if",
"(",
"url",
"=",
"=",
"null",
")",
"{",
"log",
"info",
"(",
"name",
"+",
"\"",
"not",
"found",
"\"",
")",
";",
"return",
"null",
";",
"}",
"else",
"{",
"log",
"info",
"(",
"\"",
"found",
"resource",
"\"",
"+",
"name",
"+",
"\"",
"at",
"\"",
"+",
"url",
")",
";",
"}",
"return",
"new",
"input",
"stream",
"reader",
"(",
"url",
"open",
"stream",
"(",
")",
",",
"charsets",
"utf",
"8",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}"
]
|
[
"returns",
"the",
"line",
"number",
"where",
"this",
"element",
"was",
"defined"
]
| [
"public",
"int",
"get",
"line",
"num",
"(",
")",
"{",
"return",
"line",
"num",
";",
"}"
]
|
[
"specify",
"the",
"phase",
"in",
"which",
"a",
"connection",
"should",
"be",
"established",
"to",
"the",
"remote",
"endpoint",
"and",
"subsequently",
"closed",
"the",
"startup",
"order",
"proceeds",
"from",
"lowest",
"to",
"highest",
",",
"and",
"the",
"shutdown",
"order",
"is",
"the",
"reverse",
"of",
"that",
"by",
"default",
"this",
"value",
"is",
"integer",
"max",
"value",
"meaning",
"that",
"this",
"endpoint",
"connection",
"factory",
"connects",
"as",
"late",
"as",
"possible",
"and",
"is",
"closed",
"as",
"soon",
"as",
"possible"
]
| [
"public",
"void",
"set",
"phase",
"(",
"int",
"phase",
")",
"{",
"this",
"phase",
"=",
"phase",
";",
"}"
]
|
[
"the",
"quote",
"analyzer",
"should",
"overwrite",
"any",
"other",
"forced",
"analyzer",
"in",
"quoted",
"parts",
"of",
"the",
"query"
]
| [
"public",
"void",
"test",
"quote",
"analyzer",
"(",
")",
"throws",
"exception",
"{",
"/",
"/",
"prefix",
"query",
"query",
"=",
"new",
"query",
"string",
"query",
"builder",
"(",
"\"",
"one",
"\\",
"\"",
"two",
"three",
"\\",
"\"",
"\"",
")",
"field",
"(",
"text",
"field",
"name",
")",
"analyzer",
"(",
"\"",
"whitespace",
"\"",
")",
"quote",
"analyzer",
"(",
"\"",
"simple",
"\"",
")",
"to",
"query",
"(",
"create",
"shard",
"context",
"(",
")",
")",
";",
"query",
"expected",
"query",
"=",
"new",
"boolean",
"query",
"builder",
"(",
")",
"add",
"(",
"new",
"boolean",
"clause",
"(",
"new",
"term",
"query",
"(",
"new",
"term",
"(",
"text",
"field",
"name",
",",
"\"",
"one",
"\"",
")",
")",
",",
"occur",
"should",
")",
")",
"add",
"(",
"new",
"boolean",
"clause",
"(",
"new",
"phrase",
"query",
"builder",
"(",
")",
"add",
"(",
"new",
"term",
"(",
"text",
"field",
"name",
",",
"\"",
"two",
"\"",
")",
",",
"0",
")",
"add",
"(",
"new",
"term",
"(",
"text",
"field",
"name",
",",
"\"",
"three",
"\"",
")",
",",
"1",
")",
"build",
"(",
")",
",",
"occur",
"should",
")",
")",
"build",
"(",
")",
";",
"assert",
"equals",
"(",
"expected",
"query",
",",
"query",
")",
";",
"}"
]
|
[
"returns",
"a",
"{",
"@",
"link",
"launcher",
"}",
"for",
"executing",
"programs",
"on",
"this",
"node",
"the",
"callee",
"must",
"call",
"{",
"@",
"link",
"launcher",
"#",
"decorate",
"for",
"(",
"node",
")",
"}",
"before",
"returning",
"to",
"complete",
"the",
"decoration"
]
| [
"public",
"abstract",
"launcher",
"create",
"launcher",
"(",
"task",
"listener",
"listener",
")",
";"
]
|
[
"reject",
"a",
"summary",
"entry",
"if",
"the",
"key",
"path",
"is",
"the",
"qualified",
"path",
",",
"or",
"it",
"ends",
"with",
"{",
"@",
"code",
"\"",
"$",
"folder",
"$",
"\"",
"}"
]
| [
"public",
"boolean",
"accept",
"(",
"final",
"path",
"key",
"path",
",",
"final",
"obs",
"object",
"summary",
")",
"{",
"return",
"!",
"key",
"path",
"equals",
"(",
"qualified",
"path",
")",
"&",
"&",
"!",
"summary",
"get",
"object",
"key",
"(",
")",
"ends",
"with",
"(",
"o",
"b",
"s",
"constants",
"obs",
"folder",
"suffix",
")",
";",
"}"
]
|
[
"create",
"the",
"raw",
"erasure",
"encoder",
"to",
"test"
]
| [
"protected",
"raw",
"erasure",
"encoder",
"create",
"encoder",
"(",
")",
"{",
"erasure",
"coder",
"options",
"coder",
"conf",
"=",
"new",
"erasure",
"coder",
"options",
"(",
"num",
"data",
"units",
",",
"num",
"parity",
"units",
",",
"allow",
"change",
"inputs",
",",
"allow",
"dump",
")",
";",
"try",
"{",
"raw",
"erasure",
"coder",
"factory",
"factory",
"=",
"encoder",
"factory",
"class",
"new",
"instance",
"(",
")",
";",
"return",
"factory",
"create",
"encoder",
"(",
"coder",
"conf",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"\"",
"failed",
"to",
"create",
"encoder",
"\"",
",",
"e",
")",
";",
"}",
"}"
]
|
[
"test",
"setting",
"the",
"source",
"with",
"available",
"setters"
]
| [
"public",
"void",
"test",
"set",
"source",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"create",
"index",
"request",
"builder",
"builder",
"=",
"new",
"create",
"index",
"request",
"builder",
"(",
"this",
"test",
"client",
",",
"create",
"index",
"action",
"instance",
")",
";",
"elasticsearch",
"parse",
"exception",
"e",
"=",
"expect",
"throws",
"(",
"elasticsearch",
"parse",
"exception",
"class",
",",
"(",
")",
"-",
">",
"{",
"builder",
"set",
"source",
"(",
"\"",
"{",
"\\",
"\"",
"\"",
"+",
"key",
"+",
"\"",
"\\",
"\"",
":",
"\\",
"\"",
"\"",
"+",
"value",
"+",
"\"",
"\\",
"\"",
"}",
"\"",
",",
"x",
"content",
"type",
"json",
")",
";",
"}",
")",
";",
"assert",
"equals",
"(",
"string",
"format",
"(",
"locale",
"root",
",",
"\"",
"unknown",
"key",
"[",
"%",
"s",
"]",
"for",
"create",
"index",
"\"",
",",
"key",
")",
",",
"e",
"get",
"message",
"(",
")",
")",
";",
"builder",
"set",
"source",
"(",
"\"",
"{",
"\\",
"\"",
"settings",
"\\",
"\"",
":",
"{",
"\\",
"\"",
"\"",
"+",
"key",
"+",
"\"",
"\\",
"\"",
":",
"\\",
"\"",
"\"",
"+",
"value",
"+",
"\"",
"\\",
"\"",
"}",
"}",
"\"",
",",
"x",
"content",
"type",
"json",
")",
";",
"assert",
"equals",
"(",
"value",
",",
"builder",
"request",
"(",
")",
"settings",
"(",
")",
"get",
"(",
"key",
")",
")",
";",
"x",
"content",
"builder",
"x",
"content",
"=",
"x",
"content",
"factory",
"json",
"builder",
"(",
")",
"start",
"object",
"(",
")",
"start",
"object",
"(",
"\"",
"settings",
"\"",
")",
"field",
"(",
"key",
",",
"value",
")",
"end",
"object",
"(",
")",
"end",
"object",
"(",
")",
";",
"x",
"content",
"close",
"(",
")",
";",
"builder",
"set",
"source",
"(",
"x",
"content",
")",
";",
"assert",
"equals",
"(",
"value",
",",
"builder",
"request",
"(",
")",
"settings",
"(",
")",
"get",
"(",
"key",
")",
")",
";",
"byte",
"array",
"output",
"stream",
"doc",
"out",
"=",
"new",
"byte",
"array",
"output",
"stream",
"(",
")",
";",
"x",
"content",
"builder",
"doc",
"=",
"x",
"content",
"factory",
"json",
"builder",
"(",
"doc",
"out",
")",
"start",
"object",
"(",
")",
"start",
"object",
"(",
"\"",
"settings",
"\"",
")",
"field",
"(",
"key",
",",
"value",
")",
"end",
"object",
"(",
")",
"end",
"object",
"(",
")",
";",
"doc",
"close",
"(",
")",
";",
"builder",
"set",
"source",
"(",
"doc",
"out",
"to",
"byte",
"array",
"(",
")",
",",
"x",
"content",
"type",
"json",
")",
";",
"assert",
"equals",
"(",
"value",
",",
"builder",
"request",
"(",
")",
"settings",
"(",
")",
"get",
"(",
"key",
")",
")",
";",
"map",
"<",
"string",
",",
"string",
">",
"settings",
"map",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"settings",
"map",
"put",
"(",
"key",
",",
"value",
")",
";",
"builder",
"set",
"settings",
"(",
"settings",
"map",
")",
";",
"assert",
"equals",
"(",
"value",
",",
"builder",
"request",
"(",
")",
"settings",
"(",
")",
"get",
"(",
"key",
")",
")",
";",
"}"
]
|
[
"tells",
"the",
"{",
"@",
"link",
"watermark",
"output",
"multiplexer",
"}",
"to",
"combine",
"all",
"outstanding",
"deferred",
"watermark",
"updates",
"and",
"possibly",
"emit",
"a",
"new",
"update",
"to",
"the",
"underlying",
"{",
"@",
"link",
"watermark",
"output",
"}"
]
| [
"public",
"void",
"on",
"periodic",
"emit",
"(",
")",
"{",
"update",
"combined",
"watermark",
"(",
")",
";",
"}"
]
|
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
]
| [
"private",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"integer",
"item",
"'"
]
| [
"public",
"void",
"integer",
"item",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"integer",
"item",
"}"
]
|
[
"login",
"from",
"keytab",
"using",
"the",
"mini",
"k",
"d",
"c"
]
| [
"public",
"void",
"test",
"u",
"g",
"i",
"login",
"from",
"keytab",
"(",
")",
"throws",
"exception",
"{",
"long",
"before",
"login",
"=",
"time",
"now",
"(",
")",
";",
"string",
"principal",
"=",
"\"",
"foo",
"\"",
";",
"file",
"keytab",
"=",
"new",
"file",
"(",
"work",
"dir",
",",
"\"",
"foo",
"keytab",
"\"",
")",
";",
"kdc",
"create",
"principal",
"(",
"keytab",
",",
"principal",
")",
";",
"user",
"group",
"information",
"login",
"user",
"from",
"keytab",
"(",
"principal",
",",
"keytab",
"get",
"path",
"(",
")",
")",
";",
"user",
"group",
"information",
"ugi",
"=",
"user",
"group",
"information",
"get",
"login",
"user",
"(",
")",
";",
"assert",
"assert",
"true",
"(",
"\"",
"ugi",
"should",
"be",
"configured",
"to",
"login",
"from",
"keytab",
"\"",
",",
"ugi",
"is",
"from",
"keytab",
"(",
")",
")",
";",
"user",
"user",
"=",
"get",
"user",
"(",
"ugi",
"get",
"subject",
"(",
")",
")",
";",
"assert",
"assert",
"not",
"null",
"(",
"user",
"get",
"login",
"(",
")",
")",
";",
"assert",
"assert",
"true",
"(",
"\"",
"user",
"login",
"time",
"is",
"less",
"than",
"before",
"login",
"time",
",",
"\"",
"+",
"\"",
"before",
"login",
"time",
":",
"\"",
"+",
"before",
"login",
"+",
"\"",
"user",
"login",
"time",
":",
"\"",
"+",
"user",
"get",
"last",
"login",
"(",
")",
",",
"user",
"get",
"last",
"login",
"(",
")",
">",
"before",
"login",
")",
";",
"}"
]
|
[
"decorate",
"the",
"{",
"@",
"code",
"web",
"socket",
"handler",
"}",
"passed",
"into",
"the",
"constructor",
"by",
"default",
",",
"{",
"@",
"link",
"logging",
"web",
"socket",
"handler",
"decorator",
"}",
"and",
"{",
"@",
"link",
"exception",
"web",
"socket",
"handler",
"decorator",
"}",
"are",
"added"
]
| [
"protected",
"web",
"socket",
"handler",
"decorate",
"(",
"web",
"socket",
"handler",
"handler",
")",
"{",
"return",
"new",
"exception",
"web",
"socket",
"handler",
"decorator",
"(",
"new",
"logging",
"web",
"socket",
"handler",
"decorator",
"(",
"handler",
")",
")",
";",
"}"
]
|
[
"checks",
"that",
"sasl",
"negotiation",
"has",
"completed",
"for",
"the",
"given",
"participant",
",",
"and",
"the",
"negotiated",
"quality",
"of",
"protection",
"is",
"included",
"in",
"the",
"given",
"sasl",
"properties",
"and",
"therefore",
"acceptable"
]
| [
"public",
"static",
"void",
"check",
"sasl",
"complete",
"(",
"sasl",
"participant",
"sasl",
",",
"map",
"<",
"string",
",",
"string",
">",
"sasl",
"props",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"!",
"sasl",
"is",
"complete",
"(",
")",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"failed",
"to",
"complete",
"sasl",
"handshake",
"\"",
")",
";",
"}",
"set",
"<",
"string",
">",
"requested",
"qop",
"=",
"immutable",
"set",
"copy",
"of",
"(",
"arrays",
"as",
"list",
"(",
"sasl",
"props",
"get",
"(",
"sasl",
"qop",
")",
"split",
"(",
"\"",
",",
"\"",
")",
")",
")",
";",
"string",
"negotiated",
"qop",
"=",
"sasl",
"get",
"negotiated",
"qop",
"(",
")",
";",
"log",
"debug",
"(",
"\"",
"verifying",
"qop",
",",
"requested",
"qop",
"=",
"{",
"}",
",",
"negotiated",
"qop",
"=",
"{",
"}",
"\"",
",",
"requested",
"qop",
",",
"negotiated",
"qop",
")",
";",
"if",
"(",
"!",
"requested",
"qop",
"contains",
"(",
"negotiated",
"qop",
")",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"string",
"format",
"(",
"\"",
"sasl",
"handshake",
"completed",
",",
"but",
"\"",
"+",
"\"",
"channel",
"does",
"not",
"have",
"acceptable",
"quality",
"of",
"protection",
",",
"\"",
"+",
"\"",
"requested",
"=",
"%",
"s",
",",
"negotiated",
"=",
"%",
"s",
"\"",
",",
"requested",
"qop",
",",
"negotiated",
"qop",
")",
")",
";",
"}",
"}"
]
|
[
"delegate",
"post",
"requests",
"to",
"{",
"@",
"link",
"#",
"process",
"request",
"}"
]
| [
"protected",
"final",
"void",
"do",
"post",
"(",
"http",
"servlet",
"request",
"request",
",",
"http",
"servlet",
"response",
"response",
")",
"throws",
"servlet",
"exception",
",",
"i",
"o",
"exception",
"{",
"process",
"request",
"(",
"request",
",",
"response",
")",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"map",
"string",
"'"
]
| [
"public",
"void",
"map",
"string",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"map",
"string",
"}"
]
|
[
"default",
":",
"null"
]
| [
"public",
"builder",
"racks",
"(",
"string",
"[",
"]",
"val",
")",
"{",
"this",
"racks",
"=",
"val",
";",
"return",
"this",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"final",
"void",
"aux",
"int",
"arg",
"(",
"int",
"value",
")",
"{",
"aux",
"int",
"=",
"value",
";",
"}"
]
|
[
"get",
"all",
"variables",
"and",
"search",
"only",
"in",
"the",
"task",
"scope"
]
| [
"list",
"<",
"variable",
"instance",
">",
"get",
"variable",
"instances",
"local",
"by",
"task",
"ids",
"(",
"set",
"<",
"string",
">",
"task",
"ids",
")",
";"
]
|
[
"appends",
"an",
"optimized",
"{",
"@",
"code",
"char",
"array",
"}",
"value",
"to",
"the",
"stream",
"as",
"an",
"optimized",
"array",
",",
"the",
"{",
"@",
"code",
"int",
"1",
"6",
"}",
"value",
"type",
"marker",
"and",
"element",
"count",
"are",
"encoded",
"once",
"at",
"the",
"array",
"marker",
"instead",
"of",
"repeating",
"the",
"type",
"marker",
"for",
"each",
"element"
]
| [
"public",
"u",
"b",
"json",
"writer",
"value",
"(",
"char",
"[",
"]",
"values",
")",
"throws",
"i",
"o",
"exception",
"{",
"array",
"(",
")",
";",
"out",
"write",
"byte",
"(",
"'",
"$",
"'",
")",
";",
"out",
"write",
"byte",
"(",
"'",
"c",
"'",
")",
";",
"out",
"write",
"byte",
"(",
"'",
"#",
"'",
")",
";",
"value",
"(",
"values",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"n",
"=",
"values",
"length",
";",
"i",
"<",
"n",
";",
"i",
"+",
"+",
")",
"{",
"out",
"write",
"char",
"(",
"values",
"[",
"i",
"]",
")",
";",
"}",
"pop",
"(",
"true",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"tests",
"that",
"use",
"this",
"method",
"are",
"creating",
"a",
"new",
"'",
"original",
"'",
"program",
",",
"rather",
"than",
"using",
"a",
"pre",
"-",
"fabricated",
"one",
"from",
"a",
"program",
"builder"
]
| [
"private",
"void",
"create",
"custom",
"starting",
"program",
"(",
"original",
"program",
"modifier",
"listener",
"modifier",
")",
"throws",
"exception",
"{",
"universal",
"id",
"generator",
"checkpoint",
"(",
")",
";",
"modifier",
"modify",
"original",
"(",
"original",
"program",
")",
";",
"universal",
"id",
"generator",
"restore",
"(",
")",
";",
"modifier",
"modify",
"original",
"(",
"private",
"program",
")",
";",
"universal",
"id",
"generator",
"restore",
"(",
")",
";",
"modifier",
"modify",
"original",
"(",
"latest",
"program",
")",
";",
"universal",
"id",
"generator",
"restore",
"(",
")",
";",
"modifier",
"modify",
"original",
"(",
"result",
"program",
")",
";",
"}"
]
|
[
"process",
"an",
"actual",
"rollback",
"the",
"completed",
"flag",
"has",
"already",
"been",
"checked"
]
| [
"private",
"void",
"process",
"rollback",
"(",
"default",
"transaction",
"status",
"status",
",",
"boolean",
"unexpected",
")",
"{",
"try",
"{",
"boolean",
"unexpected",
"rollback",
"=",
"unexpected",
";",
"try",
"{",
"trigger",
"before",
"completion",
"(",
"status",
")",
";",
"if",
"(",
"status",
"has",
"savepoint",
"(",
")",
")",
"{",
"if",
"(",
"status",
"is",
"debug",
"(",
")",
")",
"{",
"logger",
"debug",
"(",
"\"",
"rolling",
"back",
"transaction",
"to",
"savepoint",
"\"",
")",
";",
"}",
"status",
"rollback",
"to",
"held",
"savepoint",
"(",
")",
";",
"}",
"else",
"if",
"(",
"status",
"is",
"new",
"transaction",
"(",
")",
")",
"{",
"if",
"(",
"status",
"is",
"debug",
"(",
")",
")",
"{",
"logger",
"debug",
"(",
"\"",
"initiating",
"transaction",
"rollback",
"\"",
")",
";",
"}",
"do",
"rollback",
"(",
"status",
")",
";",
"}",
"else",
"{",
"/",
"/",
"participating",
"in",
"larger",
"transaction",
"if",
"(",
"status",
"has",
"transaction",
"(",
")",
")",
"{",
"if",
"(",
"status",
"is",
"local",
"rollback",
"only",
"(",
")",
"|",
"|",
"is",
"global",
"rollback",
"on",
"participation",
"failure",
"(",
")",
")",
"{",
"if",
"(",
"status",
"is",
"debug",
"(",
")",
")",
"{",
"logger",
"debug",
"(",
"\"",
"participating",
"transaction",
"failed",
"-",
"marking",
"existing",
"transaction",
"as",
"rollback",
"-",
"only",
"\"",
")",
";",
"}",
"do",
"set",
"rollback",
"only",
"(",
"status",
")",
";",
"}",
"else",
"{",
"if",
"(",
"status",
"is",
"debug",
"(",
")",
")",
"{",
"logger",
"debug",
"(",
"\"",
"participating",
"transaction",
"failed",
"-",
"letting",
"transaction",
"originator",
"decide",
"on",
"rollback",
"\"",
")",
";",
"}",
"}",
"}",
"else",
"{",
"logger",
"debug",
"(",
"\"",
"should",
"roll",
"back",
"transaction",
"but",
"cannot",
"-",
"no",
"transaction",
"available",
"\"",
")",
";",
"}",
"/",
"/",
"unexpected",
"rollback",
"only",
"matters",
"here",
"if",
"we",
"'",
"re",
"asked",
"to",
"fail",
"early",
"if",
"(",
"!",
"is",
"fail",
"early",
"on",
"global",
"rollback",
"only",
"(",
")",
")",
"{",
"unexpected",
"rollback",
"=",
"false",
";",
"}",
"}",
"}",
"catch",
"(",
"runtime",
"exception",
"|",
"error",
"ex",
")",
"{",
"trigger",
"after",
"completion",
"(",
"status",
",",
"transaction",
"synchronization",
"status",
"unknown",
")",
";",
"throw",
"ex",
";",
"}",
"trigger",
"after",
"completion",
"(",
"status",
",",
"transaction",
"synchronization",
"status",
"rolled",
"back",
")",
";",
"/",
"/",
"raise",
"unexpected",
"rollback",
"exception",
"if",
"we",
"had",
"a",
"global",
"rollback",
"-",
"only",
"marker",
"if",
"(",
"unexpected",
"rollback",
")",
"{",
"throw",
"new",
"unexpected",
"rollback",
"exception",
"(",
"\"",
"transaction",
"rolled",
"back",
"because",
"it",
"has",
"been",
"marked",
"as",
"rollback",
"-",
"only",
"\"",
")",
";",
"}",
"}",
"finally",
"{",
"cleanup",
"after",
"completion",
"(",
"status",
")",
";",
"}",
"}"
]
|
[
"tickle",
"the",
"layout",
"manager",
",",
"so",
"we",
"get",
"a",
"callback",
"to",
"map",
"the",
"components",
"onto",
"the",
"layout"
]
| [
"protected",
"void",
"trick",
"map",
"components",
"(",
")",
"{",
"fieldpane",
"scroll",
"view",
"(",
"0",
")",
";",
"/",
"/",
"this",
"will",
"cause",
"layouts",
"changed",
"to",
"be",
"called",
"}"
]
|
[
"register",
"an",
"allocation",
"command"
]
| [
"private",
"static",
"<",
"t",
"extends",
"allocation",
"command",
">",
"void",
"register",
"allocation",
"command",
"(",
"writeable",
"reader",
"<",
"t",
">",
"reader",
",",
"checked",
"function",
"<",
"x",
"content",
"parser",
",",
"t",
",",
"i",
"o",
"exception",
">",
"parser",
",",
"parse",
"field",
"command",
"name",
")",
"{",
"named",
"x",
"contents",
"add",
"(",
"new",
"named",
"x",
"content",
"registry",
"entry",
"(",
"allocation",
"command",
"class",
",",
"command",
"name",
",",
"parser",
")",
")",
";",
"named",
"writeables",
"add",
"(",
"new",
"named",
"writeable",
"registry",
"entry",
"(",
"allocation",
"command",
"class",
",",
"command",
"name",
"get",
"preferred",
"name",
"(",
")",
",",
"reader",
")",
")",
";",
"}"
]
|
[
"model",
"tests",
"for",
"pet"
]
| [
"public",
"void",
"test",
"pet",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"pet",
"}"
]
|
[
"begin",
"creating",
"the",
"cache",
",",
"must",
"be",
"followed",
"by",
"a",
"call",
"to",
"{",
"@",
"link",
"#",
"end",
"(",
")",
"}",
",",
"in",
"between",
"these",
"calls",
"one",
"or",
"more",
"calls",
"to",
"one",
"of",
"the",
"add",
"(",
")",
"methods",
"can",
"be",
"made",
"calling",
"this",
"method",
"will",
"clear",
"the",
"cache",
"and",
"prepare",
"it",
"for",
"creating",
"a",
"new",
"cache",
"the",
"cache",
"is",
"not",
"valid",
"until",
"the",
"call",
"to",
"{",
"@",
"link",
"#",
"end",
"(",
")",
"}",
"is",
"made",
"use",
"one",
"of",
"the",
"add",
"methods",
"(",
"e",
"g",
"{",
"@",
"link",
"#",
"add",
"(",
"renderable",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"add",
"(",
"renderable",
"provider",
")",
"}",
")",
"to",
"add",
"renderables",
"to",
"the",
"cache"
]
| [
"public",
"void",
"begin",
"(",
"camera",
"camera",
")",
"{",
"if",
"(",
"building",
")",
"throw",
"new",
"gdx",
"runtime",
"exception",
"(",
"\"",
"call",
"end",
"(",
")",
"after",
"calling",
"begin",
"(",
")",
"\"",
")",
";",
"building",
"=",
"true",
";",
"this",
"camera",
"=",
"camera",
";",
"renderables",
"pool",
"flush",
"(",
")",
";",
"renderables",
"clear",
"(",
")",
";",
"items",
"clear",
"(",
")",
";",
"mesh",
"part",
"pool",
"flush",
"(",
")",
";",
"mesh",
"pool",
"flush",
"(",
")",
";",
"}"
]
|
[
"returns",
"the",
"full",
"name",
"of",
"the",
"method",
",",
"consisting",
"of",
"<",
"method",
"name",
">",
"(",
"<",
"name",
"of",
"first",
"param",
">",
",",
"<",
"name",
"of",
"second",
"param",
">",
",",
")"
]
| [
"private",
"string",
"get",
"full",
"name",
"(",
")",
"{",
"list",
"<",
"string",
">",
"param",
"names",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"param",
"param",
":",
"callable",
"parameters",
"(",
")",
")",
"{",
"param",
"names",
"add",
"(",
"param",
"name",
"(",
")",
")",
";",
"}",
"return",
"string",
"format",
"(",
"\"",
"%",
"s",
"(",
"%",
"s",
")",
"\"",
",",
"name",
",",
"joiner",
"on",
"(",
"\"",
",",
"\"",
")",
"join",
"(",
"param",
"names",
")",
")",
";",
"}"
]
|
[
"set",
"the",
"{",
"@",
"code",
"location",
"}",
"header"
]
| [
"public",
"default",
"response",
"creator",
"location",
"(",
"uri",
"location",
")",
"{",
"this",
"headers",
"set",
"location",
"(",
"location",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"checks",
"the",
"result",
"of",
"{",
"@",
"link",
"query",
"builder",
"#",
"to",
"query",
"(",
"query",
"shard",
"context",
")",
"}",
"given",
"the",
"original",
"{",
"@",
"link",
"query",
"builder",
"}",
"and",
"{",
"@",
"link",
"query",
"shard",
"context",
"}",
"verifies",
"that",
"named",
"queries",
"and",
"boost",
"are",
"properly",
"handled",
"and",
"delegates",
"to",
"{",
"@",
"link",
"#",
"do",
"assert",
"lucene",
"query",
"(",
"abstract",
"query",
"builder",
",",
"query",
",",
"query",
"shard",
"context",
")",
"}",
"for",
"query",
"specific",
"checks"
]
| [
"private",
"void",
"assert",
"lucene",
"query",
"(",
"qb",
"query",
"builder",
",",
"query",
"query",
",",
"query",
"shard",
"context",
"context",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"query",
"builder",
"query",
"name",
"(",
")",
"!",
"=",
"null",
"&",
"&",
"query",
"instanceof",
"match",
"no",
"docs",
"query",
"=",
"=",
"false",
")",
"{",
"query",
"named",
"query",
"=",
"context",
"copy",
"named",
"queries",
"(",
")",
"get",
"(",
"query",
"builder",
"query",
"name",
"(",
")",
")",
";",
"assert",
"that",
"(",
"named",
"query",
",",
"equal",
"to",
"(",
"query",
")",
")",
";",
"}",
"if",
"(",
"query",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"query",
"builder",
"boost",
"(",
")",
"!",
"=",
"abstract",
"query",
"builder",
"default",
"boost",
")",
"{",
"assert",
"that",
"(",
"query",
",",
"either",
"(",
"instance",
"of",
"(",
"boost",
"query",
"class",
")",
")",
"or",
"(",
"instance",
"of",
"(",
"span",
"boost",
"query",
"class",
")",
")",
"or",
"(",
"instance",
"of",
"(",
"match",
"no",
"docs",
"query",
"class",
")",
")",
")",
";",
"if",
"(",
"query",
"instanceof",
"span",
"boost",
"query",
")",
"{",
"span",
"boost",
"query",
"span",
"boost",
"query",
"=",
"(",
"span",
"boost",
"query",
")",
"query",
";",
"assert",
"that",
"(",
"span",
"boost",
"query",
"get",
"boost",
"(",
")",
",",
"equal",
"to",
"(",
"query",
"builder",
"boost",
"(",
")",
")",
")",
";",
"query",
"=",
"span",
"boost",
"query",
"get",
"query",
"(",
")",
";",
"}",
"else",
"if",
"(",
"query",
"instanceof",
"boost",
"query",
")",
"{",
"boost",
"query",
"boost",
"query",
"=",
"(",
"boost",
"query",
")",
"query",
";",
"if",
"(",
"boost",
"query",
"get",
"query",
"(",
")",
"instanceof",
"match",
"no",
"docs",
"query",
"=",
"=",
"false",
")",
"{",
"assert",
"that",
"(",
"boost",
"query",
"get",
"boost",
"(",
")",
",",
"equal",
"to",
"(",
"query",
"builder",
"boost",
"(",
")",
")",
")",
";",
"}",
"query",
"=",
"boost",
"query",
"get",
"query",
"(",
")",
";",
"}",
"}",
"}",
"do",
"assert",
"lucene",
"query",
"(",
"query",
"builder",
",",
"query",
",",
"context",
")",
";",
"}"
]
|
[
"return",
"collection",
"of",
"blocks",
"that",
"has",
"already",
"been",
"located"
]
| [
"public",
"list",
"<",
"located",
"block",
">",
"get",
"all",
"blocks",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"get",
"block",
"range",
"(",
"0",
",",
"get",
"file",
"length",
"(",
")",
")",
";",
"}"
]
|
[
"model",
"tests",
"for",
"category"
]
| [
"public",
"void",
"test",
"category",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"category",
"}"
]
|
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
]
| [
"private",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
]
|
[
"returns",
"an",
"iterator",
"over",
"the",
"elements",
"in",
"this",
"deque",
"in",
"reverse",
"sequential",
"order",
"the",
"elements",
"will",
"be",
"returned",
"in",
"order",
"from",
"last",
"(",
"tail",
")",
"to",
"first",
"(",
"head",
")"
]
| [
"iterator",
"<",
"e",
">",
"descending",
"iterator",
"(",
")",
";"
]
|
[
"return",
"the",
"list",
"of",
"fields",
"that",
"were",
"suppressed",
"during",
"the",
"bind",
"process",
"can",
"be",
"used",
"to",
"determine",
"whether",
"any",
"field",
"values",
"were",
"targeting",
"disallowed",
"fields"
]
| [
"public",
"string",
"[",
"]",
"get",
"suppressed",
"fields",
"(",
")",
"{",
"return",
"string",
"utils",
"to",
"string",
"array",
"(",
"this",
"suppressed",
"fields",
")",
";",
"}"
]
|
[
"placeholder",
"for",
"subclasses",
"to",
"get",
"a",
"chance",
"to",
"install",
"actions",
"before",
"plugins"
]
| [
"protected",
"void",
"init",
"actions",
"(",
")",
"{",
"/",
"/",
"placeholder",
"}"
]
|
[
"called",
"when",
"a",
"string",
"element",
"is",
"encountered"
]
| [
"void",
"string",
"element",
"(",
"int",
"id",
",",
"string",
"value",
")",
"throws",
"parser",
"exception",
";"
]
|
[
"verifies",
"that",
"on",
"index",
"creation",
",",
"we",
"don",
"'",
"t",
"go",
"and",
"fetch",
"data",
",",
"but",
"keep",
"the",
"replica",
"shard",
"unassigned",
"to",
"let",
"the",
"shard",
"allocator",
"to",
"allocate",
"it",
"there",
"isn",
"'",
"t",
"a",
"copy",
"around",
"to",
"find",
"anyhow"
]
| [
"public",
"void",
"test",
"no",
"async",
"fetch",
"on",
"index",
"creation",
"(",
")",
"{",
"routing",
"allocation",
"allocation",
"=",
"one",
"primary",
"on",
"node",
"1",
"and",
"1",
"replica",
"(",
"yes",
"allocation",
"deciders",
"(",
")",
",",
"settings",
"empty",
",",
"unassigned",
"info",
"reason",
"index",
"created",
")",
";",
"test",
"allocator",
"clean",
"(",
")",
";",
"allocate",
"all",
"unassigned",
"(",
"allocation",
")",
";",
"assert",
"that",
"(",
"test",
"allocator",
"get",
"fetch",
"data",
"called",
"and",
"clean",
"(",
")",
",",
"equal",
"to",
"(",
"false",
")",
")",
";",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"(",
")",
"shards",
"with",
"state",
"(",
"shard",
"routing",
"state",
"unassigned",
")",
"size",
"(",
")",
",",
"equal",
"to",
"(",
"1",
")",
")",
";",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"(",
")",
"shards",
"with",
"state",
"(",
"shard",
"routing",
"state",
"unassigned",
")",
"get",
"(",
"0",
")",
"shard",
"id",
"(",
")",
",",
"equal",
"to",
"(",
"shard",
"id",
")",
")",
";",
"}"
]
|
[
"get",
"the",
"{",
"@",
"link",
"#",
"shard",
"size",
"(",
")",
"}",
"parameter"
]
| [
"public",
"integer",
"shard",
"size",
"(",
")",
"{",
"return",
"this",
"shard",
"size",
";",
"}"
]
|
[
"returns",
"the",
"name",
"of",
"the",
"two",
"-",
"byte",
"charset",
"in",
"use",
"for",
"pdb",
"processing"
]
| [
"public",
"string",
"get",
"two",
"byte",
"charset",
"name",
"(",
")",
"{",
"return",
"two",
"byte",
"charset",
"name",
";",
"}"
]
|
[
"to",
"test",
"the",
"collection",
"format",
"in",
"query",
"parameters"
]
| [
"public",
"void",
"test",
"query",
"parameter",
"collection",
"format",
"(",
"list",
"<",
"string",
">",
"pipe",
",",
"list",
"<",
"string",
">",
"ioutil",
",",
"list",
"<",
"string",
">",
"http",
",",
"list",
"<",
"string",
">",
"url",
",",
"list",
"<",
"string",
">",
"context",
",",
"api",
"client",
"auth",
"info",
"auth",
"info",
",",
"handler",
"<",
"async",
"result",
"<",
"void",
">",
">",
"result",
"handler",
")",
"{",
"delegate",
"test",
"query",
"parameter",
"collection",
"format",
"(",
"pipe",
",",
"ioutil",
",",
"http",
",",
"url",
",",
"context",
",",
"auth",
"info",
",",
"result",
"handler",
")",
";",
"}"
]
|
[
"finds",
"the",
"first",
"occurrence",
"of",
"the",
"given",
"pattern",
"and",
"then",
"stops",
"filtering",
"when",
"it",
"finds",
"something",
"that",
"is",
"not",
"that",
"pattern"
]
| [
"public",
"static",
"stack",
"trace",
"element",
"[",
"]",
"move",
"past",
"stack",
"trace",
"pattern",
"(",
"stack",
"trace",
"element",
"[",
"]",
"trace",
",",
"string",
"pattern",
")",
"{",
"boolean",
"found",
"it",
"=",
"false",
";",
"int",
"desired",
"start",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"trace",
"length",
";",
"i",
"+",
"+",
")",
"{",
"stack",
"trace",
"element",
"element",
"=",
"trace",
"[",
"i",
"]",
";",
"string",
"trace",
"string",
"=",
"element",
"to",
"string",
"(",
")",
";",
"boolean",
"matches",
"=",
"contains",
"any",
"(",
"trace",
"string",
",",
"pattern",
")",
";",
"if",
"(",
"found",
"it",
"&",
"&",
"!",
"matches",
")",
"{",
"desired",
"start",
"index",
"=",
"i",
";",
"break",
";",
"}",
"found",
"it",
"|",
"=",
"matches",
";",
"}",
"if",
"(",
"!",
"found",
"it",
")",
"{",
"/",
"/",
"never",
"contained",
"the",
"pattern",
"-",
"-",
"return",
"the",
"original",
"return",
"trace",
";",
"}",
"stack",
"trace",
"element",
"[",
"]",
"updated",
"trace",
"=",
"arrays",
"copy",
"of",
"range",
"(",
"trace",
",",
"desired",
"start",
"index",
",",
"trace",
"length",
")",
";",
"return",
"updated",
"trace",
";",
"}"
]
|
[
"similar",
"to",
"{",
"@",
"link",
"#",
"test",
"writability",
"changed",
"(",
")",
"}",
"with",
"slight",
"variation"
]
| [
"public",
"void",
"test",
"flush",
"in",
"writability",
"changed",
"(",
")",
"throws",
"exception",
"{",
"local",
"address",
"addr",
"=",
"new",
"local",
"address",
"(",
"\"",
"test",
"flush",
"in",
"writability",
"changed",
"\"",
")",
";",
"server",
"bootstrap",
"sb",
"=",
"get",
"local",
"server",
"bootstrap",
"(",
")",
";",
"sb",
"bind",
"(",
"addr",
")",
"sync",
"(",
")",
"channel",
"(",
")",
";",
"bootstrap",
"cb",
"=",
"get",
"local",
"client",
"bootstrap",
"(",
")",
";",
"set",
"interest",
"(",
"event",
"write",
",",
"event",
"flush",
",",
"event",
"writability",
")",
";",
"channel",
"client",
"channel",
"=",
"cb",
"connect",
"(",
"addr",
")",
"sync",
"(",
")",
"channel",
"(",
")",
";",
"client",
"channel",
"config",
"(",
")",
"set",
"write",
"buffer",
"low",
"water",
"mark",
"(",
"512",
")",
";",
"client",
"channel",
"config",
"(",
")",
"set",
"write",
"buffer",
"high",
"water",
"mark",
"(",
"1024",
")",
";",
"client",
"channel",
"pipeline",
"(",
")",
"add",
"last",
"(",
"new",
"channel",
"inbound",
"handler",
"adapter",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"channel",
"writability",
"changed",
"(",
"channel",
"handler",
"context",
"ctx",
")",
"throws",
"exception",
"{",
"if",
"(",
"!",
"ctx",
"channel",
"(",
")",
"is",
"writable",
"(",
")",
")",
"{",
"ctx",
"channel",
"(",
")",
"flush",
"(",
")",
";",
"}",
"ctx",
"fire",
"channel",
"writability",
"changed",
"(",
")",
";",
"}",
"}",
")",
";",
"assert",
"true",
"(",
"client",
"channel",
"is",
"writable",
"(",
")",
")",
";",
"client",
"channel",
"write",
"(",
"create",
"test",
"buf",
"(",
"2000",
")",
")",
"sync",
"(",
")",
";",
"client",
"channel",
"close",
"(",
")",
"sync",
"(",
")",
";",
"assert",
"log",
"(",
"/",
"/",
"case",
"1",
":",
"\"",
"writability",
":",
"writable",
"=",
"false",
"\\",
"n",
"\"",
"+",
"\"",
"flush",
"\\",
"n",
"\"",
"+",
"\"",
"write",
"\\",
"n",
"\"",
"+",
"\"",
"writability",
":",
"writable",
"=",
"false",
"\\",
"n",
"\"",
"+",
"\"",
"writability",
":",
"writable",
"=",
"false",
"\\",
"n",
"\"",
"+",
"\"",
"flush",
"\\",
"n",
"\"",
"+",
"\"",
"writability",
":",
"writable",
"=",
"true",
"\\",
"n",
"\"",
",",
"/",
"/",
"case",
"2",
":",
"\"",
"writability",
":",
"writable",
"=",
"false",
"\\",
"n",
"\"",
"+",
"\"",
"flush",
"\\",
"n",
"\"",
"+",
"\"",
"write",
"\\",
"n",
"\"",
"+",
"\"",
"writability",
":",
"writable",
"=",
"false",
"\\",
"n",
"\"",
"+",
"\"",
"flush",
"\\",
"n",
"\"",
"+",
"\"",
"writability",
":",
"writable",
"=",
"true",
"\\",
"n",
"\"",
"+",
"\"",
"writability",
":",
"writable",
"=",
"true",
"\\",
"n",
"\"",
")",
";",
"}"
]
|
[
"read",
"properties",
"from",
"the",
"version",
"file",
"in",
"the",
"given",
"storage",
"directory"
]
| [
"public",
"void",
"read",
"properties",
"(",
"storage",
"directory",
"sd",
")",
"throws",
"i",
"o",
"exception",
"{",
"properties",
"props",
"=",
"read",
"properties",
"file",
"(",
"sd",
"get",
"version",
"file",
"(",
")",
")",
";",
"set",
"fields",
"from",
"properties",
"(",
"props",
",",
"sd",
")",
";",
"}"
]
|
[
"judge",
"the",
"table",
"name",
"is",
"an",
"intermediate",
"table",
"or",
"not"
]
| [
"public",
"static",
"boolean",
"is",
"intermediate",
"table",
"(",
"string",
"table",
"name",
",",
"s",
"q",
"lite",
"database",
"db",
")",
"{",
"if",
"(",
"!",
"text",
"utils",
"is",
"empty",
"(",
"table",
"name",
")",
")",
"{",
"if",
"(",
"table",
"name",
"matches",
"(",
"\"",
"[",
"0",
"-",
"9a",
"-",
"z",
"a",
"-",
"z",
"]",
"+",
"[",
"0",
"-",
"9a",
"-",
"z",
"a",
"-",
"z",
"]",
"+",
"\"",
")",
")",
"{",
"cursor",
"cursor",
"=",
"null",
";",
"try",
"{",
"cursor",
"=",
"db",
"query",
"(",
"const",
"table",
"schema",
"table",
"name",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
")",
";",
"if",
"(",
"cursor",
"move",
"to",
"first",
"(",
")",
")",
"{",
"do",
"{",
"string",
"table",
"name",
"d",
"b",
"=",
"cursor",
"get",
"string",
"(",
"cursor",
"get",
"column",
"index",
"or",
"throw",
"(",
"const",
"table",
"schema",
"column",
"name",
")",
")",
";",
"if",
"(",
"table",
"name",
"equals",
"ignore",
"case",
"(",
"table",
"name",
"d",
"b",
")",
")",
"{",
"int",
"table",
"type",
"=",
"cursor",
"get",
"int",
"(",
"cursor",
"get",
"column",
"index",
"or",
"throw",
"(",
"const",
"table",
"schema",
"column",
"type",
")",
")",
";",
"if",
"(",
"table",
"type",
"=",
"=",
"const",
"table",
"schema",
"intermediate",
"join",
"table",
")",
"{",
"return",
"true",
";",
"}",
"break",
";",
"}",
"}",
"while",
"(",
"cursor",
"move",
"to",
"next",
"(",
")",
")",
";",
"}",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"cursor",
"!",
"=",
"null",
")",
"{",
"cursor",
"close",
"(",
")",
";",
"}",
"}",
"}",
"}",
"return",
"false",
";",
"}"
]
|
[
"assert",
"that",
"the",
"target",
"bean",
"class",
"is",
"an",
"instance",
"of",
"the",
"class",
"where",
"the",
"given",
"method",
"is",
"declared",
"in",
"some",
"cases",
"the",
"actual",
"controller",
"instance",
"at",
"request",
"-",
"processing",
"time",
"may",
"be",
"a",
"jdk",
"dynamic",
"proxy",
"(",
"lazy",
"initialization",
",",
"prototype",
"beans",
",",
"and",
"others",
")",
"{",
"@",
"code",
"@",
"controller",
"}",
"'",
"s",
"that",
"require",
"proxying",
"should",
"prefer",
"class",
"-",
"based",
"proxy",
"mechanisms"
]
| [
"protected",
"void",
"assert",
"target",
"bean",
"(",
"method",
"method",
",",
"object",
"target",
"bean",
",",
"object",
"[",
"]",
"args",
")",
"{",
"class",
"<",
"?",
">",
"method",
"declaring",
"class",
"=",
"method",
"get",
"declaring",
"class",
"(",
")",
";",
"class",
"<",
"?",
">",
"target",
"bean",
"class",
"=",
"target",
"bean",
"get",
"class",
"(",
")",
";",
"if",
"(",
"!",
"method",
"declaring",
"class",
"is",
"assignable",
"from",
"(",
"target",
"bean",
"class",
")",
")",
"{",
"string",
"text",
"=",
"\"",
"the",
"mapped",
"handler",
"method",
"class",
"'",
"\"",
"+",
"method",
"declaring",
"class",
"get",
"name",
"(",
")",
"+",
"\"",
"'",
"is",
"not",
"an",
"instance",
"of",
"the",
"actual",
"controller",
"bean",
"class",
"'",
"\"",
"+",
"target",
"bean",
"class",
"get",
"name",
"(",
")",
"+",
"\"",
"'",
"if",
"the",
"controller",
"requires",
"proxying",
"\"",
"+",
"\"",
"(",
"e",
"g",
"due",
"to",
"@",
"transactional",
")",
",",
"please",
"use",
"class",
"-",
"based",
"proxying",
"\"",
";",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"format",
"invoke",
"error",
"(",
"text",
",",
"args",
")",
")",
";",
"}",
"}"
]
|
[
"returns",
"the",
"label",
"of",
"the",
"{",
"@",
"code",
"java",
"runtime",
"}",
"rule",
"representing",
"the",
"jvm",
"in",
"use"
]
| [
"public",
"label",
"get",
"runtime",
"label",
"(",
")",
"{",
"return",
"runtime",
"label",
";",
"}"
]
|
[
"convert",
"an",
"address",
"from",
"the",
"specified",
"program",
"to",
"a",
"comparable",
"address",
"in",
"the",
"specified",
"other",
"program"
]
| [
"public",
"static",
"address",
"get",
"compatible",
"address",
"(",
"program",
"program",
",",
"address",
"addr",
",",
"program",
"other",
"program",
")",
"{",
"if",
"(",
"addr",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"addr",
"is",
"memory",
"address",
"(",
")",
")",
"{",
"return",
"translate",
"memory",
"address",
"(",
"addr",
",",
"other",
"program",
",",
"true",
")",
";",
"}",
"else",
"if",
"(",
"addr",
"is",
"variable",
"address",
"(",
")",
")",
"{",
"/",
"/",
"todo",
":",
"we",
"should",
"not",
"attempt",
"to",
"correlate",
"variables",
"by",
"their",
"variable",
"address",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"correlation",
"of",
"variables",
"by",
"their",
"variable",
"address",
"not",
"allowed",
"\"",
")",
";",
"/",
"/",
"address",
"storage",
"addr",
"=",
"program",
"get",
"variable",
"storage",
"manager",
"(",
")",
"get",
"storage",
"address",
"(",
"addr",
")",
";",
"/",
"/",
"if",
"(",
"storage",
"addr",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"return",
"null",
";",
"/",
"/",
"}",
"/",
"/",
"address",
"other",
"storage",
"addr",
"=",
"get",
"compatible",
"address",
"(",
"program",
",",
"storage",
"addr",
",",
"other",
"program",
")",
";",
"/",
"/",
"if",
"(",
"other",
"storage",
"addr",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"return",
"null",
";",
"/",
"/",
"}",
"/",
"/",
"/",
"/",
"namespace",
"namespace",
"=",
"program",
"get",
"variable",
"storage",
"manager",
"(",
")",
"get",
"namespace",
"(",
"addr",
")",
";",
"/",
"/",
"namespace",
"other",
"namespace",
"=",
"get",
"namespace",
"(",
"program",
",",
"namespace",
",",
"other",
"program",
")",
";",
"/",
"/",
"if",
"(",
"other",
"namespace",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"return",
"null",
";",
"/",
"/",
"}",
"/",
"/",
"return",
"other",
"program",
"get",
"variable",
"storage",
"manager",
"(",
")",
"find",
"variable",
"address",
"(",
"other",
"namespace",
"get",
"i",
"d",
"(",
")",
",",
"other",
"storage",
"addr",
")",
";",
"}",
"else",
"if",
"(",
"addr",
"is",
"stack",
"address",
"(",
")",
")",
"{",
"return",
"other",
"program",
"get",
"address",
"factory",
"(",
")",
"get",
"stack",
"space",
"(",
")",
"get",
"address",
"(",
"addr",
"get",
"offset",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"addr",
"is",
"register",
"address",
"(",
")",
")",
"{",
"if",
"(",
"program",
"get",
"language",
"(",
")",
"get",
"language",
"i",
"d",
"(",
")",
"equals",
"(",
"other",
"program",
"get",
"language",
"(",
")",
"get",
"language",
"i",
"d",
"(",
")",
")",
")",
"{",
"return",
"addr",
";",
"}",
"/",
"/",
"todo",
":",
"should",
"we",
"handle",
"small",
"varnodes",
"within",
"big",
"endian",
"registers",
"register",
"reg",
"=",
"program",
"get",
"register",
"(",
"addr",
")",
";",
"if",
"(",
"reg",
"!",
"=",
"null",
")",
"{",
"register",
"other",
"reg",
"=",
"other",
"program",
"get",
"register",
"(",
"reg",
"get",
"name",
"(",
")",
")",
";",
"if",
"(",
"other",
"reg",
"!",
"=",
"null",
"&",
"&",
"reg",
"get",
"minimum",
"byte",
"size",
"(",
")",
"=",
"=",
"other",
"reg",
"get",
"minimum",
"byte",
"size",
"(",
")",
")",
"{",
"long",
"delta",
"=",
"addr",
"subtract",
"(",
"reg",
"get",
"address",
"(",
")",
")",
";",
"if",
"(",
"delta",
"!",
"=",
"0",
")",
"{",
"return",
"other",
"reg",
"get",
"address",
"(",
")",
"add",
"(",
"delta",
")",
";",
"}",
"return",
"other",
"reg",
"get",
"address",
"(",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"addr",
"is",
"external",
"address",
"(",
")",
")",
"{",
"symbol",
"s",
"=",
"program",
"get",
"symbol",
"table",
"(",
")",
"get",
"primary",
"symbol",
"(",
"addr",
")",
";",
"if",
"(",
"s",
"!",
"=",
"null",
"&",
"&",
"s",
"is",
"external",
"(",
")",
")",
"{",
"s",
"=",
"get",
"symbol",
"(",
"s",
",",
"other",
"program",
")",
";",
"if",
"(",
"s",
"!",
"=",
"null",
")",
"{",
"return",
"s",
"get",
"address",
"(",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"addr",
"get",
"address",
"space",
"(",
")",
"get",
"type",
"(",
")",
"=",
"=",
"address",
"space",
"type",
"none",
"|",
"|",
"addr",
"get",
"address",
"space",
"(",
")",
"get",
"type",
"(",
")",
"=",
"=",
"address",
"space",
"type",
"unknown",
")",
"{",
"/",
"/",
"todo",
":",
"not",
"sure",
"if",
"this",
"is",
"correct",
"?",
"?",
"return",
"addr",
";",
"}",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"unsupported",
"address",
"type",
"\"",
")",
";",
"}"
]
|
[
"returns",
"the",
"highlight",
"of",
"the",
"data",
"set",
"that",
"contains",
"the",
"closest",
"value",
"on",
"the",
"y",
"-",
"axis"
]
| [
"public",
"highlight",
"get",
"closest",
"highlight",
"by",
"pixel",
"(",
"list",
"<",
"highlight",
">",
"closest",
"values",
",",
"float",
"x",
",",
"float",
"y",
",",
"y",
"axis",
"axis",
"dependency",
"axis",
",",
"float",
"min",
"selection",
"distance",
")",
"{",
"highlight",
"closest",
"=",
"null",
";",
"float",
"distance",
"=",
"min",
"selection",
"distance",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"closest",
"values",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"highlight",
"high",
"=",
"closest",
"values",
"get",
"(",
"i",
")",
";",
"if",
"(",
"axis",
"=",
"=",
"null",
"|",
"|",
"high",
"get",
"axis",
"(",
")",
"=",
"=",
"axis",
")",
"{",
"float",
"c",
"distance",
"=",
"get",
"distance",
"(",
"x",
",",
"y",
",",
"high",
"get",
"x",
"px",
"(",
")",
",",
"high",
"get",
"y",
"px",
"(",
")",
")",
";",
"if",
"(",
"c",
"distance",
"<",
"distance",
")",
"{",
"closest",
"=",
"high",
";",
"distance",
"=",
"c",
"distance",
";",
"}",
"}",
"}",
"return",
"closest",
";",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.