docstring_tokens
list | code_tokens
list |
---|---|
[
"a",
"{",
"@",
"link",
"queryable",
"store",
"type",
"}",
"that",
"accepts",
"{",
"@",
"link",
"read",
"only",
"key",
"value",
"store",
"read",
"only",
"key",
"value",
"store",
"<",
"k",
",",
"value",
"and",
"timestamp",
"<",
"v",
">",
">",
"}"
]
| [
"public",
"static",
"<",
"k",
",",
"v",
">",
"queryable",
"store",
"type",
"<",
"read",
"only",
"key",
"value",
"store",
"<",
"k",
",",
"value",
"and",
"timestamp",
"<",
"v",
">",
">",
">",
"timestamped",
"key",
"value",
"store",
"(",
")",
"{",
"return",
"new",
"timestamped",
"key",
"value",
"store",
"type",
"<",
">",
"(",
")",
";",
"}"
]
|
[
"initialize",
"the",
"request",
"to",
"view",
"name",
"translator",
"used",
"by",
"this",
"servlet",
"instance",
"if",
"no",
"implementation",
"is",
"configured",
"then",
"we",
"default",
"to",
"default",
"request",
"to",
"view",
"name",
"translator"
]
| [
"private",
"void",
"init",
"request",
"to",
"view",
"name",
"translator",
"(",
"application",
"context",
"context",
")",
"{",
"try",
"{",
"this",
"view",
"name",
"translator",
"=",
"context",
"get",
"bean",
"(",
"request",
"to",
"view",
"name",
"translator",
"bean",
"name",
",",
"request",
"to",
"view",
"name",
"translator",
"class",
")",
";",
"if",
"(",
"logger",
"is",
"trace",
"enabled",
"(",
")",
")",
"{",
"logger",
"trace",
"(",
"\"",
"detected",
"\"",
"+",
"this",
"view",
"name",
"translator",
"get",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"logger",
"is",
"debug",
"enabled",
"(",
")",
")",
"{",
"logger",
"debug",
"(",
"\"",
"detected",
"\"",
"+",
"this",
"view",
"name",
"translator",
")",
";",
"}",
"}",
"catch",
"(",
"no",
"such",
"bean",
"definition",
"exception",
"ex",
")",
"{",
"/",
"/",
"we",
"need",
"to",
"use",
"the",
"default",
"this",
"view",
"name",
"translator",
"=",
"get",
"default",
"strategy",
"(",
"context",
",",
"request",
"to",
"view",
"name",
"translator",
"class",
")",
";",
"if",
"(",
"logger",
"is",
"trace",
"enabled",
"(",
")",
")",
"{",
"logger",
"trace",
"(",
"\"",
"no",
"request",
"to",
"view",
"name",
"translator",
"'",
"\"",
"+",
"request",
"to",
"view",
"name",
"translator",
"bean",
"name",
"+",
"\"",
"'",
":",
"using",
"default",
"[",
"\"",
"+",
"this",
"view",
"name",
"translator",
"get",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"}",
"}"
]
|
[
"returns",
"the",
"stack",
"size",
"after",
"the",
"given",
"instruction",
"offset",
"of",
"the",
"most",
"recently",
"visited",
"code",
"attribute"
]
| [
"public",
"int",
"get",
"stack",
"size",
"after",
"(",
"int",
"instruction",
"offset",
")",
"{",
"if",
"(",
"!",
"evaluated",
"[",
"instruction",
"offset",
"]",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"unknown",
"stack",
"size",
"after",
"unreachable",
"instruction",
"offset",
"[",
"\"",
"+",
"instruction",
"offset",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"return",
"stack",
"sizes",
"after",
"[",
"instruction",
"offset",
"]",
";",
"}"
]
|
[
"waits",
"for",
"the",
"given",
"mapping",
"type",
"to",
"exists",
"on",
"the",
"master",
"node"
]
| [
"private",
"void",
"assert",
"mapping",
"on",
"master",
"(",
"final",
"string",
"index",
",",
"final",
"string",
"field",
"names",
")",
"{",
"get",
"mappings",
"response",
"response",
"=",
"client",
"(",
")",
"admin",
"(",
")",
"indices",
"(",
")",
"prepare",
"get",
"mappings",
"(",
"index",
")",
"get",
"(",
")",
";",
"mapping",
"metadata",
"mappings",
"=",
"response",
"get",
"mappings",
"(",
")",
"get",
"(",
"index",
")",
";",
"assert",
"that",
"(",
"mappings",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"map",
"<",
"string",
",",
"object",
">",
"mapping",
"source",
"=",
"mappings",
"get",
"source",
"as",
"map",
"(",
")",
";",
"assert",
"false",
"(",
"mapping",
"source",
"is",
"empty",
"(",
")",
")",
";",
"assert",
"true",
"(",
"mapping",
"source",
"contains",
"key",
"(",
"\"",
"properties",
"\"",
")",
")",
";",
"for",
"(",
"string",
"field",
"name",
":",
"field",
"names",
")",
"{",
"map",
"<",
"string",
",",
"object",
">",
"mapping",
"properties",
"=",
"(",
"map",
"<",
"string",
",",
"object",
">",
")",
"mapping",
"source",
"get",
"(",
"\"",
"properties",
"\"",
")",
";",
"if",
"(",
"field",
"name",
"index",
"of",
"(",
"'",
"'",
")",
"!",
"=",
"-",
"1",
")",
"{",
"field",
"name",
"=",
"field",
"name",
"replace",
"(",
"\"",
"\"",
",",
"\"",
"properties",
"\"",
")",
";",
"}",
"assert",
"that",
"(",
"\"",
"field",
"\"",
"+",
"field",
"name",
"+",
"\"",
"doesn",
"'",
"t",
"exists",
"in",
"mapping",
"\"",
"+",
"mappings",
"source",
"(",
")",
"string",
"(",
")",
",",
"x",
"content",
"map",
"values",
"extract",
"value",
"(",
"field",
"name",
",",
"mapping",
"properties",
")",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"test",
"for",
"names",
"derived",
"from",
"the",
"german",
"that",
"should",
"get",
"an",
"alternate",
"pronunciation",
"of",
"'",
"xv",
"'",
"to",
"match",
"the",
"german",
"version",
"spelled",
"\"",
"schw",
"-",
"\""
]
| [
"boolean",
"names",
"beginning",
"with",
"sw",
"that",
"get",
"alt",
"xv",
"(",
")",
"{",
"if",
"(",
"string",
"at",
"(",
"0",
",",
"5",
",",
"\"",
"swart",
"\"",
",",
"\"",
"\"",
")",
"|",
"|",
"string",
"at",
"(",
"0",
",",
"6",
",",
"\"",
"swartz",
"\"",
",",
"\"",
"swarts",
"\"",
",",
"\"",
"swiger",
"\"",
",",
"\"",
"\"",
")",
"|",
"|",
"string",
"at",
"(",
"0",
",",
"7",
",",
"\"",
"switzer",
"\"",
",",
"\"",
"swanger",
"\"",
",",
"\"",
"swigert",
"\"",
",",
"\"",
"swigart",
"\"",
",",
"\"",
"swihart",
"\"",
",",
"\"",
"\"",
")",
"|",
"|",
"string",
"at",
"(",
"0",
",",
"8",
",",
"\"",
"sweitzer",
"\"",
",",
"\"",
"swatzell",
"\"",
",",
"\"",
"swindler",
"\"",
",",
"\"",
"\"",
")",
"|",
"|",
"string",
"at",
"(",
"0",
",",
"9",
",",
"\"",
"swinehart",
"\"",
",",
"\"",
"\"",
")",
"|",
"|",
"string",
"at",
"(",
"0",
",",
"10",
",",
"\"",
"swearingen",
"\"",
",",
"\"",
"\"",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
]
|
[
"<",
"code",
">",
"optional",
"aapt",
"pb",
"primitive",
"prim",
"=",
"7",
";",
"<",
"code",
">"
]
| [
"private",
"void",
"set",
"prim",
"(",
"com",
"android",
"aapt",
"resources",
"primitive",
"value",
")",
"{",
"if",
"(",
"value",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"null",
"pointer",
"exception",
"(",
")",
";",
"}",
"prim",
"=",
"value",
";",
"bit",
"field",
"0",
"|",
"=",
"0x",
"0",
"0",
"0",
"0",
"0",
"0",
"4",
"0",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"first",
"name",
"'"
]
| [
"public",
"void",
"first",
"name",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"first",
"name",
"}"
]
|
[
"returns",
"a",
"unique",
",",
"serialized",
"representation",
"for",
"this",
"function"
]
| [
"public",
"final",
"string",
"function",
"identifier",
"(",
")",
"{",
"final",
"string",
"md",
"5",
"=",
"encoding",
"utils",
"hex",
"(",
"encoding",
"utils",
"md",
"5",
"(",
"encoding",
"utils",
"encode",
"object",
"to",
"string",
"(",
"this",
")",
")",
")",
";",
"return",
"get",
"class",
"(",
")",
"get",
"name",
"(",
")",
"replace",
"(",
"'",
"'",
",",
"'",
"$",
"'",
")",
"concat",
"(",
"\"",
"$",
"\"",
")",
"concat",
"(",
"md",
"5",
")",
";",
"}"
]
|
[
"return",
"true",
"if",
"the",
"block",
"is",
"a",
"striped",
"block",
"before",
"hdfs",
"-",
"4645",
",",
"block",
"id",
"was",
"randomly",
"generated",
"(",
"legacy",
")",
",",
"so",
"it",
"is",
"possible",
"that",
"legacy",
"block",
"id",
"to",
"be",
"negative",
",",
"which",
"should",
"not",
"be",
"considered",
"as",
"striped",
"block",
"id"
]
| [
"public",
"boolean",
"is",
"striped",
"block",
"(",
"block",
"block",
")",
"{",
"return",
"is",
"striped",
"block",
"i",
"d",
"(",
"block",
"get",
"block",
"id",
"(",
")",
")",
"&",
"&",
"!",
"is",
"legacy",
"block",
"(",
"block",
")",
";",
"}"
]
|
[
"returns",
"a",
"map",
"joiner",
"with",
"the",
"same",
"behavior",
"as",
"this",
"one",
",",
"except",
"automatically",
"substituting",
"{",
"@",
"code",
"null",
"text",
"}",
"for",
"any",
"provided",
"null",
"keys",
"or",
"values"
]
| [
"public",
"map",
"joiner",
"use",
"for",
"null",
"(",
"string",
"null",
"text",
")",
"{",
"return",
"new",
"map",
"joiner",
"(",
"joiner",
"use",
"for",
"null",
"(",
"null",
"text",
")",
",",
"key",
"value",
"separator",
")",
";",
"}"
]
|
[
"gets",
"an",
"unreserved",
"and",
"available",
"label",
"labels",
"are",
"distributed",
"this",
"way",
":",
"[",
"0",
",",
"max",
"label",
"[",
"are",
"the",
"labels",
"of",
"the",
"blocks",
"directly",
"corresponding",
"to",
"the",
"input",
"bytecode",
"[",
"max",
"label",
",",
"max",
"label",
"+",
"method",
"get",
"catches",
"(",
")",
"size",
"(",
")",
"[",
"are",
"reserved",
"for",
"exception",
"setup",
"blocks",
"[",
"max",
"label",
"+",
"method",
"get",
"catches",
"(",
")",
"size",
"(",
")",
",",
"max",
"label",
"+",
"method",
"get",
"catches",
"(",
")",
"size",
"(",
")",
"+",
"special",
"label",
"count",
"[",
"are",
"reserved",
"for",
"special",
"blocks",
",",
"ie",
"param",
"assignement",
",",
"return",
"and",
"synch",
"blocks",
"[",
"max",
"label",
"method",
"get",
"catches",
"(",
")",
"size",
"(",
")",
"+",
"special",
"label",
"count",
",",
"get",
"available",
"label",
"(",
")",
"[",
"assigned",
"labels",
"note",
"that",
"some",
"of",
"the",
"assigned",
"labels",
"may",
"not",
"be",
"used",
"any",
"more",
"if",
"they",
"were",
"assigned",
"to",
"a",
"block",
"that",
"was",
"deleted",
"since"
]
| [
"private",
"int",
"get",
"available",
"label",
"(",
")",
"{",
"int",
"candidate",
"=",
"get",
"minimum",
"unreserved",
"label",
"(",
")",
";",
"for",
"(",
"basic",
"block",
"bb",
":",
"result",
")",
"{",
"int",
"label",
"=",
"bb",
"get",
"label",
"(",
")",
";",
"if",
"(",
"label",
">",
"=",
"candidate",
")",
"{",
"candidate",
"=",
"label",
"+",
"1",
";",
"}",
"}",
"return",
"candidate",
";",
"}"
]
|
[
"add",
"the",
"specified",
"job",
"to",
"the",
"current",
"list",
"of",
"jobs",
"to",
"abort",
"in",
"teardown"
]
| [
"protected",
"void",
"abort",
"in",
"teardown",
"(",
"job",
"data",
"job",
"data",
")",
"{",
"abort",
"in",
"teardown",
"add",
"(",
"job",
"data",
")",
";",
"}"
]
|
[
"create",
"the",
"fields"
]
| [
"private",
"void",
"create",
"fields",
"(",
")",
"{",
"int",
"field",
"count",
"=",
"bytes",
"per",
"line",
"/",
"model",
"get",
"unit",
"byte",
"size",
"(",
")",
";",
"field",
"factories",
"=",
"new",
"field",
"factory",
"[",
"field",
"count",
"]",
";",
"int",
"char",
"width",
"=",
"fm",
"char",
"width",
"(",
"'",
"w",
"'",
")",
";",
"int",
"field",
"offset",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"field",
"count",
";",
"i",
"+",
"+",
")",
"{",
"field",
"factories",
"[",
"i",
"]",
"=",
"new",
"field",
"factory",
"(",
"model",
",",
"bytes",
"per",
"line",
",",
"field",
"offset",
",",
"fm",
",",
"highlight",
"provider",
")",
";",
"field",
"offset",
"+",
"=",
"model",
"get",
"unit",
"byte",
"size",
"(",
")",
";",
"field",
"factories",
"[",
"i",
"]",
"set",
"edit",
"color",
"(",
"edit",
"color",
")",
";",
"field",
"factories",
"[",
"i",
"]",
"set",
"index",
"map",
"(",
"index",
"map",
")",
";",
"}",
"layout",
"model",
"set",
"factorys",
"(",
"field",
"factories",
",",
"model",
",",
"char",
"width",
")",
";",
"}"
]
|
[
"returns",
"<",
"code",
">",
"true",
"<",
"code",
">",
"iff",
"this",
"setting",
"is",
"a",
"group",
"setting",
"group",
"settings",
"represent",
"a",
"set",
"of",
"settings",
"rather",
"than",
"a",
"single",
"value",
"the",
"key",
",",
"see",
"{",
"@",
"link",
"#",
"get",
"key",
"(",
")",
"}",
",",
"in",
"contrast",
"to",
"non",
"-",
"group",
"settings",
"is",
"a",
"prefix",
"like",
"{",
"@",
"code",
"cluster",
"store",
"}",
"that",
"matches",
"all",
"settings",
"with",
"this",
"prefix"
]
| [
"boolean",
"is",
"group",
"setting",
"(",
")",
"{",
"return",
"false",
";",
"}"
]
|
[
"get",
"the",
"nn",
"address",
"from",
"the",
"uri",
"if",
"the",
"uri",
"is",
"logical",
",",
"default",
"address",
"is",
"returned",
"otherwise",
"return",
"the",
"dns",
"-",
"resolved",
"address",
"of",
"the",
"uri"
]
| [
"public",
"static",
"inet",
"socket",
"address",
"get",
"n",
"n",
"address",
"check",
"logical",
"(",
"configuration",
"conf",
",",
"uri",
"filesystem",
"u",
"r",
"i",
")",
"{",
"inet",
"socket",
"address",
"ret",
"addr",
";",
"if",
"(",
"h",
"a",
"util",
"client",
"is",
"logical",
"uri",
"(",
"conf",
",",
"filesystem",
"u",
"r",
"i",
")",
")",
"{",
"ret",
"addr",
"=",
"inet",
"socket",
"address",
"create",
"unresolved",
"(",
"filesystem",
"u",
"r",
"i",
"get",
"authority",
"(",
")",
",",
"hdfs",
"client",
"config",
"keys",
"dfs",
"namenode",
"rpc",
"port",
"default",
")",
";",
"}",
"else",
"{",
"ret",
"addr",
"=",
"get",
"n",
"n",
"address",
"(",
"filesystem",
"u",
"r",
"i",
")",
";",
"}",
"return",
"ret",
"addr",
";",
"}"
]
|
[
"test",
"for",
"half",
"day",
"rounding",
"intervals",
"scrossing",
"dst"
]
| [
"public",
"void",
"test",
"interval",
"rounding",
"half",
"day",
"dst",
"(",
")",
"{",
"date",
"time",
"zone",
"tz",
"=",
"date",
"time",
"zone",
"for",
"i",
"d",
"(",
"\"",
"cet",
"\"",
")",
";",
"long",
"interval",
"=",
"time",
"unit",
"hours",
"to",
"millis",
"(",
"12",
")",
";",
"rounding",
"rounding",
"=",
"new",
"rounding",
"time",
"interval",
"rounding",
"(",
"interval",
",",
"tz",
")",
";",
"assert",
"that",
"(",
"rounding",
"round",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"26t01",
":",
"00",
":",
"00",
"+",
"01",
":",
"00",
"\"",
")",
")",
",",
"is",
"date",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"26t00",
":",
"00",
":",
"00",
"+",
"01",
":",
"00",
"\"",
")",
",",
"tz",
")",
")",
";",
"assert",
"that",
"(",
"rounding",
"round",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"26t13",
":",
"00",
":",
"00",
"+",
"01",
":",
"00",
"\"",
")",
")",
",",
"is",
"date",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"26t12",
":",
"00",
":",
"00",
"+",
"01",
":",
"00",
"\"",
")",
",",
"tz",
")",
")",
";",
"assert",
"that",
"(",
"rounding",
"round",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"27t01",
":",
"00",
":",
"00",
"+",
"01",
":",
"00",
"\"",
")",
")",
",",
"is",
"date",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"27t00",
":",
"00",
":",
"00",
"+",
"01",
":",
"00",
"\"",
")",
",",
"tz",
")",
")",
";",
"assert",
"that",
"(",
"rounding",
"round",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"27t13",
":",
"00",
":",
"00",
"+",
"02",
":",
"00",
"\"",
")",
")",
",",
"is",
"date",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"27t12",
":",
"00",
":",
"00",
"+",
"02",
":",
"00",
"\"",
")",
",",
"tz",
")",
")",
";",
"assert",
"that",
"(",
"rounding",
"round",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"28t01",
":",
"00",
":",
"00",
"+",
"02",
":",
"00",
"\"",
")",
")",
",",
"is",
"date",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"28t00",
":",
"00",
":",
"00",
"+",
"02",
":",
"00",
"\"",
")",
",",
"tz",
")",
")",
";",
"assert",
"that",
"(",
"rounding",
"round",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"28t13",
":",
"00",
":",
"00",
"+",
"02",
":",
"00",
"\"",
")",
")",
",",
"is",
"date",
"(",
"time",
"(",
"\"",
"2016",
"-",
"03",
"-",
"28t12",
":",
"00",
":",
"00",
"+",
"02",
":",
"00",
"\"",
")",
",",
"tz",
")",
")",
";",
"}"
]
|
[
"specify",
"an",
"order",
"position",
"to",
"be",
"used",
"default",
"is",
"0"
]
| [
"public",
"interceptor",
"registration",
"order",
"(",
"int",
"order",
")",
"{",
"this",
"order",
"=",
"order",
";",
"return",
"this",
";",
"}"
]
|
[
"get",
"map",
"map",
"anytype"
]
| [
"public",
"map",
"<",
"string",
",",
"map",
"<",
"string",
",",
"object",
">",
">",
"get",
"map",
"map",
"anytype",
"(",
")",
"{",
"return",
"map",
"map",
"anytype",
";",
"}"
]
|
[
"read",
"output",
"to",
"list",
"this",
"method",
"can",
"be",
"used",
"if",
"the",
"result",
"is",
"considered",
"a",
"stream",
"if",
"the",
"result",
"is",
"considered",
"a",
"table",
",",
"the",
"list",
"will",
"contain",
"all",
"updated",
",",
"ie",
",",
"a",
"key",
"might",
"be",
"contained",
"multiple",
"times",
"if",
"you",
"are",
"only",
"interested",
"in",
"the",
"last",
"table",
"update",
"(",
"ie",
",",
"the",
"final",
"table",
"state",
")",
",",
"you",
"can",
"use",
"{",
"@",
"link",
"#",
"read",
"key",
"values",
"to",
"map",
"(",
")",
"}",
"instead"
]
| [
"public",
"list",
"<",
"test",
"record",
"<",
"k",
",",
"v",
">",
">",
"read",
"records",
"to",
"list",
"(",
")",
"{",
"final",
"list",
"<",
"test",
"record",
"<",
"k",
",",
"v",
">",
">",
"output",
"=",
"new",
"linked",
"list",
"<",
">",
"(",
")",
";",
"while",
"(",
"!",
"is",
"empty",
"(",
")",
")",
"{",
"output",
"add",
"(",
"read",
"record",
"(",
")",
")",
";",
"}",
"return",
"output",
";",
"}"
]
|
[
"create",
"a",
"frame",
"out",
"of",
"the",
"{",
"@",
"link",
"byte",
"buf",
"}",
"and",
"return",
"it"
]
| [
"protected",
"object",
"decode",
"(",
"channel",
"handler",
"context",
"ctx",
",",
"byte",
"buf",
"buffer",
")",
"throws",
"exception",
"{",
"final",
"int",
"eol",
"=",
"find",
"end",
"of",
"line",
"(",
"buffer",
")",
";",
"if",
"(",
"!",
"discarding",
")",
"{",
"if",
"(",
"eol",
">",
"=",
"0",
")",
"{",
"final",
"byte",
"buf",
"frame",
";",
"final",
"int",
"length",
"=",
"eol",
"-",
"buffer",
"reader",
"index",
"(",
")",
";",
"final",
"int",
"delim",
"length",
"=",
"buffer",
"get",
"byte",
"(",
"eol",
")",
"=",
"=",
"'",
"\\",
"r",
"'",
"?",
"2",
":",
"1",
";",
"if",
"(",
"length",
">",
"max",
"length",
")",
"{",
"buffer",
"reader",
"index",
"(",
"eol",
"+",
"delim",
"length",
")",
";",
"fail",
"(",
"ctx",
",",
"length",
")",
";",
"return",
"null",
";",
"}",
"if",
"(",
"strip",
"delimiter",
")",
"{",
"frame",
"=",
"buffer",
"read",
"retained",
"slice",
"(",
"length",
")",
";",
"buffer",
"skip",
"bytes",
"(",
"delim",
"length",
")",
";",
"}",
"else",
"{",
"frame",
"=",
"buffer",
"read",
"retained",
"slice",
"(",
"length",
"+",
"delim",
"length",
")",
";",
"}",
"return",
"frame",
";",
"}",
"else",
"{",
"final",
"int",
"length",
"=",
"buffer",
"readable",
"bytes",
"(",
")",
";",
"if",
"(",
"length",
">",
"max",
"length",
")",
"{",
"discarded",
"bytes",
"=",
"length",
";",
"buffer",
"reader",
"index",
"(",
"buffer",
"writer",
"index",
"(",
")",
")",
";",
"discarding",
"=",
"true",
";",
"offset",
"=",
"0",
";",
"if",
"(",
"fail",
"fast",
")",
"{",
"fail",
"(",
"ctx",
",",
"\"",
"over",
"\"",
"+",
"discarded",
"bytes",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"eol",
">",
"=",
"0",
")",
"{",
"final",
"int",
"length",
"=",
"discarded",
"bytes",
"+",
"eol",
"-",
"buffer",
"reader",
"index",
"(",
")",
";",
"final",
"int",
"delim",
"length",
"=",
"buffer",
"get",
"byte",
"(",
"eol",
")",
"=",
"=",
"'",
"\\",
"r",
"'",
"?",
"2",
":",
"1",
";",
"buffer",
"reader",
"index",
"(",
"eol",
"+",
"delim",
"length",
")",
";",
"discarded",
"bytes",
"=",
"0",
";",
"discarding",
"=",
"false",
";",
"if",
"(",
"!",
"fail",
"fast",
")",
"{",
"fail",
"(",
"ctx",
",",
"length",
")",
";",
"}",
"}",
"else",
"{",
"discarded",
"bytes",
"+",
"=",
"buffer",
"readable",
"bytes",
"(",
")",
";",
"buffer",
"reader",
"index",
"(",
"buffer",
"writer",
"index",
"(",
")",
")",
";",
"/",
"/",
"we",
"skip",
"everything",
"in",
"the",
"buffer",
",",
"we",
"need",
"to",
"set",
"the",
"offset",
"to",
"0",
"again",
"offset",
"=",
"0",
";",
"}",
"return",
"null",
";",
"}",
"}"
]
|
[
"resolves",
"the",
"tree",
"represented",
"by",
"this",
"lazy",
"tree",
"results",
"for",
"resolve",
"might",
"be",
"cached",
"the",
"assumption",
"is",
"that",
"multiple",
"resolve",
"calls",
"on",
"a",
"lazy",
"tree",
"would",
"return",
"equivalent",
"trees"
]
| [
"pair",
"<",
"node",
",",
"state",
">",
"resolve",
"(",
")",
";"
]
|
[
"find",
"the",
"fields",
"constant",
"that",
"matches",
"field",
"id",
",",
"or",
"null",
"if",
"its",
"not",
"found"
]
| [
"public",
"static",
"fields",
"find",
"by",
"thrift",
"id",
"(",
"int",
"field",
"id",
")",
"{",
"switch",
"(",
"field",
"id",
")",
"{",
"case",
"1",
":",
"/",
"/",
"msg",
"return",
"msg",
";",
"default",
":",
"return",
"null",
";",
"}",
"}"
]
|
[
"test",
"the",
"property",
"'",
"byte",
"'"
]
| [
"public",
"void",
"byte",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"byte",
"}"
]
|
[
"get",
"the",
"next",
"body",
"in",
"the",
"world",
"'",
"s",
"body",
"list"
]
| [
"public",
"final",
"body",
"get",
"next",
"(",
")",
"{",
"return",
"m",
"next",
";",
"}"
]
|
[
"<",
"code",
">",
"optional",
"string",
"name",
"=",
"6",
";",
"<",
"code",
">"
]
| [
"public",
"com",
"google",
"protobuf",
"byte",
"string",
"get",
"name",
"bytes",
"(",
")",
"{",
"java",
"lang",
"object",
"ref",
"=",
"name",
";",
"if",
"(",
"ref",
"instanceof",
"string",
")",
"{",
"com",
"google",
"protobuf",
"byte",
"string",
"b",
"=",
"com",
"google",
"protobuf",
"byte",
"string",
"copy",
"from",
"utf",
"8",
"(",
"(",
"java",
"lang",
"string",
")",
"ref",
")",
";",
"name",
"=",
"b",
";",
"return",
"b",
";",
"}",
"else",
"{",
"return",
"(",
"com",
"google",
"protobuf",
"byte",
"string",
")",
"ref",
";",
"}",
"}"
]
|
[
"adds",
"a",
"route",
"to",
"the",
"given",
"handler",
"function",
"that",
"handles",
"all",
"http",
"{",
"@",
"code",
"patch",
"}",
"requests",
"that",
"match",
"the",
"given",
"pattern"
]
| [
"builder",
"patch",
"(",
"string",
"pattern",
",",
"handler",
"function",
"<",
"server",
"response",
">",
"handler",
"function",
")",
";"
]
|
[
"advance",
"the",
"peer",
"-",
"recovery",
"retention",
"leases",
"for",
"all",
"assigned",
"shard",
"copies",
"to",
"discard",
"history",
"below",
"the",
"corresponding",
"global",
"checkpoint",
",",
"and",
"renew",
"any",
"leases",
"that",
"are",
"approaching",
"expiry"
]
| [
"public",
"synchronized",
"void",
"renew",
"peer",
"recovery",
"retention",
"leases",
"(",
")",
"{",
"assert",
"primary",
"mode",
";",
"assert",
"invariant",
"(",
")",
";",
"/",
"*",
"*",
"peer",
"-",
"recovery",
"retention",
"leases",
"never",
"expire",
"while",
"the",
"associated",
"shard",
"is",
"assigned",
",",
"but",
"we",
"must",
"still",
"renew",
"them",
"occasionally",
"in",
"*",
"case",
"the",
"associated",
"shard",
"is",
"temporarily",
"unassigned",
"however",
"we",
"must",
"not",
"renew",
"them",
"too",
"often",
",",
"since",
"each",
"renewal",
"must",
"be",
"*",
"persisted",
"and",
"the",
"resulting",
"io",
"can",
"be",
"expensive",
"on",
"nodes",
"with",
"large",
"numbers",
"of",
"shards",
"(",
"see",
"#",
"42299",
")",
"we",
"choose",
"to",
"renew",
"them",
"after",
"*",
"half",
"the",
"expiry",
"time",
",",
"so",
"that",
"by",
"default",
"the",
"cluster",
"has",
"at",
"least",
"6",
"hours",
"to",
"recover",
"before",
"these",
"leases",
"start",
"to",
"expire",
"*",
"/",
"final",
"long",
"renewal",
"time",
"millis",
"=",
"current",
"time",
"millis",
"supplier",
"get",
"as",
"long",
"(",
")",
"-",
"index",
"settings",
"get",
"retention",
"lease",
"millis",
"(",
")",
"/",
"2",
";",
"/",
"*",
"*",
"if",
"any",
"of",
"the",
"peer",
"-",
"recovery",
"retention",
"leases",
"need",
"renewal",
",",
"it",
"'",
"s",
"a",
"good",
"opportunity",
"to",
"renew",
"them",
"all",
"*",
"/",
"final",
"boolean",
"renewal",
"needed",
"=",
"stream",
"support",
"stream",
"(",
"routing",
"table",
"spliterator",
"(",
")",
",",
"false",
")",
"filter",
"(",
"shard",
"routing",
":",
":",
"assigned",
"to",
"node",
")",
"any",
"match",
"(",
"shard",
"routing",
"-",
">",
"{",
"final",
"retention",
"lease",
"retention",
"lease",
"=",
"retention",
"leases",
"get",
"(",
"get",
"peer",
"recovery",
"retention",
"lease",
"id",
"(",
"shard",
"routing",
")",
")",
";",
"if",
"(",
"retention",
"lease",
"=",
"=",
"null",
")",
"{",
"/",
"*",
"*",
"if",
"this",
"shard",
"copy",
"is",
"tracked",
"then",
"we",
"got",
"here",
"here",
"via",
"a",
"rolling",
"upgrade",
"from",
"an",
"older",
"version",
"that",
"doesn",
"'",
"t",
"*",
"create",
"peer",
"recovery",
"retention",
"leases",
"for",
"every",
"shard",
"copy",
"*",
"/",
"assert",
"checkpoints",
"get",
"(",
"shard",
"routing",
"allocation",
"id",
"(",
")",
"get",
"id",
"(",
")",
")",
"tracked",
"=",
"=",
"false",
"|",
"|",
"has",
"all",
"peer",
"recovery",
"retention",
"leases",
"=",
"=",
"false",
";",
"return",
"false",
";",
"}",
"return",
"retention",
"lease",
"timestamp",
"(",
")",
"<",
"=",
"renewal",
"time",
"millis",
"|",
"|",
"retention",
"lease",
"retaining",
"sequence",
"number",
"(",
")",
"<",
"=",
"checkpoints",
"get",
"(",
"shard",
"routing",
"allocation",
"id",
"(",
")",
"get",
"id",
"(",
")",
")",
"global",
"checkpoint",
";",
"}",
")",
";",
"if",
"(",
"renewal",
"needed",
")",
"{",
"for",
"(",
"shard",
"routing",
"shard",
"routing",
":",
"routing",
"table",
")",
"{",
"if",
"(",
"shard",
"routing",
"assigned",
"to",
"node",
"(",
")",
")",
"{",
"final",
"retention",
"lease",
"retention",
"lease",
"=",
"retention",
"leases",
"get",
"(",
"get",
"peer",
"recovery",
"retention",
"lease",
"id",
"(",
"shard",
"routing",
")",
")",
";",
"if",
"(",
"retention",
"lease",
"!",
"=",
"null",
")",
"{",
"final",
"checkpoint",
"state",
"checkpoint",
"state",
"=",
"checkpoints",
"get",
"(",
"shard",
"routing",
"allocation",
"id",
"(",
")",
"get",
"id",
"(",
")",
")",
";",
"final",
"long",
"new",
"retained",
"sequence",
"number",
"=",
"math",
"max",
"(",
"0l",
",",
"checkpoint",
"state",
"global",
"checkpoint",
"+",
"1l",
")",
";",
"if",
"(",
"retention",
"lease",
"retaining",
"sequence",
"number",
"(",
")",
"<",
"=",
"new",
"retained",
"sequence",
"number",
")",
"{",
"renew",
"retention",
"lease",
"(",
"get",
"peer",
"recovery",
"retention",
"lease",
"id",
"(",
"shard",
"routing",
")",
",",
"new",
"retained",
"sequence",
"number",
",",
"peer",
"recovery",
"retention",
"lease",
"source",
")",
";",
"}",
"else",
"{",
"/",
"/",
"the",
"retention",
"lease",
"is",
"tied",
"to",
"the",
"node",
",",
"not",
"the",
"shard",
"copy",
",",
"so",
"it",
"'",
"s",
"possible",
"a",
"copy",
"was",
"removed",
"and",
"now",
"/",
"/",
"we",
"are",
"in",
"the",
"process",
"of",
"recovering",
"it",
"again",
",",
"or",
"maybe",
"we",
"were",
"just",
"promoted",
"and",
"have",
"not",
"yet",
"received",
"the",
"/",
"/",
"global",
"checkpoints",
"from",
"our",
"peers",
"assert",
"checkpoint",
"state",
"global",
"checkpoint",
"=",
"=",
"sequence",
"numbers",
"unassigned",
"seq",
"no",
":",
"\"",
"cannot",
"renew",
"\"",
"+",
"retention",
"lease",
"+",
"\"",
"according",
"to",
"\"",
"+",
"checkpoint",
"state",
"+",
"\"",
"for",
"\"",
"+",
"shard",
"routing",
";",
"}",
"}",
"}",
"}",
"}",
"assert",
"invariant",
"(",
")",
";",
"}"
]
|
[
"reads",
"a",
"{",
"@",
"link",
"named",
"writeable",
"}",
"from",
"the",
"current",
"stream",
"with",
"the",
"given",
"name",
"it",
"is",
"assumed",
"that",
"the",
"caller",
"obtained",
"the",
"name",
"from",
"other",
"source",
",",
"so",
"it",
"'",
"s",
"not",
"read",
"from",
"the",
"stream",
"the",
"name",
"is",
"used",
"for",
"looking",
"for",
"the",
"corresponding",
"entry",
"in",
"the",
"registry",
"by",
"name",
",",
"so",
"that",
"the",
"proper",
"object",
"can",
"be",
"read",
"and",
"returned",
"default",
"implementation",
"throws",
"{",
"@",
"link",
"unsupported",
"operation",
"exception",
"}",
"as",
"stream",
"input",
"doesn",
"'",
"t",
"hold",
"a",
"registry",
"use",
"{",
"@",
"link",
"filter",
"input",
"stream",
"}",
"instead",
"which",
"wraps",
"a",
"stream",
"and",
"supports",
"a",
"{",
"@",
"link",
"named",
"writeable",
"registry",
"}",
"too",
"prefer",
"{",
"@",
"link",
"stream",
"input",
"#",
"read",
"named",
"writeable",
"(",
"class",
")",
"}",
"and",
"{",
"@",
"link",
"stream",
"output",
"#",
"write",
"named",
"writeable",
"(",
"named",
"writeable",
")",
"}",
"unless",
"you",
"have",
"a",
"compelling",
"reason",
"to",
"use",
"this",
"method",
"instead"
]
| [
"public",
"<",
"c",
"extends",
"named",
"writeable",
">",
"c",
"read",
"named",
"writeable",
"(",
"@",
"suppress",
"warnings",
"(",
"\"",
"unused",
"\"",
")",
"class",
"<",
"c",
">",
"category",
"class",
",",
"@",
"suppress",
"warnings",
"(",
"\"",
"unused",
"\"",
")",
"string",
"name",
")",
"throws",
"i",
"o",
"exception",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
"\"",
"can",
"'",
"t",
"read",
"named",
"writeable",
"from",
"stream",
"input",
"\"",
")",
";",
"}"
]
|
[
"the",
"implicit",
"output",
"function",
"that",
"generates",
"files",
"based",
"on",
"a",
"set",
"of",
"template",
"substitutions",
"using",
"rule",
"attribute",
"values"
]
| [
"public",
"static",
"safe",
"implicit",
"outputs",
"function",
"from",
"functions",
"(",
"final",
"iterable",
"<",
"safe",
"implicit",
"outputs",
"function",
">",
"functions",
")",
"{",
"return",
"new",
"function",
"combination",
"implicit",
"outputs",
"function",
"(",
"functions",
")",
";",
"}"
]
|
[
"mark",
"the",
"event",
"with",
"given",
"name",
",",
"stage",
"(",
"startend",
")",
",",
"and",
"given",
"data",
"attribution"
]
| [
"public",
"void",
"mark",
"point",
"(",
"string",
"event",
"name",
",",
"string",
"stage",
",",
"string",
"data",
"attribution",
")",
"{",
"if",
"(",
"stage",
"equals",
"(",
"start",
")",
")",
"{",
"m",
"started",
"events",
"add",
"(",
"get",
"full",
"marker",
"name",
"(",
"event",
"name",
",",
"data",
"attribution",
",",
"\"",
"\"",
")",
")",
";",
"}",
"else",
"if",
"(",
"stage",
"equals",
"(",
"end",
")",
"&",
"&",
"!",
"m",
"started",
"events",
"remove",
"(",
"get",
"full",
"marker",
"name",
"(",
"event",
"name",
",",
"data",
"attribution",
",",
"\"",
"\"",
")",
")",
")",
"{",
"/",
"/",
"no",
"matching",
"start",
"point",
",",
"skip",
"(",
"can",
"happen",
"for",
"changeset",
"end",
")",
"return",
";",
"}",
"mark",
"point",
"(",
"get",
"full",
"marker",
"name",
"(",
"event",
"name",
",",
"data",
"attribution",
",",
"stage",
")",
")",
";",
"}"
]
|
[
"must",
"be",
"called",
"under",
"lock",
"to",
"ensure",
"integrity",
"of",
"priority",
"availability",
"helper"
]
| [
"public",
"void",
"notify",
"priority",
"(",
")",
"{",
"to",
"notify",
"priority",
"=",
"input",
"gate",
"priority",
"availability",
"helper",
"get",
"unavailable",
"to",
"reset",
"available",
"(",
")",
";",
"}"
]
|
[
"handles",
"the",
"cluster",
"state",
"transition",
"to",
"a",
"version",
"that",
"reflects",
"the",
"{",
"@",
"link",
"create",
"index",
"cluster",
"state",
"update",
"request",
"}",
"all",
"the",
"requested",
"changes",
"are",
"firstly",
"validated",
"before",
"mutating",
"the",
"{",
"@",
"link",
"cluster",
"state",
"}"
]
| [
"public",
"cluster",
"state",
"apply",
"create",
"index",
"request",
"(",
"cluster",
"state",
"current",
"state",
",",
"create",
"index",
"cluster",
"state",
"update",
"request",
"request",
",",
"boolean",
"silent",
",",
"bi",
"consumer",
"<",
"metadata",
"builder",
",",
"index",
"metadata",
">",
"metadata",
"transformer",
")",
"throws",
"exception",
"{",
"normalize",
"request",
"setting",
"(",
"request",
")",
";",
"logger",
"trace",
"(",
"\"",
"executing",
"index",
"creation",
"task",
"for",
"[",
"{",
"}",
"]",
"against",
"cluster",
"state",
"version",
"[",
"{",
"}",
"]",
"\"",
",",
"request",
",",
"current",
"state",
"version",
"(",
")",
")",
";",
"validate",
"(",
"request",
",",
"current",
"state",
")",
";",
"final",
"index",
"recover",
"from",
"index",
"=",
"request",
"recover",
"from",
"(",
")",
";",
"final",
"index",
"metadata",
"source",
"metadata",
"=",
"recover",
"from",
"index",
"=",
"=",
"null",
"?",
"null",
":",
"current",
"state",
"metadata",
"(",
")",
"get",
"index",
"safe",
"(",
"recover",
"from",
"index",
")",
";",
"if",
"(",
"source",
"metadata",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"if",
"source",
"metadata",
"was",
"provided",
",",
"it",
"means",
"we",
"'",
"re",
"recovering",
"from",
"an",
"existing",
"index",
",",
"/",
"/",
"in",
"which",
"case",
"templates",
"don",
"'",
"t",
"apply",
",",
"so",
"create",
"the",
"index",
"from",
"the",
"source",
"metadata",
"return",
"apply",
"create",
"index",
"request",
"with",
"existing",
"metadata",
"(",
"current",
"state",
",",
"request",
",",
"silent",
",",
"source",
"metadata",
",",
"metadata",
"transformer",
")",
";",
"}",
"else",
"{",
"/",
"/",
"hidden",
"indices",
"apply",
"templates",
"slightly",
"differently",
"(",
"ignoring",
"wildcard",
"'",
"*",
"'",
"/",
"/",
"templates",
")",
",",
"so",
"we",
"need",
"to",
"check",
"to",
"see",
"if",
"the",
"request",
"is",
"creating",
"a",
"hidden",
"index",
"/",
"/",
"prior",
"to",
"resolving",
"which",
"templates",
"it",
"matches",
"final",
"boolean",
"is",
"hidden",
"from",
"request",
"=",
"index",
"metadata",
"index",
"hidden",
"setting",
"exists",
"(",
"request",
"settings",
"(",
")",
")",
"?",
"index",
"metadata",
"index",
"hidden",
"setting",
"get",
"(",
"request",
"settings",
"(",
")",
")",
":",
"null",
";",
"/",
"/",
"the",
"backing",
"index",
"may",
"have",
"a",
"different",
"name",
"or",
"prefix",
"than",
"the",
"data",
"stream",
"name",
"final",
"string",
"name",
"=",
"request",
"data",
"stream",
"name",
"(",
")",
"!",
"=",
"null",
"?",
"request",
"data",
"stream",
"name",
"(",
")",
":",
"request",
"index",
"(",
")",
";",
"/",
"/",
"check",
"to",
"see",
"if",
"a",
"v",
"2",
"template",
"matched",
"final",
"string",
"v",
"2",
"template",
"=",
"metadata",
"index",
"template",
"service",
"find",
"v",
"2",
"template",
"(",
"current",
"state",
"metadata",
"(",
")",
",",
"name",
",",
"is",
"hidden",
"from",
"request",
"=",
"=",
"null",
"?",
"false",
":",
"is",
"hidden",
"from",
"request",
")",
";",
"if",
"(",
"v",
"2",
"template",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"if",
"a",
"v",
"2",
"template",
"was",
"found",
",",
"it",
"takes",
"precedence",
"over",
"all",
"v",
"1",
"templates",
",",
"so",
"create",
"/",
"/",
"the",
"index",
"using",
"that",
"template",
"and",
"the",
"request",
"'",
"s",
"specified",
"settings",
"return",
"apply",
"create",
"index",
"request",
"with",
"v",
"2",
"template",
"(",
"current",
"state",
",",
"request",
",",
"silent",
",",
"v",
"2",
"template",
",",
"metadata",
"transformer",
")",
";",
"}",
"else",
"{",
"/",
"/",
"a",
"v",
"2",
"template",
"wasn",
"'",
"t",
"found",
",",
"check",
"the",
"v",
"1",
"templates",
",",
"in",
"the",
"event",
"no",
"templates",
"are",
"/",
"/",
"found",
"creation",
"still",
"works",
"using",
"the",
"request",
"'",
"s",
"specified",
"index",
"settings",
"final",
"list",
"<",
"index",
"template",
"metadata",
">",
"v",
"1",
"templates",
"=",
"metadata",
"index",
"template",
"service",
"find",
"v",
"1",
"templates",
"(",
"current",
"state",
"metadata",
"(",
")",
",",
"request",
"index",
"(",
")",
",",
"is",
"hidden",
"from",
"request",
")",
";",
"if",
"(",
"v",
"1",
"templates",
"size",
"(",
")",
">",
"1",
")",
"{",
"deprecation",
"logger",
"deprecate",
"(",
"\"",
"index",
"template",
"multiple",
"match",
"\"",
",",
"\"",
"index",
"[",
"{",
"}",
"]",
"matches",
"multiple",
"legacy",
"templates",
"[",
"{",
"}",
"]",
",",
"composable",
"templates",
"will",
"only",
"match",
"a",
"single",
"template",
"\"",
",",
"request",
"index",
"(",
")",
",",
"v",
"1",
"templates",
"stream",
"(",
")",
"map",
"(",
"index",
"template",
"metadata",
":",
":",
"name",
")",
"sorted",
"(",
")",
"collect",
"(",
"collectors",
"joining",
"(",
"\"",
",",
"\"",
")",
")",
")",
";",
"}",
"return",
"apply",
"create",
"index",
"request",
"with",
"v",
"1",
"templates",
"(",
"current",
"state",
",",
"request",
",",
"silent",
",",
"v",
"1",
"templates",
",",
"metadata",
"transformer",
")",
";",
"}",
"}",
"}"
]
|
[
"creates",
"a",
"new",
"big",
"-",
"endian",
"buffer",
"which",
"wraps",
"the",
"sub",
"-",
"region",
"of",
"the",
"specified",
"{",
"@",
"code",
"array",
"}",
"a",
"modification",
"on",
"the",
"specified",
"array",
"'",
"s",
"content",
"will",
"be",
"visible",
"to",
"the",
"returned",
"buffer"
]
| [
"public",
"static",
"byte",
"buf",
"wrapped",
"buffer",
"(",
"byte",
"[",
"]",
"array",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"if",
"(",
"length",
"=",
"=",
"0",
")",
"{",
"return",
"empty",
"buffer",
";",
"}",
"if",
"(",
"offset",
"=",
"=",
"0",
"&",
"&",
"length",
"=",
"=",
"array",
"length",
")",
"{",
"return",
"wrapped",
"buffer",
"(",
"array",
")",
";",
"}",
"return",
"wrapped",
"buffer",
"(",
"array",
")",
"slice",
"(",
"offset",
",",
"length",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"this",
"{",
"@",
"link",
"security",
"realm",
"}",
"supports",
"explicit",
"logout",
"operation",
"if",
"the",
"method",
"returns",
"false",
",",
"\"",
"logout",
"\"",
"link",
"will",
"not",
"be",
"displayed",
"this",
"is",
"useful",
"when",
"authentication",
"doesn",
"'",
"t",
"require",
"an",
"explicit",
"login",
"activity",
"(",
"such",
"as",
"ntlm",
"authentication",
"or",
"kerberos",
"authentication",
",",
"where",
"hudson",
"has",
"no",
"ability",
"to",
"log",
"off",
"the",
"current",
"user",
")",
"by",
"default",
",",
"this",
"method",
"returns",
"true"
]
| [
"public",
"boolean",
"can",
"log",
"out",
"(",
")",
"{",
"return",
"true",
";",
"}"
]
|
[
"get",
"the",
"table",
"type"
]
| [
"public",
"int",
"get",
"type",
"(",
")",
"{",
"return",
"type",
";",
"}"
]
|
[
"returns",
"log",
"file",
"'",
"s",
"name",
"as",
"well",
"as",
"current",
"file",
"size",
"for",
"a",
"container"
]
| [
"public",
"response",
"get",
"container",
"logs",
"info",
"(",
"@",
"context",
"http",
"servlet",
"request",
"req",
",",
"@",
"context",
"http",
"servlet",
"response",
"res",
",",
"@",
"path",
"param",
"(",
"yarn",
"web",
"service",
"params",
"container",
"id",
")",
"string",
"container",
"id",
"str",
",",
"@",
"query",
"param",
"(",
"yarn",
"web",
"service",
"params",
"nm",
"id",
")",
"string",
"nm",
"id",
",",
"@",
"query",
"param",
"(",
"yarn",
"web",
"service",
"params",
"redirected",
"from",
"node",
")",
"@",
"default",
"value",
"(",
"\"",
"false",
"\"",
")",
"boolean",
"redirected",
"from",
"node",
",",
"@",
"query",
"param",
"(",
"yarn",
"web",
"service",
"params",
"cluster",
"id",
")",
"string",
"cluster",
"id",
",",
"@",
"query",
"param",
"(",
"yarn",
"web",
"service",
"params",
"manual",
"redirection",
")",
"@",
"default",
"value",
"(",
"\"",
"false",
"\"",
")",
"boolean",
"manual",
"redirection",
")",
"{",
"init",
"for",
"readable",
"endpoints",
"(",
"res",
")",
";",
"wrapped",
"log",
"meta",
"request",
"builder",
"log",
"meta",
"request",
"builder",
"=",
"log",
"servlet",
"create",
"request",
"from",
"container",
"id",
"(",
"container",
"id",
"str",
")",
";",
"return",
"log",
"servlet",
"get",
"container",
"logs",
"info",
"(",
"req",
",",
"log",
"meta",
"request",
"builder",
",",
"nm",
"id",
",",
"redirected",
"from",
"node",
",",
"cluster",
"id",
",",
"manual",
"redirection",
")",
";",
"}"
]
|
[
"waits",
"for",
"this",
"future",
"to",
"be",
"completed"
]
| [
"future",
"<",
"v",
">",
"await",
"(",
")",
"throws",
"interrupted",
"exception",
";"
]
|
[
"return",
"the",
"datanode",
"object"
]
| [
"data",
"node",
"get",
"data",
"node",
"(",
")",
"{",
"return",
"datanode",
";",
"}"
]
|
[
"get",
"prefix",
"number"
]
| [
"public",
"big",
"decimal",
"get",
"prefix",
"number",
"(",
")",
"{",
"return",
"prefix",
"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",
"\"",
")",
";",
"}"
]
|
[
"model",
"tests",
"for",
"additional",
"properties",
"number"
]
| [
"public",
"void",
"test",
"additional",
"properties",
"number",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"additional",
"properties",
"number",
"}"
]
|
[
"unpacks",
"the",
"builtins",
"zip",
"file",
"into",
"an",
"in",
"memory",
"file",
"system",
"the",
"zip",
"file",
"is",
"located",
"as",
"a",
"java",
"resource",
"file",
"the",
"files",
"underneath",
"the",
"zip",
"'",
"s",
"{",
"@",
"code",
"builtins",
"bzl",
"}",
"directory",
"are",
"moved",
"to",
"a",
"top",
"-",
"level",
"{",
"@",
"code",
"virtual",
"builtins",
"bzl",
"}",
"directory",
"the",
"path",
"to",
"that",
"directory",
"is",
"returned"
]
| [
"private",
"static",
"path",
"unpack",
"builtins",
"bzl",
"zip",
"resource",
"(",
"string",
"builtins",
"resource",
"name",
")",
"{",
"class",
"loader",
"loader",
"=",
"configured",
"rule",
"class",
"provider",
"class",
"get",
"class",
"loader",
"(",
")",
";",
"try",
"(",
"input",
"stream",
"builtins",
"zip",
"=",
"loader",
"get",
"resource",
"as",
"stream",
"(",
"builtins",
"resource",
"name",
")",
")",
"{",
"preconditions",
"check",
"argument",
"(",
"builtins",
"zip",
"!",
"=",
"null",
",",
"\"",
"no",
"resource",
"with",
"name",
"%",
"s",
"\"",
",",
"builtins",
"resource",
"name",
")",
";",
"in",
"memory",
"file",
"system",
"fs",
"=",
"new",
"in",
"memory",
"file",
"system",
"(",
"digest",
"hash",
"function",
"sha256",
")",
";",
"path",
"root",
"=",
"fs",
"get",
"path",
"(",
"\"",
"/",
"virtual",
"builtins",
"bzl",
"\"",
")",
";",
"try",
"(",
"zip",
"input",
"stream",
"zip",
"=",
"new",
"zip",
"input",
"stream",
"(",
"builtins",
"zip",
")",
")",
"{",
"for",
"(",
"zip",
"entry",
"entry",
"=",
"zip",
"get",
"next",
"entry",
"(",
")",
";",
"entry",
"!",
"=",
"null",
";",
"entry",
"=",
"zip",
"get",
"next",
"entry",
"(",
")",
")",
"{",
"string",
"entry",
"name",
"=",
"entry",
"get",
"name",
"(",
")",
";",
"preconditions",
"check",
"argument",
"(",
"entry",
"name",
"starts",
"with",
"(",
"\"",
"builtins",
"bzl",
"/",
"\"",
")",
")",
";",
"path",
"dest",
"=",
"root",
"get",
"relative",
"(",
"entry",
"name",
"substring",
"(",
"\"",
"builtins",
"bzl",
"/",
"\"",
"length",
"(",
")",
")",
")",
";",
"dest",
"get",
"parent",
"directory",
"(",
")",
"create",
"directory",
"and",
"parents",
"(",
")",
";",
"try",
"(",
"output",
"stream",
"os",
"=",
"dest",
"get",
"output",
"stream",
"(",
")",
")",
"{",
"byte",
"streams",
"copy",
"(",
"zip",
",",
"os",
")",
";",
"}",
"}",
"}",
"return",
"root",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ex",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"error",
"while",
"unpacking",
"builtins",
"bzl",
"zip",
"resource",
"file",
"\"",
",",
"ex",
")",
";",
"}",
"}"
]
|
[
"defines",
"over",
"-",
"windows",
"on",
"the",
"records",
"of",
"a",
"table",
"an",
"over",
"-",
"window",
"defines",
"for",
"each",
"record",
"an",
"interval",
"of",
"records",
"over",
"which",
"aggregation",
"functions",
"can",
"be",
"computed",
"example",
":",
"{",
"@",
"code",
"table",
"window",
"(",
"over",
"partition",
"by",
"(",
"$",
"(",
"\"",
"c",
"\"",
")",
")",
"order",
"by",
"(",
"$",
"(",
"\"",
"row",
"time",
"\"",
")",
")",
"preceding",
"(",
"lit",
"(",
"10",
")",
"seconds",
"(",
")",
")",
"as",
"(",
"\"",
"ow",
"\"",
")",
"select",
"(",
"$",
"(",
"\"",
"c",
"\"",
")",
",",
"$",
"(",
"\"",
"b",
"\"",
")",
"count",
"(",
")",
"over",
"(",
"$",
"(",
"\"",
"ow",
"\"",
")",
")",
",",
"$",
"(",
"\"",
"e",
"\"",
")",
"sum",
"(",
")",
"over",
"(",
"$",
"(",
"\"",
"ow",
"\"",
")",
")",
")",
";",
"}",
"scala",
"example",
":",
"{",
"@",
"code",
"table",
"window",
"(",
"over",
"partition",
"by",
"$",
"\"",
"c",
"\"",
"order",
"by",
"$",
"\"",
"row",
"time",
"\"",
"preceding",
"10",
"seconds",
"as",
"\"",
"ow",
"\"",
")",
"select",
"(",
"$",
"\"",
"c",
"\"",
",",
"$",
"\"",
"b",
"\"",
"count",
"over",
"$",
"\"",
"ow",
"\"",
",",
"$",
"\"",
"e",
"\"",
"sum",
"over",
"$",
"\"",
"ow",
"\"",
")",
"}",
"<",
"b",
">",
"note",
"<",
"b",
">",
":",
"computing",
"over",
"window",
"aggregates",
"on",
"a",
"streaming",
"table",
"is",
"only",
"a",
"parallel",
"operation",
"if",
"the",
"window",
"is",
"partitioned",
"otherwise",
",",
"the",
"whole",
"stream",
"will",
"be",
"processed",
"by",
"a",
"single",
"task",
",",
"i",
"e",
",",
"with",
"parallelism",
"1",
"<",
"b",
">",
"note",
"<",
"b",
">",
":",
"over",
"-",
"windows",
"for",
"batch",
"tables",
"are",
"currently",
"not",
"supported"
]
| [
"over",
"windowed",
"table",
"window",
"(",
"over",
"window",
"over",
"windows",
")",
";"
]
|
[
"add",
"to",
"cache",
"if",
"not",
"already",
"full"
]
| [
"public",
"final",
"boolean",
"add",
"(",
"pool",
"chunk",
"<",
"t",
">",
"chunk",
",",
"byte",
"buffer",
"nio",
"buffer",
",",
"long",
"handle",
",",
"int",
"norm",
"capacity",
")",
"{",
"entry",
"<",
"t",
">",
"entry",
"=",
"new",
"entry",
"(",
"chunk",
",",
"nio",
"buffer",
",",
"handle",
",",
"norm",
"capacity",
")",
";",
"boolean",
"queued",
"=",
"queue",
"offer",
"(",
"entry",
")",
";",
"if",
"(",
"!",
"queued",
")",
"{",
"/",
"/",
"if",
"it",
"was",
"not",
"possible",
"to",
"cache",
"the",
"chunk",
",",
"immediately",
"recycle",
"the",
"entry",
"entry",
"recycle",
"(",
")",
";",
"}",
"return",
"queued",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"boolean",
"equals",
"(",
"object",
"other",
")",
"{",
"if",
"(",
"!",
"(",
"other",
"instanceof",
"entry",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"compare",
"to",
"(",
"(",
"entry",
")",
"other",
")",
"=",
"=",
"0",
")",
";",
"}"
]
|
[
"excludes",
"frequently",
"-",
"occurring",
"metrics",
"from",
"the",
"analysis",
";",
"can",
"apply",
"to",
"'",
"by",
"'",
"field",
",",
"'",
"over",
"'",
"field",
",",
"or",
"both"
]
| [
"public",
"exclude",
"frequent",
"get",
"exclude",
"frequent",
"(",
")",
"{",
"return",
"exclude",
"frequent",
";",
"}"
]
|
[
"asynchronously",
"shrinks",
"an",
"index",
"using",
"the",
"shrink",
"index",
"api",
"see",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchreferencecurrentindices",
"-",
"shrink",
"-",
"index",
"html",
"\"",
">",
"shrink",
"index",
"api",
"on",
"elastic",
"co"
]
| [
"public",
"cancellable",
"shrink",
"async",
"(",
"org",
"elasticsearch",
"action",
"admin",
"indices",
"shrink",
"resize",
"request",
"resize",
"request",
",",
"request",
"options",
"options",
",",
"action",
"listener",
"<",
"org",
"elasticsearch",
"action",
"admin",
"indices",
"shrink",
"resize",
"response",
">",
"listener",
")",
"{",
"return",
"rest",
"high",
"level",
"client",
"perform",
"request",
"async",
"and",
"parse",
"entity",
"(",
"resize",
"request",
",",
"indices",
"request",
"converters",
":",
":",
"shrink",
",",
"options",
",",
"org",
"elasticsearch",
"action",
"admin",
"indices",
"shrink",
"resize",
"response",
":",
":",
"from",
"x",
"content",
",",
"listener",
",",
"empty",
"set",
"(",
")",
")",
";",
"}"
]
|
[
"sets",
"the",
"<",
"code",
">",
"array",
"of",
"string",
"<",
"code",
">",
"property"
]
| [
"public",
"array",
"test",
"array",
"of",
"string",
"(",
"list",
"<",
"string",
">",
"array",
"of",
"string",
")",
"{",
"this",
"array",
"of",
"string",
"=",
"array",
"of",
"string",
";",
"return",
"this",
";",
"}"
]
|
[
"test",
"manual",
"failover",
"failback",
"for",
"one",
"namespace"
]
| [
"private",
"void",
"test",
"manual",
"failover",
"failback",
"(",
"mini",
"d",
"f",
"s",
"cluster",
"cluster",
",",
"configuration",
"conf",
",",
"int",
"ns",
"index",
")",
"throws",
"exception",
"{",
"int",
"nn",
"0",
"=",
"2",
"*",
"ns",
"index",
",",
"nn",
"1",
"=",
"2",
"*",
"ns",
"index",
"+",
"1",
";",
"cluster",
"transition",
"to",
"active",
"(",
"nn",
"0",
")",
";",
"log",
"info",
"(",
"\"",
"starting",
"with",
"nn",
"0",
"active",
"in",
"namespace",
"\"",
"+",
"ns",
"index",
")",
";",
"file",
"system",
"fs",
"=",
"h",
"a",
"test",
"util",
"configure",
"failover",
"fs",
"(",
"cluster",
",",
"conf",
")",
";",
"fs",
"mkdirs",
"(",
"test",
"dir",
")",
";",
"log",
"info",
"(",
"\"",
"failing",
"over",
"to",
"nn",
"1",
"in",
"namespace",
"\"",
"+",
"ns",
"index",
")",
";",
"cluster",
"transition",
"to",
"standby",
"(",
"nn",
"0",
")",
";",
"cluster",
"transition",
"to",
"active",
"(",
"nn",
"1",
")",
";",
"assert",
"true",
"(",
"fs",
"exists",
"(",
"test",
"dir",
")",
")",
";",
"d",
"f",
"s",
"test",
"util",
"write",
"file",
"(",
"fs",
",",
"test",
"file",
"path",
",",
"test",
"file",
"data",
")",
";",
"log",
"info",
"(",
"\"",
"failing",
"over",
"to",
"nn",
"0",
"in",
"namespace",
"\"",
"+",
"ns",
"index",
")",
";",
"cluster",
"transition",
"to",
"standby",
"(",
"nn",
"1",
")",
";",
"cluster",
"transition",
"to",
"active",
"(",
"nn",
"0",
")",
";",
"assert",
"true",
"(",
"fs",
"exists",
"(",
"test",
"dir",
")",
")",
";",
"assert",
"equals",
"(",
"test",
"file",
"data",
",",
"d",
"f",
"s",
"test",
"util",
"read",
"file",
"(",
"fs",
",",
"test",
"file",
"path",
")",
")",
";",
"log",
"info",
"(",
"\"",
"removing",
"test",
"file",
"\"",
")",
";",
"fs",
"delete",
"(",
"test",
"dir",
",",
"true",
")",
";",
"assert",
"false",
"(",
"fs",
"exists",
"(",
"test",
"dir",
")",
")",
";",
"log",
"info",
"(",
"\"",
"failing",
"over",
"to",
"nn",
"1",
"in",
"namespace",
"\"",
"+",
"ns",
"index",
")",
";",
"cluster",
"transition",
"to",
"standby",
"(",
"nn",
"0",
")",
";",
"cluster",
"transition",
"to",
"active",
"(",
"nn",
"1",
")",
";",
"assert",
"false",
"(",
"fs",
"exists",
"(",
"test",
"dir",
")",
")",
";",
"}"
]
|
[
"manipulate",
"this",
"response",
"'",
"s",
"cookies",
"with",
"the",
"given",
"consumer",
"the",
"cookies",
"provided",
"to",
"the",
"consumer",
"are",
"\"",
"live",
"\"",
",",
"so",
"that",
"the",
"consumer",
"can",
"be",
"used",
"to",
"{",
"@",
"linkplain",
"multi",
"value",
"map",
"#",
"set",
"(",
"object",
",",
"object",
")",
"overwrite",
"}",
"existing",
"cookies",
",",
"{",
"@",
"linkplain",
"multi",
"value",
"map",
"#",
"remove",
"(",
"object",
")",
"remove",
"}",
"cookies",
",",
"or",
"use",
"any",
"of",
"the",
"other",
"{",
"@",
"link",
"multi",
"value",
"map",
"}",
"methods"
]
| [
"builder",
"<",
"t",
">",
"cookies",
"(",
"consumer",
"<",
"multi",
"value",
"map",
"<",
"string",
",",
"response",
"cookie",
">",
">",
"cookies",
"consumer",
")",
";"
]
|
[
"state",
"of",
"the",
"service",
"specifying",
"a",
"value",
"for",
"this",
"attribute",
"for",
"the",
"post",
"payload",
"raises",
"a",
"validation",
"error",
"this",
"attribute",
"is",
"available",
"only",
"in",
"the",
"get",
"response",
"of",
"a",
"started",
"service"
]
| [
"public",
"service",
"state",
"(",
"service",
"state",
"state",
")",
"{",
"this",
"state",
"=",
"state",
";",
"return",
"this",
";",
"}"
]
|
[
"get",
"all",
"the",
"key",
"-",
"value",
"pairs",
"in",
"the",
"given",
"key",
"range",
"and",
"time",
"range",
"from",
"all",
"the",
"existing",
"windows",
"this",
"iterator",
"must",
"be",
"closed",
"after",
"use"
]
| [
"key",
"value",
"iterator",
"<",
"windowed",
"<",
"k",
">",
",",
"v",
">",
"fetch",
"(",
"k",
"key",
"from",
",",
"k",
"key",
"to",
",",
"instant",
"time",
"from",
",",
"instant",
"time",
"to",
")",
"throws",
"illegal",
"argument",
"exception",
";"
]
|
[
"closes",
"all",
"open",
"editors",
"regardless",
"of",
"whether",
"there",
"are",
"unsaved",
"changes"
]
| [
"void",
"close",
"(",
")",
"{",
"dismiss",
"editors",
"(",
"null",
")",
";",
"}"
]
|
[
"add",
"the",
"supplied",
"attribute",
"to",
"the",
"model",
"using",
"a",
"{",
"@",
"linkplain",
"org",
"springframework",
"core",
"conventions",
"#",
"get",
"variable",
"name",
"generated",
"name",
"}",
"note",
":",
"empty",
"{",
"@",
"link",
"collection",
"collections",
"}",
"are",
"not",
"added",
"to",
"the",
"model",
"when",
"using",
"this",
"method",
"because",
"we",
"cannot",
"correctly",
"determine",
"the",
"true",
"convention",
"name",
"view",
"code",
"should",
"check",
"for",
"{",
"@",
"code",
"null",
"}",
"rather",
"than",
"for",
"empty",
"collections"
]
| [
"builder",
"model",
"attribute",
"(",
"object",
"attribute",
")",
";"
]
|
[
"partitions",
"the",
"operator",
"state",
"of",
"a",
"{",
"@",
"link",
"operator",
"transformation",
"}",
"by",
"the",
"given",
"key",
"positions"
]
| [
"public",
"keyed",
"operator",
"transformation",
"<",
"tuple",
",",
"t",
">",
"key",
"by",
"(",
"int",
"fields",
")",
"{",
"if",
"(",
"data",
"set",
"get",
"type",
"(",
")",
"instanceof",
"basic",
"array",
"type",
"info",
"|",
"|",
"data",
"set",
"get",
"type",
"(",
")",
"instanceof",
"primitive",
"array",
"type",
"info",
")",
"{",
"return",
"key",
"by",
"(",
"key",
"selector",
"util",
"get",
"selector",
"for",
"array",
"(",
"fields",
",",
"data",
"set",
"get",
"type",
"(",
")",
")",
")",
";",
"}",
"else",
"{",
"return",
"key",
"by",
"(",
"new",
"keys",
"expression",
"keys",
"<",
">",
"(",
"fields",
",",
"data",
"set",
"get",
"type",
"(",
")",
")",
")",
";",
"}",
"}"
]
|
[
"balancer",
"should",
"not",
"move",
"blocks",
"with",
"size",
"<",
"min",
"block",
"size"
]
| [
"public",
"void",
"test",
"min",
"block",
"size",
"and",
"source",
"nodes",
"(",
")",
"throws",
"exception",
"{",
"final",
"configuration",
"conf",
"=",
"new",
"hdfs",
"configuration",
"(",
")",
";",
"init",
"conf",
"(",
"conf",
")",
";",
"final",
"short",
"replication",
"=",
"3",
";",
"final",
"long",
"[",
"]",
"lengths",
"=",
"{",
"10",
",",
"10",
",",
"10",
",",
"10",
"}",
";",
"final",
"long",
"[",
"]",
"capacities",
"=",
"new",
"long",
"[",
"replication",
"]",
";",
"final",
"long",
"total",
"used",
"=",
"capacities",
"length",
"*",
"sum",
"(",
"lengths",
")",
";",
"arrays",
"fill",
"(",
"capacities",
",",
"1000",
")",
";",
"cluster",
"=",
"new",
"mini",
"d",
"f",
"s",
"cluster",
"builder",
"(",
"conf",
")",
"num",
"data",
"nodes",
"(",
"capacities",
"length",
")",
"simulated",
"capacities",
"(",
"capacities",
")",
"build",
"(",
")",
";",
"final",
"distributed",
"file",
"system",
"dfs",
"=",
"cluster",
"get",
"file",
"system",
"(",
")",
";",
"cluster",
"wait",
"active",
"(",
")",
";",
"client",
"=",
"name",
"node",
"proxies",
"create",
"proxy",
"(",
"conf",
",",
"dfs",
"get",
"uri",
"(",
")",
",",
"client",
"protocol",
"class",
")",
"get",
"proxy",
"(",
")",
";",
"/",
"/",
"fill",
"up",
"the",
"cluster",
"to",
"be",
"80",
"%",
"full",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"lengths",
"length",
";",
"i",
"+",
"+",
")",
"{",
"final",
"long",
"size",
"=",
"lengths",
"[",
"i",
"]",
";",
"final",
"path",
"p",
"=",
"new",
"path",
"(",
"\"",
"/",
"file",
"\"",
"+",
"i",
"+",
"\"",
"size",
"\"",
"+",
"size",
")",
";",
"try",
"(",
"output",
"stream",
"out",
"=",
"dfs",
"create",
"(",
"p",
")",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"size",
";",
"j",
"+",
"+",
")",
"{",
"out",
"write",
"(",
"j",
")",
";",
"}",
"}",
"}",
"/",
"/",
"start",
"up",
"an",
"empty",
"node",
"with",
"the",
"same",
"capacity",
"cluster",
"start",
"data",
"nodes",
"(",
"conf",
",",
"capacities",
"length",
",",
"true",
",",
"null",
",",
"null",
",",
"capacities",
")",
";",
"log",
"info",
"(",
"\"",
"capacities",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"capacities",
")",
")",
";",
"log",
"info",
"(",
"\"",
"total",
"used",
"space",
"=",
"\"",
"+",
"total",
"used",
")",
";",
"log",
"info",
"(",
"\"",
"lengths",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"lengths",
")",
"+",
"\"",
",",
"#",
"=",
"\"",
"+",
"lengths",
"length",
")",
";",
"wait",
"for",
"heart",
"beat",
"(",
"total",
"used",
",",
"2",
"*",
"capacities",
"[",
"0",
"]",
"*",
"capacities",
"length",
",",
"client",
",",
"cluster",
")",
";",
"final",
"collection",
"<",
"uri",
">",
"namenodes",
"=",
"d",
"f",
"s",
"util",
"get",
"internal",
"ns",
"rpc",
"uris",
"(",
"conf",
")",
";",
"{",
"/",
"/",
"run",
"balancer",
"with",
"min",
"-",
"block",
"-",
"size",
"=",
"50",
"final",
"balancer",
"parameters",
"p",
"=",
"balancer",
"cli",
"parse",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"policy",
"\"",
",",
"balancing",
"policy",
"node",
"instance",
"get",
"name",
"(",
")",
",",
"\"",
"-",
"threshold",
"\"",
",",
"\"",
"1",
"\"",
"}",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"balancing",
"policy",
"(",
")",
",",
"balancing",
"policy",
"node",
"instance",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"threshold",
"(",
")",
",",
"1",
"0",
",",
"0",
"001",
")",
";",
"conf",
"set",
"long",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"balancer",
"getblocks",
"min",
"block",
"size",
"key",
",",
"50",
")",
";",
"final",
"int",
"r",
"=",
"balancer",
"run",
"(",
"namenodes",
",",
"p",
",",
"conf",
")",
";",
"assert",
"equals",
"(",
"exit",
"status",
"no",
"move",
"progress",
"get",
"exit",
"code",
"(",
")",
",",
"r",
")",
";",
"}",
"conf",
"set",
"long",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"balancer",
"getblocks",
"min",
"block",
"size",
"key",
",",
"1",
")",
";",
"{",
"/",
"/",
"run",
"balancer",
"with",
"empty",
"nodes",
"as",
"source",
"nodes",
"final",
"set",
"<",
"string",
">",
"source",
"nodes",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"final",
"list",
"<",
"data",
"node",
">",
"datanodes",
"=",
"cluster",
"get",
"data",
"nodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"capacities",
"length",
";",
"i",
"<",
"datanodes",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"source",
"nodes",
"add",
"(",
"datanodes",
"get",
"(",
"i",
")",
"get",
"display",
"name",
"(",
")",
")",
";",
"}",
"final",
"balancer",
"parameters",
"p",
"=",
"balancer",
"cli",
"parse",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"policy",
"\"",
",",
"balancing",
"policy",
"node",
"instance",
"get",
"name",
"(",
")",
",",
"\"",
"-",
"threshold",
"\"",
",",
"\"",
"1",
"\"",
",",
"\"",
"-",
"source",
"\"",
",",
"string",
"utils",
"join",
"(",
"source",
"nodes",
",",
"'",
",",
"'",
")",
"}",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"balancing",
"policy",
"(",
")",
",",
"balancing",
"policy",
"node",
"instance",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"threshold",
"(",
")",
",",
"1",
"0",
",",
"0",
"001",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"source",
"nodes",
"(",
")",
",",
"source",
"nodes",
")",
";",
"conf",
"set",
"long",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"balancer",
"getblocks",
"min",
"block",
"size",
"key",
",",
"50",
")",
";",
"final",
"int",
"r",
"=",
"balancer",
"run",
"(",
"namenodes",
",",
"p",
",",
"conf",
")",
";",
"assert",
"equals",
"(",
"exit",
"status",
"no",
"move",
"block",
"get",
"exit",
"code",
"(",
")",
",",
"r",
")",
";",
"}",
"{",
"/",
"/",
"run",
"balancer",
"with",
"a",
"filled",
"node",
"as",
"a",
"source",
"node",
"final",
"set",
"<",
"string",
">",
"source",
"nodes",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"final",
"list",
"<",
"data",
"node",
">",
"datanodes",
"=",
"cluster",
"get",
"data",
"nodes",
"(",
")",
";",
"source",
"nodes",
"add",
"(",
"datanodes",
"get",
"(",
"0",
")",
"get",
"display",
"name",
"(",
")",
")",
";",
"final",
"balancer",
"parameters",
"p",
"=",
"balancer",
"cli",
"parse",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"policy",
"\"",
",",
"balancing",
"policy",
"node",
"instance",
"get",
"name",
"(",
")",
",",
"\"",
"-",
"threshold",
"\"",
",",
"\"",
"1",
"\"",
",",
"\"",
"-",
"source",
"\"",
",",
"string",
"utils",
"join",
"(",
"source",
"nodes",
",",
"'",
",",
"'",
")",
"}",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"balancing",
"policy",
"(",
")",
",",
"balancing",
"policy",
"node",
"instance",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"threshold",
"(",
")",
",",
"1",
"0",
",",
"0",
"001",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"source",
"nodes",
"(",
")",
",",
"source",
"nodes",
")",
";",
"conf",
"set",
"long",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"balancer",
"getblocks",
"min",
"block",
"size",
"key",
",",
"1",
")",
";",
"final",
"int",
"r",
"=",
"balancer",
"run",
"(",
"namenodes",
",",
"p",
",",
"conf",
")",
";",
"assert",
"equals",
"(",
"exit",
"status",
"no",
"move",
"block",
"get",
"exit",
"code",
"(",
")",
",",
"r",
")",
";",
"}",
"{",
"/",
"/",
"run",
"balancer",
"with",
"all",
"filled",
"node",
"as",
"source",
"nodes",
"final",
"set",
"<",
"string",
">",
"source",
"nodes",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"final",
"list",
"<",
"data",
"node",
">",
"datanodes",
"=",
"cluster",
"get",
"data",
"nodes",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"capacities",
"length",
";",
"i",
"+",
"+",
")",
"{",
"source",
"nodes",
"add",
"(",
"datanodes",
"get",
"(",
"i",
")",
"get",
"display",
"name",
"(",
")",
")",
";",
"}",
"final",
"balancer",
"parameters",
"p",
"=",
"balancer",
"cli",
"parse",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"policy",
"\"",
",",
"balancing",
"policy",
"node",
"instance",
"get",
"name",
"(",
")",
",",
"\"",
"-",
"threshold",
"\"",
",",
"\"",
"1",
"\"",
",",
"\"",
"-",
"source",
"\"",
",",
"string",
"utils",
"join",
"(",
"source",
"nodes",
",",
"'",
",",
"'",
")",
"}",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"balancing",
"policy",
"(",
")",
",",
"balancing",
"policy",
"node",
"instance",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"threshold",
"(",
")",
",",
"1",
"0",
",",
"0",
"001",
")",
";",
"assert",
"equals",
"(",
"p",
"get",
"source",
"nodes",
"(",
")",
",",
"source",
"nodes",
")",
";",
"conf",
"set",
"long",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"balancer",
"getblocks",
"min",
"block",
"size",
"key",
",",
"1",
")",
";",
"final",
"int",
"r",
"=",
"balancer",
"run",
"(",
"namenodes",
",",
"p",
",",
"conf",
")",
";",
"assert",
"equals",
"(",
"exit",
"status",
"success",
"get",
"exit",
"code",
"(",
")",
",",
"r",
")",
";",
"}",
"}"
]
|
[
"writes",
"4",
"timeline",
"entities",
"belonging",
"to",
"one",
"flow",
"run",
"through",
"the",
"{",
"@",
"link",
"h",
"base",
"timeline",
"writer",
"impl",
"}",
"checks",
"the",
"flow",
"run",
"table",
"contents",
"the",
"first",
"entity",
"has",
"a",
"created",
"event",
",",
"metrics",
"and",
"a",
"finish",
"event",
"the",
"second",
"entity",
"has",
"a",
"created",
"event",
"and",
"this",
"is",
"the",
"entity",
"with",
"smallest",
"start",
"time",
"this",
"should",
"be",
"the",
"start",
"time",
"for",
"the",
"flow",
"run",
"the",
"third",
"entity",
"has",
"a",
"finish",
"event",
"and",
"this",
"is",
"the",
"entity",
"with",
"the",
"max",
"end",
"time",
"this",
"should",
"be",
"the",
"end",
"time",
"for",
"the",
"flow",
"run",
"the",
"fourth",
"entity",
"has",
"a",
"created",
"event",
"which",
"has",
"a",
"start",
"time",
"that",
"is",
"greater",
"than",
"min",
"start",
"time"
]
| [
"public",
"void",
"test",
"write",
"flow",
"run",
"min",
"max",
"(",
")",
"throws",
"exception",
"{",
"timeline",
"entities",
"te",
"=",
"new",
"timeline",
"entities",
"(",
")",
";",
"te",
"add",
"entity",
"(",
"test",
"flow",
"data",
"generator",
"get",
"entity",
"1",
"(",
")",
")",
";",
"h",
"base",
"timeline",
"writer",
"impl",
"hbi",
"=",
"null",
";",
"configuration",
"c",
"1",
"=",
"util",
"get",
"configuration",
"(",
")",
";",
"string",
"cluster",
"=",
"\"",
"test",
"write",
"flow",
"run",
"min",
"max",
"to",
"h",
"base",
"cluster",
"1",
"\"",
";",
"string",
"user",
"=",
"\"",
"test",
"write",
"flow",
"run",
"min",
"max",
"to",
"h",
"base",
"user",
"1",
"\"",
";",
"string",
"flow",
"=",
"\"",
"testing",
"flow",
"run",
"flow",
"name",
"\"",
";",
"string",
"flow",
"version",
"=",
"\"",
"cf7022c10f1354",
"\"",
";",
"long",
"runid",
"=",
"1002345678919l",
";",
"string",
"app",
"name",
"=",
"\"",
"application",
"100000000000",
"1111",
"\"",
";",
"long",
"min",
"start",
"ts",
"=",
"1425026900000l",
";",
"long",
"greater",
"start",
"ts",
"=",
"30000000000000l",
";",
"long",
"end",
"ts",
"=",
"1439750690000l",
";",
"timeline",
"entity",
"entity",
"min",
"start",
"time",
"=",
"test",
"flow",
"data",
"generator",
"get",
"entity",
"min",
"start",
"time",
"(",
"min",
"start",
"ts",
")",
";",
"try",
"{",
"hbi",
"=",
"new",
"h",
"base",
"timeline",
"writer",
"impl",
"(",
")",
";",
"hbi",
"init",
"(",
"c",
"1",
")",
";",
"user",
"group",
"information",
"remote",
"user",
"=",
"user",
"group",
"information",
"create",
"remote",
"user",
"(",
"user",
")",
";",
"hbi",
"write",
"(",
"new",
"timeline",
"collector",
"context",
"(",
"cluster",
",",
"user",
",",
"flow",
",",
"flow",
"version",
",",
"runid",
",",
"app",
"name",
")",
",",
"te",
",",
"remote",
"user",
")",
";",
"/",
"/",
"write",
"another",
"entity",
"with",
"the",
"right",
"min",
"start",
"time",
"te",
"=",
"new",
"timeline",
"entities",
"(",
")",
";",
"te",
"add",
"entity",
"(",
"entity",
"min",
"start",
"time",
")",
";",
"app",
"name",
"=",
"\"",
"application",
"100000000000",
"3333",
"\"",
";",
"hbi",
"write",
"(",
"new",
"timeline",
"collector",
"context",
"(",
"cluster",
",",
"user",
",",
"flow",
",",
"flow",
"version",
",",
"runid",
",",
"app",
"name",
")",
",",
"te",
",",
"remote",
"user",
")",
";",
"/",
"/",
"writer",
"another",
"entity",
"for",
"max",
"end",
"time",
"timeline",
"entity",
"entity",
"max",
"end",
"time",
"=",
"test",
"flow",
"data",
"generator",
"get",
"entity",
"max",
"end",
"time",
"(",
"end",
"ts",
")",
";",
"te",
"=",
"new",
"timeline",
"entities",
"(",
")",
";",
"te",
"add",
"entity",
"(",
"entity",
"max",
"end",
"time",
")",
";",
"app",
"name",
"=",
"\"",
"application",
"100000000000",
"4444",
"\"",
";",
"hbi",
"write",
"(",
"new",
"timeline",
"collector",
"context",
"(",
"cluster",
",",
"user",
",",
"flow",
",",
"flow",
"version",
",",
"runid",
",",
"app",
"name",
")",
",",
"te",
",",
"remote",
"user",
")",
";",
"/",
"/",
"writer",
"another",
"entity",
"with",
"greater",
"start",
"time",
"timeline",
"entity",
"entity",
"greater",
"start",
"time",
"=",
"test",
"flow",
"data",
"generator",
"get",
"entity",
"greater",
"start",
"time",
"(",
"greater",
"start",
"ts",
")",
";",
"te",
"=",
"new",
"timeline",
"entities",
"(",
")",
";",
"te",
"add",
"entity",
"(",
"entity",
"greater",
"start",
"time",
")",
";",
"app",
"name",
"=",
"\"",
"application",
"1000000000000000",
"2222",
"\"",
";",
"hbi",
"write",
"(",
"new",
"timeline",
"collector",
"context",
"(",
"cluster",
",",
"user",
",",
"flow",
",",
"flow",
"version",
",",
"runid",
",",
"app",
"name",
")",
",",
"te",
",",
"remote",
"user",
")",
";",
"/",
"/",
"flush",
"everything",
"to",
"hbase",
"hbi",
"flush",
"(",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"hbi",
"!",
"=",
"null",
")",
"{",
"hbi",
"close",
"(",
")",
";",
"}",
"}",
"connection",
"conn",
"=",
"connection",
"factory",
"create",
"connection",
"(",
"c",
"1",
")",
";",
"/",
"/",
"check",
"in",
"flow",
"run",
"table",
"table",
"table",
"1",
"=",
"conn",
"get",
"table",
"(",
"base",
"table",
"r",
"w",
"get",
"table",
"name",
"(",
"c",
"1",
",",
"flow",
"run",
"table",
"r",
"w",
"table",
"name",
"conf",
"name",
",",
"flow",
"run",
"table",
"r",
"w",
"default",
"table",
"name",
")",
")",
";",
"/",
"/",
"scan",
"the",
"table",
"and",
"see",
"that",
"we",
"get",
"back",
"the",
"right",
"min",
"and",
"max",
"/",
"/",
"timestamps",
"byte",
"[",
"]",
"start",
"row",
"=",
"new",
"flow",
"run",
"row",
"key",
"(",
"cluster",
",",
"user",
",",
"flow",
",",
"runid",
")",
"get",
"row",
"key",
"(",
")",
";",
"get",
"g",
"=",
"new",
"get",
"(",
"start",
"row",
")",
";",
"g",
"add",
"column",
"(",
"flow",
"run",
"column",
"family",
"info",
"get",
"bytes",
"(",
")",
",",
"flow",
"run",
"column",
"min",
"start",
"time",
"get",
"column",
"qualifier",
"bytes",
"(",
")",
")",
";",
"g",
"add",
"column",
"(",
"flow",
"run",
"column",
"family",
"info",
"get",
"bytes",
"(",
")",
",",
"flow",
"run",
"column",
"max",
"end",
"time",
"get",
"column",
"qualifier",
"bytes",
"(",
")",
")",
";",
"result",
"r",
"1",
"=",
"table",
"1",
"get",
"(",
"g",
")",
";",
"assert",
"not",
"null",
"(",
"r",
"1",
")",
";",
"assert",
"true",
"(",
"!",
"r",
"1",
"is",
"empty",
"(",
")",
")",
";",
"map",
"<",
"byte",
"[",
"]",
",",
"byte",
"[",
"]",
">",
"values",
"=",
"r",
"1",
"get",
"family",
"map",
"(",
"flow",
"run",
"column",
"family",
"info",
"get",
"bytes",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"2",
",",
"r",
"1",
"size",
"(",
")",
")",
";",
"long",
"starttime",
"=",
"bytes",
"to",
"long",
"(",
"values",
"get",
"(",
"flow",
"run",
"column",
"min",
"start",
"time",
"get",
"column",
"qualifier",
"bytes",
"(",
")",
")",
")",
";",
"assert",
"equals",
"(",
"min",
"start",
"ts",
",",
"starttime",
")",
";",
"assert",
"equals",
"(",
"end",
"ts",
",",
"bytes",
"to",
"long",
"(",
"values",
"get",
"(",
"flow",
"run",
"column",
"max",
"end",
"time",
"get",
"column",
"qualifier",
"bytes",
"(",
")",
")",
")",
")",
";",
"/",
"/",
"use",
"the",
"timeline",
"reader",
"to",
"verify",
"data",
"h",
"base",
"timeline",
"reader",
"impl",
"hbr",
"=",
"null",
";",
"try",
"{",
"hbr",
"=",
"new",
"h",
"base",
"timeline",
"reader",
"impl",
"(",
")",
";",
"hbr",
"init",
"(",
"c",
"1",
")",
";",
"hbr",
"start",
"(",
")",
";",
"/",
"/",
"get",
"the",
"flow",
"run",
"entity",
"timeline",
"entity",
"entity",
"=",
"hbr",
"get",
"entity",
"(",
"new",
"timeline",
"reader",
"context",
"(",
"cluster",
",",
"user",
",",
"flow",
",",
"runid",
",",
"null",
",",
"timeline",
"entity",
"type",
"yarn",
"flow",
"run",
"to",
"string",
"(",
")",
",",
"null",
")",
",",
"new",
"timeline",
"data",
"to",
"retrieve",
"(",
")",
")",
";",
"assert",
"true",
"(",
"timeline",
"entity",
"type",
"yarn",
"flow",
"run",
"matches",
"(",
"entity",
"get",
"type",
"(",
")",
")",
")",
";",
"flow",
"run",
"entity",
"flow",
"run",
"=",
"(",
"flow",
"run",
"entity",
")",
"entity",
";",
"assert",
"equals",
"(",
"min",
"start",
"ts",
",",
"flow",
"run",
"get",
"start",
"time",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"end",
"ts",
",",
"flow",
"run",
"get",
"max",
"end",
"time",
"(",
")",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"hbr",
"!",
"=",
"null",
")",
"{",
"hbr",
"close",
"(",
")",
";",
"}",
"}",
"}"
]
|
[
"cancels",
"the",
"task",
"it",
"will",
"not",
"be",
"executed",
"until",
"it",
"is",
"scheduled",
"again",
"this",
"method",
"can",
"be",
"called",
"at",
"any",
"time"
]
| [
"public",
"void",
"cancel",
"(",
")",
"{",
"timer",
"timer",
"=",
"this",
"timer",
";",
"if",
"(",
"timer",
"!",
"=",
"null",
")",
"{",
"synchronized",
"(",
"timer",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"execute",
"time",
"millis",
"=",
"0",
";",
"this",
"timer",
"=",
"null",
";",
"timer",
"tasks",
"remove",
"value",
"(",
"this",
",",
"true",
")",
";",
"}",
"}",
"}",
"else",
"{",
"synchronized",
"(",
"this",
")",
"{",
"execute",
"time",
"millis",
"=",
"0",
";",
"this",
"timer",
"=",
"null",
";",
"}",
"}",
"}"
]
|
[
"get",
"the",
"comma",
"delimited",
"values",
"of",
"the",
"<",
"code",
">",
"name",
"<",
"code",
">",
"property",
"as",
"a",
"collection",
"of",
"<",
"code",
">",
"string",
"<",
"code",
">",
"s",
",",
"trimmed",
"of",
"the",
"leading",
"and",
"trailing",
"whitespace",
"if",
"no",
"such",
"property",
"is",
"specified",
"then",
"empty",
"<",
"code",
">",
"collection",
"<",
"code",
">",
"is",
"returned"
]
| [
"public",
"collection",
"<",
"string",
">",
"get",
"trimmed",
"string",
"collection",
"(",
"string",
"name",
")",
"{",
"string",
"value",
"string",
"=",
"get",
"(",
"name",
")",
";",
"if",
"(",
"null",
"=",
"=",
"value",
"string",
")",
"{",
"collection",
"<",
"string",
">",
"empty",
"=",
"new",
"array",
"list",
"<",
"string",
">",
"(",
")",
";",
"return",
"empty",
";",
"}",
"return",
"string",
"utils",
"get",
"trimmed",
"string",
"collection",
"(",
"value",
"string",
")",
";",
"}"
]
|
[
"returns",
"the",
"key",
"that",
"is",
"associated",
"to",
"the",
"cache",
"entry",
"holding",
"this",
"reference",
"if",
"the",
"cache",
"holds",
"keys",
"strongly",
",",
"this",
"is",
"that",
"key",
"instance",
"otherwise",
"the",
"cache",
"holds",
"keys",
"weakly",
"and",
"the",
"{",
"@",
"link",
"weak",
"key",
"reference",
"}",
"is",
"returned"
]
| [
"object",
"get",
"key",
"reference",
"(",
")",
";"
]
|
[
"get",
"the",
"artifact",
"generated",
"by",
"the",
"2to",
"3",
"action",
"there",
"might",
"be",
"conflicts",
"eg",
"when",
"the",
"input",
"file",
"is",
"generated",
",",
"but",
"that",
"case",
"is",
"unsupported",
"because",
"2to",
"3",
"is",
"obsolete",
"returns",
"null",
"and",
"reports",
"a",
"rule",
"error",
"if",
"the",
"output",
"file",
"cannot",
"be",
"created",
"because",
"it",
"is",
"not",
"underneath",
"the",
"target",
"'",
"s",
"package"
]
| [
"private",
"static",
"artifact",
"get",
"2to",
"3",
"output",
"artifact",
"(",
"rule",
"context",
"rule",
"context",
",",
"artifact",
"input",
")",
"{",
"path",
"fragment",
"root",
"relative",
"path",
"=",
"input",
"get",
"output",
"dir",
"relative",
"path",
"(",
"rule",
"context",
"get",
"configuration",
"(",
")",
"is",
"sibling",
"repository",
"layout",
"(",
")",
")",
";",
"if",
"(",
"!",
"root",
"relative",
"path",
"starts",
"with",
"(",
"rule",
"context",
"get",
"package",
"directory",
"(",
")",
")",
")",
"{",
"rule",
"context",
"rule",
"error",
"(",
"string",
"format",
"(",
"\"",
"cannot",
"perform",
"2to",
"3",
"conversion",
"on",
"source",
"file",
"%",
"s",
"from",
"another",
"package",
"\"",
",",
"root",
"relative",
"path",
")",
")",
";",
"return",
"null",
";",
"}",
"artifact",
"root",
"root",
"=",
"rule",
"context",
"get",
"genfiles",
"directory",
"(",
")",
";",
"return",
"rule",
"context",
"get",
"derived",
"artifact",
"(",
"root",
"relative",
"path",
",",
"root",
")",
";",
"}"
]
|
[
"sets",
"the",
"list",
"of",
"index",
"settings",
"and",
"index",
"settings",
"groups",
"that",
"shouldn",
"'",
"t",
"be",
"restored",
"from",
"snapshot"
]
| [
"public",
"restore",
"snapshot",
"request",
"ignore",
"index",
"settings",
"(",
"list",
"<",
"string",
">",
"ignore",
"index",
"settings",
")",
"{",
"this",
"ignore",
"index",
"settings",
"=",
"ignore",
"index",
"settings",
"to",
"array",
"(",
"new",
"string",
"[",
"ignore",
"index",
"settings",
"size",
"(",
")",
"]",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"returns",
"an",
"existing",
"error",
"info",
",",
"or",
"{",
"@",
"code",
"null",
"}",
"if",
"the",
"given",
"key",
"is",
"not",
"currently",
"in",
"the",
"graph"
]
| [
"public",
"static",
"error",
"info",
"get",
"existing",
"error",
"(",
"skyframe",
"executor",
"skyframe",
"executor",
",",
"sky",
"key",
"key",
")",
"throws",
"interrupted",
"exception",
"{",
"return",
"skyframe",
"executor",
"get",
"evaluator",
"for",
"testing",
"(",
")",
"get",
"existing",
"error",
"for",
"testing",
"(",
"key",
")",
";",
"}"
]
|
[
"redirect",
"the",
"request",
"to",
"a",
"separate",
"and",
"possibly",
"external",
"url",
"in",
"case",
"authorization",
"fails",
"for",
"this",
"service",
"if",
"no",
"url",
"is",
"specified",
",",
"cas",
"shall",
"redirect",
"the",
"request",
"by",
"default",
"to",
"a",
"generic",
"page",
"that",
"describes",
"the",
"authorization",
"failed",
"attempt"
]
| [
"default",
"uri",
"get",
"unauthorized",
"redirect",
"url",
"(",
")",
"{",
"return",
"null",
";",
"}"
]
|
[
"this",
"is",
"slow",
",",
"don",
"'",
"t",
"call",
"it",
"if",
"you",
"care",
"about",
"write",
"overhead",
",",
"use",
"a",
"buffered",
"output",
"stream",
"better",
"yet",
",",
"you",
"can",
"use",
"your",
"own",
"single",
"byte",
"buffer",
"and",
"call",
"{",
"@",
"link",
"#",
"write",
"(",
"byte",
"[",
"]",
",",
"int",
",",
"int",
")",
"}"
]
| [
"public",
"void",
"write",
"(",
"int",
"b",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"current",
"!",
"=",
"null",
"&",
"&",
"current",
"writable",
"bytes",
"(",
")",
">",
"0",
")",
"{",
"current",
"write",
"(",
"(",
"byte",
")",
"b",
")",
";",
"return",
";",
"}",
"byte",
"[",
"]",
"single",
"byte",
"=",
"new",
"byte",
"[",
"]",
"{",
"(",
"byte",
")",
"b",
"}",
";",
"write",
"(",
"single",
"byte",
",",
"0",
",",
"1",
")",
";",
"}"
]
|
[
"called",
"when",
"the",
"task",
"is",
"successfully",
"executed",
",",
"and",
"the",
"required",
"task",
"parameters",
"are",
"given",
"by",
"the",
"end",
"-",
"user"
]
| [
"void",
"complete",
"(",
"string",
"task",
"id",
",",
"map",
"<",
"string",
",",
"object",
">",
"variables",
")",
";"
]
|
[
"sets",
"the",
"authentication",
"method",
"in",
"the",
"subject"
]
| [
"public",
"void",
"set",
"authentication",
"method",
"(",
"auth",
"method",
"auth",
"method",
")",
"{",
"user",
"set",
"authentication",
"method",
"(",
"authentication",
"method",
"value",
"of",
"(",
"auth",
"method",
")",
")",
";",
"}"
]
|
[
"query",
"the",
"data"
]
| [
"public",
"static",
"void",
"query",
"data",
"(",
")",
"{",
"var",
"wizard",
"dao",
"=",
"new",
"wizard",
"dao",
"impl",
"(",
")",
";",
"var",
"spellbook",
"dao",
"=",
"new",
"spellbook",
"dao",
"impl",
"(",
")",
";",
"var",
"spell",
"dao",
"=",
"new",
"spell",
"dao",
"impl",
"(",
")",
";",
"var",
"service",
"=",
"new",
"magic",
"service",
"impl",
"(",
"wizard",
"dao",
",",
"spellbook",
"dao",
",",
"spell",
"dao",
")",
";",
"logger",
"info",
"(",
"\"",
"enumerating",
"all",
"wizards",
"\"",
")",
";",
"service",
"find",
"all",
"wizards",
"(",
")",
"stream",
"(",
")",
"map",
"(",
"wizard",
":",
":",
"get",
"name",
")",
"for",
"each",
"(",
"logger",
":",
":",
"info",
")",
";",
"logger",
"info",
"(",
"\"",
"enumerating",
"all",
"spellbooks",
"\"",
")",
";",
"service",
"find",
"all",
"spellbooks",
"(",
")",
"stream",
"(",
")",
"map",
"(",
"spellbook",
":",
":",
"get",
"name",
")",
"for",
"each",
"(",
"logger",
":",
":",
"info",
")",
";",
"logger",
"info",
"(",
"\"",
"enumerating",
"all",
"spells",
"\"",
")",
";",
"service",
"find",
"all",
"spells",
"(",
")",
"stream",
"(",
")",
"map",
"(",
"spell",
":",
":",
"get",
"name",
")",
"for",
"each",
"(",
"logger",
":",
":",
"info",
")",
";",
"logger",
"info",
"(",
"\"",
"find",
"wizards",
"with",
"spellbook",
"'",
"book",
"of",
"idores",
"'",
"\"",
")",
";",
"var",
"wizards",
"with",
"spellbook",
"=",
"service",
"find",
"wizards",
"with",
"spellbook",
"(",
"book",
"of",
"idores",
")",
";",
"wizards",
"with",
"spellbook",
"for",
"each",
"(",
"w",
"-",
">",
"logger",
"info",
"(",
"\"",
"{",
"}",
"has",
"'",
"book",
"of",
"idores",
"'",
"\"",
",",
"w",
"get",
"name",
"(",
")",
")",
")",
";",
"logger",
"info",
"(",
"\"",
"find",
"wizards",
"with",
"spell",
"'",
"fireball",
"'",
"\"",
")",
";",
"var",
"wizards",
"with",
"spell",
"=",
"service",
"find",
"wizards",
"with",
"spell",
"(",
"\"",
"fireball",
"\"",
")",
";",
"wizards",
"with",
"spell",
"for",
"each",
"(",
"w",
"-",
">",
"logger",
"info",
"(",
"\"",
"{",
"}",
"has",
"'",
"fireball",
"'",
"\"",
",",
"w",
"get",
"name",
"(",
")",
")",
")",
";",
"}"
]
|
[
"incorporates",
"settings",
"from",
"a",
"spawn",
"'",
"s",
"execution",
"info"
]
| [
"public",
"command",
"line",
"builder",
"add",
"execution",
"info",
"(",
"map",
"<",
"string",
",",
"string",
">",
"execution",
"info",
")",
"{",
"if",
"(",
"execution",
"info",
"contains",
"key",
"(",
"execution",
"requirements",
"graceful",
"termination",
")",
")",
"{",
"sigint",
"sends",
"sigterm",
"=",
"true",
";",
"}",
"return",
"this",
";",
"}"
]
|
[
"read",
"a",
"record",
",",
"return",
"null",
"if",
"no",
"more",
"record"
]
| [
"t",
"read",
"(",
")",
"throws",
"i",
"o",
"exception",
";"
]
|
[
"will",
"be",
"called",
"when",
"the",
"visibility",
"of",
"the",
"dialog",
"using",
"this",
"model",
"has",
"changed"
]
| [
"public",
"void",
"dialog",
"visibility",
"changed",
"(",
"boolean",
"is",
"visible",
")",
";"
]
|
[
"test",
"globbing",
"in",
"the",
"context",
"of",
"a",
"package",
",",
"using",
"the",
"build",
"language",
"we",
"use",
"the",
"specially",
"setup",
"\"",
"globs",
"\"",
"test",
"package",
"and",
"the",
"files",
"beneath",
"it"
]
| [
"private",
"void",
"assert",
"glob",
"matches",
"(",
"list",
"<",
"string",
">",
"result",
",",
"list",
"<",
"string",
">",
"includes",
",",
"list",
"<",
"string",
">",
"excludes",
",",
"boolean",
"exclude",
"dirs",
")",
"throws",
"exception",
"{",
"/",
"/",
"if",
"the",
"glob",
"doesn",
"'",
"t",
"match",
"the",
"expected",
"result",
",",
"build",
"execution",
"calls",
"fail",
"(",
")",
"which",
"/",
"/",
"posts",
"an",
"error",
"to",
"the",
"fail",
"-",
"fast",
"handler",
",",
"throwing",
"assertion",
"error",
"package",
"pkg",
"=",
"evaluate",
"glob",
"(",
"includes",
",",
"excludes",
",",
"exclude",
"dirs",
",",
"starlark",
"format",
"(",
"\"",
"(",
"result",
"=",
"=",
"sorted",
"(",
"%",
"r",
")",
")",
"or",
"fail",
"(",
"'",
"incorrect",
"glob",
"result",
":",
"got",
"%",
"%",
"s",
",",
"want",
"%",
"%",
"s",
"'",
"%",
"%",
"\"",
"+",
"\"",
"(",
"result",
",",
"sorted",
"(",
"%",
"r",
")",
")",
")",
"\"",
",",
"result",
",",
"result",
")",
")",
";",
"/",
"/",
"execution",
"succeeded",
"assert",
"that",
"there",
"were",
"no",
"other",
"errors",
"in",
"the",
"package",
"assert",
"that",
"(",
"pkg",
"contains",
"errors",
"(",
")",
")",
"is",
"false",
"(",
")",
";",
"}"
]
|
[
"set",
"the",
"value",
"of",
"this",
"attribute",
"for",
"the",
"specified",
"keyed",
"object"
]
| [
"public",
"void",
"set",
"value",
"(",
"t",
"o",
",",
"int",
"value",
")",
"{",
"update",
"(",
")",
";",
"values",
"put",
"(",
"o",
"key",
"(",
")",
",",
"value",
")",
";",
"}"
]
|
[
"return",
"whether",
"the",
"config",
"is",
"read",
"-",
"only",
"and",
"cannot",
"be",
"updated"
]
| [
"public",
"boolean",
"is",
"read",
"only",
"(",
")",
"{",
"return",
"is",
"read",
"only",
";",
"}"
]
|
[
"called",
"when",
"cache",
"has",
"been",
"initialized"
]
| [
"void",
"on",
"cache",
"initialized",
"(",
")",
";"
]
|
[
"get",
"the",
"federation",
"metrics"
]
| [
"public",
"r",
"b",
"f",
"metrics",
"get",
"metrics",
"(",
")",
"{",
"if",
"(",
"this",
"metrics",
"!",
"=",
"null",
")",
"{",
"return",
"this",
"metrics",
"get",
"r",
"b",
"f",
"metrics",
"(",
")",
";",
"}",
"return",
"null",
";",
"}"
]
|
[
"get",
"the",
"cluster",
"filesystem",
"-",
"hdfs",
"or",
"local"
]
| [
"protected",
"file",
"system",
"get",
"cluster",
"f",
"s",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"get",
"cluster",
"binding",
"(",
")",
"get",
"cluster",
"f",
"s",
"(",
")",
";",
"}"
]
|
[
"this",
"implementation",
"always",
"returns",
"{",
"@",
"code",
"true",
"}"
]
| [
"public",
"boolean",
"exists",
"(",
")",
"{",
"return",
"true",
";",
"}"
]
|
[
"throws",
"an",
"error",
"that",
"'",
"s",
"preventing",
"data",
"from",
"being",
"read",
"does",
"nothing",
"if",
"no",
"such",
"error",
"exists"
]
| [
"public",
"void",
"maybe",
"throw",
"error",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"todo",
":",
"avoid",
"throwing",
"if",
"the",
"drm",
"error",
"is",
"not",
"preventing",
"a",
"read",
"operation",
"if",
"(",
"current",
"drm",
"session",
"!",
"=",
"null",
"&",
"&",
"current",
"drm",
"session",
"get",
"state",
"(",
")",
"=",
"=",
"drm",
"session",
"state",
"error",
")",
"{",
"throw",
"assertions",
"check",
"not",
"null",
"(",
"current",
"drm",
"session",
"get",
"error",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"construct",
"an",
"implementation",
"of",
"{",
"@",
"link",
"hystrix",
"thread",
"pool",
"properties",
"}",
"for",
"{",
"@",
"link",
"hystrix",
"thread",
"pool",
"}",
"instances",
"with",
"{",
"@",
"link",
"hystrix",
"thread",
"pool",
"key",
"}",
"<",
"b",
">",
"default",
"implementation",
"<",
"b",
">",
"constructs",
"instance",
"of",
"{",
"@",
"link",
"hystrix",
"properties",
"thread",
"pool",
"default",
"}"
]
| [
"public",
"hystrix",
"thread",
"pool",
"properties",
"get",
"thread",
"pool",
"properties",
"(",
"hystrix",
"thread",
"pool",
"key",
"thread",
"pool",
"key",
",",
"hystrix",
"thread",
"pool",
"properties",
"setter",
"builder",
")",
"{",
"return",
"new",
"hystrix",
"properties",
"thread",
"pool",
"default",
"(",
"thread",
"pool",
"key",
",",
"builder",
")",
";",
"}"
]
|
[
"get",
"array",
"item"
]
| [
"public",
"list",
"<",
"integer",
">",
"get",
"array",
"item",
"(",
")",
"{",
"return",
"array",
"item",
";",
"}"
]
|
[
"model",
"tests",
"for",
"additional",
"properties",
"class"
]
| [
"public",
"void",
"test",
"additional",
"properties",
"class",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"additional",
"properties",
"class",
"}"
]
|
[
"return",
"the",
"{",
"@",
"code",
"x",
"m",
"l",
"event",
"reader",
"}",
"used",
"by",
"this",
"{",
"@",
"code",
"stax",
"source",
"}",
"if",
"this",
"{",
"@",
"code",
"stax",
"source",
"}",
"was",
"created",
"with",
"an",
"{",
"@",
"code",
"x",
"m",
"l",
"stream",
"reader",
"}",
",",
"the",
"result",
"will",
"be",
"{",
"@",
"code",
"null",
"}"
]
| [
"x",
"m",
"l",
"event",
"reader",
"get",
"x",
"m",
"l",
"event",
"reader",
"(",
")",
"{",
"return",
"this",
"event",
"reader",
";",
"}"
]
|
[
"should",
"be",
"called",
"when",
"the",
"scheduler",
"assigns",
"a",
"container",
"at",
"a",
"higher",
"degree",
"of",
"locality",
"than",
"the",
"current",
"threshold",
"reset",
"the",
"allowed",
"locality",
"level",
"to",
"a",
"higher",
"degree",
"of",
"locality"
]
| [
"void",
"reset",
"allowed",
"locality",
"level",
"(",
"scheduler",
"request",
"key",
"scheduler",
"key",
",",
"node",
"type",
"level",
")",
"{",
"node",
"type",
"old",
";",
"write",
"lock",
"lock",
"(",
")",
";",
"try",
"{",
"old",
"=",
"allowed",
"locality",
"level",
"put",
"(",
"scheduler",
"key",
",",
"level",
")",
";",
"}",
"finally",
"{",
"write",
"lock",
"unlock",
"(",
")",
";",
"}",
"log",
"info",
"(",
"\"",
"raising",
"locality",
"level",
"from",
"\"",
"+",
"old",
"+",
"\"",
"to",
"\"",
"+",
"level",
"+",
"\"",
"at",
"\"",
"+",
"\"",
"priority",
"\"",
"+",
"scheduler",
"key",
"get",
"priority",
"(",
")",
")",
";",
"}"
]
|
[
"returns",
"the",
"concatenation",
"of",
"8",
"-",
"bit",
",",
"length",
"prefixed",
"protocol",
"names",
"http",
":",
"tools",
"ietf",
"orghtmldraft",
"-",
"agl",
"-",
"tls",
"-",
"nextprotoneg",
"-",
"04",
"#",
"page",
"-",
"4"
]
| [
"public",
"static",
"byte",
"[",
"]",
"concat",
"length",
"prefixed",
"(",
"list",
"<",
"protocol",
">",
"protocols",
")",
"{",
"buffer",
"result",
"=",
"new",
"buffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"protocols",
"size",
"(",
")",
";",
"i",
"<",
"size",
";",
"i",
"+",
"+",
")",
"{",
"protocol",
"protocol",
"=",
"protocols",
"get",
"(",
"i",
")",
";",
"if",
"(",
"protocol",
"=",
"=",
"protocol",
"http",
"1",
"0",
")",
"continue",
";",
"/",
"/",
"no",
"http",
"/",
"1",
"0",
"for",
"alpn",
"result",
"write",
"byte",
"(",
"protocol",
"to",
"string",
"(",
")",
"length",
"(",
")",
")",
";",
"result",
"write",
"utf",
"8",
"(",
"protocol",
"to",
"string",
"(",
")",
")",
";",
"}",
"return",
"result",
"read",
"byte",
"array",
"(",
")",
";",
"}"
]
|
[
"http",
":",
"gbiv",
"comprotocolsurirfcrfc",
"2",
"3",
"9",
"6",
"html",
"#",
"rfc",
"section",
"c",
"2"
]
| [
"public",
"void",
"test",
"rfc",
"2",
"3",
"9",
"6",
"abnormal",
"(",
")",
"{",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"g",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"/",
"/",
"g",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"/",
"g",
"/",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"/",
"h",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"/",
"/",
"h",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"h",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
"/",
"/",
"h",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
";",
"x",
"=",
"1",
"/",
"y",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
";",
"x",
"=",
"1",
"/",
"/",
"y",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"y",
"\"",
",",
"simplify",
"path",
"(",
"\"",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"g",
";",
"x",
"=",
"1",
"/",
"/",
"y",
"\"",
")",
")",
";",
"}"
]
|
[
"test",
"that",
"the",
"number",
"of",
"safe",
"blocks",
"is",
"accounted",
"correctly",
"even",
"when",
"blocks",
"move",
"between",
"under",
"-",
"construction",
"state",
"and",
"completed",
"state",
"if",
"a",
"finalized",
"report",
"arrives",
"at",
"the",
"sbn",
"before",
"the",
"block",
"is",
"marked",
"complete",
",",
"then",
"when",
"we",
"get",
"the",
"op",
"close",
"we",
"need",
"to",
"count",
"it",
"as",
"\"",
"safe",
"\"",
"at",
"that",
"point",
"this",
"is",
"a",
"regression",
"test",
"for",
"hdfs",
"-",
"2742"
]
| [
"private",
"void",
"test",
"safe",
"block",
"tracking",
"(",
"boolean",
"no",
"first",
"block",
"report",
")",
"throws",
"exception",
"{",
"banner",
"(",
"\"",
"starting",
"with",
"nn0",
"active",
"and",
"nn1",
"standby",
",",
"creating",
"some",
"\"",
"+",
"\"",
"uc",
"blocks",
"plus",
"some",
"other",
"blocks",
"to",
"force",
"safemode",
"\"",
")",
";",
"d",
"f",
"s",
"test",
"util",
"create",
"file",
"(",
"fs",
",",
"new",
"path",
"(",
"\"",
"/",
"other",
"-",
"blocks",
"\"",
")",
",",
"10",
"*",
"block",
"size",
",",
"(",
"short",
")",
"3",
",",
"1l",
")",
";",
"list",
"<",
"f",
"s",
"data",
"output",
"stream",
">",
"stms",
"=",
"lists",
"new",
"array",
"list",
"(",
")",
";",
"try",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"5",
";",
"i",
"+",
"+",
")",
"{",
"f",
"s",
"data",
"output",
"stream",
"stm",
"=",
"fs",
"create",
"(",
"new",
"path",
"(",
"\"",
"/",
"test",
"-",
"uc",
"-",
"\"",
"+",
"i",
")",
")",
";",
"stms",
"add",
"(",
"stm",
")",
";",
"stm",
"write",
"(",
"1",
")",
";",
"stm",
"hflush",
"(",
")",
";",
"}",
"/",
"/",
"roll",
"edit",
"log",
"so",
"that",
",",
"when",
"the",
"sbn",
"restarts",
",",
"it",
"will",
"load",
"/",
"/",
"the",
"namespace",
"during",
"startup",
"and",
"enter",
"safemode",
"nn",
"0",
"get",
"rpc",
"server",
"(",
")",
"roll",
"edit",
"log",
"(",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"no",
"first",
"block",
"report",
")",
"{",
"cluster",
"shutdown",
"name",
"node",
"(",
"1",
")",
";",
"}",
"for",
"(",
"f",
"s",
"data",
"output",
"stream",
"stm",
":",
"stms",
")",
"{",
"i",
"o",
"utils",
"close",
"stream",
"(",
"stm",
")",
";",
"}",
"}",
"banner",
"(",
"\"",
"restarting",
"sbn",
"\"",
")",
";",
"restart",
"standby",
"(",
")",
";",
"assert",
"safe",
"mode",
"(",
"nn",
"1",
",",
"10",
",",
"10",
",",
"3",
",",
"0",
")",
";",
"banner",
"(",
"\"",
"allowing",
"sbn",
"to",
"catch",
"up",
"\"",
")",
";",
"h",
"a",
"test",
"util",
"wait",
"for",
"standby",
"to",
"catch",
"up",
"(",
"nn",
"0",
",",
"nn",
"1",
")",
";",
"assert",
"safe",
"mode",
"(",
"nn",
"1",
",",
"15",
",",
"15",
",",
"3",
",",
"0",
")",
";",
"}"
]
|
[
"returns",
"the",
"generic",
"calling",
"convention",
"which",
"is",
"likely",
"to",
"correspond",
"with",
"the",
"specified",
"prototype",
"name"
]
| [
"public",
"static",
"generic",
"calling",
"convention",
"guess",
"from",
"name",
"(",
"string",
"calling",
"convention",
")",
"{",
"if",
"(",
"calling",
"convention",
"=",
"=",
"null",
")",
"{",
"return",
"unknown",
";",
"}",
"calling",
"convention",
"=",
"calling",
"convention",
"to",
"lower",
"case",
"(",
")",
";",
"for",
"(",
"generic",
"calling",
"convention",
"value",
":",
"generic",
"calling",
"convention",
"values",
"(",
")",
")",
"{",
"if",
"(",
"value",
"=",
"=",
"unknown",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"calling",
"convention",
"contains",
"(",
"value",
"name",
"(",
")",
")",
")",
"{",
"return",
"value",
";",
"}",
"}",
"return",
"unknown",
";",
"}"
]
|
[
"starts",
"periodic",
"updates",
"of",
"the",
"{",
"@",
"link",
"text",
"view",
"}",
"must",
"be",
"called",
"from",
"the",
"application",
"'",
"s",
"main",
"thread"
]
| [
"public",
"final",
"void",
"start",
"(",
")",
"{",
"if",
"(",
"started",
")",
"{",
"return",
";",
"}",
"started",
"=",
"true",
";",
"player",
"add",
"listener",
"(",
"this",
")",
";",
"update",
"and",
"post",
"(",
")",
";",
"}"
]
|
[
"return",
"the",
"string",
"representation",
"of",
"the",
"object",
"in",
"the",
"output",
"format",
"for",
"description",
"of",
"the",
"options",
","
]
| [
"public",
"string",
"to",
"string",
"(",
"boolean",
"q",
"option",
",",
"boolean",
"h",
"option",
",",
"boolean",
"t",
"option",
",",
"list",
"<",
"storage",
"type",
">",
"types",
")",
"{",
"return",
"to",
"string",
"(",
"q",
"option",
",",
"h",
"option",
",",
"t",
"option",
",",
"false",
",",
"types",
")",
";",
"}"
]
|
[
"build",
"properties",
"for",
"the",
"driver",
",",
"including",
"the",
"given",
"username",
"and",
"password",
"(",
"if",
"any",
")",
",",
"and",
"obtain",
"a",
"corresponding",
"connection"
]
| [
"protected",
"connection",
"get",
"connection",
"from",
"driver",
"(",
"@",
"nullable",
"string",
"username",
",",
"@",
"nullable",
"string",
"password",
")",
"throws",
"s",
"q",
"l",
"exception",
"{",
"properties",
"merged",
"props",
"=",
"new",
"properties",
"(",
")",
";",
"properties",
"conn",
"props",
"=",
"get",
"connection",
"properties",
"(",
")",
";",
"if",
"(",
"conn",
"props",
"!",
"=",
"null",
")",
"{",
"merged",
"props",
"put",
"all",
"(",
"conn",
"props",
")",
";",
"}",
"if",
"(",
"username",
"!",
"=",
"null",
")",
"{",
"merged",
"props",
"set",
"property",
"(",
"\"",
"user",
"\"",
",",
"username",
")",
";",
"}",
"if",
"(",
"password",
"!",
"=",
"null",
")",
"{",
"merged",
"props",
"set",
"property",
"(",
"\"",
"password",
"\"",
",",
"password",
")",
";",
"}",
"connection",
"con",
"=",
"get",
"connection",
"from",
"driver",
"(",
"merged",
"props",
")",
";",
"if",
"(",
"this",
"catalog",
"!",
"=",
"null",
")",
"{",
"con",
"set",
"catalog",
"(",
"this",
"catalog",
")",
";",
"}",
"if",
"(",
"this",
"schema",
"!",
"=",
"null",
")",
"{",
"con",
"set",
"schema",
"(",
"this",
"schema",
")",
";",
"}",
"return",
"con",
";",
"}"
]
|
[
"called",
"immediately",
"after",
"a",
"model",
"is",
"unbound",
"from",
"a",
"view",
"holder",
"subclasses",
"can",
"override",
"this",
"if",
"they",
"want",
"alerts",
"on",
"when",
"a",
"model",
"is",
"unbound",
"alternatively",
"you",
"may",
"attach",
"a",
"listener",
"directly",
"to",
"a",
"generated",
"model",
"with",
"model",
"on",
"unbind",
"(",
")"
]
| [
"protected",
"void",
"on",
"model",
"unbound",
"(",
"@",
"non",
"null",
"epoxy",
"view",
"holder",
"holder",
",",
"@",
"non",
"null",
"epoxy",
"model",
"<",
"?",
">",
"model",
")",
"{",
"}"
]
|
[
"returns",
"a",
"retained",
"slice",
"of",
"this",
"buffer",
"'",
"s",
"readable",
"bytes",
"modifying",
"the",
"content",
"of",
"the",
"returned",
"buffer",
"or",
"this",
"buffer",
"affects",
"each",
"other",
"'",
"s",
"content",
"while",
"they",
"maintain",
"separate",
"indexes",
"and",
"marks",
"this",
"method",
"is",
"identical",
"to",
"{",
"@",
"code",
"buf",
"slice",
"(",
"buf",
"reader",
"index",
"(",
")",
",",
"buf",
"readable",
"bytes",
"(",
")",
")",
"}",
"this",
"method",
"does",
"not",
"modify",
"{",
"@",
"code",
"reader",
"index",
"}",
"or",
"{",
"@",
"code",
"writer",
"index",
"}",
"of",
"this",
"buffer",
"note",
"that",
"this",
"method",
"returns",
"a",
"{",
"@",
"linkplain",
"#",
"retain",
"(",
")",
"retained",
"}",
"buffer",
"unlike",
"{",
"@",
"link",
"#",
"slice",
"(",
")",
"}",
"this",
"method",
"behaves",
"similarly",
"to",
"{",
"@",
"code",
"slice",
"(",
")",
"retain",
"(",
")",
"}",
"except",
"that",
"this",
"method",
"may",
"return",
"a",
"buffer",
"implementation",
"that",
"produces",
"less",
"garbage"
]
| [
"public",
"abstract",
"byte",
"buf",
"retained",
"slice",
"(",
")",
";"
]
|
[
"test",
"the",
"property",
"'",
"class",
"name",
"'"
]
| [
"public",
"void",
"class",
"name",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"class",
"name",
"}"
]
|
[
"this",
"matcher",
"performs",
"similar",
"comparison",
"to",
"{",
"@",
"link",
"org",
"hamcrest",
"core",
"is",
"equal",
"}",
",",
"which",
"resembles",
"{",
"@",
"link",
"java",
"util",
"objects",
"#",
"deep",
"equals",
"(",
"object",
",",
"object",
")",
"}",
"logic",
"the",
"only",
"difference",
"here",
"is",
"that",
"{",
"@",
"link",
"tuple",
"}",
"s",
"are",
"treated",
"similarly",
"to",
"arrays",
"this",
"means",
"that",
"if",
"we",
"compare",
"two",
"tuples",
"that",
"contain",
"arrays",
",",
"those",
"arrays",
"will",
"be",
"compared",
"with",
"{",
"@",
"link",
"arrays",
"#",
"deep",
"equals",
"(",
"object",
"[",
"]",
",",
"object",
"[",
"]",
")",
"}",
"rather",
"than",
"with",
"reference",
"comparison"
]
| [
"public",
"static",
"custom",
"equality",
"matcher",
"deeply",
"equals",
"(",
"object",
"item",
")",
"{",
"return",
"new",
"custom",
"equality",
"matcher",
"(",
"item",
",",
"new",
"deeply",
"equals",
"checker",
"(",
")",
")",
";",
"}"
]
|
[
"release",
"the",
"resource",
"used",
"by",
"the",
"parser",
"util"
]
| [
"@",
"override",
"public",
"final",
"void",
"close",
"(",
")",
"{",
"history",
"skyline",
"store",
"=",
"null",
";",
"}"
]
|
[
"return",
"the",
"list",
"of",
"sub",
"-",
"protocols",
"supported",
"by",
"this",
"handler",
"by",
"default",
"an",
"empty",
"list",
"is",
"returned"
]
| [
"default",
"list",
"<",
"string",
">",
"get",
"sub",
"protocols",
"(",
")",
"{",
"return",
"collections",
"empty",
"list",
"(",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"final",
"int",
"hash",
"code",
"(",
")",
"{",
"return",
"(",
"int",
")",
"bits",
"^",
"(",
"int",
")",
"(",
"bits",
">",
">",
"32",
")",
";",
"}"
]
|
[
"determine",
"the",
"lifecycle",
"phase",
"of",
"the",
"given",
"bean",
"the",
"default",
"implementation",
"checks",
"for",
"the",
"{",
"@",
"link",
"phased",
"}",
"interface",
",",
"using",
"a",
"default",
"of",
"0",
"otherwise",
"can",
"be",
"overridden",
"to",
"apply",
"otherfurther",
"policies"
]
| [
"protected",
"int",
"get",
"phase",
"(",
"lifecycle",
"bean",
")",
"{",
"return",
"(",
"bean",
"instanceof",
"phased",
"?",
"(",
"(",
"phased",
")",
"bean",
")",
"get",
"phase",
"(",
")",
":",
"0",
")",
";",
"}"
]
|
[
"checks",
"if",
"any",
"of",
"the",
"contained",
"media",
"type",
"expressions",
"match",
"the",
"given",
"request",
"'",
"content",
"-",
"type",
"'",
"header",
"and",
"returns",
"an",
"instance",
"that",
"is",
"guaranteed",
"to",
"contain",
"matching",
"expressions",
"only",
"the",
"match",
"is",
"performed",
"via",
"{",
"@",
"link",
"media",
"type",
"#",
"is",
"compatible",
"with",
"(",
"media",
"type",
")",
"}"
]
| [
"public",
"produces",
"request",
"condition",
"get",
"matching",
"condition",
"(",
"server",
"web",
"exchange",
"exchange",
")",
"{",
"if",
"(",
"cors",
"utils",
"is",
"pre",
"flight",
"request",
"(",
"exchange",
"get",
"request",
"(",
")",
")",
")",
"{",
"return",
"empty",
"condition",
";",
"}",
"if",
"(",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"this",
";",
"}",
"list",
"<",
"produce",
"media",
"type",
"expression",
">",
"result",
"=",
"get",
"matching",
"expressions",
"(",
"exchange",
")",
";",
"if",
"(",
"!",
"collection",
"utils",
"is",
"empty",
"(",
"result",
")",
")",
"{",
"return",
"new",
"produces",
"request",
"condition",
"(",
"result",
",",
"this",
")",
";",
"}",
"else",
"{",
"try",
"{",
"if",
"(",
"media",
"type",
"all",
"is",
"present",
"in",
"(",
"get",
"accepted",
"media",
"types",
"(",
"exchange",
")",
")",
")",
"{",
"return",
"empty",
"condition",
";",
"}",
"}",
"catch",
"(",
"not",
"acceptable",
"status",
"exception",
"|",
"unsupported",
"media",
"type",
"status",
"exception",
"ex",
")",
"{",
"/",
"/",
"ignore",
"}",
"}",
"return",
"null",
";",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.