docstring_tokens
list | code_tokens
list |
---|---|
[
"return",
"the",
"value",
"for",
"the",
"passed",
"pname",
"given",
"the",
"passed",
"program"
]
| [
"public",
"final",
"native",
"boolean",
"get",
"program",
"parameterb",
"(",
"web",
"g",
"l",
"program",
"program",
",",
"int",
"pname",
")",
"/",
"*",
"-",
"{",
"return",
"this",
"get",
"program",
"parameter",
"(",
"program",
",",
"pname",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"this",
"project",
"url",
"corresponds",
"to",
"a",
"transient",
"project",
"(",
"e",
"g",
",",
"corresponds",
"to",
"remote",
"ghidra",
"url",
")"
]
| [
"public",
"boolean",
"is",
"transient",
"(",
")",
"{",
"return",
"false",
";",
"}"
]
|
[
"adds",
"a",
"new",
"cell",
"with",
"a",
"label",
"this",
"may",
"only",
"be",
"called",
"if",
"a",
"skin",
"has",
"been",
"set",
"with",
"{",
"@",
"link",
"table",
"#",
"table",
"(",
"skin",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"set",
"skin",
"(",
"skin",
")",
"}"
]
| [
"public",
"cell",
"<",
"label",
">",
"add",
"(",
"@",
"null",
"char",
"sequence",
"text",
",",
"string",
"label",
"style",
"name",
")",
"{",
"if",
"(",
"skin",
"=",
"=",
"null",
")",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"table",
"must",
"have",
"a",
"skin",
"set",
"to",
"use",
"this",
"method",
"\"",
")",
";",
"return",
"add",
"(",
"new",
"label",
"(",
"text",
",",
"skin",
"get",
"(",
"label",
"style",
"name",
",",
"label",
"style",
"class",
")",
")",
")",
";",
"}"
]
|
[
"provide",
"a",
"nested",
"string",
"representation",
"of",
"a",
"litho",
"view",
"and",
"its",
"nested",
"components",
"for",
"debugging",
"purposes"
]
| [
"public",
"static",
"string",
"view",
"to",
"string",
"(",
"litho",
"view",
"view",
",",
"boolean",
"embedded",
")",
"{",
"debug",
"component",
"root",
"=",
"debug",
"component",
"get",
"root",
"instance",
"(",
"view",
")",
";",
"if",
"(",
"root",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"\"",
";",
"}",
"final",
"string",
"builder",
"sb",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"int",
"depth",
"=",
"embedded",
"?",
"get",
"litho",
"view",
"depth",
"in",
"android",
"(",
"view",
")",
":",
"0",
";",
"sb",
"append",
"(",
"\"",
"\\",
"n",
"\"",
")",
";",
"view",
"to",
"string",
"(",
"root",
",",
"sb",
",",
"embedded",
",",
"false",
",",
"depth",
",",
"0",
",",
"0",
",",
"null",
")",
";",
"return",
"sb",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"allow",
"map",
"access",
"to",
"the",
"static",
"attributes",
"for",
"views",
"returned",
"by",
"this",
"resolver",
",",
"with",
"the",
"option",
"to",
"add",
"or",
"override",
"specific",
"entries",
"useful",
"for",
"specifying",
"entries",
"directly",
",",
"for",
"example",
"via",
"\"",
"attributes",
"map",
"[",
"my",
"key",
"]",
"\"",
"this",
"is",
"particularly",
"useful",
"for",
"adding",
"or",
"overriding",
"entries",
"in",
"child",
"view",
"definitions"
]
| [
"public",
"map",
"<",
"string",
",",
"object",
">",
"get",
"attributes",
"map",
"(",
")",
"{",
"return",
"this",
"static",
"attributes",
";",
"}"
]
|
[
"visit",
"a",
"parse",
"tree",
"produced",
"by",
"{",
"@",
"link",
"sql",
"base",
"parser",
"#",
"pivot",
"clause",
"}"
]
| [
"t",
"visit",
"pivot",
"clause",
"(",
"sql",
"base",
"parser",
"pivot",
"clause",
"context",
"ctx",
")",
";"
]
|
[
"returns",
"`",
"api",
"exception",
"`",
"if",
"the",
"log",
"directory",
"is",
"offline",
"or",
"an",
"error",
"occurred",
",",
"otherwise",
"returns",
"null",
"kafka",
"storage",
"exception",
"-",
"the",
"log",
"directory",
"is",
"offline",
"unknown",
"server",
"exception",
"-",
"the",
"server",
"experienced",
"an",
"unexpected",
"error",
"when",
"processing",
"the",
"request"
]
| [
"public",
"api",
"exception",
"error",
"(",
")",
"{",
"return",
"error",
";",
"}"
]
|
[
"'",
"'",
","
]
| [
"public",
"static",
"int",
"divide",
"(",
"int",
"p",
",",
"int",
"q",
",",
"rounding",
"mode",
"mode",
")",
"{",
"return",
"int",
"math",
"divide",
"(",
"p",
",",
"q",
",",
"mode",
")",
";",
"}"
]
|
[
"start",
"the",
"launcher",
"activity"
]
| [
"public",
"static",
"void",
"start",
"launcher",
"activity",
"(",
")",
"{",
"start",
"launcher",
"activity",
"(",
"utils",
"get",
"app",
"(",
")",
"get",
"package",
"name",
"(",
")",
")",
";",
"}"
]
|
[
"all",
"instances",
"have",
"the",
"same",
"hash",
"code"
]
| [
"public",
"int",
"hash",
"code",
"(",
")",
"{",
"return",
"no",
"client",
"bind",
"protocol",
"socket",
"factory",
"class",
"hash",
"code",
"(",
")",
";",
"}"
]
|
[
"tests",
"that",
"tombstone",
"expiry",
"is",
"implemented",
"if",
"a",
"file",
"is",
"created",
"raw",
"while",
"the",
"tombstone",
"exist",
"in",
"ms",
"for",
"with",
"the",
"same",
"name",
"then",
"s",
"3",
"guard",
"will",
"check",
"s3",
"for",
"the",
"file",
"seq",
":",
"create",
"guarded",
";",
"delete",
"guarded",
";",
"create",
"raw",
"(",
"same",
"path",
")",
";",
"read",
"guarded",
";",
"this",
"will",
"fail",
"if",
"no",
"tombstone",
"expiry",
"is",
"set"
]
| [
"public",
"void",
"test",
"tombstone",
"expiry",
"guarded",
"delete",
"raw",
"create",
"(",
")",
"throws",
"exception",
"{",
"boolean",
"allow",
"authoritative",
"=",
"authoritative",
";",
"path",
"test",
"file",
"path",
"=",
"path",
"(",
"\"",
"tegdrc",
"-",
"\"",
"+",
"uuid",
"random",
"u",
"u",
"i",
"d",
"(",
")",
"+",
"\"",
"/",
"file",
"\"",
")",
";",
"log",
"info",
"(",
"\"",
"allow",
"authoritative",
"param",
":",
"{",
"}",
"\"",
",",
"allow",
"authoritative",
")",
";",
"string",
"original",
"text",
"=",
"\"",
"some",
"test",
"\"",
";",
"string",
"new",
"text",
"=",
"\"",
"the",
"new",
"original",
"text",
"for",
"test",
"\"",
";",
"final",
"i",
"ttl",
"time",
"provider",
"original",
"time",
"provider",
"=",
"guarded",
"fs",
"get",
"ttl",
"time",
"provider",
"(",
")",
";",
"try",
"{",
"final",
"atomic",
"long",
"now",
"=",
"new",
"atomic",
"long",
"(",
"1",
")",
";",
"final",
"atomic",
"long",
"metadata",
"ttl",
"=",
"new",
"atomic",
"long",
"(",
"1",
")",
";",
"/",
"/",
"set",
"ttl",
"time",
"provider",
"for",
"testing",
"i",
"ttl",
"time",
"provider",
"test",
"time",
"provider",
"=",
"new",
"i",
"ttl",
"time",
"provider",
"(",
")",
"{",
"@",
"override",
"public",
"long",
"get",
"now",
"(",
")",
"{",
"return",
"now",
"get",
"(",
")",
";",
"}",
"@",
"override",
"public",
"long",
"get",
"metadata",
"ttl",
"(",
")",
"{",
"return",
"metadata",
"ttl",
"get",
"(",
")",
";",
"}",
"}",
";",
"guarded",
"fs",
"set",
"ttl",
"time",
"provider",
"(",
"test",
"time",
"provider",
")",
";",
"/",
"/",
"create",
"guarded",
"create",
"and",
"await",
"fs",
"(",
"guarded",
"fs",
",",
"test",
"file",
"path",
",",
"original",
"text",
")",
";",
"/",
"/",
"delete",
"guarded",
"delete",
"guarded",
"tombstoned",
"(",
"guarded",
"fs",
",",
"test",
"file",
"path",
",",
"now",
")",
";",
"/",
"/",
"create",
"raw",
"create",
"and",
"await",
"fs",
"(",
"raw",
"f",
"s",
",",
"test",
"file",
"path",
",",
"new",
"text",
")",
";",
"/",
"/",
"check",
"listing",
"-",
"the",
"file",
"should",
"not",
"be",
"there",
",",
"even",
"if",
"it",
"'",
"s",
"created",
"raw",
"check",
"listing",
"does",
"not",
"contain",
"path",
"(",
"guarded",
"fs",
",",
"test",
"file",
"path",
")",
";",
"/",
"/",
"change",
"ttl",
"so",
"entry",
"(",
"&",
"tombstone",
"metadata",
")",
"will",
"expire",
"long",
"will",
"expire",
"=",
"now",
"get",
"(",
")",
"+",
"metadata",
"ttl",
"get",
"(",
")",
"+",
"1l",
";",
"now",
"set",
"(",
"will",
"expire",
")",
";",
"log",
"info",
"(",
"\"",
"will",
"expire",
":",
"{",
"}",
",",
"ttl",
"now",
":",
"{",
"}",
";",
"ttl",
"t",
"t",
"l",
":",
"{",
"}",
"\"",
",",
"will",
"expire",
",",
"test",
"time",
"provider",
"get",
"now",
"(",
")",
",",
"test",
"time",
"provider",
"get",
"metadata",
"ttl",
"(",
")",
")",
";",
"/",
"/",
"read",
"guarded",
"/",
"/",
"this",
"should",
"fail",
"in",
"authoritative",
"mode",
"since",
"we",
"trust",
"the",
"metadatastore",
"/",
"/",
"despite",
"of",
"the",
"expiry",
"the",
"metadata",
"will",
"not",
"expire",
"if",
"(",
"authoritative",
")",
"{",
"intercept",
"(",
"file",
"not",
"found",
"exception",
"class",
",",
"test",
"file",
"path",
"to",
"string",
"(",
")",
",",
"\"",
"file",
"should",
"not",
"be",
"present",
"in",
"the",
"metedatastore",
"in",
"authoritative",
"mode",
"\"",
",",
"(",
")",
"-",
">",
"read",
"bytes",
"to",
"string",
"(",
"guarded",
"fs",
",",
"test",
"file",
"path",
",",
"new",
"text",
"length",
"(",
")",
")",
")",
";",
"}",
"else",
"{",
"string",
"new",
"read",
"=",
"read",
"bytes",
"to",
"string",
"(",
"guarded",
"fs",
",",
"test",
"file",
"path",
",",
"new",
"text",
"length",
"(",
")",
")",
";",
"/",
"/",
"check",
"listing",
"-",
"the",
"file",
"should",
"be",
"there",
",",
"tombstone",
"expired",
"check",
"listing",
"contains",
"path",
"(",
"guarded",
"fs",
",",
"test",
"file",
"path",
")",
";",
"/",
"/",
"we",
"can",
"assert",
"that",
"the",
"original",
"text",
"is",
"the",
"new",
"one",
",",
"which",
"created",
"raw",
"log",
"info",
"(",
"\"",
"old",
":",
"{",
"}",
",",
"new",
":",
"{",
"}",
",",
"read",
":",
"{",
"}",
"\"",
",",
"original",
"text",
",",
"new",
"text",
",",
"new",
"read",
")",
";",
"assert",
"equals",
"(",
"\"",
"the",
"text",
"should",
"be",
"modified",
"with",
"a",
"new",
"\"",
",",
"new",
"text",
",",
"new",
"read",
")",
";",
"}",
"}",
"finally",
"{",
"guarded",
"fs",
"delete",
"(",
"test",
"file",
"path",
",",
"true",
")",
";",
"guarded",
"fs",
"set",
"ttl",
"time",
"provider",
"(",
"original",
"time",
"provider",
")",
";",
"}",
"}"
]
|
[
"allows",
"the",
"disassembler",
"context",
"to",
"be",
"seeded",
"for",
"the",
"various",
"disassembly",
"start",
"points",
"which",
"may",
"be",
"encountered",
"using",
"the",
"future",
"flow",
"state",
"of",
"the",
"specified",
"seed",
"context",
"any",
"initial",
"context",
"set",
"via",
"the",
"{",
"@",
"link",
"#",
"set",
"initial",
"context",
"(",
"register",
"value",
")",
"}",
"method",
"will",
"take",
"precedence",
"when",
"combined",
"with",
"any",
"seed",
"values",
"the",
"seed",
"context",
"should",
"remain",
"unchanged",
"while",
"disassembler",
"command",
"is",
"actively",
"running"
]
| [
"public",
"void",
"set",
"seed",
"context",
"(",
"disassembler",
"context",
"impl",
"seed",
"context",
")",
"{",
"this",
"seed",
"context",
"=",
"seed",
"context",
";",
"}"
]
|
[
"sets",
"the",
"min",
"width",
",",
"pref",
"width",
",",
"max",
"width",
",",
"min",
"height",
",",
"pref",
"height",
",",
"and",
"max",
"height",
"to",
"the",
"specified",
"value"
]
| [
"public",
"container",
"<",
"t",
">",
"size",
"(",
"value",
"size",
")",
"{",
"if",
"(",
"size",
"=",
"=",
"null",
")",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"size",
"cannot",
"be",
"null",
"\"",
")",
";",
"min",
"width",
"=",
"size",
";",
"min",
"height",
"=",
"size",
";",
"pref",
"width",
"=",
"size",
";",
"pref",
"height",
"=",
"size",
";",
"max",
"width",
"=",
"size",
";",
"max",
"height",
"=",
"size",
";",
"return",
"this",
";",
"}"
]
|
[
"validate",
"if",
"the",
"application",
"id",
"is",
"present",
"or",
"not"
]
| [
"private",
"static",
"void",
"check",
"application",
"id",
"(",
"application",
"id",
"app",
"id",
")",
"throws",
"federation",
"state",
"store",
"invalid",
"input",
"exception",
"{",
"if",
"(",
"app",
"id",
"=",
"=",
"null",
")",
"{",
"string",
"message",
"=",
"\"",
"missing",
"application",
"id",
"\"",
"+",
"\"",
"please",
"try",
"again",
"by",
"specifying",
"an",
"application",
"id",
"\"",
";",
"log",
"warn",
"(",
"message",
")",
";",
"throw",
"new",
"federation",
"state",
"store",
"invalid",
"input",
"exception",
"(",
"message",
")",
";",
"}",
"}"
]
|
[
"caliper",
"metrics",
"wrapper"
]
| [
"protected",
"caliper",
"measure",
"measure",
"(",
")",
"{",
"return",
"measure",
";",
"}"
]
|
[
"you",
"can",
"disable",
"sleeping",
"on",
"this",
"body",
"if",
"you",
"disable",
"sleeping",
",",
"the"
]
| [
"public",
"void",
"set",
"sleeping",
"allowed",
"(",
"boolean",
"flag",
")",
"{",
"body",
"set",
"sleeping",
"allowed",
"(",
"flag",
")",
";",
"}"
]
|
[
"the",
"magic",
"item",
"supplies",
"the",
"magic",
"number",
"identifying",
"the",
"class",
"file",
"format",
";",
"it",
"has",
"the",
"value",
"0x",
"c",
"a",
"f",
"e",
"b",
"a",
"b",
"e"
]
| [
"public",
"int",
"get",
"magic",
"(",
")",
"{",
"return",
"magic",
";",
"}"
]
|
[
"gets",
"foreign",
"keys",
"which",
"refers",
"this",
"table"
]
| [
"list",
"<",
"?",
"extends",
"d",
"b",
"s",
"trigger",
">",
"get",
"triggers",
"(",
"@",
"not",
"null",
"d",
"b",
"r",
"progress",
"monitor",
"monitor",
")",
"throws",
"d",
"b",
"exception",
";"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"string",
"insn",
"comment",
"string",
"(",
"dalv",
"insn",
"insn",
",",
"boolean",
"note",
"indices",
")",
"{",
"return",
"branch",
"comment",
"(",
"insn",
")",
";",
"}"
]
|
[
"register",
"the",
"given",
"datanode",
"with",
"the",
"namenode",
"nb",
":",
"the",
"given",
"registration",
"is",
"mutated",
"and",
"given",
"back",
"to",
"the",
"datanode"
]
| [
"public",
"void",
"register",
"datanode",
"(",
"datanode",
"registration",
"node",
"reg",
")",
"throws",
"disallowed",
"datanode",
"exception",
",",
"unresolved",
"topology",
"exception",
"{",
"inet",
"address",
"dn",
"address",
"=",
"server",
"get",
"remote",
"ip",
"(",
")",
";",
"if",
"(",
"dn",
"address",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"mostly",
"called",
"inside",
"an",
"rpc",
",",
"update",
"ip",
"and",
"peer",
"hostname",
"string",
"hostname",
"=",
"dn",
"address",
"get",
"host",
"name",
"(",
")",
";",
"string",
"ip",
"=",
"dn",
"address",
"get",
"host",
"address",
"(",
")",
";",
"if",
"(",
"check",
"ip",
"hostname",
"in",
"registration",
"&",
"&",
"!",
"is",
"name",
"resolved",
"(",
"dn",
"address",
")",
")",
"{",
"/",
"/",
"reject",
"registration",
"of",
"unresolved",
"datanode",
"to",
"prevent",
"performance",
"/",
"/",
"impact",
"of",
"repetitive",
"dns",
"lookups",
"later",
"final",
"string",
"message",
"=",
"\"",
"hostname",
"cannot",
"be",
"resolved",
"(",
"ip",
"=",
"\"",
"+",
"ip",
"+",
"\"",
",",
"hostname",
"=",
"\"",
"+",
"hostname",
"+",
"\"",
")",
"\"",
";",
"log",
"warn",
"(",
"\"",
"unresolved",
"datanode",
"registration",
":",
"\"",
"+",
"message",
")",
";",
"throw",
"new",
"disallowed",
"datanode",
"exception",
"(",
"node",
"reg",
",",
"message",
")",
";",
"}",
"/",
"/",
"update",
"node",
"registration",
"with",
"the",
"ip",
"and",
"hostname",
"from",
"rpc",
"request",
"node",
"reg",
"set",
"ip",
"addr",
"(",
"ip",
")",
";",
"node",
"reg",
"set",
"peer",
"host",
"name",
"(",
"hostname",
")",
";",
"}",
"try",
"{",
"node",
"reg",
"set",
"exported",
"keys",
"(",
"block",
"manager",
"get",
"block",
"keys",
"(",
")",
")",
";",
"/",
"/",
"checks",
"if",
"the",
"node",
"is",
"not",
"on",
"the",
"hosts",
"list",
"if",
"it",
"is",
"not",
",",
"then",
"/",
"/",
"it",
"will",
"be",
"disallowed",
"from",
"registering",
"if",
"(",
"!",
"host",
"config",
"manager",
"is",
"included",
"(",
"node",
"reg",
")",
")",
"{",
"throw",
"new",
"disallowed",
"datanode",
"exception",
"(",
"node",
"reg",
")",
";",
"}",
"name",
"node",
"state",
"change",
"log",
"info",
"(",
"\"",
"block",
"*",
"register",
"datanode",
":",
"from",
"\"",
"+",
"node",
"reg",
"+",
"\"",
"storage",
"\"",
"+",
"node",
"reg",
"get",
"datanode",
"uuid",
"(",
")",
")",
";",
"datanode",
"descriptor",
"node",
"s",
"=",
"get",
"datanode",
"(",
"node",
"reg",
"get",
"datanode",
"uuid",
"(",
")",
")",
";",
"datanode",
"descriptor",
"node",
"n",
"=",
"host",
"2",
"datanode",
"map",
"get",
"datanode",
"by",
"xfer",
"addr",
"(",
"node",
"reg",
"get",
"ip",
"addr",
"(",
")",
",",
"node",
"reg",
"get",
"xfer",
"port",
"(",
")",
")",
";",
"if",
"(",
"node",
"n",
"!",
"=",
"null",
"&",
"&",
"node",
"n",
"!",
"=",
"node",
"s",
")",
"{",
"name",
"node",
"log",
"info",
"(",
"\"",
"block",
"*",
"register",
"datanode",
":",
"\"",
"+",
"node",
"n",
")",
";",
"/",
"/",
"node",
"n",
"previously",
"served",
"a",
"different",
"data",
"storage",
",",
"/",
"/",
"which",
"is",
"not",
"served",
"by",
"anybody",
"anymore",
"remove",
"datanode",
"(",
"node",
"n",
")",
";",
"/",
"/",
"physically",
"remove",
"node",
"from",
"datanode",
"map",
"wipe",
"datanode",
"(",
"node",
"n",
")",
";",
"node",
"n",
"=",
"null",
";",
"}",
"if",
"(",
"node",
"s",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"node",
"n",
"=",
"=",
"node",
"s",
")",
"{",
"/",
"/",
"the",
"same",
"datanode",
"has",
"been",
"just",
"restarted",
"to",
"serve",
"the",
"same",
"data",
"/",
"/",
"storage",
"we",
"do",
"not",
"need",
"to",
"remove",
"old",
"data",
"blocks",
",",
"the",
"delta",
"will",
"/",
"/",
"be",
"calculated",
"on",
"the",
"next",
"block",
"report",
"from",
"the",
"datanode",
"if",
"(",
"name",
"node",
"state",
"change",
"log",
"is",
"debug",
"enabled",
"(",
")",
")",
"{",
"name",
"node",
"state",
"change",
"log",
"debug",
"(",
"\"",
"block",
"*",
"register",
"datanode",
":",
"\"",
"+",
"\"",
"node",
"restarted",
"\"",
")",
";",
"}",
"}",
"else",
"{",
"/",
"/",
"node",
"s",
"is",
"found",
"/",
"*",
"the",
"registering",
"datanode",
"is",
"a",
"replacement",
"node",
"for",
"the",
"existing",
"data",
"storage",
",",
"which",
"from",
"now",
"on",
"will",
"be",
"served",
"by",
"a",
"new",
"node",
"if",
"this",
"message",
"repeats",
",",
"both",
"nodes",
"might",
"have",
"same",
"storage",
"i",
"d",
"by",
"(",
"insanely",
"rare",
")",
"random",
"chance",
"user",
"needs",
"to",
"restart",
"one",
"of",
"the",
"nodes",
"with",
"its",
"data",
"cleared",
"(",
"or",
"user",
"can",
"just",
"remove",
"the",
"storage",
"i",
"d",
"value",
"in",
"\"",
"version",
"\"",
"file",
"under",
"the",
"data",
"directory",
"of",
"the",
"datanode",
",",
"but",
"this",
"is",
"might",
"not",
"work",
"if",
"version",
"file",
"format",
"has",
"changed",
"*",
"/",
"name",
"node",
"state",
"change",
"log",
"info",
"(",
"\"",
"block",
"*",
"register",
"datanode",
":",
"\"",
"+",
"node",
"s",
"+",
"\"",
"is",
"replaced",
"by",
"\"",
"+",
"node",
"reg",
"+",
"\"",
"with",
"the",
"same",
"storage",
"i",
"d",
"\"",
"+",
"node",
"reg",
"get",
"datanode",
"uuid",
"(",
")",
")",
";",
"}",
"boolean",
"success",
"=",
"false",
";",
"try",
"{",
"/",
"/",
"update",
"cluster",
"map",
"get",
"network",
"topology",
"(",
")",
"remove",
"(",
"node",
"s",
")",
";",
"if",
"(",
"should",
"count",
"version",
"(",
"node",
"s",
")",
")",
"{",
"decrement",
"version",
"count",
"(",
"node",
"s",
"get",
"software",
"version",
"(",
")",
")",
";",
"}",
"node",
"s",
"update",
"reg",
"info",
"(",
"node",
"reg",
")",
";",
"node",
"s",
"set",
"software",
"version",
"(",
"node",
"reg",
"get",
"software",
"version",
"(",
")",
")",
";",
"node",
"s",
"set",
"disallowed",
"(",
"false",
")",
";",
"/",
"/",
"node",
"is",
"in",
"the",
"include",
"list",
"/",
"/",
"resolve",
"network",
"location",
"if",
"(",
"this",
"reject",
"unresolved",
"topology",
"d",
"n",
")",
"{",
"node",
"s",
"set",
"network",
"location",
"(",
"resolve",
"network",
"location",
"(",
"node",
"s",
")",
")",
";",
"node",
"s",
"set",
"dependent",
"host",
"names",
"(",
"get",
"network",
"dependencies",
"(",
"node",
"s",
")",
")",
";",
"}",
"else",
"{",
"node",
"s",
"set",
"network",
"location",
"(",
"resolve",
"network",
"location",
"with",
"fall",
"back",
"to",
"default",
"location",
"(",
"node",
"s",
")",
")",
";",
"node",
"s",
"set",
"dependent",
"host",
"names",
"(",
"get",
"network",
"dependencies",
"with",
"default",
"(",
"node",
"s",
")",
")",
";",
"}",
"get",
"network",
"topology",
"(",
")",
"add",
"(",
"node",
"s",
")",
";",
"resolve",
"upgrade",
"domain",
"(",
"node",
"s",
")",
";",
"/",
"/",
"also",
"treat",
"the",
"registration",
"message",
"as",
"a",
"heartbeat",
"heartbeat",
"manager",
"register",
"(",
"node",
"s",
")",
";",
"increment",
"version",
"count",
"(",
"node",
"s",
"get",
"software",
"version",
"(",
")",
")",
";",
"start",
"admin",
"operation",
"if",
"necessary",
"(",
"node",
"s",
")",
";",
"success",
"=",
"true",
";",
"}",
"finally",
"{",
"if",
"(",
"!",
"success",
")",
"{",
"remove",
"datanode",
"(",
"node",
"s",
")",
";",
"wipe",
"datanode",
"(",
"node",
"s",
")",
";",
"count",
"software",
"versions",
"(",
")",
";",
"}",
"}",
"return",
";",
"}",
"datanode",
"descriptor",
"node",
"descr",
"=",
"new",
"datanode",
"descriptor",
"(",
"node",
"reg",
",",
"network",
"topology",
"default",
"rack",
")",
";",
"boolean",
"success",
"=",
"false",
";",
"try",
"{",
"/",
"/",
"resolve",
"network",
"location",
"if",
"(",
"this",
"reject",
"unresolved",
"topology",
"d",
"n",
")",
"{",
"node",
"descr",
"set",
"network",
"location",
"(",
"resolve",
"network",
"location",
"(",
"node",
"descr",
")",
")",
";",
"node",
"descr",
"set",
"dependent",
"host",
"names",
"(",
"get",
"network",
"dependencies",
"(",
"node",
"descr",
")",
")",
";",
"}",
"else",
"{",
"node",
"descr",
"set",
"network",
"location",
"(",
"resolve",
"network",
"location",
"with",
"fall",
"back",
"to",
"default",
"location",
"(",
"node",
"descr",
")",
")",
";",
"node",
"descr",
"set",
"dependent",
"host",
"names",
"(",
"get",
"network",
"dependencies",
"with",
"default",
"(",
"node",
"descr",
")",
")",
";",
"}",
"node",
"descr",
"set",
"software",
"version",
"(",
"node",
"reg",
"get",
"software",
"version",
"(",
")",
")",
";",
"resolve",
"upgrade",
"domain",
"(",
"node",
"descr",
")",
";",
"/",
"/",
"register",
"new",
"datanode",
"add",
"datanode",
"(",
"node",
"descr",
")",
";",
"block",
"manager",
"get",
"block",
"report",
"lease",
"manager",
"(",
")",
"register",
"(",
"node",
"descr",
")",
";",
"/",
"/",
"also",
"treat",
"the",
"registration",
"message",
"as",
"a",
"heartbeat",
"/",
"/",
"no",
"need",
"to",
"update",
"its",
"timestamp",
"/",
"/",
"because",
"its",
"is",
"done",
"when",
"the",
"descriptor",
"is",
"created",
"heartbeat",
"manager",
"add",
"datanode",
"(",
"node",
"descr",
")",
";",
"heartbeat",
"manager",
"update",
"dn",
"stat",
"(",
"node",
"descr",
")",
";",
"increment",
"version",
"count",
"(",
"node",
"reg",
"get",
"software",
"version",
"(",
")",
")",
";",
"start",
"admin",
"operation",
"if",
"necessary",
"(",
"node",
"descr",
")",
";",
"success",
"=",
"true",
";",
"}",
"finally",
"{",
"if",
"(",
"!",
"success",
")",
"{",
"remove",
"datanode",
"(",
"node",
"descr",
")",
";",
"wipe",
"datanode",
"(",
"node",
"descr",
")",
";",
"count",
"software",
"versions",
"(",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"invalid",
"topology",
"exception",
"e",
")",
"{",
"/",
"/",
"if",
"the",
"network",
"location",
"is",
"invalid",
",",
"clear",
"the",
"cached",
"mappings",
"/",
"/",
"so",
"that",
"we",
"have",
"a",
"chance",
"to",
"re",
"-",
"add",
"this",
"data",
"node",
"with",
"the",
"/",
"/",
"correct",
"network",
"location",
"later",
"list",
"<",
"string",
">",
"invalid",
"node",
"names",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"3",
")",
";",
"/",
"/",
"clear",
"cache",
"for",
"nodes",
"in",
"ip",
"or",
"hostname",
"invalid",
"node",
"names",
"add",
"(",
"node",
"reg",
"get",
"ip",
"addr",
"(",
")",
")",
";",
"invalid",
"node",
"names",
"add",
"(",
"node",
"reg",
"get",
"host",
"name",
"(",
")",
")",
";",
"invalid",
"node",
"names",
"add",
"(",
"node",
"reg",
"get",
"peer",
"host",
"name",
"(",
")",
")",
";",
"dns",
"to",
"switch",
"mapping",
"reload",
"cached",
"mappings",
"(",
"invalid",
"node",
"names",
")",
";",
"throw",
"e",
";",
"}",
"}"
]
|
[
"return",
"the",
"handle",
"to",
"the",
"kafka",
"cluster",
"this",
"connect",
"cluster",
"connects",
"to"
]
| [
"public",
"embedded",
"kafka",
"cluster",
"kafka",
"(",
")",
"{",
"return",
"kafka",
"cluster",
";",
"}"
]
|
[
"used",
"internally",
"to",
"know",
"if",
"name",
"is",
"generated",
"by",
"green",
"d",
"a",
"o"
]
| [
"void",
"set",
"default",
"name",
"(",
"string",
"name",
")",
"{",
"this",
"name",
"=",
"name",
";",
"this",
"non",
"default",
"name",
"=",
"false",
";",
"}"
]
|
[
"return",
"a",
"predicate",
"for",
"excluding",
"classes",
"from",
"the",
"import",
"candidates",
",",
"to",
"be",
"transitively",
"applied",
"to",
"all",
"classes",
"found",
"through",
"this",
"selector",
"'",
"s",
"imports",
"if",
"this",
"predicate",
"returns",
"{",
"@",
"code",
"true",
"}",
"for",
"a",
"given",
"fully",
"-",
"qualified",
"class",
"name",
",",
"said",
"class",
"will",
"not",
"be",
"considered",
"as",
"an",
"imported",
"configuration",
"class",
",",
"bypassing",
"class",
"file",
"loading",
"as",
"well",
"as",
"metadata",
"introspection"
]
| [
"default",
"predicate",
"<",
"string",
">",
"get",
"exclusion",
"filter",
"(",
")",
"{",
"return",
"null",
";",
"}"
]
|
[
"build",
"the",
"roadmap",
",",
"draw",
"a",
"postcard"
]
| [
"public",
"postcard",
"build",
"(",
"uri",
"url",
")",
"{",
"return",
"a",
"router",
"get",
"instance",
"(",
")",
"build",
"(",
"url",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"this",
"is",
"the",
"default",
"resource",
"of",
"a",
"resource",
"type",
"resource",
"name",
"is",
"empty",
"for",
"the",
"default",
"resource"
]
| [
"public",
"boolean",
"is",
"default",
"(",
")",
"{",
"return",
"name",
"is",
"empty",
"(",
")",
";",
"}"
]
|
[
"writes",
"the",
"specified",
"bytes",
"to",
"the",
"file",
"parent",
"directories",
"will",
"be",
"created",
"if",
"necessary"
]
| [
"public",
"void",
"write",
"bytes",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"offset",
",",
"int",
"length",
",",
"boolean",
"append",
")",
"{",
"output",
"stream",
"output",
"=",
"write",
"(",
"append",
")",
";",
"try",
"{",
"output",
"write",
"(",
"bytes",
",",
"offset",
",",
"length",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ex",
")",
"{",
"throw",
"new",
"gdx",
"runtime",
"exception",
"(",
"\"",
"error",
"writing",
"file",
":",
"\"",
"+",
"file",
"+",
"\"",
"(",
"\"",
"+",
"type",
"+",
"\"",
")",
"\"",
",",
"ex",
")",
";",
"}",
"finally",
"{",
"stream",
"utils",
"close",
"quietly",
"(",
"output",
")",
";",
"}",
"}"
]
|
[
"return",
"the",
"path",
"of",
"storageemulated",
"0",
"notifications"
]
| [
"public",
"static",
"string",
"get",
"external",
"notifications",
"path",
"(",
")",
"{",
"if",
"(",
"!",
"utils",
"bridge",
"is",
"s",
"d",
"card",
"enable",
"by",
"environment",
"(",
")",
")",
"return",
"\"",
"\"",
";",
"return",
"get",
"absolute",
"path",
"(",
"environment",
"get",
"external",
"storage",
"public",
"directory",
"(",
"environment",
"directory",
"notifications",
")",
")",
";",
"}"
]
|
[
"submits",
"a",
"update",
"by",
"query",
"task",
"see",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchreferencecurrentdocs",
"-",
"update",
"-",
"by",
"-",
"query",
"html",
"\"",
">",
"update",
"by",
"query",
"api",
"on",
"elastic",
"co"
]
| [
"public",
"final",
"task",
"submission",
"response",
"submit",
"update",
"by",
"query",
"task",
"(",
"update",
"by",
"query",
"request",
"update",
"by",
"query",
"request",
",",
"request",
"options",
"options",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"perform",
"request",
"and",
"parse",
"entity",
"(",
"update",
"by",
"query",
"request",
",",
"request",
"converters",
":",
":",
"submit",
"update",
"by",
"query",
",",
"options",
",",
"task",
"submission",
"response",
":",
":",
"from",
"x",
"content",
",",
"empty",
"set",
"(",
")",
")",
";",
"}"
]
|
[
"returns",
"the",
"current",
"session",
"associated",
"with",
"this",
"request",
",",
"or",
"if",
"there",
"is",
"no",
"current",
"session",
"and",
"<",
"code",
">",
"create",
"<",
"code",
">",
"is",
"true",
",",
"returns",
"a",
"new",
"session"
]
| [
"public",
"session",
"session",
"(",
"boolean",
"create",
")",
"{",
"if",
"(",
"session",
"=",
"=",
"null",
"|",
"|",
"!",
"valid",
"session",
")",
"{",
"http",
"session",
"http",
"session",
"=",
"servlet",
"request",
"get",
"session",
"(",
"create",
")",
";",
"if",
"(",
"http",
"session",
"!",
"=",
"null",
")",
"{",
"valid",
"session",
"(",
"true",
")",
";",
"session",
"=",
"new",
"session",
"(",
"http",
"session",
",",
"this",
")",
";",
"}",
"else",
"{",
"session",
"=",
"null",
";",
"}",
"}",
"return",
"session",
";",
"}"
]
|
[
"get",
"the",
"length",
"of",
"a",
"stored",
"record",
"with",
"key"
]
| [
"private",
"int",
"get",
"full",
"record",
"length",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"=",
"=",
"0",
")",
"{",
"return",
"buffer",
"length",
"(",
")",
"-",
"get",
"record",
"key",
"offset",
"(",
"0",
")",
";",
"}",
"return",
"get",
"record",
"key",
"offset",
"(",
"index",
"-",
"1",
")",
"-",
"get",
"record",
"key",
"offset",
"(",
"index",
")",
";",
"}"
]
|
[
"the",
"total",
"current",
"memory",
"usage",
"by",
"processes",
"in",
"the",
"cgroup",
"(",
"in",
"bytes",
")",
"this",
"is",
"stored",
"as",
"a",
"<",
"code",
">",
"string",
"<",
"code",
">",
"for",
"consistency",
"with",
"<",
"code",
">",
"memory",
"limit",
"in",
"bytes",
"<",
"code",
">"
]
| [
"public",
"string",
"get",
"memory",
"usage",
"in",
"bytes",
"(",
")",
"{",
"return",
"memory",
"usage",
"in",
"bytes",
";",
"}"
]
|
[
"returns",
"a",
"thread",
"pool",
"that",
"is",
"meant",
"to",
"be",
"shared",
"amongst",
"analyzers",
"that",
"wish",
"to",
"run",
"in",
"parallel",
"normally",
",",
"this",
"will",
"only",
"be",
"used",
"by",
"one",
"analyzer",
"at",
"a",
"time",
"however",
",",
"if",
"multiple",
"tools",
"are",
"running",
",",
"then",
"they",
"will",
"share",
"this",
"pool"
]
| [
"public",
"static",
"g",
"thread",
"pool",
"get",
"shared",
"analsys",
"thread",
"pool",
"(",
")",
"{",
"g",
"thread",
"pool",
"pool",
"=",
"g",
"thread",
"pool",
"get",
"shared",
"thread",
"pool",
"(",
"shared",
"thread",
"pool",
"name",
")",
";",
"update",
"shared",
"thread",
"pool",
"size",
"(",
")",
";",
"pool",
"set",
"max",
"thread",
"count",
"(",
"analysis",
"shared",
"thread",
"pool",
"size",
")",
";",
"return",
"pool",
";",
"}"
]
|
[
"join",
"an",
"array",
"of",
"strings",
"with",
"the",
"given",
"separator",
"note",
":",
"this",
"might",
"be",
"replaced",
"by",
"utility",
"method",
"from",
"commons",
"-",
"lang",
"or",
"guava",
"someday",
"if",
"one",
"of",
"those",
"libraries",
"is",
"added",
"as",
"dependency"
]
| [
"public",
"static",
"string",
"join",
"(",
"string",
"[",
"]",
"array",
",",
"string",
"separator",
")",
"{",
"int",
"len",
"=",
"array",
"length",
";",
"if",
"(",
"len",
"=",
"=",
"0",
")",
"return",
"\"",
"\"",
";",
"string",
"builder",
"out",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"out",
"append",
"(",
"array",
"[",
"0",
"]",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"len",
";",
"i",
"+",
"+",
")",
"{",
"out",
"append",
"(",
"separator",
")",
"append",
"(",
"array",
"[",
"i",
"]",
")",
";",
"}",
"return",
"out",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"add",
"a",
"single",
"suite",
"file",
"to",
"the",
"set",
"of",
"suites"
]
| [
"private",
"static",
"void",
"add",
"suite",
"(",
"path",
"root",
",",
"path",
"file",
",",
"map",
"<",
"string",
",",
"set",
"<",
"path",
">",
">",
"files",
")",
"{",
"string",
"group",
"name",
"=",
"root",
"relativize",
"(",
"file",
"get",
"parent",
"(",
")",
")",
"to",
"string",
"(",
")",
";",
"set",
"<",
"path",
">",
"files",
"set",
"=",
"files",
"get",
"(",
"group",
"name",
")",
";",
"if",
"(",
"files",
"set",
"=",
"=",
"null",
")",
"{",
"files",
"set",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"files",
"put",
"(",
"group",
"name",
",",
"files",
"set",
")",
";",
"}",
"files",
"set",
"add",
"(",
"file",
")",
";",
"}"
]
|
[
"builds",
"a",
"new",
"{",
"@",
"link",
"glide",
"executor",
"}",
"with",
"any",
"previously",
"specified",
"options"
]
| [
"public",
"glide",
"executor",
"build",
"(",
")",
"{",
"if",
"(",
"text",
"utils",
"is",
"empty",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"name",
"must",
"be",
"non",
"-",
"null",
"and",
"non",
"-",
"empty",
",",
"but",
"given",
":",
"\"",
"+",
"name",
")",
";",
"}",
"thread",
"pool",
"executor",
"executor",
"=",
"new",
"thread",
"pool",
"executor",
"(",
"core",
"pool",
"size",
",",
"maximum",
"pool",
"size",
",",
"/",
"*",
"keep",
"alive",
"time",
"=",
"*",
"/",
"thread",
"timeout",
"millis",
",",
"time",
"unit",
"milliseconds",
",",
"new",
"priority",
"blocking",
"queue",
"<",
"runnable",
">",
"(",
")",
",",
"new",
"default",
"thread",
"factory",
"(",
"name",
",",
"uncaught",
"throwable",
"strategy",
",",
"prevent",
"network",
"operations",
")",
")",
";",
"if",
"(",
"thread",
"timeout",
"millis",
"!",
"=",
"no",
"thread",
"timeout",
")",
"{",
"executor",
"allow",
"core",
"thread",
"time",
"out",
"(",
"true",
")",
";",
"}",
"return",
"new",
"glide",
"executor",
"(",
"executor",
")",
";",
"}"
]
|
[
"the",
"main",
"interface",
"between",
"an",
"<",
"code",
">",
"application",
"master",
"<",
"code",
">",
"and",
"the",
"<",
"code",
">",
"resource",
"manager",
"<",
"code",
">",
"the",
"<",
"code",
">",
"application",
"master",
"<",
"code",
">",
"uses",
"this",
"interface",
"to",
"provide",
"a",
"list",
"of",
"{",
"@",
"link",
"resource",
"request",
"}",
"and",
"returns",
"unused",
"{",
"@",
"link",
"container",
"}",
"allocated",
"to",
"it",
"via",
"{",
"@",
"link",
"allocate",
"request",
"}",
"optionally",
",",
"the",
"<",
"code",
">",
"application",
"master",
"<",
"code",
">",
"can",
"also",
"blacklist",
"resources",
"which",
"it",
"doesn",
"'",
"t",
"want",
"to",
"use",
"this",
"also",
"doubles",
"up",
"as",
"a",
"heartbeat",
"to",
"let",
"the",
"<",
"code",
">",
"resource",
"manager",
"<",
"code",
">",
"know",
"that",
"the",
"<",
"code",
">",
"application",
"master",
"<",
"code",
">",
"is",
"alive",
"thus",
",",
"applications",
"should",
"periodically",
"make",
"this",
"call",
"to",
"be",
"kept",
"alive",
"the",
"frequency",
"depends",
"on",
"{",
"@",
"link",
"yarn",
"configuration",
"#",
"rm",
"am",
"expiry",
"interval",
"ms",
"}",
"which",
"defaults",
"to",
"{",
"@",
"link",
"yarn",
"configuration",
"#",
"default",
"rm",
"am",
"expiry",
"interval",
"ms",
"}",
"the",
"<",
"code",
">",
"resource",
"manager",
"<",
"code",
">",
"responds",
"with",
"list",
"of",
"allocated",
"{",
"@",
"link",
"container",
"}",
",",
"status",
"of",
"completed",
"containers",
"and",
"headroom",
"information",
"for",
"the",
"application",
"the",
"<",
"code",
">",
"application",
"master",
"<",
"code",
">",
"can",
"use",
"the",
"available",
"headroom",
"(",
"resources",
")",
"to",
"decide",
"how",
"to",
"utilized",
"allocated",
"resources",
"and",
"make",
"informed",
"decisions",
"about",
"future",
"resource",
"requests"
]
| [
"public",
"allocate",
"response",
"allocate",
"(",
"allocate",
"request",
"request",
")",
"throws",
"yarn",
"exception",
",",
"i",
"o",
"exception",
";"
]
|
[
"execute",
"the",
"actual",
"open",
"file",
"operation",
"this",
"is",
"invoked",
"from",
"{",
"@",
"code",
"f",
"s",
"data",
"input",
"stream",
"builder",
"build",
"(",
")",
"}",
"and",
"from",
"{",
"@",
"link",
"delegate",
"to",
"file",
"system",
"}",
"and",
"is",
"where",
"the",
"action",
"of",
"opening",
"the",
"file",
"should",
"begin",
"the",
"base",
"implementation",
"performs",
"a",
"blocking",
"call",
"to",
"{",
"@",
"link",
"#",
"open",
"(",
"path",
",",
"int",
")",
"}",
"in",
"this",
"call",
";",
"the",
"actual",
"outcome",
"is",
"in",
"the",
"returned",
"{",
"@",
"code",
"completable",
"future",
"}",
"this",
"avoids",
"having",
"to",
"create",
"some",
"thread",
"pool",
",",
"while",
"still",
"setting",
"up",
"the",
"expectation",
"that",
"the",
"{",
"@",
"code",
"get",
"(",
")",
"}",
"call",
"is",
"needed",
"to",
"evaluate",
"the",
"result"
]
| [
"protected",
"completable",
"future",
"<",
"f",
"s",
"data",
"input",
"stream",
">",
"open",
"file",
"with",
"options",
"(",
"final",
"path",
"path",
",",
"final",
"open",
"file",
"parameters",
"parameters",
")",
"throws",
"i",
"o",
"exception",
"{",
"abstract",
"f",
"s",
"builder",
"impl",
"reject",
"unknown",
"mandatory",
"keys",
"(",
"parameters",
"get",
"mandatory",
"keys",
"(",
")",
",",
"collections",
"empty",
"set",
"(",
")",
",",
"\"",
"for",
"\"",
"+",
"path",
")",
";",
"return",
"lambda",
"utils",
"eval",
"(",
"new",
"completable",
"future",
"<",
">",
"(",
")",
",",
"(",
")",
"-",
">",
"open",
"(",
"path",
",",
"parameters",
"get",
"buffer",
"size",
"(",
")",
")",
")",
";",
"}"
]
|
[
"enables",
"a",
"child",
"source"
]
| [
"protected",
"final",
"void",
"enable",
"child",
"source",
"(",
"@",
"unknown",
"null",
"t",
"id",
")",
"{",
"media",
"source",
"and",
"listener",
"enabled",
"child",
"=",
"assertions",
"check",
"not",
"null",
"(",
"child",
"sources",
"get",
"(",
"id",
")",
")",
";",
"enabled",
"child",
"media",
"source",
"enable",
"(",
"enabled",
"child",
"caller",
")",
";",
"}"
]
|
[
"we",
"split",
"the",
"disk",
"to",
"diskarchive",
"volumes",
"and",
"test",
"if",
"nn",
"gets",
"correct",
"stat"
]
| [
"public",
"void",
"test",
"volume",
"size",
"with",
"same",
"disk",
"tiering",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"hdfs",
"configuration",
"(",
")",
";",
"mini",
"d",
"f",
"s",
"cluster",
"cluster",
"=",
"null",
";",
"/",
"/",
"set",
"aside",
"fifth",
"of",
"the",
"total",
"capacity",
"as",
"reserved",
"long",
"reserved",
"=",
"10000",
";",
"conf",
"set",
"long",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"datanode",
"du",
"reserved",
"key",
",",
"reserved",
")",
";",
"try",
"{",
"double",
"reserve",
"for",
"achive",
"=",
"0",
"3",
";",
"conf",
"set",
"boolean",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"datanode",
"allow",
"same",
"disk",
"tiering",
",",
"true",
")",
";",
"conf",
"set",
"double",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"datanode",
"reserve",
"for",
"archive",
"default",
"percentage",
",",
"reserve",
"for",
"achive",
")",
";",
"cluster",
"=",
"new",
"mini",
"d",
"f",
"s",
"cluster",
"builder",
"(",
"conf",
")",
"storage",
"types",
"(",
"new",
"storage",
"type",
"[",
"]",
"{",
"storage",
"type",
"disk",
",",
"storage",
"type",
"archive",
"}",
")",
"build",
"(",
")",
";",
"cluster",
"wait",
"active",
"(",
")",
";",
"final",
"fs",
"dataset",
"test",
"utils",
"utils",
"=",
"cluster",
"get",
"fs",
"dataset",
"test",
"utils",
"(",
"0",
")",
";",
"long",
"config",
"capacity",
"=",
"cluster",
"get",
"namesystem",
"(",
")",
"get",
"capacity",
"total",
"(",
")",
";",
"/",
"/",
"disk",
"capacity",
"should",
"be",
"just",
"the",
"raw",
"capacity",
"/",
"/",
"as",
"two",
"volumes",
"shares",
"the",
"capacity",
"long",
"raw",
"capacity",
"=",
"utils",
"get",
"raw",
"capacity",
"(",
")",
";",
"long",
"disk",
"capacity",
"=",
"(",
"long",
")",
"(",
"(",
"raw",
"capacity",
"-",
"reserved",
")",
"*",
"reserve",
"for",
"achive",
")",
"+",
"(",
"long",
")",
"(",
"(",
"raw",
"capacity",
"-",
"reserved",
")",
"*",
"(",
"1",
"-",
"reserve",
"for",
"achive",
")",
")",
"+",
"reserved",
";",
"/",
"/",
"ensure",
"reserved",
"should",
"not",
"be",
"double",
"counted",
"assert",
"equals",
"(",
"config",
"capacity",
",",
"disk",
"capacity",
"-",
"reserved",
")",
";",
"data",
"node",
"dn",
"=",
"cluster",
"get",
"data",
"nodes",
"(",
")",
"get",
"(",
"0",
")",
";",
"/",
"/",
"ensure",
"non",
"dfs",
"used",
"is",
"not",
"double",
"counted",
"long",
"single",
"volume",
"used",
"=",
"dn",
"get",
"f",
"s",
"dataset",
"(",
")",
"get",
"storage",
"reports",
"(",
"cluster",
"get",
"namesystem",
"(",
")",
"get",
"block",
"pool",
"id",
"(",
")",
")",
"[",
"0",
"]",
"get",
"non",
"dfs",
"used",
"(",
")",
";",
"cluster",
"trigger",
"heartbeats",
"(",
")",
";",
"assert",
"true",
"(",
"cluster",
"get",
"namesystem",
"(",
")",
"get",
"capacity",
"used",
"(",
")",
"<",
"single",
"volume",
"used",
"*",
"2",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"cluster",
"!",
"=",
"null",
")",
"{",
"cluster",
"shutdown",
"(",
")",
";",
"}",
"}",
"}"
]
|
[
"calculate",
"the",
"height",
"(",
"in",
"meters",
")",
"of",
"geohash",
"cells",
"at",
"a",
"specific",
"level"
]
| [
"public",
"static",
"double",
"geo",
"hash",
"cell",
"height",
"(",
"int",
"level",
")",
"{",
"assert",
"level",
">",
"=",
"0",
";",
"/",
"/",
"geohash",
"cells",
"are",
"split",
"into",
"32",
"cells",
"at",
"each",
"level",
"the",
"grid",
"/",
"/",
"alternates",
"at",
"each",
"level",
"between",
"a",
"8x",
"4",
"and",
"a",
"4x",
"8",
"grid",
"return",
"earth",
"polar",
"distance",
"/",
"(",
"1l",
"<",
"<",
"(",
"(",
"(",
"(",
"level",
"+",
"1",
")",
"/",
"2",
")",
"*",
"2",
")",
"+",
"(",
"(",
"level",
"/",
"2",
")",
"*",
"3",
")",
")",
")",
";",
"}"
]
|
[
"get",
"the",
"dot",
"product",
"between",
"the",
"two",
"quaternions",
"(",
"commutative",
")"
]
| [
"public",
"final",
"static",
"float",
"dot",
"(",
"final",
"float",
"x",
"1",
",",
"final",
"float",
"y",
"1",
",",
"final",
"float",
"z",
"1",
",",
"final",
"float",
"w",
"1",
",",
"final",
"float",
"x",
"2",
",",
"final",
"float",
"y",
"2",
",",
"final",
"float",
"z",
"2",
",",
"final",
"float",
"w",
"2",
")",
"{",
"return",
"x",
"1",
"*",
"x",
"2",
"+",
"y",
"1",
"*",
"y",
"2",
"+",
"z",
"1",
"*",
"z",
"2",
"+",
"w",
"1",
"*",
"w",
"2",
";",
"}"
]
|
[
"sub",
"-",
"classes",
"can",
"invoke",
"this",
"before",
"sending",
"a",
"message",
"(",
"false",
")",
"and",
"after",
"receiving",
"the",
"async",
"send",
"callback",
"(",
"true",
")",
"effective",
"translating",
"async",
"completion",
"callback",
"into",
"simple",
"flow",
"control"
]
| [
"public",
"void",
"set",
"ready",
"to",
"send",
"(",
"boolean",
"ready",
")",
"{",
"if",
"(",
"ready",
"&",
"&",
"rs",
"write",
"logger",
"is",
"trace",
"enabled",
"(",
")",
")",
"{",
"rs",
"write",
"logger",
"trace",
"(",
"get",
"log",
"prefix",
"(",
")",
"+",
"\"",
"ready",
"to",
"send",
"\"",
")",
";",
"}",
"this",
"is",
"ready",
"=",
"ready",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"message",
"'"
]
| [
"public",
"void",
"message",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"message",
"}"
]
|
[
"helper",
"method",
"to",
"set",
"the",
"password",
"flow",
"for",
"the",
"first",
"o",
"auth",
"2",
"authentication"
]
| [
"public",
"api",
"client",
"set",
"oauth",
"password",
"flow",
"(",
"string",
"username",
",",
"string",
"password",
")",
"{",
"for",
"(",
"authentication",
"auth",
":",
"authentications",
"values",
"(",
")",
")",
"{",
"if",
"(",
"auth",
"instanceof",
"o",
"auth",
")",
"{",
"(",
"(",
"o",
"auth",
")",
"auth",
")",
"use",
"password",
"flow",
"(",
"username",
",",
"password",
")",
";",
"return",
"this",
";",
"}",
"}",
"throw",
"new",
"runtime",
"exception",
"(",
"\"",
"no",
"o",
"auth",
"2",
"authentication",
"configured",
"!",
"\"",
")",
";",
"}"
]
|
[
"override",
"with",
"any",
"special",
"text",
"escaping",
"logic",
"to",
"handle",
"unsafe",
"characters",
"so",
"as",
"to",
"avoid",
"code",
"injection"
]
| [
"public",
"string",
"escape",
"unsafe",
"characters",
"(",
"string",
"input",
")",
"{",
"logger",
"warn",
"(",
"\"",
"escape",
"unsafe",
"characters",
"should",
"be",
"overridden",
"in",
"the",
"code",
"generator",
"with",
"proper",
"logic",
"to",
"escape",
"\"",
"+",
"\"",
"unsafe",
"characters",
"\"",
")",
";",
"/",
"/",
"doing",
"nothing",
"by",
"default",
"and",
"code",
"generator",
"should",
"implement",
"/",
"/",
"the",
"logic",
"to",
"prevent",
"code",
"injection",
"/",
"/",
"later",
"we",
"'",
"ll",
"make",
"this",
"method",
"abstract",
"to",
"make",
"sure",
"/",
"/",
"code",
"generator",
"implements",
"this",
"method",
"return",
"input",
";",
"}"
]
|
[
"returns",
"true",
"if",
"this",
"elf",
"was",
"created",
"for",
"a",
"big",
"endian",
"processor"
]
| [
"public",
"boolean",
"is",
"big",
"endian",
"(",
")",
"{",
"return",
"e",
"ident",
"data",
"=",
"=",
"elf",
"constants",
"elf",
"data",
"be",
";",
"}"
]
|
[
"process",
"any",
"remaining",
"queued",
"datanode",
"messages",
"after",
"entering",
"active",
"state",
"at",
"this",
"point",
"they",
"will",
"not",
"be",
"re",
"-",
"queued",
"since",
"we",
"are",
"the",
"definitive",
"master",
"node",
"and",
"thus",
"should",
"be",
"up",
"-",
"to",
"-",
"date",
"with",
"the",
"namespace",
"information"
]
| [
"public",
"void",
"process",
"all",
"pending",
"d",
"n",
"messages",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"assert",
"!",
"should",
"postpone",
"blocks",
"from",
"future",
":",
"\"",
"process",
"all",
"pending",
"d",
"n",
"messages",
"(",
")",
"should",
"be",
"called",
"after",
"disabling",
"\"",
"+",
"\"",
"block",
"postponement",
"\"",
";",
"int",
"count",
"=",
"pending",
"d",
"n",
"messages",
"count",
"(",
")",
";",
"if",
"(",
"count",
">",
"0",
")",
"{",
"log",
"info",
"(",
"\"",
"processing",
"{",
"}",
"messages",
"from",
"data",
"nodes",
"\"",
"+",
"\"",
"that",
"were",
"previously",
"queued",
"during",
"standby",
"state",
"\"",
",",
"count",
")",
";",
"}",
"process",
"queued",
"messages",
"(",
"pending",
"d",
"n",
"messages",
"take",
"all",
"(",
")",
")",
";",
"assert",
"pending",
"d",
"n",
"messages",
"count",
"(",
")",
"=",
"=",
"0",
";",
"}"
]
|
[
"checks",
"to",
"see",
"whether",
"any",
"other",
"applications",
"runnable",
"now",
"that",
"the",
"given",
"application",
"has",
"been",
"removed",
"from",
"the",
"given",
"queue",
"and",
"makes",
"them",
"so",
"runs",
"in",
"o",
"(",
"n",
"log",
"(",
"n",
")",
")",
"where",
"n",
"is",
"the",
"number",
"of",
"queues",
"that",
"are",
"under",
"the",
"highest",
"queue",
"that",
"went",
"from",
"having",
"no",
"slack",
"to",
"having",
"slack"
]
| [
"public",
"void",
"update",
"runnability",
"on",
"app",
"removal",
"(",
"fi",
"ca",
"scheduler",
"app",
"app",
")",
"{",
"/",
"/",
"childqueue",
"x",
"might",
"have",
"no",
"pending",
"apps",
"itself",
",",
"but",
"if",
"a",
"queue",
"higher",
"up",
"/",
"/",
"in",
"the",
"hierarchy",
"parentqueue",
"y",
"has",
"a",
"max",
"running",
"apps",
"set",
",",
"an",
"app",
"completion",
"/",
"/",
"in",
"childqueue",
"x",
"could",
"allow",
"an",
"app",
"in",
"some",
"other",
"distant",
"child",
"of",
"/",
"/",
"parentqueue",
"y",
"to",
"become",
"runnable",
"/",
"/",
"an",
"app",
"removal",
"will",
"only",
"possibly",
"allow",
"another",
"app",
"to",
"become",
"runnable",
"if",
"/",
"/",
"the",
"queue",
"was",
"already",
"at",
"its",
"max",
"before",
"the",
"removal",
"/",
"/",
"thus",
"we",
"find",
"the",
"ancestor",
"queue",
"highest",
"in",
"the",
"tree",
"for",
"which",
"the",
"app",
"/",
"/",
"that",
"was",
"at",
"its",
"max",
"running",
"apps",
"before",
"the",
"removal",
"leaf",
"queue",
"queue",
"=",
"app",
"get",
"c",
"s",
"leaf",
"queue",
"(",
")",
";",
"abstract",
"c",
"s",
"queue",
"highest",
"queue",
"with",
"apps",
"now",
"runnable",
"=",
"(",
"queue",
"get",
"num",
"runnable",
"apps",
"(",
")",
"=",
"=",
"queue",
"get",
"max",
"parallel",
"apps",
"(",
")",
"-",
"1",
")",
"?",
"queue",
":",
"null",
";",
"parent",
"queue",
"parent",
"=",
"(",
"parent",
"queue",
")",
"queue",
"get",
"parent",
"(",
")",
";",
"while",
"(",
"parent",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"parent",
"get",
"num",
"runnable",
"apps",
"(",
")",
"=",
"=",
"parent",
"get",
"max",
"parallel",
"apps",
"(",
")",
"-",
"1",
")",
"{",
"highest",
"queue",
"with",
"apps",
"now",
"runnable",
"=",
"parent",
";",
"}",
"parent",
"=",
"(",
"parent",
"queue",
")",
"parent",
"get",
"parent",
"(",
")",
";",
"}",
"list",
"<",
"list",
"<",
"fi",
"ca",
"scheduler",
"app",
">",
">",
"apps",
"now",
"maybe",
"runnable",
"=",
"new",
"array",
"list",
"<",
"list",
"<",
"fi",
"ca",
"scheduler",
"app",
">",
">",
"(",
")",
";",
"/",
"/",
"compile",
"lists",
"of",
"apps",
"which",
"may",
"now",
"be",
"runnable",
"/",
"/",
"we",
"gather",
"lists",
"instead",
"of",
"building",
"a",
"set",
"of",
"all",
"non",
"-",
"runnable",
"apps",
"so",
"/",
"/",
"that",
"this",
"whole",
"operation",
"can",
"be",
"o",
"(",
"number",
"of",
"queues",
")",
"instead",
"of",
"/",
"/",
"o",
"(",
"number",
"of",
"apps",
")",
"if",
"(",
"highest",
"queue",
"with",
"apps",
"now",
"runnable",
"!",
"=",
"null",
")",
"{",
"gather",
"possibly",
"runnable",
"app",
"lists",
"(",
"highest",
"queue",
"with",
"apps",
"now",
"runnable",
",",
"apps",
"now",
"maybe",
"runnable",
")",
";",
"}",
"string",
"user",
"=",
"app",
"get",
"user",
"(",
")",
";",
"integer",
"user",
"num",
"running",
"=",
"users",
"num",
"runnable",
"apps",
"get",
"(",
"user",
")",
";",
"if",
"(",
"user",
"num",
"running",
"=",
"=",
"null",
")",
"{",
"user",
"num",
"running",
"=",
"0",
";",
"}",
"if",
"(",
"user",
"num",
"running",
"=",
"=",
"get",
"user",
"max",
"parallel",
"apps",
"(",
"user",
")",
"-",
"1",
")",
"{",
"list",
"<",
"fi",
"ca",
"scheduler",
"app",
">",
"user",
"waiting",
"apps",
"=",
"users",
"non",
"runnable",
"apps",
"get",
"(",
"user",
")",
";",
"if",
"(",
"user",
"waiting",
"apps",
"!",
"=",
"null",
")",
"{",
"apps",
"now",
"maybe",
"runnable",
"add",
"(",
"user",
"waiting",
"apps",
")",
";",
"}",
"}",
"update",
"apps",
"runnability",
"(",
"apps",
"now",
"maybe",
"runnable",
",",
"apps",
"now",
"maybe",
"runnable",
"size",
"(",
")",
")",
";",
"}"
]
|
[
"get",
"pet",
"id"
]
| [
"public",
"long",
"get",
"pet",
"id",
"(",
")",
"{",
"return",
"pet",
"id",
";",
"}"
]
|
[
"windows",
"this",
"{",
"@",
"code",
"data",
"stream",
"}",
"into",
"sliding",
"count",
"windows",
"note",
":",
"this",
"operation",
"is",
"inherently",
"non",
"-",
"parallel",
"since",
"all",
"elements",
"have",
"to",
"pass",
"through",
"the",
"same",
"operator",
"instance"
]
| [
"public",
"all",
"windowed",
"stream",
"<",
"t",
",",
"global",
"window",
">",
"count",
"window",
"all",
"(",
"long",
"size",
",",
"long",
"slide",
")",
"{",
"return",
"window",
"all",
"(",
"global",
"windows",
"create",
"(",
")",
")",
"evictor",
"(",
"count",
"evictor",
"of",
"(",
"size",
")",
")",
"trigger",
"(",
"count",
"trigger",
"of",
"(",
"slide",
")",
")",
";",
"}"
]
|
[
"execute",
"a",
"get",
"request",
"on",
"the",
"given",
"url"
]
| [
"public",
"response",
"request",
"get",
"(",
"string",
"url",
")",
"{",
"return",
"request",
"http",
"method",
"(",
"url",
",",
"null",
",",
"collections",
"empty",
"map",
"(",
")",
",",
"\"",
"get",
"\"",
")",
";",
"}"
]
|
[
"gets",
"the",
"table",
"entry",
"for",
"the",
"given",
"segment",
"and",
"hash"
]
| [
"static",
"final",
"<",
"k",
",",
"v",
">",
"hash",
"entry",
"<",
"k",
",",
"v",
">",
"entry",
"for",
"hash",
"(",
"segment",
"<",
"k",
",",
"v",
">",
"seg",
",",
"int",
"h",
")",
"{",
"hash",
"entry",
"<",
"k",
",",
"v",
">",
"[",
"]",
"tab",
";",
"return",
"(",
"seg",
"=",
"=",
"null",
"|",
"|",
"(",
"tab",
"=",
"seg",
"table",
")",
"=",
"=",
"null",
")",
"?",
"null",
":",
"(",
"hash",
"entry",
"<",
"k",
",",
"v",
">",
")",
"unsafe",
"get",
"object",
"volatile",
"(",
"tab",
",",
"(",
"(",
"long",
")",
"(",
"(",
"(",
"tab",
"length",
"-",
"1",
")",
"&",
"h",
")",
")",
"<",
"<",
"tshift",
")",
"+",
"tbase",
")",
";",
"}"
]
|
[
"get",
"number",
"of",
"killed",
"cleanup",
"tasks"
]
| [
"public",
"int",
"get",
"num",
"killed",
"cleanups",
"(",
")",
"{",
"return",
"num",
"killed",
"cleanups",
";",
"}"
]
|
[
"returns",
"the",
"contained",
"instance",
",",
"which",
"must",
"be",
"present",
"if",
"the",
"instance",
"might",
"be",
"absent",
",",
"use",
"{",
"@",
"link",
"#",
"or",
"(",
"object",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"or",
"null",
"}",
"instead",
"<",
"b",
">",
"comparison",
"to",
"{",
"@",
"code",
"java",
"util",
"optional",
"}",
":",
"<",
"b",
">",
"when",
"the",
"value",
"is",
"absent",
",",
"this",
"method",
"throws",
"{",
"@",
"link",
"illegal",
"state",
"exception",
"}",
",",
"whereas",
"the",
"java",
"8",
"counterpart",
"throws",
"{",
"@",
"link",
"java",
"util",
"no",
"such",
"element",
"exception",
"no",
"such",
"element",
"exception",
"}"
]
| [
"public",
"abstract",
"t",
"get",
"(",
")",
";"
]
|
[
"returns",
"the",
"name",
"of",
"the",
"field",
"or",
"method",
"designated",
"by",
"this",
"handle"
]
| [
"public",
"string",
"get",
"name",
"(",
")",
"{",
"return",
"name",
";",
"}"
]
|
[
"map",
"the",
"route",
"for",
"http",
"delete",
"requests"
]
| [
"public",
"static",
"void",
"delete",
"(",
"string",
"path",
",",
"route",
"route",
",",
"response",
"transformer",
"transformer",
")",
"{",
"get",
"instance",
"(",
")",
"delete",
"(",
"path",
",",
"route",
",",
"transformer",
")",
";",
"}"
]
|
[
"get",
"attribute",
"number"
]
| [
"public",
"big",
"decimal",
"get",
"attribute",
"number",
"(",
")",
"{",
"return",
"attribute",
"number",
";",
"}"
]
|
[
"set",
"the",
"{",
"@",
"code",
"jmx",
"attribute",
"source",
"}",
"implementation",
"to",
"use",
"for",
"reading",
"the",
"metadata",
"from",
"the",
"bean",
"class"
]
| [
"public",
"void",
"set",
"attribute",
"source",
"(",
"jmx",
"attribute",
"source",
"attribute",
"source",
")",
"{",
"assert",
"not",
"null",
"(",
"attribute",
"source",
",",
"\"",
"jmx",
"attribute",
"source",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"this",
"attribute",
"source",
"=",
"attribute",
"source",
";",
"}"
]
|
[
"returns",
"true",
"if",
"the",
"routing",
"is",
"the",
"relocation",
"target",
"of",
"the",
"given",
"routing"
]
| [
"public",
"boolean",
"is",
"relocation",
"target",
"of",
"(",
"shard",
"routing",
"other",
")",
"{",
"boolean",
"b",
"=",
"this",
"allocation",
"id",
"!",
"=",
"null",
"&",
"&",
"other",
"allocation",
"id",
"!",
"=",
"null",
"&",
"&",
"this",
"state",
"=",
"=",
"shard",
"routing",
"state",
"initializing",
"&",
"&",
"this",
"allocation",
"id",
"get",
"id",
"(",
")",
"equals",
"(",
"other",
"allocation",
"id",
"get",
"relocation",
"id",
"(",
")",
")",
";",
"assert",
"b",
"=",
"=",
"false",
"|",
"|",
"other",
"state",
"=",
"=",
"shard",
"routing",
"state",
"relocating",
":",
"\"",
"shard",
"routing",
"is",
"a",
"relocation",
"target",
"but",
"the",
"source",
"shard",
"state",
"isn",
"'",
"t",
"relocating",
"this",
"[",
"\"",
"+",
"this",
"+",
"\"",
"]",
",",
"other",
"[",
"\"",
"+",
"other",
"+",
"\"",
"]",
"\"",
";",
"assert",
"b",
"=",
"=",
"false",
"|",
"|",
"other",
"allocation",
"id",
"get",
"id",
"(",
")",
"equals",
"(",
"this",
"allocation",
"id",
"get",
"relocation",
"id",
"(",
")",
")",
":",
"\"",
"shard",
"routing",
"is",
"a",
"relocation",
"target",
"but",
"the",
"source",
"id",
"isn",
"'",
"t",
"equal",
"to",
"source",
"'",
"s",
"allocation",
"id",
"get",
"relocation",
"id",
"\"",
"+",
"\"",
"this",
"[",
"\"",
"+",
"this",
"+",
"\"",
"]",
",",
"other",
"[",
"\"",
"+",
"other",
"+",
"\"",
"]",
"\"",
";",
"assert",
"b",
"=",
"=",
"false",
"|",
"|",
"other",
"current",
"node",
"id",
"(",
")",
"equals",
"(",
"this",
"relocating",
"node",
"id",
")",
":",
"\"",
"shard",
"routing",
"is",
"a",
"relocation",
"target",
"but",
"source",
"current",
"node",
"id",
"isn",
"'",
"t",
"equal",
"to",
"target",
"relocating",
"node",
"\"",
"+",
"\"",
"this",
"[",
"\"",
"+",
"this",
"+",
"\"",
"]",
",",
"other",
"[",
"\"",
"+",
"other",
"+",
"\"",
"]",
"\"",
";",
"assert",
"b",
"=",
"=",
"false",
"|",
"|",
"this",
"current",
"node",
"id",
"(",
")",
"equals",
"(",
"other",
"relocating",
"node",
"id",
")",
":",
"\"",
"shard",
"routing",
"is",
"a",
"relocation",
"target",
"but",
"current",
"node",
"id",
"isn",
"'",
"t",
"equal",
"to",
"source",
"relocating",
"node",
"\"",
"+",
"\"",
"this",
"[",
"\"",
"+",
"this",
"+",
"\"",
"]",
",",
"other",
"[",
"\"",
"+",
"other",
"+",
"\"",
"]",
"\"",
";",
"assert",
"b",
"=",
"=",
"false",
"|",
"|",
"this",
"shard",
"id",
"equals",
"(",
"other",
"shard",
"id",
")",
":",
"\"",
"shard",
"routing",
"is",
"a",
"relocation",
"target",
"but",
"both",
"index",
"routings",
"are",
"not",
"of",
"the",
"same",
"shard",
"id",
"\"",
"+",
"\"",
"this",
"[",
"\"",
"+",
"this",
"+",
"\"",
"]",
",",
"other",
"[",
"\"",
"+",
"other",
"+",
"\"",
"]",
"\"",
";",
"assert",
"b",
"=",
"=",
"false",
"|",
"|",
"this",
"primary",
"=",
"=",
"other",
"primary",
":",
"\"",
"shard",
"routing",
"is",
"a",
"relocation",
"target",
"but",
"primary",
"flag",
"is",
"different",
"\"",
"+",
"\"",
"this",
"[",
"\"",
"+",
"this",
"+",
"\"",
"]",
",",
"target",
"[",
"\"",
"+",
"other",
"+",
"\"",
"]",
"\"",
";",
"return",
"b",
";",
"}"
]
|
[
"return",
"the",
"affected",
"value",
"that",
"was",
"about",
"to",
"be",
"set",
",",
"if",
"any"
]
| [
"public",
"object",
"get",
"value",
"(",
")",
"{",
"return",
"(",
"this",
"property",
"change",
"event",
"!",
"=",
"null",
"?",
"this",
"property",
"change",
"event",
"get",
"new",
"value",
"(",
")",
":",
"null",
")",
";",
"}"
]
|
[
"creates",
"and",
"inserts",
"a",
"new",
"{",
"@",
"link",
"state",
"map",
"entry",
"}"
]
| [
"private",
"state",
"map",
"entry",
"<",
"k",
",",
"n",
",",
"s",
">",
"add",
"new",
"state",
"map",
"entry",
"(",
"state",
"map",
"entry",
"<",
"k",
",",
"n",
",",
"s",
">",
"[",
"]",
"table",
",",
"k",
"key",
",",
"n",
"namespace",
",",
"int",
"hash",
")",
"{",
"/",
"/",
"small",
"optimization",
"that",
"aims",
"to",
"avoid",
"holding",
"references",
"on",
"duplicate",
"namespace",
"objects",
"if",
"(",
"namespace",
"equals",
"(",
"last",
"namespace",
")",
")",
"{",
"namespace",
"=",
"last",
"namespace",
";",
"}",
"else",
"{",
"last",
"namespace",
"=",
"namespace",
";",
"}",
"int",
"index",
"=",
"hash",
"&",
"(",
"table",
"length",
"-",
"1",
")",
";",
"state",
"map",
"entry",
"<",
"k",
",",
"n",
",",
"s",
">",
"new",
"entry",
"=",
"new",
"state",
"map",
"entry",
"<",
">",
"(",
"key",
",",
"namespace",
",",
"null",
",",
"hash",
",",
"table",
"[",
"index",
"]",
",",
"state",
"map",
"version",
",",
"state",
"map",
"version",
")",
";",
"table",
"[",
"index",
"]",
"=",
"new",
"entry",
";",
"if",
"(",
"table",
"=",
"=",
"primary",
"table",
")",
"{",
"+",
"+",
"primary",
"table",
"size",
";",
"}",
"else",
"{",
"+",
"+",
"incremental",
"rehash",
"table",
"size",
";",
"}",
"return",
"new",
"entry",
";",
"}"
]
|
[
"test",
"a",
"m",
"r",
"m",
"proxy",
"restart",
"with",
"application",
"recovery",
"failure"
]
| [
"public",
"void",
"test",
"app",
"recovery",
"failure",
"(",
")",
"throws",
"yarn",
"exception",
",",
"exception",
"{",
"configuration",
"conf",
"=",
"create",
"configuration",
"(",
")",
";",
"/",
"/",
"use",
"the",
"mock",
"request",
"interceptor",
"across",
"restart",
"instead",
"for",
"the",
"chain",
"conf",
"set",
"(",
"yarn",
"configuration",
"amrm",
"proxy",
"interceptor",
"class",
"pipeline",
",",
"bad",
"request",
"interceptor",
"across",
"restart",
"class",
"get",
"name",
"(",
")",
")",
";",
"mock",
"r",
"m",
"=",
"new",
"mock",
"resource",
"manager",
"facade",
"(",
"new",
"yarn",
"configuration",
"(",
"conf",
")",
",",
"0",
")",
";",
"create",
"and",
"start",
"a",
"m",
"r",
"m",
"proxy",
"service",
"(",
"conf",
")",
";",
"/",
"/",
"create",
"an",
"app",
"entry",
"in",
"nmss",
"register",
"application",
"master",
"(",
"1",
")",
";",
"recovered",
"a",
"m",
"r",
"m",
"proxy",
"state",
"state",
"=",
"get",
"n",
"m",
"context",
"(",
")",
"get",
"n",
"m",
"state",
"store",
"(",
")",
"load",
"a",
"m",
"r",
"m",
"proxy",
"state",
"(",
")",
";",
"assert",
"assert",
"equals",
"(",
"1",
",",
"state",
"get",
"app",
"contexts",
"(",
")",
"size",
"(",
")",
")",
";",
"/",
"/",
"a",
"m",
"r",
"m",
"proxy",
"restarts",
"and",
"recover",
"create",
"and",
"start",
"a",
"m",
"r",
"m",
"proxy",
"service",
"(",
"conf",
")",
";",
"state",
"=",
"get",
"n",
"m",
"context",
"(",
")",
"get",
"n",
"m",
"state",
"store",
"(",
")",
"load",
"a",
"m",
"r",
"m",
"proxy",
"state",
"(",
")",
";",
"/",
"/",
"the",
"app",
"that",
"failed",
"to",
"recover",
"should",
"have",
"been",
"removed",
"from",
"nmss",
"assert",
"assert",
"equals",
"(",
"0",
",",
"state",
"get",
"app",
"contexts",
"(",
")",
"size",
"(",
")",
")",
";",
"}"
]
|
[
"defines",
"target",
"size",
"for",
"image",
"aware",
"view",
"size",
"is",
"defined",
"by",
"target",
"{",
"@",
"link",
"com",
"nostra",
"1",
"3",
"universalimageloader",
"core",
"imageaware",
"image",
"aware",
"view",
"}",
"parameters",
",",
"configuration",
"parameters",
"or",
"device",
"display",
"dimensions",
"<",
"br",
">"
]
| [
"public",
"static",
"image",
"size",
"define",
"target",
"size",
"for",
"view",
"(",
"image",
"aware",
"image",
"aware",
",",
"image",
"size",
"max",
"image",
"size",
")",
"{",
"int",
"width",
"=",
"image",
"aware",
"get",
"width",
"(",
")",
";",
"if",
"(",
"width",
"<",
"=",
"0",
")",
"{",
"width",
"=",
"max",
"image",
"size",
"get",
"width",
"(",
")",
";",
"}",
"else",
"{",
"width",
"=",
"math",
"min",
"(",
"width",
",",
"max",
"image",
"size",
"get",
"width",
"(",
")",
")",
";",
"}",
"int",
"height",
"=",
"image",
"aware",
"get",
"height",
"(",
")",
";",
"if",
"(",
"height",
"<",
"=",
"0",
")",
"{",
"height",
"=",
"max",
"image",
"size",
"get",
"height",
"(",
")",
";",
"}",
"else",
"{",
"height",
"=",
"math",
"min",
"(",
"height",
",",
"max",
"image",
"size",
"get",
"height",
"(",
")",
")",
";",
"}",
"return",
"new",
"image",
"size",
"(",
"width",
",",
"height",
")",
";",
"}"
]
|
[
"tests",
"selection",
"of",
"local",
"node",
"from",
"node",
"queue",
"load",
"monitor",
"this",
"test",
"covers",
"selection",
"of",
"node",
"based",
"on",
"queue",
"limit",
"and",
"blacklisted",
"nodes"
]
| [
"public",
"void",
"test",
"select",
"local",
"node",
"(",
")",
"{",
"node",
"queue",
"load",
"monitor",
"selector",
"=",
"new",
"node",
"queue",
"load",
"monitor",
"(",
"node",
"queue",
"load",
"monitor",
"load",
"comparator",
"queue",
"length",
")",
";",
"r",
"m",
"node",
"h",
"1",
"=",
"create",
"r",
"m",
"node",
"(",
"\"",
"h",
"1",
"\"",
",",
"1",
",",
"-",
"1",
",",
"2",
",",
"5",
")",
";",
"r",
"m",
"node",
"h",
"2",
"=",
"create",
"r",
"m",
"node",
"(",
"\"",
"h",
"2",
"\"",
",",
"2",
",",
"-",
"1",
",",
"5",
",",
"5",
")",
";",
"r",
"m",
"node",
"h",
"3",
"=",
"create",
"r",
"m",
"node",
"(",
"\"",
"h",
"3",
"\"",
",",
"3",
",",
"-",
"1",
",",
"4",
",",
"5",
")",
";",
"selector",
"add",
"node",
"(",
"null",
",",
"h",
"1",
")",
";",
"selector",
"add",
"node",
"(",
"null",
",",
"h",
"2",
")",
";",
"selector",
"add",
"node",
"(",
"null",
",",
"h",
"3",
")",
";",
"selector",
"update",
"node",
"(",
"h",
"1",
")",
";",
"selector",
"update",
"node",
"(",
"h",
"2",
")",
";",
"selector",
"update",
"node",
"(",
"h",
"3",
")",
";",
"/",
"/",
"basic",
"test",
"for",
"selecting",
"node",
"which",
"has",
"queue",
"length",
"less",
"/",
"/",
"than",
"queue",
"capacity",
"set",
"<",
"string",
">",
"blacklist",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"r",
"m",
"node",
"node",
"=",
"selector",
"select",
"local",
"node",
"(",
"\"",
"h",
"1",
"\"",
",",
"blacklist",
")",
";",
"assert",
"assert",
"equals",
"(",
"\"",
"h",
"1",
"\"",
",",
"node",
"get",
"host",
"name",
"(",
")",
")",
";",
"/",
"/",
"if",
"node",
"has",
"been",
"added",
"to",
"blacklist",
"blacklist",
"add",
"(",
"\"",
"h",
"1",
"\"",
")",
";",
"node",
"=",
"selector",
"select",
"local",
"node",
"(",
"\"",
"h",
"1",
"\"",
",",
"blacklist",
")",
";",
"assert",
"assert",
"null",
"(",
"node",
")",
";",
"node",
"=",
"selector",
"select",
"local",
"node",
"(",
"\"",
"h",
"2",
"\"",
",",
"blacklist",
")",
";",
"assert",
"assert",
"null",
"(",
"node",
")",
";",
"node",
"=",
"selector",
"select",
"local",
"node",
"(",
"\"",
"h",
"3",
"\"",
",",
"blacklist",
")",
";",
"assert",
"assert",
"equals",
"(",
"\"",
"h",
"3",
"\"",
",",
"node",
"get",
"host",
"name",
"(",
")",
")",
";",
"}"
]
|
[
"sets",
"whether",
"network",
"round",
"-",
"trips",
"should",
"be",
"minimized",
"when",
"executing",
"cross",
"-",
"cluster",
"search",
"requests",
"defaults",
"to",
"<",
"code",
">",
"true",
"<",
"code",
">"
]
| [
"public",
"void",
"set",
"ccs",
"minimize",
"roundtrips",
"(",
"boolean",
"ccs",
"minimize",
"roundtrips",
")",
"{",
"this",
"ccs",
"minimize",
"roundtrips",
"=",
"ccs",
"minimize",
"roundtrips",
";",
"}"
]
|
[
"given",
"an",
"item",
",",
"split",
"it",
"to",
"the",
"parent",
"and",
"child",
"fields"
]
| [
"private",
"static",
"pair",
"<",
"string",
",",
"string",
">",
"primary",
"key",
"(",
"item",
"item",
")",
"{",
"return",
"pair",
"of",
"(",
"item",
"get",
"string",
"(",
"parent",
")",
",",
"item",
"get",
"string",
"(",
"child",
")",
")",
";",
"}"
]
|
[
"get",
"checkpoint",
"statistics",
"for",
"a",
"stopped",
"transform",
"for",
"stopped",
"transforms",
"we",
"need",
"to",
"do",
"lookups",
"in",
"the",
"internal",
"index"
]
| [
"void",
"get",
"checkpointing",
"info",
"(",
"long",
"last",
"checkpoint",
"number",
",",
"transform",
"indexer",
"position",
"next",
"checkpoint",
"position",
",",
"transform",
"progress",
"next",
"checkpoint",
"progress",
",",
"action",
"listener",
"<",
"transform",
"checkpointing",
"info",
"builder",
">",
"listener",
")",
";"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"retrieves",
"the",
"existing",
"i",
"nodes",
"from",
"a",
"path",
",",
"starting",
"at",
"the",
"root",
"directory",
"the",
"root",
"directory",
"is",
"located",
"by",
"following",
"the",
"parent",
"link",
"in",
"the",
"inode",
"recursively",
"until",
"the",
"final",
"root",
"inode",
"is",
"found",
"the",
"inodes",
"returned",
"will",
"depend",
"upon",
"the",
"output",
"of",
"inode",
"get",
"full",
"path",
"name",
"(",
")",
"for",
"a",
"snapshot",
"path",
",",
"like",
"data",
"snapshotsnap",
"1",
",",
"it",
"will",
"be",
"resolved",
"to",
":",
"[",
"null",
",",
"data",
",",
"snapshotsnap",
"1",
"]",
"for",
"a",
"file",
"in",
"the",
"snapshot",
",",
"as",
"inode",
"get",
"full",
"path",
"name",
"resolves",
"the",
"snapshot",
"information",
",",
"the",
"returned",
"inodes",
"for",
"a",
"path",
"like",
"data",
"snapshotsnap",
"1d",
"1",
"would",
"be",
":",
"[",
"null",
",",
"data",
",",
"d",
"1",
"]"
]
| [
"static",
"i",
"nodes",
"in",
"path",
"resolve",
"from",
"root",
"(",
"i",
"node",
"inode",
")",
"{",
"i",
"node",
"[",
"]",
"inodes",
"=",
"get",
"i",
"nodes",
"(",
"inode",
")",
";",
"byte",
"[",
"]",
"[",
"]",
"paths",
"=",
"i",
"node",
"get",
"path",
"components",
"(",
"inode",
"get",
"full",
"path",
"name",
"(",
")",
")",
";",
"i",
"node",
"directory",
"root",
"dir",
"=",
"inodes",
"[",
"0",
"]",
"as",
"directory",
"(",
")",
";",
"return",
"resolve",
"(",
"root",
"dir",
",",
"paths",
")",
";",
"}"
]
|
[
"query",
"terms",
"that",
"contain",
"\"",
"now",
"\"",
"can",
"trigger",
"a",
"query",
"to",
"not",
"be",
"cacheable",
"this",
"test",
"checks",
"the",
"search",
"context",
"cacheable",
"flag",
"is",
"updated",
"accordingly"
]
| [
"public",
"void",
"test",
"caching",
"strategies",
"with",
"now",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"if",
"we",
"hit",
"all",
"fields",
",",
"this",
"should",
"contain",
"a",
"date",
"field",
"and",
"should",
"diable",
"cachability",
"string",
"query",
"=",
"\"",
"now",
"\"",
"+",
"random",
"alpha",
"of",
"length",
"between",
"(",
"4",
",",
"10",
")",
";",
"query",
"string",
"query",
"builder",
"query",
"string",
"query",
"builder",
"=",
"new",
"query",
"string",
"query",
"builder",
"(",
"query",
")",
";",
"assert",
"query",
"cachability",
"(",
"query",
"string",
"query",
"builder",
",",
"false",
")",
";",
"/",
"/",
"if",
"we",
"hit",
"a",
"date",
"field",
"with",
"\"",
"now",
"\"",
",",
"this",
"should",
"diable",
"cachability",
"query",
"string",
"query",
"builder",
"=",
"new",
"query",
"string",
"query",
"builder",
"(",
"\"",
"now",
"\"",
")",
";",
"query",
"string",
"query",
"builder",
"field",
"(",
"date",
"field",
"name",
")",
";",
"assert",
"query",
"cachability",
"(",
"query",
"string",
"query",
"builder",
",",
"false",
")",
";",
"/",
"/",
"everything",
"else",
"is",
"fine",
"on",
"all",
"fields",
"query",
"=",
"random",
"from",
"(",
"\"",
"no",
"w",
"\"",
",",
"\"",
"n",
"ow",
"\"",
",",
"\"",
"now",
"\"",
")",
"+",
"\"",
"\"",
"+",
"random",
"alpha",
"of",
"length",
"between",
"(",
"4",
",",
"10",
")",
";",
"query",
"string",
"query",
"builder",
"=",
"new",
"query",
"string",
"query",
"builder",
"(",
"query",
")",
";",
"assert",
"query",
"cachability",
"(",
"query",
"string",
"query",
"builder",
",",
"true",
")",
";",
"}"
]
|
[
"execute",
"the",
"script",
"for",
"the",
"provided",
"{",
"@",
"code",
"doc",
"id",
"}"
]
| [
"public",
"final",
"void",
"run",
"for",
"doc",
"(",
"int",
"doc",
"id",
")",
"{",
"count",
"=",
"0",
";",
"set",
"document",
"(",
"doc",
"id",
")",
";",
"execute",
"(",
")",
";",
"}"
]
|
[
"simply",
"returns",
"its",
"argument"
]
| [
"public",
"static",
"<",
"n",
",",
"e",
">",
"immutable",
"network",
"<",
"n",
",",
"e",
">",
"copy",
"of",
"(",
"immutable",
"network",
"<",
"n",
",",
"e",
">",
"network",
")",
"{",
"return",
"check",
"not",
"null",
"(",
"network",
")",
";",
"}"
]
|
[
"add",
"a",
"goto",
"entry",
"to",
"the",
"given",
"cell"
]
| [
"public",
"boolean",
"put",
"goto",
"(",
"int",
"from",
"state",
",",
"assembly",
"non",
"terminal",
"next",
",",
"int",
"new",
"state",
")",
"{",
"return",
"put",
"(",
"from",
"state",
",",
"next",
",",
"new",
"goto",
"action",
"(",
"new",
"state",
")",
")",
";",
"}"
]
|
[
"program",
"entry",
"point"
]
| [
"public",
"static",
"void",
"main",
"(",
"string",
"[",
"]",
"args",
")",
"{",
"var",
"king",
"=",
"new",
"orc",
"king",
"(",
")",
";",
"king",
"make",
"request",
"(",
"new",
"request",
"(",
"request",
"type",
"defend",
"castle",
",",
"\"",
"defend",
"castle",
"\"",
")",
")",
";",
"king",
"make",
"request",
"(",
"new",
"request",
"(",
"request",
"type",
"torture",
"prisoner",
",",
"\"",
"torture",
"prisoner",
"\"",
")",
")",
";",
"king",
"make",
"request",
"(",
"new",
"request",
"(",
"request",
"type",
"collect",
"tax",
",",
"\"",
"collect",
"tax",
"\"",
")",
")",
";",
"}"
]
|
[
"transfers",
"this",
"buffer",
"'",
"s",
"data",
"to",
"the",
"specified",
"destination",
"starting",
"at",
"the",
"current",
"{",
"@",
"code",
"reader",
"index",
"}",
"and",
"increases",
"the",
"{",
"@",
"code",
"reader",
"index",
"}",
"by",
"the",
"number",
"of",
"the",
"transferred",
"bytes",
"(",
"=",
"{",
"@",
"code",
"length",
"}",
")"
]
| [
"public",
"abstract",
"byte",
"buf",
"read",
"bytes",
"(",
"byte",
"buf",
"dst",
",",
"int",
"dst",
"index",
",",
"int",
"length",
")",
";"
]
|
[
"put",
"fakebody",
"-",
"with",
"-",
"query",
"-",
"params"
]
| [
"public",
"response",
"entity",
"<",
"void",
">",
"test",
"body",
"with",
"query",
"params",
"(",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"query",
"\"",
",",
"required",
"=",
"true",
")",
"string",
"query",
",",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"body",
"user",
"body",
")",
"{",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"http",
"status",
"not",
"implemented",
")",
";",
"}"
]
|
[
"getter",
"for",
"the",
"final",
"commit",
"-",
"directory"
]
| [
"public",
"static",
"path",
"get",
"commit",
"directory",
"(",
"job",
"job",
")",
"{",
"return",
"get",
"commit",
"directory",
"(",
"job",
"get",
"configuration",
"(",
")",
")",
";",
"}"
]
|
[
"add",
"the",
"given",
"allocation",
"decider",
"to",
"the",
"given",
"deciders",
"collection",
",",
"erroring",
"if",
"the",
"class",
"name",
"is",
"already",
"used"
]
| [
"private",
"static",
"void",
"add",
"allocation",
"decider",
"(",
"map",
"<",
"class",
",",
"allocation",
"decider",
">",
"deciders",
",",
"allocation",
"decider",
"decider",
")",
"{",
"if",
"(",
"deciders",
"put",
"(",
"decider",
"get",
"class",
"(",
")",
",",
"decider",
")",
"!",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"cannot",
"specify",
"allocation",
"decider",
"[",
"\"",
"+",
"decider",
"get",
"class",
"(",
")",
"get",
"name",
"(",
")",
"+",
"\"",
"]",
"twice",
"\"",
")",
";",
"}",
"}"
]
|
[
"create",
"intermediate",
"join",
"table",
"name",
"by",
"the",
"concatenation",
"of",
"the",
"two",
"target",
"table",
"names",
"in",
"alphabetical",
"order",
"with",
"underline",
"in",
"the",
"middle"
]
| [
"public",
"static",
"string",
"get",
"intermediate",
"table",
"name",
"(",
"string",
"table",
"name",
",",
"string",
"associated",
"table",
"name",
")",
"{",
"if",
"(",
"!",
"(",
"text",
"utils",
"is",
"empty",
"(",
"table",
"name",
")",
"|",
"|",
"text",
"utils",
"is",
"empty",
"(",
"associated",
"table",
"name",
")",
")",
")",
"{",
"string",
"intermediate",
"table",
"name",
";",
"if",
"(",
"table",
"name",
"to",
"lower",
"case",
"(",
"locale",
"us",
")",
"compare",
"to",
"(",
"associated",
"table",
"name",
"to",
"lower",
"case",
"(",
"locale",
"us",
")",
")",
"<",
"=",
"0",
")",
"{",
"intermediate",
"table",
"name",
"=",
"table",
"name",
"+",
"\"",
"\"",
"+",
"associated",
"table",
"name",
";",
"}",
"else",
"{",
"intermediate",
"table",
"name",
"=",
"associated",
"table",
"name",
"+",
"\"",
"\"",
"+",
"table",
"name",
";",
"}",
"return",
"intermediate",
"table",
"name",
";",
"}",
"return",
"null",
";",
"}"
]
|
[
"test",
"that",
"ask",
"choice",
"method",
"auto",
"-",
"populates",
"dialog",
"with",
"user",
"-",
"supplied",
"default",
"value",
"(",
"in",
"the",
"absence",
"of",
"a",
"properties",
"file",
")"
]
| [
"public",
"void",
"test",
"ask",
"choice",
"default",
"value",
"(",
")",
"throws",
"exception",
"{",
"create",
"script",
"(",
")",
";",
"list",
"<",
"string",
">",
"choices",
"=",
"arrays",
"as",
"list",
"(",
"\"",
"one",
"fish",
"\"",
",",
"\"",
"two",
"fish",
"\"",
",",
"\"",
"red",
"fish",
"\"",
",",
"\"",
"blue",
"fish",
"\"",
")",
";",
"int",
"choice",
"index",
"=",
"2",
";",
"string",
"chosen",
"=",
"ask",
"combo",
"input",
"(",
"(",
")",
"-",
">",
"{",
"return",
"script",
"ask",
"choice",
"(",
"\"",
"ask",
"default",
"choice",
"test",
"\"",
",",
"\"",
"which",
"choice",
"would",
"you",
"like",
"to",
"pick",
"?",
"\"",
",",
"choices",
",",
"choices",
"get",
"(",
"choice",
"index",
")",
")",
";",
"}",
")",
";",
"assert",
"equals",
"(",
"choices",
"get",
"(",
"choice",
"index",
")",
",",
"chosen",
")",
";",
"}"
]
|
[
"returns",
"the",
"ordinal",
"value",
"of",
"this",
"symbol",
"a",
"value",
"of",
"-",
"1",
"indicates",
"that",
"this",
"symbol",
"is",
"only",
"exported",
"by",
"name"
]
| [
"int",
"get",
"ordinal",
"(",
")",
"{",
"return",
"ordinal",
";",
"}"
]
|
[
"returns",
"the",
"array",
"of",
"keys",
"in",
"this",
"version",
"child"
]
| [
"public",
"string",
"[",
"]",
"get",
"keys",
"(",
")",
"{",
"string",
"[",
"]",
"keys",
"=",
"new",
"string",
"[",
"value",
"map",
"size",
"(",
")",
"]",
";",
"iterator",
"<",
"string",
">",
"iter",
"=",
"value",
"map",
"key",
"set",
"(",
")",
"iterator",
"(",
")",
";",
"int",
"i",
"=",
"0",
";",
"while",
"(",
"iter",
"has",
"next",
"(",
")",
")",
"{",
"keys",
"[",
"i",
"+",
"+",
"]",
"=",
"iter",
"next",
"(",
")",
";",
"}",
"arrays",
"sort",
"(",
"keys",
")",
";",
"return",
"keys",
";",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"checks",
"the",
"current",
"cluster",
"state",
"for",
"compatibility",
"with",
"the",
"params",
"throws",
"an",
"exception",
"if",
"the",
"supplied",
"params",
"cannot",
"be",
"executed",
"on",
"the",
"cluster",
"in",
"the",
"current",
"state"
]
| [
"public",
"void",
"validate",
"(",
"params",
"params",
",",
"cluster",
"state",
"cluster",
"state",
")",
"{",
"}"
]
|
[
"test",
"that",
"formatting",
"a",
"date",
"with",
"long",
"max",
"value",
"or",
"long",
"min",
"value",
"doesn",
"throw",
"errors",
"since",
"we",
"use",
"these",
"e",
"g",
"for",
"sorting",
"documents",
"with",
"`",
"null",
"`",
"values",
"first",
"or",
"last"
]
| [
"public",
"void",
"test",
"printers",
"long",
"min",
"max",
"value",
"(",
")",
"{",
"for",
"(",
"format",
"names",
"format",
":",
"format",
"names",
"values",
"(",
")",
")",
"{",
"date",
"formatter",
"formatter",
"=",
"date",
"formatters",
"for",
"pattern",
"(",
"format",
"get",
"name",
"(",
")",
")",
";",
"formatter",
"format",
"(",
"date",
"field",
"mapper",
"resolution",
"milliseconds",
"to",
"instant",
"(",
"long",
"min",
"value",
")",
")",
";",
"formatter",
"format",
"(",
"date",
"field",
"mapper",
"resolution",
"milliseconds",
"to",
"instant",
"(",
"long",
"max",
"value",
")",
")",
";",
"}",
"}"
]
|
[
"note",
"the",
"deletion",
"of",
"files",
"or",
"fake",
"directories",
"deleted"
]
| [
"private",
"void",
"note",
"deleted",
"(",
"final",
"int",
"count",
",",
"final",
"boolean",
"delete",
"fake",
"dir",
")",
"{",
"if",
"(",
"!",
"delete",
"fake",
"dir",
")",
"{",
"instrumentation",
"file",
"deleted",
"(",
"count",
")",
";",
"}",
"else",
"{",
"instrumentation",
"fake",
"dirs",
"deleted",
"(",
"count",
")",
";",
"}",
"}"
]
|
[
"return",
"whether",
"it",
"is",
"a",
"system",
"application"
]
| [
"public",
"static",
"boolean",
"is",
"app",
"system",
"(",
"final",
"string",
"package",
"name",
")",
"{",
"if",
"(",
"utils",
"bridge",
"is",
"space",
"(",
"package",
"name",
")",
")",
"return",
"false",
";",
"try",
"{",
"package",
"manager",
"pm",
"=",
"utils",
"get",
"app",
"(",
")",
"get",
"package",
"manager",
"(",
")",
";",
"application",
"info",
"ai",
"=",
"pm",
"get",
"application",
"info",
"(",
"package",
"name",
",",
"0",
")",
";",
"return",
"ai",
"!",
"=",
"null",
"&",
"&",
"(",
"ai",
"flags",
"&",
"application",
"info",
"flag",
"system",
")",
"!",
"=",
"0",
";",
"}",
"catch",
"(",
"package",
"manager",
"name",
"not",
"found",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"return",
"false",
";",
"}",
"}"
]
|
[
"returns",
"the",
"internal",
"version",
"of",
"the",
"{",
"@",
"link",
"copy",
"on",
"write",
"state",
"map",
"}",
"when",
"this",
"snapshot",
"was",
"created",
"this",
"value",
"must",
"be",
"used",
"to",
"tell",
"the",
"{",
"@",
"link",
"copy",
"on",
"write",
"state",
"map",
"}",
"when",
"to",
"release",
"this",
"snapshot"
]
| [
"int",
"get",
"snapshot",
"version",
"(",
")",
"{",
"return",
"snapshot",
"version",
";",
"}"
]
|
[
"returns",
"whether",
"the",
"stream",
"uses",
"get",
"this",
"is",
"not",
"known",
"until",
"after",
"{",
"@",
"link",
"sink",
"#",
"write",
"headers",
"}",
"is",
"invoked"
]
| [
"boolean",
"use",
"get",
"(",
")",
"{",
"return",
"use",
"get",
";",
"}"
]
|
[
"make",
"operation",
"to",
"set",
"the",
"s",
"3",
"client",
"public"
]
| [
"public",
"void",
"set",
"amazon",
"s",
"3",
"client",
"(",
"amazon",
"s",
"3",
"client",
")",
"{",
"log",
"debug",
"(",
"\"",
"setting",
"s3",
"client",
"to",
"{",
"}",
"\"",
",",
"client",
")",
";",
"super",
"set",
"amazon",
"s",
"3",
"client",
"(",
"client",
")",
";",
"}"
]
|
[
"the",
"initial",
"entries",
"in",
"the",
"cache",
",",
"iterable",
"in",
"insertion",
"order"
]
| [
"public",
"map",
"<",
"integer",
",",
"integer",
">",
"original",
"(",
")",
"{",
"initial",
"size",
"(",
")",
";",
"/",
"/",
"lazy",
"initialize",
"return",
"original",
";",
"}"
]
|
[
"test",
"special",
"handling",
"for",
"field",
"names",
"field",
"(",
"three",
"fields",
",",
"to",
"exercise",
"termsenum",
"better",
")"
]
| [
"public",
"void",
"test",
"field",
"names",
"three",
"fields",
"(",
")",
"throws",
"exception",
"{",
"directory",
"dir",
"=",
"new",
"directory",
"(",
")",
";",
"index",
"writer",
"config",
"iwc",
"=",
"new",
"index",
"writer",
"config",
"(",
"null",
")",
";",
"index",
"writer",
"iw",
"=",
"new",
"index",
"writer",
"(",
"dir",
",",
"iwc",
")",
";",
"/",
"/",
"add",
"document",
"with",
"2",
"fields",
"document",
"doc",
"=",
"new",
"document",
"(",
")",
";",
"doc",
"add",
"(",
"new",
"string",
"field",
"(",
"\"",
"field",
"a",
"\"",
",",
"\"",
"test",
"\"",
",",
"field",
"store",
"no",
")",
")",
";",
"doc",
"add",
"(",
"new",
"string",
"field",
"(",
"\"",
"field",
"b",
"\"",
",",
"\"",
"test",
"\"",
",",
"field",
"store",
"no",
")",
")",
";",
"doc",
"add",
"(",
"new",
"string",
"field",
"(",
"\"",
"field",
"c",
"\"",
",",
"\"",
"test",
"\"",
",",
"field",
"store",
"no",
")",
")",
";",
"doc",
"add",
"(",
"new",
"string",
"field",
"(",
"field",
"names",
"field",
"mapper",
"name",
",",
"\"",
"field",
"a",
"\"",
",",
"field",
"store",
"no",
")",
")",
";",
"doc",
"add",
"(",
"new",
"string",
"field",
"(",
"field",
"names",
"field",
"mapper",
"name",
",",
"\"",
"field",
"b",
"\"",
",",
"field",
"store",
"no",
")",
")",
";",
"doc",
"add",
"(",
"new",
"string",
"field",
"(",
"field",
"names",
"field",
"mapper",
"name",
",",
"\"",
"field",
"c",
"\"",
",",
"field",
"store",
"no",
")",
")",
";",
"iw",
"add",
"document",
"(",
"doc",
")",
";",
"/",
"/",
"open",
"reader",
"automaton",
"automaton",
"=",
"automatons",
"patterns",
"(",
"arrays",
"as",
"list",
"(",
"\"",
"field",
"a",
"\"",
",",
"\"",
"field",
"c",
"\"",
",",
"field",
"names",
"field",
"mapper",
"name",
")",
")",
";",
"directory",
"reader",
"ir",
"=",
"field",
"subset",
"reader",
"wrap",
"(",
"directory",
"reader",
"open",
"(",
"iw",
")",
",",
"new",
"character",
"run",
"automaton",
"(",
"automaton",
")",
")",
";",
"/",
"/",
"see",
"only",
"two",
"fields",
"leaf",
"reader",
"segment",
"reader",
"=",
"ir",
"leaves",
"(",
")",
"get",
"(",
"0",
")",
"reader",
"(",
")",
";",
"terms",
"terms",
"=",
"segment",
"reader",
"terms",
"(",
"field",
"names",
"field",
"mapper",
"name",
")",
";",
"terms",
"enum",
"terms",
"enum",
"=",
"terms",
"iterator",
"(",
")",
";",
"assert",
"equals",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"a",
"\"",
")",
",",
"terms",
"enum",
"next",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"c",
"\"",
")",
",",
"terms",
"enum",
"next",
"(",
")",
")",
";",
"assert",
"null",
"(",
"terms",
"enum",
"next",
"(",
")",
")",
";",
"/",
"/",
"seek",
"exact",
"terms",
"enum",
"=",
"terms",
"iterator",
"(",
")",
";",
"assert",
"true",
"(",
"terms",
"enum",
"seek",
"exact",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"a",
"\"",
")",
")",
")",
";",
"assert",
"false",
"(",
"terms",
"enum",
"seek",
"exact",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"b",
"\"",
")",
")",
")",
";",
"assert",
"true",
"(",
"terms",
"enum",
"seek",
"exact",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"c",
"\"",
")",
")",
")",
";",
"/",
"/",
"seek",
"ceil",
"terms",
"enum",
"=",
"terms",
"iterator",
"(",
")",
";",
"assert",
"equals",
"(",
"seek",
"status",
"found",
",",
"terms",
"enum",
"seek",
"ceil",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"a",
"\"",
")",
")",
")",
";",
"assert",
"equals",
"(",
"seek",
"status",
"not",
"found",
",",
"terms",
"enum",
"seek",
"ceil",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"b",
"\"",
")",
")",
")",
";",
"assert",
"equals",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"c",
"\"",
")",
",",
"terms",
"enum",
"term",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"seek",
"status",
"end",
",",
"terms",
"enum",
"seek",
"ceil",
"(",
"new",
"bytes",
"ref",
"(",
"\"",
"field",
"d",
"\"",
")",
")",
")",
";",
"test",
"util",
"check",
"reader",
"(",
"ir",
")",
";",
"i",
"o",
"utils",
"close",
"(",
"ir",
",",
"iw",
",",
"dir",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"the",
"execution",
"should",
"be",
"blocked",
"for",
"temporary",
"reasons"
]
| [
"default",
"boolean",
"is",
"build",
"blocked",
"(",
")",
"{",
"return",
"get",
"cause",
"of",
"blockage",
"(",
")",
"!",
"=",
"null",
";",
"}"
]
|
[
"helper",
"for",
"all",
"the",
"{",
"@",
"code",
"if",
"}",
"-",
"related",
"methods",
",",
"which",
"checks",
"types",
"and",
"picks",
"one",
"of",
"the",
"four",
"variants",
",",
"throwing",
"if",
"there",
"'",
"s",
"a",
"problem"
]
| [
"private",
"static",
"rop",
"pick",
"if",
"(",
"type",
"list",
"types",
",",
"rop",
"int",
"z",
",",
"rop",
"obj",
"z",
",",
"rop",
"int",
"int",
",",
"rop",
"obj",
"obj",
")",
"{",
"switch",
"(",
"types",
"size",
"(",
")",
")",
"{",
"case",
"1",
":",
"{",
"switch",
"(",
"types",
"get",
"type",
"(",
"0",
")",
"get",
"basic",
"frame",
"type",
"(",
")",
")",
"{",
"case",
"type",
"bt",
"int",
":",
"{",
"return",
"int",
"z",
";",
"}",
"case",
"type",
"bt",
"object",
":",
"{",
"if",
"(",
"obj",
"z",
"!",
"=",
"null",
")",
"{",
"return",
"obj",
"z",
";",
"}",
"}",
"}",
"break",
";",
"}",
"case",
"2",
":",
"{",
"int",
"bt",
"=",
"types",
"get",
"type",
"(",
"0",
")",
"get",
"basic",
"frame",
"type",
"(",
")",
";",
"if",
"(",
"bt",
"=",
"=",
"types",
"get",
"type",
"(",
"1",
")",
"get",
"basic",
"frame",
"type",
"(",
")",
")",
"{",
"switch",
"(",
"bt",
")",
"{",
"case",
"type",
"bt",
"int",
":",
"{",
"return",
"int",
"int",
";",
"}",
"case",
"type",
"bt",
"object",
":",
"{",
"if",
"(",
"obj",
"obj",
"!",
"=",
"null",
")",
"{",
"return",
"obj",
"obj",
";",
"}",
"}",
"}",
"}",
"break",
";",
"}",
"}",
"return",
"throw",
"bad",
"types",
"(",
"types",
")",
";",
"}"
]
|
[
"start",
"the",
"timer",
"note",
":",
"no",
"effect",
"if",
"timer",
"is",
"already",
"started"
]
| [
"public",
"void",
"start",
"(",
")",
"{",
"if",
"(",
"!",
"this",
"started",
")",
"{",
"this",
"last",
"=",
"system",
"nano",
"time",
"(",
")",
";",
"this",
"started",
"=",
"true",
";",
"}",
"}"
]
|
[
"return",
"the",
"configuration",
"classes",
"that",
"imported",
"this",
"class",
",",
"or",
"an",
"empty",
"set",
"if",
"this",
"configuration",
"was",
"not",
"imported"
]
| [
"public",
"set",
"<",
"configuration",
"class",
">",
"get",
"imported",
"by",
"(",
")",
"{",
"return",
"this",
"imported",
"by",
";",
"}"
]
|
[
"the",
"analysis",
"bucket",
"span"
]
| [
"public",
"time",
"value",
"get",
"bucket",
"span",
"(",
")",
"{",
"return",
"bucket",
"span",
";",
"}"
]
|
[
"sets",
"the",
"resources",
"for",
"this",
"sink",
",",
"the",
"minimum",
"and",
"preferred",
"resources",
"are",
"the",
"same",
"by",
"default"
]
| [
"private",
"data",
"stream",
"sink",
"<",
"t",
">",
"set",
"resources",
"(",
"resource",
"spec",
"resources",
")",
"{",
"transformation",
"set",
"resources",
"(",
"resources",
",",
"resources",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"key",
"by",
"operation",
"for",
"connected",
"data",
"stream",
"assigns",
"keys",
"to",
"the",
"elements",
"of",
"input",
"1",
"and",
"input",
"2",
"using",
"key",
"selector",
"1",
"and",
"key",
"selector",
"2"
]
| [
"public",
"<",
"key",
">",
"connected",
"streams",
"<",
"in1",
",",
"in2",
">",
"key",
"by",
"(",
"key",
"selector",
"<",
"in1",
",",
"key",
">",
"key",
"selector",
"1",
",",
"key",
"selector",
"<",
"in2",
",",
"key",
">",
"key",
"selector",
"2",
")",
"{",
"return",
"new",
"connected",
"streams",
"<",
">",
"(",
"environment",
",",
"input",
"stream",
"1",
"key",
"by",
"(",
"key",
"selector",
"1",
")",
",",
"input",
"stream",
"2",
"key",
"by",
"(",
"key",
"selector",
"2",
")",
")",
";",
"}"
]
|
[
"get",
"map",
"map",
"anytype"
]
| [
"public",
"map",
"<",
"string",
",",
"map",
"<",
"string",
",",
"object",
">",
">",
"get",
"map",
"map",
"anytype",
"(",
")",
"{",
"return",
"map",
"map",
"anytype",
";",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.