docstring_tokens
list | code_tokens
list |
---|---|
[
"child",
"class",
"implements",
"this",
"method",
"to",
"realize",
"{",
"@",
"code",
"array",
"offset",
"(",
")",
"}"
]
| [
"abstract",
"int",
"protected",
"array",
"offset",
"(",
")",
";"
]
|
[
"called",
"when",
"conditions",
"justify",
"shutting",
"down",
"the",
"output",
"portion",
"of",
"the",
"channel",
"this",
"may",
"happen",
"if",
"a",
"write",
"operation",
"throws",
"an",
"exception"
]
| [
"protected",
"void",
"do",
"shutdown",
"output",
"(",
")",
"throws",
"exception",
"{",
"do",
"close",
"(",
")",
";",
"}"
]
|
[
"convert",
"the",
"entity",
"from",
"a",
"{",
"@",
"link",
"response",
"}",
"into",
"a",
"list",
"of",
"maps"
]
| [
"public",
"static",
"list",
"<",
"object",
">",
"entity",
"as",
"list",
"(",
"response",
"response",
")",
"throws",
"i",
"o",
"exception",
"{",
"x",
"content",
"type",
"x",
"content",
"type",
"=",
"x",
"content",
"type",
"from",
"media",
"type",
"(",
"response",
"get",
"entity",
"(",
")",
"get",
"content",
"type",
"(",
")",
"get",
"value",
"(",
")",
")",
";",
"/",
"/",
"empty",
"and",
"throw",
"are",
"fine",
"here",
"because",
"`",
"map",
"`",
"doesn",
"'",
"t",
"use",
"named",
"x",
"content",
"or",
"deprecation",
"try",
"(",
"x",
"content",
"parser",
"parser",
"=",
"x",
"content",
"type",
"x",
"content",
"(",
")",
"create",
"parser",
"(",
"named",
"x",
"content",
"registry",
"empty",
",",
"deprecation",
"handler",
"throw",
"unsupported",
"operation",
",",
"response",
"get",
"entity",
"(",
")",
"get",
"content",
"(",
")",
")",
")",
"{",
"return",
"parser",
"list",
"(",
")",
";",
"}",
"}"
]
|
[
"gets",
"the",
"maximum",
"time",
"that",
"a",
"checkpoint",
"may",
"take",
"before",
"being",
"discarded"
]
| [
"public",
"long",
"get",
"checkpoint",
"timeout",
"(",
")",
"{",
"return",
"checkpoint",
"timeout",
";",
"}"
]
|
[
"marks",
"this",
"output",
"as",
"idle",
",",
"meaning",
"that",
"downstream",
"operations",
"do",
"not",
"wait",
"for",
"watermarks",
"from",
"this",
"output",
"an",
"output",
"becomes",
"active",
"again",
"as",
"soon",
"as",
"the",
"next",
"watermark",
"is",
"emitted"
]
| [
"void",
"mark",
"idle",
"(",
")",
";"
]
|
[
"determines",
"if",
"an",
"artifact",
"is",
"derived",
",",
"that",
"is",
",",
"its",
"root",
"is",
"a",
"derived",
"root",
"or",
"its",
"exec",
"path",
"starts",
"with",
"the",
"bazel",
"-",
"out",
"prefix"
]
| [
"boolean",
"is",
"derived",
"artifact",
"(",
"path",
"fragment",
"exec",
"path",
")",
"{",
"return",
"exec",
"path",
"starts",
"with",
"(",
"derived",
"path",
"prefix",
")",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"name",
"'"
]
| [
"public",
"void",
"name",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"name",
"}"
]
|
[
"creates",
"a",
"new",
"mapper",
"service",
"to",
"do",
"administrative",
"work",
"like",
"mapping",
"updates",
"this",
"should",
"not",
"be",
"used",
"for",
"document",
"parsing",
"doing",
"so",
"will",
"result",
"in",
"an",
"exception"
]
| [
"public",
"mapper",
"service",
"new",
"index",
"mapper",
"service",
"(",
"named",
"x",
"content",
"registry",
"x",
"content",
"registry",
",",
"mapper",
"registry",
"mapper",
"registry",
",",
"script",
"service",
"script",
"service",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"new",
"mapper",
"service",
"(",
"index",
"settings",
",",
"analysis",
"registry",
"build",
"(",
"index",
"settings",
")",
",",
"x",
"content",
"registry",
",",
"new",
"similarity",
"service",
"(",
"index",
"settings",
",",
"script",
"service",
",",
"similarities",
")",
",",
"mapper",
"registry",
",",
"(",
")",
"-",
">",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
"\"",
"no",
"index",
"query",
"shard",
"context",
"available",
"\"",
")",
";",
"}",
",",
"(",
")",
"-",
">",
"false",
",",
"script",
"service",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"void",
"visit",
"throwing",
"cst",
"insn",
"(",
"throwing",
"cst",
"insn",
"insn",
")",
"{",
"super",
"visit",
"throwing",
"cst",
"insn",
"(",
"insn",
")",
";",
"add",
"introduction",
"if",
"necessary",
"(",
"insn",
")",
";",
"}"
]
|
[
"returns",
"the",
"coverage",
"metadata",
"artifact",
"generated",
"in",
"the",
"transitive",
"closure"
]
| [
"public",
"artifact",
"get",
"coverage",
"metadata",
"(",
")",
"{",
"return",
"coverage",
"metadata",
";",
"}"
]
|
[
"deletes",
"all",
"the",
"contents",
"of",
"this",
"directory",
",",
"but",
"not",
"the",
"directory",
"itself"
]
| [
"public",
"void",
"delete",
"contents",
"(",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
"{",
"act",
"(",
"new",
"delete",
"contents",
"(",
")",
")",
";",
"}"
]
|
[
"verify",
"that",
"the",
"a",
"c",
"ls",
"are",
"fetched",
"when",
"configured"
]
| [
"public",
"void",
"test",
"import",
"acl",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"conf",
"set",
"boolean",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"provided",
"acls",
"import",
"enabled",
",",
"true",
")",
";",
"file",
"system",
"fs",
"=",
"mock",
"(",
"file",
"system",
"class",
")",
";",
"path",
"root",
"=",
"mock",
"(",
"path",
"class",
")",
";",
"when",
"(",
"root",
"get",
"file",
"system",
"(",
"conf",
")",
")",
"then",
"return",
"(",
"fs",
")",
";",
"map",
"<",
"path",
",",
"file",
"status",
">",
"expected",
"children",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"file",
"status",
"child",
"1",
"=",
"new",
"file",
"status",
"(",
"0",
",",
"true",
",",
"0",
",",
"0",
",",
"1",
",",
"new",
"path",
"(",
"\"",
"/",
"a",
"\"",
")",
")",
";",
"file",
"status",
"child",
"2",
"=",
"new",
"file",
"status",
"(",
"0",
",",
"true",
",",
"0",
",",
"0",
",",
"1",
",",
"new",
"path",
"(",
"\"",
"/",
"b",
"\"",
")",
")",
";",
"expected",
"children",
"put",
"(",
"child",
"1",
"get",
"path",
"(",
")",
",",
"child",
"1",
")",
";",
"expected",
"children",
"put",
"(",
"child",
"2",
"get",
"path",
"(",
")",
",",
"child",
"2",
")",
";",
"when",
"(",
"fs",
"list",
"status",
"(",
"root",
")",
")",
"then",
"return",
"(",
"expected",
"children",
"values",
"(",
")",
"to",
"array",
"(",
"new",
"file",
"status",
"[",
"1",
"]",
")",
")",
";",
"acl",
"status",
"expected",
"acls",
"=",
"mock",
"(",
"acl",
"status",
"class",
")",
";",
"when",
"(",
"fs",
"get",
"acl",
"status",
"(",
"any",
"(",
"path",
"class",
")",
")",
")",
"then",
"return",
"(",
"expected",
"acls",
")",
";",
"f",
"s",
"tree",
"walk",
"fs",
"tree",
"walk",
"=",
"new",
"f",
"s",
"tree",
"walk",
"(",
"root",
",",
"conf",
")",
";",
"file",
"status",
"root",
"file",
"status",
"=",
"new",
"file",
"status",
"(",
"0",
",",
"true",
",",
"0",
",",
"0",
",",
"1",
",",
"root",
")",
";",
"tree",
"path",
"tree",
"path",
"=",
"new",
"tree",
"path",
"(",
"root",
"file",
"status",
",",
"1",
",",
"null",
")",
";",
"iterable",
"<",
"tree",
"path",
">",
"result",
"=",
"fs",
"tree",
"walk",
"get",
"children",
"(",
"tree",
"path",
",",
"1",
",",
"null",
")",
";",
"for",
"(",
"tree",
"path",
"path",
":",
"result",
")",
"{",
"file",
"status",
"expected",
"child",
"status",
"=",
"expected",
"children",
"remove",
"(",
"path",
"get",
"file",
"status",
"(",
")",
"get",
"path",
"(",
")",
")",
";",
"assert",
"not",
"null",
"(",
"expected",
"child",
"status",
")",
";",
"acl",
"status",
"child",
"acl",
"=",
"path",
"get",
"acl",
"status",
"(",
")",
";",
"assert",
"equals",
"(",
"expected",
"acls",
",",
"child",
"acl",
")",
";",
"}",
"assert",
"equals",
"(",
"0",
",",
"expected",
"children",
"size",
"(",
")",
")",
";",
"}"
]
|
[
"transform",
"a",
"path",
"to",
"an",
"input",
"file",
"provider",
"that",
"needs",
"to",
"be",
"closed",
"by",
"the",
"caller"
]
| [
"public",
"static",
"input",
"file",
"provider",
"open",
"(",
"path",
"path",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"files",
"is",
"directory",
"(",
"path",
")",
")",
"{",
"return",
"new",
"directory",
"input",
"file",
"provider",
"(",
"path",
")",
";",
"}",
"else",
"{",
"return",
"new",
"zip",
"input",
"file",
"provider",
"(",
"path",
")",
";",
"}",
"}"
]
|
[
"get",
"the",
"double",
"array",
"contained",
"with",
"this",
"field"
]
| [
"public",
"double",
"[",
"]",
"get",
"double",
"array",
"(",
")",
"{",
"if",
"(",
"double",
"array",
"!",
"=",
"data",
"[",
"data",
"type",
"offset",
"]",
")",
"{",
"throw",
"new",
"illegal",
"field",
"access",
"exception",
"(",
")",
";",
"}",
"if",
"(",
"data",
"[",
"data",
"offset",
"]",
"<",
"0",
")",
"{",
"return",
"null",
";",
"}",
"double",
"[",
"]",
"values",
"=",
"new",
"double",
"[",
"(",
"data",
"length",
"-",
"2",
")",
"/",
"8",
"]",
";",
"binary",
"data",
"buffer",
"buffer",
"=",
"new",
"binary",
"data",
"buffer",
"(",
"data",
")",
";",
"int",
"offset",
"=",
"data",
"offset",
"+",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"values",
"length",
";",
"i",
"+",
"+",
")",
"{",
"values",
"[",
"i",
"]",
"=",
"double",
"long",
"bits",
"to",
"double",
"(",
"buffer",
"get",
"long",
"(",
"offset",
")",
")",
";",
"offset",
"+",
"=",
"8",
";",
"}",
"return",
"values",
";",
"}"
]
|
[
"surrounds",
"this",
"subtext",
"with",
"the",
"specified",
"start",
"tag",
"and",
"the",
"end",
"tag",
"startend",
"tag",
"text",
"can",
"contain",
"special",
"tokens",
"\"",
"$",
"0",
"\"",
",",
"\"",
"$",
"1",
"\"",
",",
"and",
"they",
"will",
"be",
"replaced",
"by",
"their",
"{",
"@",
"link",
"#",
"group",
"(",
"int",
")",
"group",
"match",
"}",
"\"",
"\\",
"$",
"\"",
"can",
"be",
"used",
"to",
"escape",
"characters"
]
| [
"public",
"void",
"surround",
"with",
"(",
"string",
"start",
"tag",
",",
"string",
"end",
"tag",
")",
"{",
"add",
"markup",
"(",
"0",
",",
"length",
"(",
")",
",",
"replace",
"(",
"start",
"tag",
")",
",",
"replace",
"(",
"end",
"tag",
")",
")",
";",
"}"
]
|
[
"probe",
"for",
"a",
"specific",
"capability",
"under",
"the",
"given",
"path",
"if",
"the",
"function",
"returns",
"{",
"@",
"code",
"true",
"}",
",",
"this",
"instance",
"is",
"explicitly",
"declaring",
"that",
"the",
"capability",
"is",
"available",
"if",
"the",
"function",
"returns",
"{",
"@",
"code",
"false",
"}",
",",
"it",
"can",
"mean",
"one",
"of",
":",
"the",
"capability",
"is",
"not",
"known",
"the",
"capability",
"is",
"known",
"but",
"it",
"is",
"not",
"supported",
"the",
"capability",
"is",
"known",
"but",
"the",
"filesystem",
"does",
"not",
"know",
"if",
"it",
"is",
"supported",
"under",
"the",
"supplied",
"path",
"the",
"core",
"guarantee",
"which",
"a",
"caller",
"can",
"rely",
"on",
"is",
":",
"if",
"the",
"predicate",
"returns",
"true",
",",
"then",
"the",
"specific",
"operationbehavior",
"can",
"be",
"expected",
"to",
"be",
"supported",
"however",
"a",
"specific",
"call",
"may",
"be",
"rejected",
"for",
"permission",
"reasons",
",",
"the",
"actual",
"filedirectory",
"not",
"being",
"present",
",",
"or",
"some",
"other",
"failure",
"during",
"the",
"attempted",
"execution",
"of",
"the",
"operation",
"implementors",
":",
"{",
"@",
"link",
"org",
"apache",
"hadoop",
"fs",
"impl",
"path",
"capabilities",
"support",
"}",
"can",
"be",
"used",
"to",
"help",
"implement",
"this",
"method"
]
| [
"boolean",
"has",
"path",
"capability",
"(",
"path",
"path",
",",
"string",
"capability",
")",
"throws",
"i",
"o",
"exception",
";"
]
|
[
"add",
"a",
"listener",
"for",
"this",
"program",
"tree"
]
| [
"void",
"add",
"tree",
"listener",
"(",
"tree",
"listener",
"l",
")",
"{",
"tree",
"add",
"tree",
"listener",
"(",
"l",
")",
";",
"}"
]
|
[
"get",
"server",
"default",
"values",
"for",
"a",
"number",
"of",
"configuration",
"params"
]
| [
"fs",
"server",
"defaults",
"get",
"server",
"defaults",
"(",
")",
"throws",
"i",
"o",
"exception",
";"
]
|
[
"check",
"if",
"dfs",
"can",
"handle",
"corrupted",
"crc",
"blocks"
]
| [
"private",
"void",
"thistest",
"(",
"configuration",
"conf",
",",
"d",
"f",
"s",
"test",
"util",
"util",
")",
"throws",
"exception",
"{",
"mini",
"d",
"f",
"s",
"cluster",
"cluster",
"=",
"null",
";",
"int",
"num",
"data",
"nodes",
"=",
"2",
";",
"short",
"repl",
"factor",
"=",
"2",
";",
"random",
"random",
"=",
"new",
"random",
"(",
")",
";",
"/",
"/",
"set",
"short",
"retry",
"timeouts",
"so",
"this",
"test",
"runs",
"faster",
"conf",
"set",
"int",
"(",
"hdfs",
"client",
"config",
"keys",
"retry",
"window",
"base",
"key",
",",
"10",
")",
";",
"try",
"{",
"cluster",
"=",
"new",
"mini",
"d",
"f",
"s",
"cluster",
"builder",
"(",
"conf",
")",
"num",
"data",
"nodes",
"(",
"num",
"data",
"nodes",
")",
"build",
"(",
")",
";",
"cluster",
"wait",
"active",
"(",
")",
";",
"file",
"system",
"fs",
"=",
"cluster",
"get",
"file",
"system",
"(",
")",
";",
"util",
"create",
"files",
"(",
"fs",
",",
"\"",
"/",
"srcdat",
"\"",
",",
"repl",
"factor",
")",
";",
"util",
"wait",
"replication",
"(",
"fs",
",",
"\"",
"/",
"srcdat",
"\"",
",",
"(",
"short",
")",
"2",
")",
";",
"/",
"/",
"now",
"deliberately",
"remove",
"/",
"truncate",
"meta",
"blocks",
"from",
"the",
"first",
"/",
"/",
"directory",
"of",
"the",
"first",
"datanode",
"the",
"complete",
"absense",
"of",
"a",
"meta",
"/",
"/",
"file",
"disallows",
"this",
"datanode",
"to",
"send",
"data",
"to",
"another",
"datanode",
"/",
"/",
"however",
",",
"a",
"client",
"is",
"alowed",
"access",
"to",
"this",
"block",
"/",
"/",
"final",
"int",
"dn",
"idx",
"=",
"0",
";",
"final",
"data",
"node",
"dn",
"=",
"cluster",
"get",
"data",
"nodes",
"(",
")",
"get",
"(",
"dn",
"idx",
")",
";",
"final",
"string",
"bpid",
"=",
"cluster",
"get",
"namesystem",
"(",
")",
"get",
"block",
"pool",
"id",
"(",
")",
";",
"list",
"<",
"replica",
"info",
">",
"replicas",
"=",
"dn",
"get",
"f",
"s",
"dataset",
"(",
")",
"get",
"sorted",
"finalized",
"blocks",
"(",
"bpid",
")",
";",
"assert",
"true",
"(",
"\"",
"replicas",
"do",
"not",
"exist",
"\"",
",",
"!",
"replicas",
"is",
"empty",
"(",
")",
")",
";",
"for",
"(",
"int",
"idx",
"=",
"0",
";",
"idx",
"<",
"replicas",
"size",
"(",
")",
";",
"idx",
"+",
"+",
")",
"{",
"replica",
"info",
"replica",
"=",
"replicas",
"get",
"(",
"idx",
")",
";",
"extended",
"block",
"eb",
"=",
"new",
"extended",
"block",
"(",
"bpid",
",",
"replica",
")",
";",
"if",
"(",
"idx",
"%",
"3",
"=",
"=",
"0",
")",
"{",
"log",
"info",
"(",
"\"",
"deliberately",
"removing",
"meta",
"for",
"block",
"\"",
"+",
"eb",
")",
";",
"cluster",
"delete",
"meta",
"(",
"dn",
"idx",
",",
"eb",
")",
";",
"}",
"else",
"if",
"(",
"idx",
"%",
"3",
"=",
"=",
"1",
")",
"{",
"final",
"int",
"new",
"size",
"=",
"2",
";",
"/",
"/",
"bytes",
"log",
"info",
"(",
"\"",
"deliberately",
"truncating",
"meta",
"file",
"for",
"block",
"\"",
"+",
"eb",
"+",
"\"",
"to",
"size",
"\"",
"+",
"new",
"size",
"+",
"\"",
"bytes",
"\"",
")",
";",
"cluster",
"truncate",
"meta",
"(",
"dn",
"idx",
",",
"eb",
",",
"new",
"size",
")",
";",
"}",
"else",
"{",
"cluster",
"corrupt",
"meta",
"(",
"dn",
"idx",
",",
"eb",
")",
";",
"}",
"}",
"/",
"/",
"/",
"/",
"only",
"one",
"replica",
"is",
"possibly",
"corrupted",
"the",
"other",
"replica",
"should",
"still",
"/",
"/",
"be",
"good",
"verify",
"/",
"/",
"assert",
"true",
"(",
"\"",
"corrupted",
"replicas",
"not",
"handled",
"properly",
"\"",
",",
"util",
"check",
"files",
"(",
"fs",
",",
"\"",
"/",
"srcdat",
"\"",
")",
")",
";",
"log",
"info",
"(",
"\"",
"all",
"file",
"still",
"have",
"a",
"valid",
"replica",
"\"",
")",
";",
"/",
"/",
"/",
"/",
"set",
"replication",
"factor",
"back",
"to",
"1",
"this",
"causes",
"only",
"one",
"replica",
"of",
"/",
"/",
"of",
"each",
"block",
"to",
"remain",
"in",
"hdfs",
"the",
"check",
"is",
"to",
"make",
"sure",
"that",
"/",
"/",
"the",
"corrupted",
"replica",
"generated",
"above",
"is",
"the",
"one",
"that",
"gets",
"deleted",
"/",
"/",
"this",
"test",
"is",
"currently",
"disabled",
"until",
"hadoop",
"-",
"1557",
"is",
"solved",
"/",
"/",
"util",
"set",
"replication",
"(",
"fs",
",",
"\"",
"/",
"srcdat",
"\"",
",",
"(",
"short",
")",
"1",
")",
";",
"/",
"/",
"util",
"wait",
"replication",
"(",
"fs",
",",
"\"",
"/",
"srcdat",
"\"",
",",
"(",
"short",
")",
"1",
")",
";",
"/",
"/",
"system",
"out",
"println",
"(",
"\"",
"all",
"files",
"done",
"with",
"removing",
"replicas",
"\"",
")",
";",
"/",
"/",
"assert",
"true",
"(",
"\"",
"excess",
"replicas",
"deleted",
"corrupted",
"replicas",
"found",
"\"",
",",
"/",
"/",
"util",
"check",
"files",
"(",
"fs",
",",
"\"",
"/",
"srcdat",
"\"",
")",
")",
";",
"log",
"info",
"(",
"\"",
"the",
"excess",
"-",
"corrupted",
"-",
"replica",
"test",
"is",
"disabled",
"\"",
"+",
"\"",
"pending",
"hadoop",
"-",
"1557",
"\"",
")",
";",
"util",
"cleanup",
"(",
"fs",
",",
"\"",
"/",
"srcdat",
"\"",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"cluster",
"!",
"=",
"null",
")",
"{",
"cluster",
"shutdown",
"(",
")",
";",
"}",
"}",
"}"
]
|
[
"adds",
"a",
"string",
"to",
"the",
"preview",
"table"
]
| [
"public",
"void",
"add",
"preview",
"string",
"(",
"string",
"preview",
"text",
",",
"integer",
"index",
")",
"{",
"preview",
"string",
"map",
"put",
"(",
"index",
",",
"preview",
"text",
")",
";",
"refresh",
"view",
"(",
")",
";",
"}"
]
|
[
"get",
"the",
"data",
"from",
"the",
"bytes",
"writable"
]
| [
"public",
"byte",
"[",
"]",
"get",
"(",
")",
"{",
"return",
"get",
"bytes",
"(",
")",
";",
"}"
]
|
[
"gets",
"the",
"current",
"state",
"of",
"the",
"function",
"the",
"state",
"must",
"reflect",
"the",
"result",
"of",
"all",
"prior",
"invocations",
"to",
"this",
"function",
"the",
"returned",
"list",
"should",
"contain",
"one",
"entry",
"for",
"redistributable",
"unit",
"of",
"state",
"see",
"the",
"{",
"@",
"link",
"list",
"checkpointed",
"class",
"docs",
"}",
"for",
"an",
"illustration",
"how",
"list",
"-",
"style",
"state",
"redistribution",
"works",
"as",
"special",
"case",
",",
"the",
"returned",
"list",
"may",
"be",
"null",
"or",
"empty",
"(",
"if",
"the",
"operator",
"has",
"no",
"state",
")",
"or",
"it",
"may",
"contain",
"a",
"single",
"element",
"(",
"if",
"the",
"operator",
"state",
"is",
"indivisible",
")"
]
| [
"list",
"<",
"t",
">",
"snapshot",
"state",
"(",
"long",
"checkpoint",
"id",
",",
"long",
"timestamp",
")",
"throws",
"exception",
";"
]
|
[
"squeeze",
"multiple",
"empty",
"lines",
"into",
"a",
"single",
"line"
]
| [
"static",
"list",
"<",
"string",
">",
"skip",
"blanks",
"(",
"list",
"<",
"string",
">",
"lines",
")",
"{",
"boolean",
"skip",
"next",
"empty",
"=",
"false",
";",
"final",
"list",
"<",
"string",
">",
"output",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"lines",
"size",
"(",
")",
")",
";",
"for",
"(",
"final",
"string",
"line",
":",
"lines",
")",
"{",
"if",
"(",
"line",
"is",
"empty",
"(",
")",
")",
"{",
"if",
"(",
"skip",
"next",
"empty",
")",
"{",
"continue",
";",
"}",
"else",
"{",
"skip",
"next",
"empty",
"=",
"true",
";",
"}",
"}",
"else",
"{",
"skip",
"next",
"empty",
"=",
"false",
";",
"}",
"output",
"add",
"(",
"line",
")",
";",
"}",
"return",
"output",
";",
"}"
]
|
[
"check",
"if",
"identity",
"is",
"allowed",
"to",
"add",
"columns",
"to",
"the",
"specified",
"table",
"in",
"a",
"catalog"
]
| [
"default",
"void",
"check",
"can",
"add",
"column",
"(",
"identity",
"identity",
",",
"access",
"control",
"context",
"context",
",",
"catalog",
"schema",
"table",
"name",
"table",
")",
"{",
"deny",
"add",
"column",
"(",
"table",
"to",
"string",
"(",
")",
")",
";",
"}"
]
|
[
"gets",
"the",
"file",
"offset",
"of",
"the",
"start",
"of",
"the",
"mapping"
]
| [
"public",
"long",
"get",
"file",
"offset",
"(",
")",
"{",
"return",
"file",
"offset",
";",
"}"
]
|
[
"returns",
"an",
"unmodifiable",
"view",
"of",
"the",
"specified",
"sorted",
"multiset",
"query",
"operations",
"on",
"the",
"returned",
"multiset",
"\"",
"read",
"through",
"\"",
"to",
"the",
"specified",
"multiset",
",",
"and",
"attempts",
"to",
"modify",
"the",
"returned",
"multiset",
"result",
"in",
"an",
"{",
"@",
"link",
"unsupported",
"operation",
"exception",
"}",
"the",
"returned",
"multiset",
"will",
"be",
"serializable",
"if",
"the",
"specified",
"multiset",
"is",
"serializable"
]
| [
"public",
"static",
"<",
"e",
">",
"sorted",
"multiset",
"<",
"e",
">",
"unmodifiable",
"sorted",
"multiset",
"(",
"sorted",
"multiset",
"<",
"e",
">",
"sorted",
"multiset",
")",
"{",
"/",
"/",
"it",
"'",
"s",
"in",
"its",
"own",
"file",
"so",
"it",
"can",
"be",
"emulated",
"for",
"gwt",
"return",
"new",
"unmodifiable",
"sorted",
"multiset",
"<",
"e",
">",
"(",
"check",
"not",
"null",
"(",
"sorted",
"multiset",
")",
")",
";",
"}"
]
|
[
"the",
"source",
"file",
"information",
"of",
"the",
"parent",
"inheritance",
"declaration",
"<",
"code",
">",
"optional",
"aapt",
"pb",
"source",
"parent",
"source",
"=",
"2",
";",
"<",
"code",
">"
]
| [
"public",
"com",
"android",
"aapt",
"resources",
"source",
"get",
"parent",
"source",
"(",
")",
"{",
"return",
"parent",
"source",
"=",
"=",
"null",
"?",
"com",
"android",
"aapt",
"resources",
"source",
"get",
"default",
"instance",
"(",
")",
":",
"parent",
"source",
";",
"}"
]
|
[
"deletes",
"the",
"table",
"associated",
"with",
"the",
"given",
"bookmark",
"type"
]
| [
"void",
"delete",
"type",
"(",
"int",
"type",
"i",
"d",
")",
"throws",
"i",
"o",
"exception",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
")",
";",
"}"
]
|
[
"move",
"the",
"src",
"file",
"to",
"the",
"target",
"using",
"{",
"@",
"link",
"file",
"utils",
"#",
"move",
"file",
"(",
"file",
",",
"file",
")",
"}"
]
| [
"public",
"void",
"move",
"file",
"(",
"@",
"nullable",
"fs",
"volume",
"spi",
"volume",
",",
"file",
"src",
",",
"file",
"target",
")",
"throws",
"i",
"o",
"exception",
"{",
"final",
"long",
"begin",
"=",
"profiling",
"event",
"hook",
"before",
"metadata",
"op",
"(",
"volume",
",",
"move",
")",
";",
"try",
"{",
"fault",
"injector",
"event",
"hook",
"before",
"metadata",
"op",
"(",
"volume",
",",
"move",
")",
";",
"file",
"utils",
"move",
"file",
"(",
"src",
",",
"target",
")",
";",
"profiling",
"event",
"hook",
"after",
"metadata",
"op",
"(",
"volume",
",",
"move",
",",
"begin",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"on",
"failure",
"(",
"volume",
",",
"begin",
")",
";",
"throw",
"e",
";",
"}",
"}"
]
|
[
"gets",
"a",
"handle",
"to",
"the",
"system",
"'",
"s",
"keyvalue",
"reducing",
"state",
"this",
"state",
"is",
"similar",
"to",
"the",
"state",
"accessed",
"via",
"{",
"@",
"link",
"#",
"get",
"state",
"(",
"value",
"state",
"descriptor",
")",
"}",
",",
"but",
"is",
"optimized",
"for",
"state",
"that",
"aggregates",
"values",
"this",
"state",
"is",
"only",
"accessible",
"if",
"the",
"function",
"is",
"executed",
"on",
"a",
"keyed",
"stream",
"{",
"@",
"code",
"data",
"stream",
"<",
"my",
"type",
">",
"stream",
"=",
";",
"keyed",
"stream",
"<",
"my",
"type",
">",
"keyed",
"stream",
"=",
"stream",
"key",
"by",
"(",
"\"",
"id",
"\"",
")",
";",
"keyed",
"stream",
"map",
"(",
"new",
"rich",
"map",
"function",
"<",
"my",
"type",
",",
"list",
"<",
"my",
"type",
">",
">",
"(",
")",
"{",
"private",
"reducing",
"state",
"<",
"long",
">",
"state",
";",
"public",
"void",
"open",
"(",
"configuration",
"cfg",
")",
"{",
"state",
"=",
"get",
"runtime",
"context",
"(",
")",
"get",
"reducing",
"state",
"(",
"new",
"reducing",
"state",
"descriptor",
"<",
">",
"(",
"\"",
"sum",
"\"",
",",
"(",
"a",
",",
"b",
")",
"-",
">",
"a",
"+",
"b",
",",
"long",
"class",
")",
")",
";",
"}",
"public",
"tuple",
"2",
"<",
"my",
"type",
",",
"long",
">",
"map",
"(",
"my",
"type",
"value",
")",
"{",
"state",
"add",
"(",
"value",
"count",
"(",
")",
")",
";",
"return",
"new",
"tuple",
"2",
"<",
">",
"(",
"value",
",",
"state",
"get",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"}"
]
| [
"<",
"t",
">",
"reducing",
"state",
"<",
"t",
">",
"get",
"reducing",
"state",
"(",
"reducing",
"state",
"descriptor",
"<",
"t",
">",
"state",
"properties",
")",
";"
]
|
[
"unregisters",
"and",
"removes",
"the",
"passed",
"in",
"partitions",
"from",
"the",
"set",
"of",
"changelogs"
]
| [
"void",
"unregister",
"(",
"final",
"collection",
"<",
"topic",
"partition",
">",
"removed",
"partitions",
")",
";"
]
|
[
"static",
"utility",
"to",
"parse",
"a",
"field",
"of",
"type",
"double",
"from",
"a",
"byte",
"sequence",
"that",
"represents",
"text",
"characters",
"(",
"such",
"as",
"when",
"read",
"from",
"a",
"file",
"stream",
")"
]
| [
"public",
"static",
"final",
"double",
"parse",
"field",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"start",
"pos",
",",
"int",
"length",
")",
"{",
"return",
"parse",
"field",
"(",
"bytes",
",",
"start",
"pos",
",",
"length",
",",
"(",
"char",
")",
"0xffff",
")",
";",
"}"
]
|
[
"save",
"or",
"update",
"metadata",
"document",
"in",
"the",
"source"
]
| [
"default",
"void",
"save",
"or",
"update",
"(",
"final",
"saml",
"metadata",
"document",
"document",
")",
"{",
"throw",
"new",
"not",
"implemented",
"exception",
"(",
"\"",
"operation",
"save",
"or",
"update",
"is",
"not",
"implemented",
"/",
"supported",
"\"",
")",
";",
"}"
]
|
[
"parse",
"command",
"line",
"arguments"
]
| [
"static",
"balancer",
"parameters",
"parse",
"(",
"string",
"[",
"]",
"args",
")",
"{",
"set",
"<",
"string",
">",
"excluded",
"nodes",
"=",
"null",
";",
"set",
"<",
"string",
">",
"included",
"nodes",
"=",
"null",
";",
"balancer",
"parameters",
"builder",
"b",
"=",
"new",
"balancer",
"parameters",
"builder",
"(",
")",
";",
"if",
"(",
"args",
"!",
"=",
"null",
")",
"{",
"try",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
"length",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"\"",
"-",
"threshold",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"check",
"argument",
"(",
"+",
"+",
"i",
"<",
"args",
"length",
",",
"\"",
"threshold",
"value",
"is",
"missing",
":",
"args",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"args",
")",
")",
";",
"try",
"{",
"double",
"threshold",
"=",
"double",
"parse",
"double",
"(",
"args",
"[",
"i",
"]",
")",
";",
"if",
"(",
"threshold",
"<",
"1",
"|",
"|",
"threshold",
">",
"100",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"number",
"out",
"of",
"range",
":",
"threshold",
"=",
"\"",
"+",
"threshold",
")",
";",
"}",
"log",
"info",
"(",
"\"",
"using",
"a",
"threshold",
"of",
"\"",
"+",
"threshold",
")",
";",
"b",
"set",
"threshold",
"(",
"threshold",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"system",
"err",
"println",
"(",
"\"",
"expecting",
"a",
"number",
"in",
"the",
"range",
"of",
"[",
"1",
"0",
",",
"100",
"0",
"]",
":",
"\"",
"+",
"args",
"[",
"i",
"]",
")",
";",
"throw",
"e",
";",
"}",
"}",
"else",
"if",
"(",
"\"",
"-",
"policy",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"check",
"argument",
"(",
"+",
"+",
"i",
"<",
"args",
"length",
",",
"\"",
"policy",
"value",
"is",
"missing",
":",
"args",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"args",
")",
")",
";",
"try",
"{",
"b",
"set",
"balancing",
"policy",
"(",
"balancing",
"policy",
"parse",
"(",
"args",
"[",
"i",
"]",
")",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"system",
"err",
"println",
"(",
"\"",
"illegal",
"policy",
"name",
":",
"\"",
"+",
"args",
"[",
"i",
"]",
")",
";",
"throw",
"e",
";",
"}",
"}",
"else",
"if",
"(",
"\"",
"-",
"exclude",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"excluded",
"nodes",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"i",
"=",
"process",
"host",
"list",
"(",
"args",
",",
"i",
",",
"\"",
"exclude",
"\"",
",",
"excluded",
"nodes",
")",
";",
"b",
"set",
"excluded",
"nodes",
"(",
"excluded",
"nodes",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"include",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"included",
"nodes",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"i",
"=",
"process",
"host",
"list",
"(",
"args",
",",
"i",
",",
"\"",
"include",
"\"",
",",
"included",
"nodes",
")",
";",
"b",
"set",
"included",
"nodes",
"(",
"included",
"nodes",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"source",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"set",
"<",
"string",
">",
"source",
"nodes",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"i",
"=",
"process",
"host",
"list",
"(",
"args",
",",
"i",
",",
"\"",
"source",
"\"",
",",
"source",
"nodes",
")",
";",
"b",
"set",
"source",
"nodes",
"(",
"source",
"nodes",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"blockpools",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"check",
"argument",
"(",
"+",
"+",
"i",
"<",
"args",
"length",
",",
"\"",
"blockpools",
"value",
"is",
"missing",
":",
"args",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"args",
")",
")",
";",
"set",
"<",
"string",
">",
"blockpools",
"=",
"parse",
"block",
"pool",
"list",
"(",
"args",
"[",
"i",
"]",
")",
";",
"log",
"info",
"(",
"\"",
"balancer",
"will",
"run",
"on",
"the",
"following",
"blockpools",
":",
"\"",
"+",
"blockpools",
"to",
"string",
"(",
")",
")",
";",
"b",
"set",
"blockpools",
"(",
"blockpools",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"idleiterations",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"check",
"argument",
"(",
"+",
"+",
"i",
"<",
"args",
"length",
",",
"\"",
"idleiterations",
"value",
"is",
"missing",
":",
"args",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"args",
")",
")",
";",
"int",
"max",
"idle",
"iteration",
"=",
"integer",
"parse",
"int",
"(",
"args",
"[",
"i",
"]",
")",
";",
"log",
"info",
"(",
"\"",
"using",
"a",
"idleiterations",
"of",
"\"",
"+",
"max",
"idle",
"iteration",
")",
";",
"b",
"set",
"max",
"idle",
"iteration",
"(",
"max",
"idle",
"iteration",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"run",
"during",
"upgrade",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"b",
"set",
"run",
"during",
"upgrade",
"(",
"true",
")",
";",
"log",
"info",
"(",
"\"",
"will",
"run",
"the",
"balancer",
"even",
"during",
"an",
"ongoing",
"hdfs",
"\"",
"+",
"\"",
"upgrade",
"most",
"users",
"will",
"not",
"want",
"to",
"run",
"the",
"balancer",
"\"",
"+",
"\"",
"during",
"an",
"upgrade",
"since",
"it",
"will",
"not",
"affect",
"used",
"space",
"\"",
"+",
"\"",
"on",
"over",
"-",
"utilized",
"machines",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"as",
"service",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"b",
"set",
"run",
"as",
"service",
"(",
"true",
")",
";",
"log",
"info",
"(",
"\"",
"balancer",
"will",
"run",
"as",
"a",
"long",
"running",
"service",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"hot",
"block",
"time",
"interval",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"check",
"argument",
"(",
"+",
"+",
"i",
"<",
"args",
"length",
",",
"\"",
"hot",
"block",
"time",
"interval",
"value",
"is",
"missing",
":",
"args",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"args",
")",
")",
";",
"long",
"hot",
"block",
"time",
"interval",
"=",
"long",
"parse",
"long",
"(",
"args",
"[",
"i",
"]",
")",
";",
"log",
"info",
"(",
"\"",
"using",
"a",
"hot",
"block",
"time",
"interval",
"of",
"\"",
"+",
"hot",
"block",
"time",
"interval",
")",
";",
"b",
"set",
"hot",
"block",
"time",
"interval",
"(",
"hot",
"block",
"time",
"interval",
")",
";",
"}",
"else",
"if",
"(",
"\"",
"-",
"sort",
"top",
"nodes",
"\"",
"equals",
"ignore",
"case",
"(",
"args",
"[",
"i",
"]",
")",
")",
"{",
"b",
"set",
"sort",
"top",
"nodes",
"(",
"true",
")",
";",
"log",
"info",
"(",
"\"",
"balancer",
"will",
"sort",
"nodes",
"by",
"\"",
"+",
"\"",
"capacity",
"usage",
"percentage",
"to",
"prioritize",
"top",
"used",
"nodes",
"\"",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"args",
"=",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"args",
")",
")",
";",
"}",
"}",
"check",
"argument",
"(",
"excluded",
"nodes",
"=",
"=",
"null",
"|",
"|",
"included",
"nodes",
"=",
"=",
"null",
",",
"\"",
"-",
"exclude",
"and",
"-",
"include",
"options",
"cannot",
"be",
"specified",
"together",
"\"",
")",
";",
"}",
"catch",
"(",
"runtime",
"exception",
"e",
")",
"{",
"print",
"usage",
"(",
"system",
"err",
")",
";",
"throw",
"e",
";",
"}",
"}",
"return",
"b",
"build",
"(",
")",
";",
"}"
]
|
[
"extract",
"file",
"from",
"{",
"@",
"link",
"mock",
"default",
"generator",
"}"
]
| [
"public",
"static",
"written",
"template",
"based",
"file",
"get",
"template",
"based",
"file",
"(",
"mock",
"default",
"generator",
"generator",
",",
"file",
"root",
",",
"string",
"filename",
")",
"{",
"string",
"default",
"api",
"filename",
"=",
"new",
"file",
"(",
"root",
",",
"filename",
")",
"get",
"absolute",
"path",
"(",
")",
"replace",
"(",
"\"",
"\\",
"\\",
"\"",
",",
"\"",
"/",
"\"",
")",
";",
"optional",
"<",
"written",
"template",
"based",
"file",
">",
"optional",
"=",
"generator",
"get",
"template",
"based",
"files",
"(",
")",
"stream",
"(",
")",
"filter",
"(",
"f",
"-",
">",
"default",
"api",
"filename",
"equals",
"(",
"f",
"get",
"output",
"filename",
"(",
")",
")",
")",
"find",
"first",
"(",
")",
";",
"assert",
"assert",
"true",
"(",
"optional",
"is",
"present",
"(",
")",
")",
";",
"return",
"optional",
"get",
"(",
")",
";",
"}"
]
|
[
"finds",
"pets",
"by",
"status",
"multiple",
"status",
"values",
"can",
"be",
"provided",
"with",
"comma",
"separated",
"strings"
]
| [
"public",
"void",
"find",
"pets",
"by",
"status",
"(",
"list",
"<",
"string",
">",
"status",
",",
"handler",
"<",
"async",
"result",
"<",
"list",
"<",
"pet",
">",
">",
">",
"result",
"handler",
")",
"{",
"find",
"pets",
"by",
"status",
"(",
"status",
",",
"null",
",",
"result",
"handler",
")",
";",
"}"
]
|
[
"returns",
"the",
"enumeration",
"of",
"the",
"nested",
"set",
"{",
"{",
"\"",
"a",
"\"",
",",
"\"",
"b",
"\"",
"}",
",",
"{",
"\"",
"b",
"\"",
",",
"\"",
"a",
"\"",
"}",
"}"
]
| [
"protected",
"list",
"<",
"string",
">",
"order",
"conflict",
"result",
"(",
")",
"{",
"return",
"immutable",
"list",
"of",
"(",
"\"",
"a",
"\"",
",",
"\"",
"b",
"\"",
")",
";",
"}"
]
|
[
"against",
"what",
"mime",
"types",
"this",
"filter",
"applies"
]
| [
"protected",
"abstract",
"set",
"<",
"mime",
"type",
">",
"constraint",
"types",
"(",
")",
";"
]
|
[
"returns",
"an",
"immutable",
"set",
"containing",
"each",
"of",
"{",
"@",
"code",
"elements",
"}",
",",
"minus",
"duplicates",
",",
"in",
"the",
"order",
"each",
"appears",
"first",
"in",
"the",
"source",
"array"
]
| [
"public",
"static",
"<",
"e",
">",
"immutable",
"set",
"<",
"e",
">",
"copy",
"of",
"(",
"e",
"[",
"]",
"elements",
")",
"{",
"switch",
"(",
"elements",
"length",
")",
"{",
"case",
"0",
":",
"return",
"of",
"(",
")",
";",
"case",
"1",
":",
"return",
"of",
"(",
"elements",
"[",
"0",
"]",
")",
";",
"default",
":",
"return",
"construct",
"unknown",
"duplication",
"(",
"elements",
"length",
",",
"elements",
"clone",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"get",
"big",
"decimal"
]
| [
"public",
"big",
"decimal",
"get",
"big",
"decimal",
"(",
")",
"{",
"return",
"big",
"decimal",
";",
"}"
]
|
[
"get",
"the",
"actual",
"schema",
"from",
"aliases",
"if",
"the",
"provided",
"schema",
"is",
"not",
"an",
"alias",
",",
"the",
"schema",
"itself",
"will",
"be",
"returned"
]
| [
"public",
"static",
"schema",
"unalias",
"schema",
"(",
"open",
"a",
"p",
"i",
"open",
"a",
"p",
"i",
",",
"schema",
"schema",
")",
"{",
"return",
"unalias",
"schema",
"(",
"open",
"a",
"p",
"i",
",",
"schema",
",",
"collections",
"<",
"string",
",",
"string",
">",
"empty",
"map",
"(",
")",
")",
";",
"}"
]
|
[
"markup",
"scalar",
"with",
"equate",
"if",
"an",
"appropriate",
"one",
"is",
"contained",
"within",
"the",
"specified",
"equates",
"list"
]
| [
"private",
"boolean",
"markup",
"scalar",
"with",
"equate",
"(",
"scalar",
"scalar",
"to",
"replace",
",",
"int",
"scalar",
"index",
",",
"list",
"<",
"equate",
">",
"equates",
",",
"list",
"<",
"object",
">",
"representation",
"list",
")",
"{",
"if",
"(",
"!",
"equates",
"is",
"empty",
"(",
")",
")",
"{",
"/",
"/",
"register",
"association",
"not",
"found",
"-",
"perform",
"equate",
"replacement",
"of",
"matching",
"scalar",
"value",
"equate",
"equate",
"=",
"find",
"equate",
"(",
"scalar",
"to",
"replace",
",",
"equates",
")",
";",
"if",
"(",
"equate",
"!",
"=",
"null",
")",
"{",
"representation",
"list",
"set",
"(",
"scalar",
"index",
",",
"equate",
")",
";",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
]
|
[
"replace",
"node",
"of",
"given",
"name"
]
| [
"public",
"boolean",
"replace",
"node",
"(",
"final",
"node",
"old",
"one",
",",
"final",
"@",
"non",
"null",
"node",
"new",
"one",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"enforce",
"name",
"restrictions",
")",
"{",
"jenkins",
"check",
"good",
"name",
"(",
"new",
"one",
"get",
"node",
"name",
"(",
")",
")",
";",
"}",
"if",
"(",
"old",
"one",
"=",
"=",
"nodes",
"get",
"(",
"old",
"one",
"get",
"node",
"name",
"(",
")",
")",
")",
"{",
"/",
"/",
"use",
"the",
"queue",
"lock",
"until",
"nodes",
"has",
"a",
"way",
"of",
"directly",
"modifying",
"a",
"single",
"node",
"queue",
"with",
"lock",
"(",
"new",
"runnable",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")",
"{",
"nodes",
"this",
"nodes",
"remove",
"(",
"old",
"one",
"get",
"node",
"name",
"(",
")",
")",
";",
"nodes",
"this",
"nodes",
"put",
"(",
"new",
"one",
"get",
"node",
"name",
"(",
")",
",",
"new",
"one",
")",
";",
"jenkins",
"update",
"computer",
"list",
"(",
")",
";",
"jenkins",
"trim",
"labels",
"(",
")",
";",
"}",
"}",
")",
";",
"update",
"node",
"(",
"new",
"one",
")",
";",
"if",
"(",
"!",
"new",
"one",
"get",
"node",
"name",
"(",
")",
"equals",
"(",
"old",
"one",
"get",
"node",
"name",
"(",
")",
")",
")",
"{",
"util",
"delete",
"recursive",
"(",
"new",
"file",
"(",
"get",
"nodes",
"dir",
"(",
")",
",",
"old",
"one",
"get",
"node",
"name",
"(",
")",
")",
")",
";",
"}",
"node",
"listener",
"fire",
"on",
"updated",
"(",
"old",
"one",
",",
"new",
"one",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}"
]
|
[
"loads",
"an",
"object",
"that",
"represents",
"difference",
"between",
"two",
"maps",
"of",
"diffable",
"objects"
]
| [
"public",
"static",
"<",
"k",
",",
"t",
">",
"map",
"diff",
"<",
"k",
",",
"t",
",",
"map",
"<",
"k",
",",
"t",
">",
">",
"read",
"jdk",
"map",
"diff",
"(",
"stream",
"input",
"in",
",",
"key",
"serializer",
"<",
"k",
">",
"key",
"serializer",
",",
"value",
"serializer",
"<",
"k",
",",
"t",
">",
"value",
"serializer",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"new",
"jdk",
"map",
"diff",
"<",
">",
"(",
"in",
",",
"key",
"serializer",
",",
"value",
"serializer",
")",
";",
"}"
]
|
[
"multiple",
"threads",
"concurrently",
"fire",
"queries"
]
| [
"public",
"void",
"test",
"concurrent",
"queries",
"(",
")",
"throws",
"exception",
"{",
"deadline",
"deadline",
"=",
"test",
"timeout",
"from",
"now",
"(",
")",
";",
"atomic",
"kv",
"state",
"request",
"stats",
"stats",
"=",
"new",
"atomic",
"kv",
"state",
"request",
"stats",
"(",
")",
";",
"final",
"message",
"serializer",
"<",
"kv",
"state",
"internal",
"request",
",",
"kv",
"state",
"response",
">",
"serializer",
"=",
"new",
"message",
"serializer",
"<",
">",
"(",
"new",
"kv",
"state",
"internal",
"request",
"kv",
"state",
"internal",
"request",
"deserializer",
"(",
")",
",",
"new",
"kv",
"state",
"response",
"kv",
"state",
"response",
"deserializer",
"(",
")",
")",
";",
"executor",
"service",
"executor",
"=",
"null",
";",
"client",
"<",
"kv",
"state",
"internal",
"request",
",",
"kv",
"state",
"response",
">",
"client",
"=",
"null",
";",
"channel",
"server",
"channel",
"=",
"null",
";",
"final",
"byte",
"[",
"]",
"serialized",
"result",
"=",
"new",
"byte",
"[",
"1024",
"]",
";",
"thread",
"local",
"random",
"current",
"(",
")",
"next",
"bytes",
"(",
"serialized",
"result",
")",
";",
"try",
"{",
"int",
"num",
"query",
"tasks",
"=",
"4",
";",
"final",
"int",
"num",
"queries",
"per",
"task",
"=",
"1024",
";",
"executor",
"=",
"executors",
"new",
"fixed",
"thread",
"pool",
"(",
"num",
"query",
"tasks",
")",
";",
"client",
"=",
"new",
"client",
"<",
">",
"(",
"\"",
"test",
"client",
"\"",
",",
"1",
",",
"serializer",
",",
"stats",
")",
";",
"server",
"channel",
"=",
"create",
"server",
"channel",
"(",
"new",
"channel",
"inbound",
"handler",
"adapter",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"channel",
"read",
"(",
"channel",
"handler",
"context",
"ctx",
",",
"object",
"msg",
")",
"throws",
"exception",
"{",
"byte",
"buf",
"buf",
"=",
"(",
"byte",
"buf",
")",
"msg",
";",
"assert",
"equals",
"(",
"message",
"type",
"request",
",",
"message",
"serializer",
"deserialize",
"header",
"(",
"buf",
")",
")",
";",
"long",
"request",
"id",
"=",
"message",
"serializer",
"get",
"request",
"id",
"(",
"buf",
")",
";",
"kv",
"state",
"internal",
"request",
"request",
"=",
"serializer",
"deserialize",
"request",
"(",
"buf",
")",
";",
"buf",
"release",
"(",
")",
";",
"kv",
"state",
"response",
"response",
"=",
"new",
"kv",
"state",
"response",
"(",
"serialized",
"result",
")",
";",
"byte",
"buf",
"ser",
"response",
"=",
"message",
"serializer",
"serialize",
"response",
"(",
"ctx",
"alloc",
"(",
")",
",",
"request",
"id",
",",
"response",
")",
";",
"ctx",
"channel",
"(",
")",
"write",
"and",
"flush",
"(",
"ser",
"response",
")",
";",
"}",
"}",
")",
";",
"final",
"inet",
"socket",
"address",
"server",
"address",
"=",
"get",
"kv",
"state",
"server",
"address",
"(",
"server",
"channel",
")",
";",
"final",
"client",
"<",
"kv",
"state",
"internal",
"request",
",",
"kv",
"state",
"response",
">",
"final",
"client",
"=",
"client",
";",
"callable",
"<",
"list",
"<",
"completable",
"future",
"<",
"kv",
"state",
"response",
">",
">",
">",
"query",
"task",
"=",
"(",
")",
"-",
">",
"{",
"list",
"<",
"completable",
"future",
"<",
"kv",
"state",
"response",
">",
">",
"results",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"num",
"queries",
"per",
"task",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"num",
"queries",
"per",
"task",
";",
"i",
"+",
"+",
")",
"{",
"kv",
"state",
"internal",
"request",
"request",
"=",
"new",
"kv",
"state",
"internal",
"request",
"(",
"new",
"kv",
"state",
"i",
"d",
"(",
")",
",",
"new",
"byte",
"[",
"0",
"]",
")",
";",
"results",
"add",
"(",
"final",
"client",
"send",
"request",
"(",
"server",
"address",
",",
"request",
")",
")",
";",
"}",
"return",
"results",
";",
"}",
";",
"/",
"/",
"submit",
"query",
"tasks",
"list",
"<",
"future",
"<",
"list",
"<",
"completable",
"future",
"<",
"kv",
"state",
"response",
">",
">",
">",
">",
"futures",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"num",
"query",
"tasks",
";",
"i",
"+",
"+",
")",
"{",
"futures",
"add",
"(",
"executor",
"submit",
"(",
"query",
"task",
")",
")",
";",
"}",
"/",
"/",
"verify",
"results",
"for",
"(",
"future",
"<",
"list",
"<",
"completable",
"future",
"<",
"kv",
"state",
"response",
">",
">",
">",
"future",
":",
"futures",
")",
"{",
"list",
"<",
"completable",
"future",
"<",
"kv",
"state",
"response",
">",
">",
"results",
"=",
"future",
"get",
"(",
"deadline",
"time",
"left",
"(",
")",
"to",
"millis",
"(",
")",
",",
"time",
"unit",
"milliseconds",
")",
";",
"for",
"(",
"completable",
"future",
"<",
"kv",
"state",
"response",
">",
"result",
":",
"results",
")",
"{",
"kv",
"state",
"response",
"actual",
"=",
"result",
"get",
"(",
"deadline",
"time",
"left",
"(",
")",
"to",
"millis",
"(",
")",
",",
"time",
"unit",
"milliseconds",
")",
";",
"assert",
"array",
"equals",
"(",
"serialized",
"result",
",",
"actual",
"get",
"content",
"(",
")",
")",
";",
"}",
"}",
"int",
"total",
"queries",
"=",
"num",
"query",
"tasks",
"*",
"num",
"queries",
"per",
"task",
";",
"/",
"/",
"counts",
"can",
"take",
"some",
"time",
"to",
"propagate",
"while",
"(",
"deadline",
"has",
"time",
"left",
"(",
")",
"&",
"&",
"stats",
"get",
"num",
"successful",
"(",
")",
"!",
"=",
"total",
"queries",
")",
"{",
"thread",
"sleep",
"(",
"100l",
")",
";",
"}",
"assert",
"equals",
"(",
"total",
"queries",
",",
"stats",
"get",
"num",
"requests",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"total",
"queries",
",",
"stats",
"get",
"num",
"successful",
"(",
")",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"executor",
"!",
"=",
"null",
")",
"{",
"executor",
"shutdown",
"(",
")",
";",
"}",
"if",
"(",
"server",
"channel",
"!",
"=",
"null",
")",
"{",
"server",
"channel",
"close",
"(",
")",
";",
"}",
"if",
"(",
"client",
"!",
"=",
"null",
")",
"{",
"try",
"{",
"client",
"shutdown",
"(",
")",
"get",
"(",
"10l",
",",
"time",
"unit",
"seconds",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"}",
"assert",
"assert",
"true",
"(",
"client",
"is",
"event",
"group",
"shutdown",
"(",
")",
")",
";",
"}",
"assert",
"equals",
"(",
"\"",
"channel",
"leak",
"\"",
",",
"0l",
",",
"stats",
"get",
"num",
"connections",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"static",
"utility",
"to",
"parse",
"a",
"field",
"of",
"type",
"long",
"from",
"a",
"byte",
"sequence",
"that",
"represents",
"text",
"characters",
"(",
"such",
"as",
"when",
"read",
"from",
"a",
"file",
"stream",
")"
]
| [
"public",
"static",
"final",
"long",
"parse",
"field",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"start",
"pos",
",",
"int",
"length",
")",
"{",
"return",
"parse",
"field",
"(",
"bytes",
",",
"start",
"pos",
",",
"length",
",",
"(",
"char",
")",
"0xffff",
")",
";",
"}"
]
|
[
"tries",
"to",
"allocate",
"a",
"slot",
"for",
"the",
"given",
"slot",
"request",
"if",
"there",
"is",
"no",
"slot",
"available",
",",
"the",
"resource",
"manager",
"is",
"informed",
"to",
"allocate",
"more",
"resources",
"and",
"a",
"timeout",
"for",
"the",
"request",
"is",
"registered"
]
| [
"private",
"void",
"internal",
"request",
"slot",
"(",
"pending",
"slot",
"request",
"pending",
"slot",
"request",
")",
"throws",
"resource",
"manager",
"exception",
"{",
"final",
"resource",
"profile",
"resource",
"profile",
"=",
"pending",
"slot",
"request",
"get",
"resource",
"profile",
"(",
")",
";",
"optional",
"consumer",
"of",
"(",
"find",
"matching",
"slot",
"(",
"resource",
"profile",
")",
")",
"if",
"present",
"(",
"task",
"manager",
"slot",
"-",
">",
"allocate",
"slot",
"(",
"task",
"manager",
"slot",
",",
"pending",
"slot",
"request",
")",
")",
"if",
"not",
"present",
"(",
"(",
")",
"-",
">",
"fulfill",
"pending",
"slot",
"request",
"with",
"pending",
"task",
"manager",
"slot",
"(",
"pending",
"slot",
"request",
")",
")",
";",
"}"
]
|
[
"get",
"the",
"realm",
"where",
"the",
"effective",
"user",
"comes",
"from",
"the",
"effective",
"user",
"is",
"the",
"es",
"-",
"security",
"-",
"runas",
"-",
"user",
"if",
"present",
"or",
"the",
"authenticated",
"user"
]
| [
"public",
"realm",
"ref",
"get",
"source",
"realm",
"(",
")",
"{",
"return",
"looked",
"up",
"by",
"=",
"=",
"null",
"?",
"authenticated",
"by",
":",
"looked",
"up",
"by",
";",
"}"
]
|
[
"configure",
"a",
"custom",
"{",
"@",
"link",
"locale",
"context",
"resolver",
"}",
"the",
"provided",
"instance",
"is",
"set",
"on",
"each",
"created",
"{",
"@",
"link",
"default",
"server",
"web",
"exchange",
"}",
"by",
"default",
"this",
"is",
"set",
"to",
"{",
"@",
"link",
"org",
"springframework",
"web",
"server",
"i",
"1",
"8n",
"accept",
"header",
"locale",
"context",
"resolver",
"}"
]
| [
"public",
"void",
"set",
"locale",
"context",
"resolver",
"(",
"locale",
"context",
"resolver",
"resolver",
")",
"{",
"assert",
"not",
"null",
"(",
"resolver",
",",
"\"",
"locale",
"context",
"resolver",
"is",
"required",
"\"",
")",
";",
"this",
"locale",
"context",
"resolver",
"=",
"resolver",
";",
"}"
]
|
[
"returns",
"the",
"aws",
"secret",
"access",
"key",
"for",
"this",
"credentials",
"object"
]
| [
"public",
"string",
"get",
"a",
"w",
"s",
"secret",
"key",
"(",
")",
";"
]
|
[
"creates",
"a",
"rate",
"limiter",
"with",
"the",
"runtime",
"context",
"provided"
]
| [
"public",
"void",
"open",
"(",
"runtime",
"context",
"runtime",
"context",
")",
"{",
"this",
"runtime",
"context",
"=",
"runtime",
"context",
";",
"local",
"rate",
"bytes",
"per",
"second",
"=",
"global",
"rate",
"bytes",
"per",
"second",
"/",
"runtime",
"context",
"get",
"number",
"of",
"parallel",
"subtasks",
"(",
")",
";",
"this",
"rate",
"limiter",
"=",
"rate",
"limiter",
"create",
"(",
"local",
"rate",
"bytes",
"per",
"second",
")",
";",
"}"
]
|
[
"return",
"the",
"name",
"of",
"launcher",
"activity"
]
| [
"public",
"static",
"string",
"get",
"launcher",
"activity",
"(",
"@",
"non",
"null",
"final",
"string",
"pkg",
")",
"{",
"if",
"(",
"utils",
"bridge",
"is",
"space",
"(",
"pkg",
")",
")",
"return",
"\"",
"\"",
";",
"intent",
"intent",
"=",
"new",
"intent",
"(",
"intent",
"action",
"main",
",",
"null",
")",
";",
"intent",
"add",
"category",
"(",
"intent",
"category",
"launcher",
")",
";",
"intent",
"set",
"package",
"(",
"pkg",
")",
";",
"package",
"manager",
"pm",
"=",
"utils",
"get",
"app",
"(",
")",
"get",
"package",
"manager",
"(",
")",
";",
"list",
"<",
"resolve",
"info",
">",
"info",
"=",
"pm",
"query",
"intent",
"activities",
"(",
"intent",
",",
"0",
")",
";",
"if",
"(",
"info",
"=",
"=",
"null",
"|",
"|",
"info",
"size",
"(",
")",
"=",
"=",
"0",
")",
"{",
"return",
"\"",
"\"",
";",
"}",
"return",
"info",
"get",
"(",
"0",
")",
"activity",
"info",
"name",
";",
"}"
]
|
[
"returns",
"whether",
"the",
"given",
"variable",
"has",
"been",
"marked",
"as",
"being",
"used"
]
| [
"public",
"boolean",
"is",
"variable",
"used",
"(",
"int",
"variable",
"index",
")",
"{",
"return",
"variable",
"used",
"[",
"variable",
"index",
"]",
";",
"}"
]
|
[
"initialize",
"the",
"given",
"data",
"binder",
"for",
"the",
"given",
"(",
"servlet",
")",
"request"
]
| [
"default",
"void",
"init",
"binder",
"(",
"web",
"data",
"binder",
"binder",
",",
"web",
"request",
"request",
")",
"{",
"init",
"binder",
"(",
"binder",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"void",
"close",
"(",
"close",
"mode",
"close",
"mode",
")",
"{",
"super",
"close",
"(",
"close",
"mode",
")",
";",
"metrics",
"registry",
"remove",
"(",
"name",
"(",
"metrics",
"prefix",
",",
"name",
",",
"\"",
"available",
"-",
"connections",
"\"",
")",
")",
";",
"metrics",
"registry",
"remove",
"(",
"name",
"(",
"metrics",
"prefix",
",",
"name",
",",
"\"",
"leased",
"-",
"connections",
"\"",
")",
")",
";",
"metrics",
"registry",
"remove",
"(",
"name",
"(",
"metrics",
"prefix",
",",
"name",
",",
"\"",
"max",
"-",
"connections",
"\"",
")",
")",
";",
"metrics",
"registry",
"remove",
"(",
"name",
"(",
"metrics",
"prefix",
",",
"name",
",",
"\"",
"pending",
"-",
"connections",
"\"",
")",
")",
";",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"obtain",
"the",
"instrumentation",
"instance",
"for",
"the",
"current",
"vm",
",",
"if",
"available"
]
| [
"private",
"static",
"instrumentation",
"get",
"instrumentation",
"(",
")",
"{",
"if",
"(",
"agent",
"class",
"present",
")",
"{",
"return",
"instrumentation",
"accessor",
"get",
"instrumentation",
"(",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}"
]
|
[
"collects",
"all",
"labels",
"used",
"as",
"keys",
"for",
"configurable",
"attributes",
"and",
"places",
"them",
"into",
"the",
"special",
"implicit",
"attribute",
"that",
"tracks",
"them"
]
| [
"private",
"static",
"void",
"populate",
"config",
"dependencies",
"attribute",
"(",
"rule",
"rule",
")",
"{",
"raw",
"attribute",
"mapper",
"attributes",
"=",
"raw",
"attribute",
"mapper",
"of",
"(",
"rule",
")",
";",
"attribute",
"config",
"deps",
"attribute",
"=",
"attributes",
"get",
"attribute",
"definition",
"(",
"config",
"setting",
"deps",
"attribute",
")",
";",
"if",
"(",
"config",
"deps",
"attribute",
"=",
"=",
"null",
")",
"{",
"return",
";",
"}",
"linked",
"hash",
"set",
"<",
"label",
">",
"config",
"labels",
"=",
"new",
"linked",
"hash",
"set",
"<",
">",
"(",
")",
";",
"for",
"(",
"attribute",
"attr",
":",
"rule",
"get",
"attributes",
"(",
")",
")",
"{",
"selector",
"list",
"<",
"?",
">",
"selector",
"list",
"=",
"attributes",
"get",
"selector",
"list",
"(",
"attr",
"get",
"name",
"(",
")",
",",
"attr",
"get",
"type",
"(",
")",
")",
";",
"if",
"(",
"selector",
"list",
"!",
"=",
"null",
")",
"{",
"config",
"labels",
"add",
"all",
"(",
"selector",
"list",
"get",
"key",
"labels",
"(",
")",
")",
";",
"}",
"}",
"rule",
"set",
"attribute",
"value",
"(",
"config",
"deps",
"attribute",
",",
"immutable",
"list",
"copy",
"of",
"(",
"config",
"labels",
")",
",",
"/",
"*",
"explicit",
"=",
"*",
"/",
"false",
")",
";",
"}"
]
|
[
"sets",
"the",
"fraction",
"of",
"the",
"total",
"memory",
"to",
"be",
"used",
"for",
"write",
"buffers",
"this",
"only",
"has",
"an",
"effect",
"is",
"either",
"{",
"@",
"link",
"#",
"set",
"use",
"managed",
"memory",
"(",
"boolean",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"set",
"fixed",
"memory",
"per",
"slot",
"(",
"memory",
"size",
")",
"}",
"are",
"set",
"see",
"{",
"@",
"link",
"rocks",
"d",
"b",
"options",
"#",
"write",
"buffer",
"ratio",
"}",
"for",
"details"
]
| [
"public",
"void",
"set",
"write",
"buffer",
"ratio",
"(",
"double",
"write",
"buffer",
"ratio",
")",
"{",
"preconditions",
"check",
"argument",
"(",
"write",
"buffer",
"ratio",
">",
"0",
"&",
"&",
"write",
"buffer",
"ratio",
"<",
"1",
"0",
",",
"\"",
"write",
"buffer",
"ratio",
"%",
"s",
"must",
"be",
"in",
"(",
"0",
",",
"1",
")",
"\"",
",",
"write",
"buffer",
"ratio",
")",
";",
"this",
"write",
"buffer",
"ratio",
"=",
"write",
"buffer",
"ratio",
";",
"}"
]
|
[
"order",
"by",
"id",
"(",
"needs",
"to",
"be",
"followed",
"by",
"{",
"@",
"link",
"#",
"asc",
"(",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"desc",
"(",
")",
"}",
")"
]
| [
"execution",
"query",
"order",
"by",
"process",
"instance",
"id",
"(",
")",
";"
]
|
[
"the",
"hostname",
"of",
"this",
"process",
"mostly",
"used",
"as",
"a",
"convenience",
"for",
"logging",
"and",
"to",
"respond",
"to",
"{",
"@",
"link",
"#",
"get",
"leader",
"host",
"name",
"(",
")",
"}",
"requests"
]
| [
"public",
"synchronized",
"string",
"get",
"host",
"name",
"(",
")",
"{",
"return",
"host",
"name",
";",
"}"
]
|
[
"resets",
"all",
"rpc",
"service",
"performance",
"counters",
"to",
"their",
"defaults"
]
| [
"public",
"void",
"reset",
"perf",
"counters",
"(",
")",
"{",
"if",
"(",
"registered",
"bean",
"!",
"=",
"null",
")",
"{",
"m",
"beans",
"unregister",
"(",
"registered",
"bean",
")",
";",
"registered",
"bean",
"=",
"null",
";",
"}",
"if",
"(",
"metrics",
"!",
"=",
"null",
")",
"{",
"federation",
"r",
"p",
"c",
"metrics",
"reset",
"(",
")",
";",
"metrics",
"=",
"null",
";",
"}",
"init",
"(",
"conf",
",",
"server",
",",
"store",
")",
";",
"}"
]
|
[
"returns",
"a",
"fluent",
"iterable",
"that",
"wraps",
"{",
"@",
"code",
"iterable",
"}",
",",
"or",
"{",
"@",
"code",
"iterable",
"}",
"itself",
"if",
"it",
"is",
"already",
"a",
"{",
"@",
"code",
"fluent",
"iterable",
"}",
"<",
"b",
">",
"{",
"@",
"code",
"stream",
"}",
"equivalent",
":",
"<",
"b",
">",
"{",
"@",
"code",
"iterable",
"stream",
"(",
")",
"}",
"if",
"{",
"@",
"code",
"iterable",
"}",
"is",
"a",
"{",
"@",
"link",
"collection",
"}",
";",
"{",
"@",
"code",
"stream",
"support",
"stream",
"(",
"iterable",
"spliterator",
"(",
")",
",",
"false",
")",
"}",
"otherwise"
]
| [
"public",
"static",
"<",
"e",
">",
"fluent",
"iterable",
"<",
"e",
">",
"from",
"(",
"final",
"iterable",
"<",
"e",
">",
"iterable",
")",
"{",
"return",
"(",
"iterable",
"instanceof",
"fluent",
"iterable",
")",
"?",
"(",
"fluent",
"iterable",
"<",
"e",
">",
")",
"iterable",
":",
"new",
"fluent",
"iterable",
"<",
"e",
">",
"(",
"iterable",
")",
"{",
"@",
"override",
"public",
"iterator",
"<",
"e",
">",
"iterator",
"(",
")",
"{",
"return",
"iterable",
"iterator",
"(",
")",
";",
"}",
"}",
";",
"}"
]
|
[
"returns",
"the",
"human",
"name",
"for",
"the",
"particular",
"type",
"of",
"constant",
"this",
"instance",
"is"
]
| [
"public",
"abstract",
"string",
"type",
"name",
"(",
")",
";"
]
|
[
"stores",
"an",
"long",
"array",
"in",
"the",
"table",
"at",
"the",
"given",
"row",
"and",
"column",
"note",
"-",
"all",
"values",
"in",
"a",
"given",
"column",
"must",
"be",
"of",
"the",
"same",
"type"
]
| [
"public",
"void",
"put",
"long",
"array",
"(",
"int",
"row",
",",
"int",
"col",
",",
"long",
"[",
"]",
"value",
")",
"{",
"max",
"row",
"=",
"math",
"max",
"(",
"max",
"row",
",",
"row",
")",
";",
"occupied",
"put",
"(",
"row",
",",
"true",
")",
";",
"super",
"put",
"long",
"array",
"(",
"row",
",",
"col",
",",
"value",
")",
";",
"}"
]
|
[
"checks",
"to",
"make",
"sure",
"no",
"plugins",
"in",
"the",
"list",
"provide",
"any",
"services",
"used",
"by",
"plugin",
"p"
]
| [
"private",
"boolean",
"check",
"services",
"(",
"plugin",
"using",
"plugin",
",",
"list",
"<",
"plugin",
">",
"service",
"providing",
"plugins",
")",
"{",
"for",
"(",
"class",
"<",
"?",
">",
"used",
"service",
":",
"using",
"plugin",
"get",
"services",
"required",
"(",
")",
")",
"{",
"for",
"(",
"plugin",
"providing",
"plugin",
":",
"service",
"providing",
"plugins",
")",
"{",
"if",
"(",
"providing",
"plugin",
"provides",
"service",
"(",
"used",
"service",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}"
]
|
[
"return",
"true",
"if",
"this",
"apple",
"object",
"is",
"equal",
"to",
"o"
]
| [
"public",
"boolean",
"equals",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"this",
"=",
"=",
"o",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"o",
"=",
"=",
"null",
"|",
"|",
"get",
"class",
"(",
")",
"!",
"=",
"o",
"get",
"class",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"apple",
"apple",
"=",
"(",
"apple",
")",
"o",
";",
"return",
"objects",
"equals",
"(",
"this",
"cultivar",
",",
"apple",
"cultivar",
")",
"&",
"&",
"objects",
"equals",
"(",
"this",
"origin",
",",
"apple",
"origin",
")",
";",
"}"
]
|
[
"to",
"test",
"special",
"tags",
"to",
"test",
"special",
"tags",
"and",
"operation",
"id",
"starting",
"with",
"number"
]
| [
"public",
"void",
"call",
"1",
"2",
"3test",
"special",
"tags",
"test",
"(",
"test",
"context",
"test",
"context",
")",
"{",
"async",
"async",
"=",
"test",
"context",
"async",
"(",
")",
";",
"client",
"body",
"=",
"null",
";",
"api",
"call",
"1",
"2",
"3test",
"special",
"tags",
"(",
"body",
",",
"result",
"-",
">",
"{",
"/",
"/",
"todo",
":",
"test",
"validations",
"async",
"complete",
"(",
")",
";",
"}",
")",
";",
"}"
]
|
[
"select",
"the",
"content",
"-",
"type",
"header",
"'",
"s",
"value",
"from",
"the",
"given",
"array",
":",
"if",
"json",
"exists",
"in",
"the",
"given",
"array",
",",
"use",
"it",
";",
"otherwise",
"use",
"the",
"first",
"one",
"of",
"the",
"array"
]
| [
"public",
"string",
"select",
"header",
"content",
"type",
"(",
"string",
"[",
"]",
"content",
"types",
")",
"{",
"if",
"(",
"content",
"types",
"length",
"=",
"=",
"0",
"|",
"|",
"content",
"types",
"[",
"0",
"]",
"equals",
"(",
"\"",
"*",
"/",
"*",
"\"",
")",
")",
"{",
"return",
"\"",
"application",
"/",
"json",
"\"",
";",
"}",
"for",
"(",
"string",
"content",
"type",
":",
"content",
"types",
")",
"{",
"if",
"(",
"is",
"json",
"mime",
"(",
"content",
"type",
")",
")",
"{",
"return",
"content",
"type",
";",
"}",
"}",
"return",
"content",
"types",
"[",
"0",
"]",
";",
"}"
]
|
[
"rx",
"version",
"of",
"{",
"@",
"link",
"abstract",
"dao",
"#",
"save",
"(",
"object",
")",
"}",
"returning",
"an",
"observable",
"note",
"that",
"the",
"observable",
"will",
"emit",
"the",
"given",
"entity",
"back",
"to",
"its",
"subscribers"
]
| [
"public",
"observable",
"<",
"t",
">",
"save",
"(",
"final",
"t",
"entity",
")",
"{",
"return",
"wrap",
"(",
"new",
"callable",
"<",
"t",
">",
"(",
")",
"{",
"@",
"override",
"public",
"t",
"call",
"(",
")",
"throws",
"exception",
"{",
"dao",
"save",
"(",
"entity",
")",
";",
"return",
"entity",
";",
"}",
"}",
")",
";",
"}"
]
|
[
"gets",
"the",
"border",
"color"
]
| [
"public",
"int",
"get",
"border",
"color",
"(",
")",
"{",
"return",
"m",
"border",
"color",
";",
"}"
]
|
[
"returns",
"whether",
"all",
"of",
"a",
"collection",
"of",
"{",
"@",
"link",
"cor",
"ref",
"}",
"s",
"are",
"satisfied",
"by",
"at",
"least",
"one",
"of",
"a",
"collection",
"of",
"{",
"@",
"link",
"cor",
"def",
"}",
"s"
]
| [
"private",
"boolean",
"has",
"all",
"(",
"collection",
"<",
"cor",
"ref",
">",
"cor",
"refs",
",",
"collection",
"<",
"cor",
"def",
">",
"cor",
"defs",
")",
"{",
"for",
"(",
"cor",
"ref",
"cor",
"ref",
":",
"cor",
"refs",
")",
"{",
"if",
"(",
"!",
"has",
"(",
"cor",
"defs",
",",
"cor",
"ref",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}"
]
|
[
"when",
"true",
"and",
"wrap",
"is",
"false",
",",
"the",
"rows",
"will",
"take",
"up",
"the",
"entire",
"horizontal",
"group",
"height"
]
| [
"public",
"horizontal",
"group",
"expand",
"(",
"boolean",
"expand",
")",
"{",
"this",
"expand",
"=",
"expand",
";",
"return",
"this",
";",
"}"
]
|
[
"this",
"methods",
"arranges",
"for",
"the",
"data",
"node",
"to",
"send",
"the",
"block",
"report",
"at",
"the",
"next",
"heartbeat"
]
| [
"public",
"void",
"schedule",
"all",
"block",
"report",
"(",
"long",
"delay",
")",
"{",
"for",
"(",
"b",
"p",
"offer",
"service",
"bpos",
":",
"block",
"pool",
"manager",
"get",
"all",
"namenode",
"threads",
"(",
")",
")",
"{",
"bpos",
"schedule",
"block",
"report",
"(",
"delay",
")",
";",
"}",
"}"
]
|
[
"removes",
"the",
"component",
"from",
"this",
"node",
"(",
"and",
"the",
"manager",
")",
",",
"but",
"possibly",
"keeps",
"an",
"empty",
"object",
"as",
"a",
"placeholder"
]
| [
"void",
"remove",
"(",
"component",
"placeholder",
"placeholder",
",",
"boolean",
"keep",
"empty",
"placeholder",
")",
"{",
"if",
"(",
"placeholder",
"is",
"showing",
"(",
")",
")",
"{",
"placeholder",
"show",
"(",
"false",
")",
";",
"if",
"(",
"top",
"=",
"=",
"placeholder",
")",
"{",
"top",
"=",
"null",
";",
"}",
"invalidate",
"(",
")",
";",
"win",
"mgr",
"schedule",
"update",
"(",
")",
";",
"}",
"placeholder",
"set",
"provider",
"(",
"null",
")",
";",
"if",
"(",
"!",
"keep",
"empty",
"placeholder",
")",
"{",
"window",
"placeholders",
"remove",
"(",
"placeholder",
")",
";",
"placeholder",
"set",
"node",
"(",
"null",
")",
";",
"if",
"(",
"window",
"placeholders",
"is",
"empty",
"(",
")",
")",
"{",
"parent",
"remove",
"node",
"(",
"this",
")",
";",
"}",
"}",
"}"
]
|
[
"tests",
"that",
"we",
"can",
"register",
"task",
"manager",
"and",
"their",
"slots",
"at",
"the",
"slot",
"manager"
]
| [
"public",
"void",
"test",
"task",
"manager",
"registration",
"(",
")",
"throws",
"exception",
"{",
"final",
"resource",
"manager",
"id",
"resource",
"manager",
"id",
"=",
"resource",
"manager",
"id",
"generate",
"(",
")",
";",
"final",
"resource",
"actions",
"resource",
"manager",
"actions",
"=",
"new",
"testing",
"resource",
"actions",
"builder",
"(",
")",
"build",
"(",
")",
";",
"final",
"task",
"executor",
"gateway",
"task",
"executor",
"gateway",
"=",
"new",
"testing",
"task",
"executor",
"gateway",
"builder",
"(",
")",
"create",
"testing",
"task",
"executor",
"gateway",
"(",
")",
";",
"final",
"resource",
"i",
"d",
"resource",
"id",
"=",
"resource",
"i",
"d",
"generate",
"(",
")",
";",
"final",
"task",
"executor",
"connection",
"task",
"manager",
"connection",
"=",
"new",
"task",
"executor",
"connection",
"(",
"resource",
"id",
",",
"task",
"executor",
"gateway",
")",
";",
"final",
"slot",
"i",
"d",
"slot",
"id",
"1",
"=",
"new",
"slot",
"i",
"d",
"(",
"resource",
"id",
",",
"0",
")",
";",
"final",
"slot",
"i",
"d",
"slot",
"id",
"2",
"=",
"new",
"slot",
"i",
"d",
"(",
"resource",
"id",
",",
"1",
")",
";",
"final",
"resource",
"profile",
"resource",
"profile",
"=",
"resource",
"profile",
"from",
"resources",
"(",
"42",
"0",
",",
"1337",
")",
";",
"final",
"slot",
"status",
"slot",
"status",
"1",
"=",
"new",
"slot",
"status",
"(",
"slot",
"id",
"1",
",",
"resource",
"profile",
")",
";",
"final",
"slot",
"status",
"slot",
"status",
"2",
"=",
"new",
"slot",
"status",
"(",
"slot",
"id",
"2",
",",
"resource",
"profile",
")",
";",
"final",
"slot",
"report",
"slot",
"report",
"=",
"new",
"slot",
"report",
"(",
"arrays",
"as",
"list",
"(",
"slot",
"status",
"1",
",",
"slot",
"status",
"2",
")",
")",
";",
"try",
"(",
"slot",
"manager",
"impl",
"slot",
"manager",
"=",
"create",
"slot",
"manager",
"(",
"resource",
"manager",
"id",
",",
"resource",
"manager",
"actions",
")",
")",
"{",
"slot",
"manager",
"register",
"task",
"manager",
"(",
"task",
"manager",
"connection",
",",
"slot",
"report",
",",
"resource",
"profile",
"any",
",",
"resource",
"profile",
"any",
")",
";",
"assert",
"true",
"(",
"\"",
"the",
"number",
"registered",
"slots",
"does",
"not",
"equal",
"the",
"expected",
"number",
"\"",
",",
"2",
"=",
"=",
"slot",
"manager",
"get",
"number",
"registered",
"slots",
"(",
")",
")",
";",
"assert",
"not",
"null",
"(",
"slot",
"manager",
"get",
"slot",
"(",
"slot",
"id",
"1",
")",
")",
";",
"assert",
"not",
"null",
"(",
"slot",
"manager",
"get",
"slot",
"(",
"slot",
"id",
"2",
")",
")",
";",
"}",
"}"
]
|
[
"get",
"the",
"prefix",
"for",
"this",
"suggestion"
]
| [
"public",
"string",
"prefix",
"(",
")",
"{",
"return",
"this",
"prefix",
";",
"}"
]
|
[
"assert",
"that",
"a",
"built",
"up",
"fs",
"uri",
"matches",
"the",
"endpoint"
]
| [
"private",
"void",
"assert",
"matches",
"endpoint",
"(",
"uri",
"uri",
")",
"{",
"assert",
"equals",
"(",
"\"",
"source",
"\"",
"+",
"uri",
",",
"endpoint",
",",
"s",
"3x",
"login",
"helper",
"build",
"f",
"s",
"u",
"r",
"i",
"(",
"uri",
")",
")",
";",
"}"
]
|
[
"reads",
"an",
"instance",
"of",
"{",
"@",
"link",
"repository",
"data",
"}",
"from",
"x",
"-",
"content",
",",
"loading",
"the",
"snapshots",
"and",
"indices",
"metadata"
]
| [
"public",
"static",
"repository",
"data",
"snapshots",
"from",
"x",
"content",
"(",
"x",
"content",
"parser",
"parser",
",",
"long",
"gen",
"id",
",",
"boolean",
"fix",
"broken",
"shard",
"gens",
")",
"throws",
"i",
"o",
"exception",
"{",
"x",
"content",
"parser",
"utils",
"ensure",
"expected",
"token",
"(",
"x",
"content",
"parser",
"token",
"start",
"object",
",",
"parser",
"next",
"token",
"(",
")",
",",
"parser",
")",
";",
"final",
"map",
"<",
"string",
",",
"snapshot",
"id",
">",
"snapshots",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"final",
"map",
"<",
"string",
",",
"snapshot",
"state",
">",
"snapshot",
"states",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"final",
"map",
"<",
"string",
",",
"version",
">",
"snapshot",
"versions",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"final",
"map",
"<",
"index",
"id",
",",
"list",
"<",
"snapshot",
"id",
">",
">",
"index",
"snapshots",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"final",
"map",
"<",
"string",
",",
"index",
"id",
">",
"index",
"lookup",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"final",
"shard",
"generations",
"builder",
"shard",
"generations",
"=",
"shard",
"generations",
"builder",
"(",
")",
";",
"final",
"map",
"<",
"snapshot",
"id",
",",
"map",
"<",
"string",
",",
"string",
">",
">",
"index",
"meta",
"lookup",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"map",
"<",
"string",
",",
"string",
">",
"index",
"meta",
"identifiers",
"=",
"null",
";",
"while",
"(",
"parser",
"next",
"token",
"(",
")",
"=",
"=",
"x",
"content",
"parser",
"token",
"field",
"name",
")",
"{",
"final",
"string",
"field",
"=",
"parser",
"current",
"name",
"(",
")",
";",
"switch",
"(",
"field",
")",
"{",
"case",
"snapshots",
":",
"parse",
"snapshots",
"(",
"parser",
",",
"snapshots",
",",
"snapshot",
"states",
",",
"snapshot",
"versions",
",",
"index",
"meta",
"lookup",
")",
";",
"break",
";",
"case",
"indices",
":",
"parse",
"indices",
"(",
"parser",
",",
"fix",
"broken",
"shard",
"gens",
",",
"snapshots",
",",
"index",
"snapshots",
",",
"index",
"lookup",
",",
"shard",
"generations",
")",
";",
"break",
";",
"case",
"index",
"metadata",
"identifiers",
":",
"x",
"content",
"parser",
"utils",
"ensure",
"expected",
"token",
"(",
"x",
"content",
"parser",
"token",
"start",
"object",
",",
"parser",
"next",
"token",
"(",
")",
",",
"parser",
")",
";",
"index",
"meta",
"identifiers",
"=",
"parser",
"map",
"strings",
"(",
")",
";",
"break",
";",
"case",
"min",
"version",
":",
"x",
"content",
"parser",
"utils",
"ensure",
"expected",
"token",
"(",
"x",
"content",
"parser",
"token",
"value",
"string",
",",
"parser",
"next",
"token",
"(",
")",
",",
"parser",
")",
";",
"final",
"version",
"version",
"=",
"version",
"from",
"string",
"(",
"parser",
"text",
"(",
")",
")",
";",
"assert",
"snapshots",
"service",
"use",
"shard",
"generations",
"(",
"version",
")",
";",
"break",
";",
"default",
":",
"x",
"content",
"parser",
"utils",
"throw",
"unknown",
"field",
"(",
"field",
",",
"parser",
"get",
"token",
"location",
"(",
")",
")",
";",
"}",
"}",
"return",
"new",
"repository",
"data",
"(",
"gen",
"id",
",",
"snapshots",
",",
"snapshot",
"states",
",",
"snapshot",
"versions",
",",
"index",
"snapshots",
",",
"shard",
"generations",
"build",
"(",
")",
",",
"build",
"index",
"meta",
"generations",
"(",
"index",
"meta",
"lookup",
",",
"index",
"lookup",
",",
"index",
"meta",
"identifiers",
")",
")",
";",
"}"
]
|
[
"find",
"the",
"fields",
"constant",
"that",
"matches",
"field",
"id",
",",
"throwing",
"an",
"exception",
"if",
"it",
"is",
"not",
"found"
]
| [
"public",
"static",
"fields",
"find",
"by",
"thrift",
"id",
"or",
"throw",
"(",
"int",
"field",
"id",
")",
"{",
"fields",
"fields",
"=",
"find",
"by",
"thrift",
"id",
"(",
"field",
"id",
")",
";",
"if",
"(",
"fields",
"=",
"=",
"null",
")",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"field",
"\"",
"+",
"field",
"id",
"+",
"\"",
"doesn",
"'",
"t",
"exist",
"!",
"\"",
")",
";",
"return",
"fields",
";",
"}"
]
|
[
"allows",
"the",
"framework",
"to",
"react",
"to",
"a",
"request",
"to",
"make",
"this",
"folder",
"the",
"\"",
"active",
"\"",
"one"
]
| [
"public",
"void",
"set",
"active",
"(",
")",
";"
]
|
[
"get",
"photo",
"urls"
]
| [
"public",
"set",
"<",
"string",
">",
"get",
"photo",
"urls",
"(",
")",
"{",
"return",
"photo",
"urls",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"v",
"put",
"(",
"k",
"key",
",",
"v",
"value",
")",
"{",
"return",
"null",
";",
"}"
]
|
[
"get",
"outer",
"enum"
]
| [
"public",
"outer",
"enum",
"get",
"outer",
"enum",
"(",
")",
"{",
"return",
"outer",
"enum",
";",
"}"
]
|
[
"make",
"sure",
"that",
"an",
"aggregation",
"using",
"a",
"deterministic",
"script",
"does",
"gets",
"cached",
"while",
"one",
"using",
"a",
"nondeterministic",
"script",
"does",
"not"
]
| [
"public",
"void",
"test",
"script",
"caching",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"directory",
"directory",
"=",
"new",
"directory",
"(",
")",
";",
"random",
"index",
"writer",
"index",
"writer",
"=",
"new",
"random",
"index",
"writer",
"(",
"random",
"(",
")",
",",
"directory",
")",
";",
"final",
"int",
"num",
"docs",
"=",
"10",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"num",
"docs",
";",
"i",
"+",
"+",
")",
"{",
"index",
"writer",
"add",
"document",
"(",
"singleton",
"(",
"new",
"numeric",
"doc",
"values",
"field",
"(",
"\"",
"value",
"\"",
",",
"i",
"+",
"1",
")",
")",
")",
";",
"}",
"index",
"writer",
"close",
"(",
")",
";",
"directory",
"unmapped",
"directory",
"=",
"new",
"directory",
"(",
")",
";",
"random",
"index",
"writer",
"unmapped",
"index",
"writer",
"=",
"new",
"random",
"index",
"writer",
"(",
"random",
"(",
")",
",",
"unmapped",
"directory",
")",
";",
"unmapped",
"index",
"writer",
"close",
"(",
")",
";",
"index",
"reader",
"index",
"reader",
"=",
"directory",
"reader",
"open",
"(",
"directory",
")",
";",
"index",
"reader",
"unamapped",
"index",
"reader",
"=",
"directory",
"reader",
"open",
"(",
"unmapped",
"directory",
")",
";",
"multi",
"reader",
"multi",
"reader",
"=",
"new",
"multi",
"reader",
"(",
"index",
"reader",
",",
"unamapped",
"index",
"reader",
")",
";",
"index",
"searcher",
"index",
"searcher",
"=",
"new",
"searcher",
"(",
"multi",
"reader",
",",
"true",
",",
"true",
")",
";",
"mapped",
"field",
"type",
"field",
"type",
"=",
"new",
"number",
"field",
"mapper",
"number",
"field",
"type",
"(",
"\"",
"value",
"\"",
",",
"number",
"field",
"mapper",
"number",
"type",
"integer",
")",
";",
"avg",
"aggregation",
"builder",
"aggregation",
"builder",
"=",
"new",
"avg",
"aggregation",
"builder",
"(",
"\"",
"avg",
"\"",
")",
"field",
"(",
"\"",
"value",
"\"",
")",
"script",
"(",
"new",
"script",
"(",
"script",
"type",
"inline",
",",
"mock",
"script",
"engine",
"name",
",",
"value",
"script",
",",
"collections",
"empty",
"map",
"(",
")",
")",
")",
";",
"aggregation",
"context",
"context",
"=",
"create",
"aggregation",
"context",
"(",
"index",
"searcher",
",",
"null",
",",
"field",
"type",
")",
";",
"avg",
"aggregator",
"aggregator",
"=",
"create",
"aggregator",
"(",
"aggregation",
"builder",
",",
"context",
")",
";",
"aggregator",
"pre",
"collection",
"(",
")",
";",
"index",
"searcher",
"search",
"(",
"new",
"match",
"all",
"docs",
"query",
"(",
")",
",",
"aggregator",
")",
";",
"internal",
"avg",
"avg",
"=",
"(",
"internal",
"avg",
")",
"aggregator",
"build",
"aggregation",
"(",
"0l",
")",
";",
"assert",
"equals",
"(",
"5",
"5",
",",
"avg",
"get",
"value",
"(",
")",
",",
"0",
")",
";",
"assert",
"equals",
"(",
"\"",
"avg",
"\"",
",",
"avg",
"get",
"name",
"(",
")",
")",
";",
"assert",
"true",
"(",
"aggregation",
"inspection",
"helper",
"has",
"value",
"(",
"avg",
")",
")",
";",
"/",
"/",
"test",
"that",
"an",
"aggregation",
"using",
"a",
"deterministic",
"script",
"gets",
"cached",
"assert",
"true",
"(",
"context",
"is",
"cacheable",
"(",
")",
")",
";",
"aggregation",
"builder",
"=",
"new",
"avg",
"aggregation",
"builder",
"(",
"\"",
"avg",
"\"",
")",
"field",
"(",
"\"",
"value",
"\"",
")",
"script",
"(",
"new",
"script",
"(",
"script",
"type",
"inline",
",",
"mock",
"script",
"engine",
"name",
",",
"random",
"script",
",",
"collections",
"empty",
"map",
"(",
")",
")",
")",
";",
"context",
"=",
"create",
"aggregation",
"context",
"(",
"index",
"searcher",
",",
"null",
",",
"field",
"type",
")",
";",
"aggregator",
"=",
"create",
"aggregator",
"(",
"aggregation",
"builder",
",",
"context",
")",
";",
"aggregator",
"pre",
"collection",
"(",
")",
";",
"index",
"searcher",
"search",
"(",
"new",
"match",
"all",
"docs",
"query",
"(",
")",
",",
"aggregator",
")",
";",
"avg",
"=",
"(",
"internal",
"avg",
")",
"aggregator",
"build",
"aggregation",
"(",
"0l",
")",
";",
"assert",
"true",
"(",
"avg",
"get",
"value",
"(",
")",
">",
"=",
"0",
"0",
")",
";",
"assert",
"true",
"(",
"avg",
"get",
"value",
"(",
")",
"<",
"=",
"1",
"0",
")",
";",
"assert",
"equals",
"(",
"\"",
"avg",
"\"",
",",
"avg",
"get",
"name",
"(",
")",
")",
";",
"assert",
"true",
"(",
"aggregation",
"inspection",
"helper",
"has",
"value",
"(",
"avg",
")",
")",
";",
"/",
"/",
"test",
"that",
"an",
"aggregation",
"using",
"a",
"nondeterministic",
"script",
"does",
"not",
"get",
"cached",
"assert",
"false",
"(",
"context",
"is",
"cacheable",
"(",
")",
")",
";",
"multi",
"reader",
"close",
"(",
")",
";",
"directory",
"close",
"(",
")",
";",
"unmapped",
"directory",
"close",
"(",
")",
";",
"}"
]
|
[
"get",
"sc",
"a",
"e",
"t",
"h",
"flow",
"points"
]
| [
"public",
"string",
"get",
"sc",
"a",
"e",
"t",
"h",
"flow",
"points",
"(",
")",
"{",
"return",
"sc",
"a",
"e",
"t",
"h",
"flow",
"points",
";",
"}"
]
|
[
"returns",
"a",
"version",
"-",
"specific",
"kafka",
"consumer",
"with",
"the",
"start",
"position",
"configured"
]
| [
"protected",
"flink",
"kafka",
"consumer",
"base",
"<",
"row",
">",
"get",
"kafka",
"consumer",
"(",
"string",
"topic",
",",
"properties",
"properties",
",",
"deserialization",
"schema",
"<",
"row",
">",
"deserialization",
"schema",
")",
"{",
"flink",
"kafka",
"consumer",
"base",
"<",
"row",
">",
"kafka",
"consumer",
"=",
"create",
"kafka",
"consumer",
"(",
"topic",
",",
"properties",
",",
"deserialization",
"schema",
")",
";",
"switch",
"(",
"startup",
"mode",
")",
"{",
"case",
"earliest",
":",
"kafka",
"consumer",
"set",
"start",
"from",
"earliest",
"(",
")",
";",
"break",
";",
"case",
"latest",
":",
"kafka",
"consumer",
"set",
"start",
"from",
"latest",
"(",
")",
";",
"break",
";",
"case",
"group",
"offsets",
":",
"kafka",
"consumer",
"set",
"start",
"from",
"group",
"offsets",
"(",
")",
";",
"break",
";",
"case",
"specific",
"offsets",
":",
"kafka",
"consumer",
"set",
"start",
"from",
"specific",
"offsets",
"(",
"specific",
"startup",
"offsets",
")",
";",
"break",
";",
"case",
"timestamp",
":",
"kafka",
"consumer",
"set",
"start",
"from",
"timestamp",
"(",
"startup",
"timestamp",
"millis",
")",
";",
"break",
";",
"}",
"kafka",
"consumer",
"set",
"commit",
"offsets",
"on",
"checkpoints",
"(",
"properties",
"get",
"property",
"(",
"\"",
"group",
"id",
"\"",
")",
"!",
"=",
"null",
")",
";",
"return",
"kafka",
"consumer",
";",
"}"
]
|
[
"return",
"whether",
"a",
"path",
"corresponds",
"java",
"class",
"file"
]
| [
"public",
"static",
"boolean",
"is",
"class",
"file",
"(",
"path",
"path",
")",
"{",
"return",
"path",
"to",
"string",
"(",
")",
"to",
"lower",
"case",
"(",
"locale",
"root",
")",
"ends",
"with",
"(",
"\"",
"class",
"\"",
")",
";",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"adds",
"{",
"@",
"link",
"starlark",
"java",
"method",
"doc",
"}",
"entries",
"to",
"the",
"top",
"level",
"module",
",",
"one",
"for",
"each",
"@",
"starlark",
"method",
"method",
"defined",
"in",
"the",
"given",
"@",
"document",
"methods",
"class",
"{",
"@",
"code",
"module",
"class",
"}"
]
| [
"private",
"static",
"void",
"collect",
"documented",
"methods",
"(",
"class",
"<",
"?",
">",
"module",
"class",
",",
"map",
"<",
"string",
",",
"starlark",
"builtin",
"doc",
">",
"modules",
")",
"{",
"starlark",
"builtin",
"doc",
"top",
"level",
"module",
"doc",
"=",
"get",
"top",
"level",
"module",
"doc",
"(",
"modules",
")",
";",
"for",
"(",
"map",
"entry",
"<",
"method",
",",
"starlark",
"method",
">",
"entry",
":",
"starlark",
"get",
"method",
"annotations",
"(",
"module",
"class",
")",
"entry",
"set",
"(",
")",
")",
"{",
"/",
"/",
"only",
"add",
"non",
"-",
"constructor",
"global",
"library",
"methods",
"constructors",
"are",
"added",
"later",
"if",
"(",
"!",
"entry",
"get",
"key",
"(",
")",
"is",
"annotation",
"present",
"(",
"starlark",
"constructor",
"class",
")",
")",
"{",
"top",
"level",
"module",
"doc",
"add",
"method",
"(",
"new",
"starlark",
"java",
"method",
"doc",
"(",
"\"",
"\"",
",",
"entry",
"get",
"key",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
")",
")",
";",
"}",
"}",
"}"
]
|
[
"get",
"number",
"of",
"finished",
"set",
"up",
"tasks"
]
| [
"public",
"int",
"get",
"num",
"finished",
"setups",
"(",
")",
"{",
"return",
"num",
"finished",
"setups",
";",
"}"
]
|
[
"combines",
"multiple",
"iterables",
"into",
"a",
"single",
"iterable",
"the",
"returned",
"iterable",
"has",
"an",
"iterator",
"that",
"traverses",
"the",
"elements",
"of",
"each",
"iterable",
"in",
"{",
"@",
"code",
"inputs",
"}",
"the",
"input",
"iterators",
"are",
"not",
"polled",
"until",
"necessary",
"the",
"returned",
"iterable",
"'",
"s",
"iterator",
"supports",
"{",
"@",
"code",
"remove",
"(",
")",
"}",
"when",
"the",
"corresponding",
"input",
"iterator",
"supports",
"it",
"the",
"methods",
"of",
"the",
"returned",
"iterable",
"may",
"throw",
"{",
"@",
"code",
"null",
"pointer",
"exception",
"}",
"if",
"any",
"of",
"the",
"input",
"iterators",
"is",
"null",
"<",
"b",
">",
"java",
"8",
"users",
":",
"<",
"b",
">",
"the",
"{",
"@",
"code",
"stream",
"}",
"equivalent",
"of",
"this",
"method",
"is",
"{",
"@",
"code",
"stream",
"of",
"streams",
"flat",
"map",
"(",
"s",
"-",
">",
"s",
")",
"}"
]
| [
"public",
"static",
"<",
"t",
">",
"iterable",
"<",
"t",
">",
"concat",
"(",
"iterable",
"<",
"?",
"extends",
"iterable",
"<",
"?",
"extends",
"t",
">",
">",
"inputs",
")",
"{",
"return",
"fluent",
"iterable",
"concat",
"(",
"inputs",
")",
";",
"}"
]
|
[
"creates",
"a",
"new",
"register",
"value",
"the",
"resulting",
"value",
"is",
"a",
"combination",
"of",
"this",
"register",
"value",
"and",
"the",
"given",
"register",
"value",
",",
"where",
"the",
"given",
"register",
"value",
"'",
"s",
"value",
"bits",
"take",
"precedence",
"over",
"this",
"register",
"value",
"'",
"s",
"value",
"each",
"value",
"bit",
"is",
"determined",
"as",
"follows",
":",
"if",
"the",
"mask",
"bit",
"in",
"<",
"code",
">",
"other",
"value",
"<",
"code",
">",
"is",
"\"",
"on",
"\"",
",",
"then",
"<",
"code",
">",
"other",
"value",
"<",
"code",
">",
"'",
"s",
"value",
"bit",
"is",
"used",
"otherwise",
",",
"<",
"code",
">",
"this",
"<",
"code",
">",
"value",
"bit",
"used",
"the",
"mask",
"bits",
"are",
"or",
"'",
"d",
"together",
"to",
"form",
"the",
"new",
"mask",
"bits"
]
| [
"public",
"register",
"value",
"combine",
"values",
"(",
"register",
"value",
"other",
"value",
")",
"{",
"if",
"(",
"other",
"value",
"=",
"=",
"null",
")",
"{",
"return",
"this",
";",
"}",
"check",
"base",
"register",
"(",
"other",
"value",
"register",
")",
";",
"register",
"base",
"register",
"=",
"register",
"get",
"base",
"register",
"(",
")",
";",
"register",
"result",
"register",
"=",
"register",
";",
"if",
"(",
"register",
"!",
"=",
"other",
"value",
"get",
"register",
"(",
")",
")",
"{",
"result",
"register",
"=",
"base",
"register",
";",
"}",
"byte",
"[",
"]",
"result",
"bytes",
"=",
"new",
"byte",
"[",
"other",
"value",
"bytes",
"length",
"]",
";",
"int",
"n",
"=",
"bytes",
"length",
"/",
"2",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"+",
"+",
")",
"{",
"int",
"mask",
"=",
"other",
"value",
"bytes",
"[",
"i",
"]",
";",
"int",
"clear",
"mask",
"=",
"~",
"mask",
";",
"result",
"bytes",
"[",
"n",
"+",
"i",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"other",
"value",
"bytes",
"[",
"n",
"+",
"i",
"]",
"&",
"mask",
")",
"|",
"(",
"bytes",
"[",
"n",
"+",
"i",
"]",
"&",
"clear",
"mask",
")",
")",
";",
"result",
"bytes",
"[",
"i",
"]",
"=",
"(",
"byte",
")",
"(",
"bytes",
"[",
"i",
"]",
"|",
"other",
"value",
"bytes",
"[",
"i",
"]",
")",
";",
"}",
"return",
"new",
"register",
"value",
"(",
"result",
"register",
",",
"result",
"bytes",
")",
";",
"}"
]
|
[
"returns",
"the",
"window",
"parent",
"of",
"c",
"if",
"c",
"is",
"a",
"window",
",",
"then",
"c",
"is",
"returned",
"<",
"p",
">",
"warning",
":",
"this",
"differs",
"from",
"{",
"@",
"link",
"swing",
"utilities",
"#",
"window",
"for",
"component",
"(",
"component",
")",
"}",
"in",
"that",
"the",
"latter",
"method",
"will",
"not",
"return",
"the",
"given",
"component",
"if",
"it",
"is",
"a",
"window"
]
| [
"public",
"static",
"window",
"window",
"for",
"component",
"(",
"component",
"c",
")",
"{",
"if",
"(",
"c",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"c",
"instanceof",
"window",
")",
"{",
"return",
"(",
"window",
")",
"c",
";",
"}",
"return",
"swing",
"utilities",
"get",
"window",
"ancestor",
"(",
"c",
")",
";",
"}"
]
|
[
"helper",
"for",
"{",
"@",
"code",
"add",
"contents",
"(",
")",
"}",
"methods",
",",
"which",
"adds",
"contents",
"for",
"a",
"particular",
"{",
"@",
"link",
"annotation",
"}",
",",
"calling",
"itself",
"recursively",
"should",
"it",
"encounter",
"a",
"nested",
"annotation"
]
| [
"public",
"static",
"void",
"add",
"contents",
"(",
"dex",
"file",
"file",
",",
"annotation",
"annotation",
")",
"{",
"type",
"ids",
"section",
"type",
"ids",
"=",
"file",
"get",
"type",
"ids",
"(",
")",
";",
"string",
"ids",
"section",
"string",
"ids",
"=",
"file",
"get",
"string",
"ids",
"(",
")",
";",
"type",
"ids",
"intern",
"(",
"annotation",
"get",
"type",
"(",
")",
")",
";",
"for",
"(",
"name",
"value",
"pair",
"pair",
":",
"annotation",
"get",
"name",
"value",
"pairs",
"(",
")",
")",
"{",
"string",
"ids",
"intern",
"(",
"pair",
"get",
"name",
"(",
")",
")",
";",
"add",
"contents",
"(",
"file",
",",
"pair",
"get",
"value",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"helper",
"method",
"to",
"return",
"a",
"register",
"list",
"string"
]
| [
"protected",
"static",
"string",
"reg",
"list",
"string",
"(",
"register",
"spec",
"list",
"list",
")",
"{",
"int",
"sz",
"=",
"list",
"size",
"(",
")",
";",
"string",
"buffer",
"sb",
"=",
"new",
"string",
"buffer",
"(",
"sz",
"*",
"5",
"+",
"2",
")",
";",
"sb",
"append",
"(",
"'",
"{",
"'",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sz",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"i",
"!",
"=",
"0",
")",
"{",
"sb",
"append",
"(",
"\"",
",",
"\"",
")",
";",
"}",
"sb",
"append",
"(",
"list",
"get",
"(",
"i",
")",
"reg",
"string",
"(",
")",
")",
";",
"}",
"sb",
"append",
"(",
"'",
"}",
"'",
")",
";",
"return",
"sb",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"configure",
"a",
"{",
"@",
"link",
"web",
"socket",
"policy",
"}",
"to",
"use",
"to",
"initialize",
"{",
"@",
"link",
"web",
"socket",
"server",
"factory",
"}"
]
| [
"public",
"void",
"set",
"web",
"socket",
"policy",
"(",
"web",
"socket",
"policy",
"web",
"socket",
"policy",
")",
"{",
"this",
"web",
"socket",
"policy",
"=",
"web",
"socket",
"policy",
";",
"}"
]
|
[
"sets",
"which",
"driver",
"executable",
"the",
"builder",
"will",
"use"
]
| [
"public",
"b",
"using",
"driver",
"executable",
"(",
"file",
"file",
")",
"{",
"require",
"non",
"null",
"(",
"\"",
"driver",
"executable",
"file",
"\"",
",",
"file",
")",
";",
"check",
"executable",
"(",
"file",
")",
";",
"this",
"exe",
"=",
"file",
";",
"return",
"(",
"b",
")",
"this",
";",
"}"
]
|
[
"returns",
"the",
"name",
"of",
"the",
"file"
]
| [
"public",
"string",
"to",
"string",
"(",
")",
"{",
"return",
"filename",
";",
"}"
]
|
[
"currently",
",",
"used",
"by",
"node",
"managers",
"only",
"create",
"a",
"proxy",
"for",
"the",
"specified",
"protocol",
"for",
"non",
"-",
"ha",
",",
"this",
"is",
"a",
"direct",
"connection",
"to",
"the",
"resource",
"manager",
"address",
"when",
"ha",
"is",
"enabled",
",",
"the",
"proxy",
"handles",
"the",
"failover",
"between",
"the",
"resource",
"managers",
"as",
"well"
]
| [
"protected",
"static",
"<",
"t",
">",
"t",
"create",
"r",
"m",
"proxy",
"(",
"final",
"configuration",
"configuration",
",",
"final",
"class",
"<",
"t",
">",
"protocol",
",",
"r",
"m",
"proxy",
"<",
"t",
">",
"instance",
",",
"final",
"long",
"retry",
"time",
",",
"final",
"long",
"retry",
"interval",
")",
"throws",
"i",
"o",
"exception",
"{",
"yarn",
"configuration",
"conf",
"=",
"(",
"configuration",
"instanceof",
"yarn",
"configuration",
")",
"?",
"(",
"yarn",
"configuration",
")",
"configuration",
":",
"new",
"yarn",
"configuration",
"(",
"configuration",
")",
";",
"retry",
"policy",
"retry",
"policy",
"=",
"create",
"retry",
"policy",
"(",
"conf",
",",
"retry",
"time",
",",
"retry",
"interval",
",",
"h",
"a",
"util",
"is",
"h",
"a",
"enabled",
"(",
"conf",
")",
")",
";",
"return",
"new",
"proxy",
"instance",
"(",
"conf",
",",
"protocol",
",",
"instance",
",",
"retry",
"policy",
")",
";",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.