docstring_tokens
list | code_tokens
list |
---|---|
[
"minimum",
":",
"54",
"3",
"maximum",
":",
"987",
"6"
] |
[
"public",
"format",
"test",
"float",
"(",
"float",
"float",
")",
"{",
"this",
"float",
"=",
"float",
";",
"return",
"this",
";",
"}"
] |
[
"compute",
"format",
"string",
"based",
"on",
"maximum",
"column",
"widths",
"copied",
"from",
"ls",
"adjust",
"column",
"widths",
"as",
"these",
"tests",
"are",
"more",
"interested",
"in",
"proving",
"regression",
"rather",
"than",
"absolute",
"format"
] |
[
"public",
"static",
"string",
"compute",
"line",
"format",
"(",
"linked",
"list",
"<",
"path",
"data",
">",
"items",
")",
"{",
"int",
"max",
"repl",
"=",
"3",
",",
"max",
"len",
"=",
"10",
",",
"max",
"owner",
"=",
"0",
",",
"max",
"group",
"=",
"0",
";",
"for",
"(",
"path",
"data",
"item",
":",
"items",
")",
"{",
"file",
"status",
"stat",
"=",
"item",
"stat",
";",
"max",
"repl",
"=",
"max",
"length",
"(",
"max",
"repl",
",",
"stat",
"get",
"replication",
"(",
")",
")",
";",
"max",
"len",
"=",
"max",
"length",
"(",
"max",
"len",
",",
"stat",
"get",
"len",
"(",
")",
")",
";",
"max",
"owner",
"=",
"max",
"length",
"(",
"max",
"owner",
",",
"stat",
"get",
"owner",
"(",
")",
")",
";",
"max",
"group",
"=",
"max",
"length",
"(",
"max",
"group",
",",
"stat",
"get",
"group",
"(",
")",
")",
";",
"}",
"string",
"builder",
"fmt",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"fmt",
"append",
"(",
"\"",
"%",
"s",
"%",
"s",
"\"",
")",
";",
"/",
"/",
"permission",
"string",
"fmt",
"append",
"(",
"\"",
"%",
"\"",
"+",
"max",
"repl",
"+",
"\"",
"s",
"\"",
")",
";",
"/",
"/",
"do",
"not",
"use",
"'",
"%",
"-",
"0s",
"'",
"as",
"a",
"formatting",
"conversion",
",",
"since",
"it",
"will",
"throw",
"a",
"/",
"/",
"a",
"missing",
"format",
"width",
"exception",
"if",
"it",
"is",
"used",
"in",
"string",
"format",
"(",
")",
"/",
"/",
"http",
":",
"/",
"/",
"docs",
"oracle",
"com",
"/",
"javase",
"/",
"1",
"5",
"0",
"/",
"docs",
"/",
"api",
"/",
"java",
"/",
"util",
"/",
"formatter",
"html",
"#",
"int",
"flags",
"fmt",
"append",
"(",
"(",
"max",
"owner",
">",
"0",
")",
"?",
"\"",
"%",
"-",
"\"",
"+",
"max",
"owner",
"+",
"\"",
"s",
"\"",
":",
"\"",
"%",
"s",
"\"",
")",
";",
"fmt",
"append",
"(",
"(",
"max",
"group",
">",
"0",
")",
"?",
"\"",
"%",
"-",
"\"",
"+",
"max",
"group",
"+",
"\"",
"s",
"\"",
":",
"\"",
"%",
"s",
"\"",
")",
";",
"fmt",
"append",
"(",
"\"",
"%",
"\"",
"+",
"max",
"len",
"+",
"\"",
"s",
"\"",
")",
";",
"fmt",
"append",
"(",
"\"",
"%",
"s",
"%",
"s",
"\"",
")",
";",
"/",
"/",
"mod",
"time",
"&",
"path",
"return",
"fmt",
"to",
"string",
"(",
")",
";",
"}"
] |
[
"provides",
"methods",
"for",
"accessing",
"the",
"elastic",
"licensed",
"data",
"frame",
"a",
"p",
"is",
"that",
"are",
"shipped",
"with",
"the",
"elastic",
"stack",
"distribution",
"of",
"elasticsearch",
"all",
"of",
"these",
"a",
"p",
"is",
"will",
"404",
"if",
"run",
"against",
"the",
"oss",
"distribution",
"of",
"elasticsearch",
"see",
"the",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchreferencecurrenttransform",
"-",
"apis",
"html",
"\"",
">",
"transform",
"a",
"p",
"is",
"on",
"elastic",
"co",
"for",
"more",
"information"
] |
[
"public",
"transform",
"client",
"transform",
"(",
")",
"{",
"return",
"transform",
"client",
";",
"}"
] |
[
"gets",
"the",
"socks",
"proxy"
] |
[
"public",
"string",
"get",
"socks",
"proxy",
"(",
")",
"{",
"return",
"socks",
"proxy",
";",
"}"
] |
[
"bytes",
"to",
"int",
"int"
] |
[
"public",
"static",
"int",
"bytes",
"to",
"int",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"offset",
")",
"{",
"int",
"ret",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
"&",
"&",
"i",
"+",
"offset",
"<",
"bytes",
"length",
";",
"i",
"+",
"+",
")",
"{",
"ret",
"<",
"<",
"=",
"8",
";",
"ret",
"|",
"=",
"(",
"int",
")",
"bytes",
"[",
"i",
"+",
"offset",
"]",
"&",
"0x",
"f",
"f",
";",
"}",
"return",
"ret",
";",
"}"
] |
[
"verify",
"the",
"signature",
"of",
"the",
"jwt",
"token",
"in",
"this",
"method",
"this",
"method",
"depends",
"on",
"the",
"public",
"key",
"that",
"was",
"established",
"during",
"init",
"based",
"upon",
"the",
"provisioned",
"public",
"key",
"override",
"this",
"method",
"in",
"subclasses",
"in",
"order",
"to",
"customize",
"the",
"signature",
"verification",
"behavior"
] |
[
"protected",
"boolean",
"validate",
"signature",
"(",
"signed",
"j",
"w",
"t",
"jwt",
"token",
")",
"{",
"boolean",
"valid",
"=",
"false",
";",
"if",
"(",
"j",
"w",
"s",
"object",
"state",
"signed",
"=",
"=",
"jwt",
"token",
"get",
"state",
"(",
")",
")",
"{",
"log",
"debug",
"(",
"\"",
"jwt",
"token",
"is",
"in",
"a",
"signed",
"state",
"\"",
")",
";",
"if",
"(",
"jwt",
"token",
"get",
"signature",
"(",
")",
"!",
"=",
"null",
")",
"{",
"log",
"debug",
"(",
"\"",
"jwt",
"token",
"signature",
"is",
"not",
"null",
"\"",
")",
";",
"try",
"{",
"j",
"w",
"s",
"verifier",
"verifier",
"=",
"new",
"r",
"s",
"a",
"s",
"s",
"a",
"verifier",
"(",
"public",
"key",
")",
";",
"if",
"(",
"jwt",
"token",
"verify",
"(",
"verifier",
")",
")",
"{",
"valid",
"=",
"true",
";",
"log",
"debug",
"(",
"\"",
"jwt",
"token",
"has",
"been",
"successfully",
"verified",
"\"",
")",
";",
"}",
"else",
"{",
"log",
"warn",
"(",
"\"",
"jwt",
"signature",
"verification",
"failed",
"\"",
")",
";",
"}",
"}",
"catch",
"(",
"j",
"o",
"s",
"e",
"exception",
"je",
")",
"{",
"log",
"warn",
"(",
"\"",
"error",
"while",
"validating",
"signature",
"\"",
",",
"je",
")",
";",
"}",
"}",
"}",
"return",
"valid",
";",
"}"
] |
[
"closes",
"all",
"resources",
"used"
] |
[
"public",
"void",
"close",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"try",
"{",
"if",
"(",
"session",
"!",
"=",
"null",
")",
"{",
"session",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"log",
"error",
"(",
"\"",
"error",
"while",
"closing",
"session",
"\"",
",",
"e",
")",
";",
"}",
"try",
"{",
"if",
"(",
"cluster",
"!",
"=",
"null",
")",
"{",
"cluster",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"log",
"error",
"(",
"\"",
"error",
"while",
"closing",
"cluster",
"\"",
",",
"e",
")",
";",
"}",
"}"
] |
[
"whether",
"the",
"browser",
"should",
"send",
"credentials",
",",
"such",
"as",
"cookies",
"along",
"with",
"cross",
"domain",
"requests",
",",
"to",
"the",
"annotated",
"endpoint",
"the",
"configured",
"value",
"is",
"set",
"on",
"the",
"{",
"@",
"code",
"access",
"-",
"control",
"-",
"allow",
"-",
"credentials",
"}",
"response",
"header",
"of",
"preflight",
"requests",
"note",
":",
"be",
"aware",
"that",
"this",
"option",
"establishes",
"a",
"high",
"level",
"of",
"trust",
"with",
"the",
"configured",
"domains",
"and",
"also",
"increases",
"the",
"surface",
"attack",
"of",
"the",
"web",
"application",
"by",
"exposing",
"sensitive",
"user",
"-",
"specific",
"information",
"such",
"as",
"cookies",
"and",
"csrf",
"tokens",
"by",
"default",
"this",
"is",
"not",
"set",
"in",
"which",
"case",
"the",
"{",
"@",
"code",
"access",
"-",
"control",
"-",
"allow",
"-",
"credentials",
"}",
"header",
"is",
"also",
"not",
"set",
"and",
"credentials",
"are",
"therefore",
"not",
"allowed"
] |
[
"public",
"cors",
"registration",
"allow",
"credentials",
"(",
"boolean",
"allow",
"credentials",
")",
"{",
"this",
"config",
"set",
"allow",
"credentials",
"(",
"allow",
"credentials",
")",
";",
"return",
"this",
";",
"}"
] |
[
"get",
"my",
"number"
] |
[
"public",
"big",
"decimal",
"get",
"my",
"number",
"(",
")",
"{",
"return",
"my",
"number",
";",
"}"
] |
[
"returns",
"the",
"symlink",
"target",
"and",
"file",
"state",
"of",
"{",
"@",
"code",
"rooted",
"path",
"}",
"'",
"s",
"symlink",
"to",
"{",
"@",
"code",
"symlink",
"target",
"}",
",",
"accounting",
"for",
"ancestor",
"symlinks",
",",
"or",
"{",
"@",
"code",
"null",
"}",
"if",
"there",
"was",
"a",
"missing",
"dep"
] |
[
"private",
"partial",
"resolution",
"result",
"get",
"symlink",
"target",
"rooted",
"path",
"(",
"rooted",
"path",
"rooted",
"path",
",",
"path",
"fragment",
"symlink",
"target",
",",
"symlink",
"resolution",
"state",
"symlink",
"resolution",
"state",
",",
"environment",
"env",
")",
"throws",
"file",
"function",
"exception",
",",
"interrupted",
"exception",
"{",
"path",
"path",
"=",
"rooted",
"path",
"as",
"path",
"(",
")",
";",
"path",
"symlink",
"target",
"path",
";",
"if",
"(",
"symlink",
"target",
"is",
"absolute",
"(",
")",
")",
"{",
"symlink",
"target",
"path",
"=",
"path",
"get",
"relative",
"(",
"symlink",
"target",
")",
";",
"}",
"else",
"{",
"path",
"parent",
"path",
"=",
"path",
"get",
"parent",
"directory",
"(",
")",
";",
"symlink",
"target",
"path",
"=",
"parent",
"path",
"!",
"=",
"null",
"?",
"parent",
"path",
"get",
"relative",
"(",
"symlink",
"target",
")",
":",
"path",
"get",
"relative",
"(",
"symlink",
"target",
")",
";",
"}",
"rooted",
"path",
"symlink",
"target",
"rooted",
"path",
"=",
"to",
"rooted",
"path",
"(",
"symlink",
"target",
"path",
")",
";",
"check",
"path",
"seen",
"during",
"partial",
"resolution",
"(",
"symlink",
"target",
"rooted",
"path",
",",
"symlink",
"resolution",
"state",
",",
"env",
")",
";",
"if",
"(",
"env",
"values",
"missing",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"/",
"/",
"the",
"symlink",
"target",
"could",
"have",
"a",
"different",
"parent",
"directory",
",",
"which",
"itself",
"could",
"be",
"a",
"directory",
"/",
"/",
"symlink",
"(",
"or",
"have",
"an",
"ancestor",
"directory",
"symlink",
")",
"!",
"return",
"resolve",
"from",
"ancestors",
"(",
"symlink",
"target",
"rooted",
"path",
",",
"symlink",
"resolution",
"state",
",",
"env",
")",
";",
"}"
] |
[
"close",
"the",
"stream"
] |
[
"public",
"void",
"close",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"file",
"reader",
"close",
"(",
")",
";",
"output",
"close",
"(",
")",
";",
"super",
"close",
"(",
")",
";",
"}"
] |
[
"<",
"code",
">",
"optional",
"string",
"namespace",
"uri",
"=",
"1",
";",
"<",
"code",
">"
] |
[
"public",
"java",
"lang",
"string",
"get",
"namespace",
"uri",
"(",
")",
"{",
"return",
"instance",
"get",
"namespace",
"uri",
"(",
")",
";",
"}"
] |
[
"update",
"the",
"panel",
"requests",
"a",
"new",
"list",
"of",
"languages",
"from",
"the",
"language",
"service",
"and",
"updates",
"the",
"table"
] |
[
"public",
"void",
"update",
"(",
")",
"{",
"model",
"update",
"(",
")",
";",
"}"
] |
[
"compares",
"the",
"two",
"specified",
"{",
"@",
"code",
"byte",
"}",
"values",
"the",
"sign",
"of",
"the",
"value",
"returned",
"is",
"the",
"same",
"as",
"that",
"of",
"{",
"@",
"code",
"(",
"(",
"byte",
")",
"a",
")",
"compare",
"to",
"(",
"b",
")",
"}",
"<",
"b",
">",
"note",
":",
"<",
"b",
">",
"this",
"method",
"behaves",
"identically",
"to",
"the",
"jdk",
"7",
"method",
"{",
"@",
"link",
"byte",
"#",
"compare",
"}"
] |
[
"public",
"static",
"int",
"compare",
"(",
"byte",
"a",
",",
"byte",
"b",
")",
"{",
"return",
"a",
"-",
"b",
";",
"/",
"/",
"safe",
"due",
"to",
"restricted",
"range",
"}"
] |
[
"read",
"bytes",
"until",
"the",
"array",
"is",
"filled"
] |
[
"public",
"final",
"void",
"read",
"fully",
"(",
"byte",
"ba",
"[",
"]",
")",
"throws",
"i",
"o",
"exception",
"{",
"dis",
"read",
"fully",
"(",
"ba",
",",
"0",
",",
"ba",
"length",
")",
";",
"}"
] |
[
"checks",
"if",
"the",
"user",
"was",
"successfully",
"authenticated"
] |
[
"public",
"void",
"do",
"secured",
"(",
"stapler",
"request",
"req",
",",
"stapler",
"response",
"rsp",
")",
"throws",
"i",
"o",
"exception",
",",
"servlet",
"exception",
"{",
"/",
"/",
"todo",
"fire",
"something",
"in",
"security",
"listener",
"?",
"(",
"seems",
"to",
"be",
"used",
"only",
"for",
"rest",
"calls",
"when",
"legacy",
"security",
"realm",
"is",
"active",
")",
"if",
"(",
"req",
"get",
"user",
"principal",
"(",
")",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"authentication",
"must",
"have",
"failed",
"rsp",
"set",
"status",
"(",
"http",
"servlet",
"response",
"sc",
"unauthorized",
")",
";",
"return",
";",
"}",
"/",
"/",
"the",
"user",
"is",
"now",
"authenticated",
",",
"so",
"send",
"him",
"back",
"to",
"the",
"target",
"string",
"path",
"=",
"req",
"get",
"context",
"path",
"(",
")",
"+",
"req",
"get",
"original",
"rest",
"of",
"path",
"(",
")",
";",
"string",
"q",
"=",
"req",
"get",
"query",
"string",
"(",
")",
";",
"if",
"(",
"q",
"!",
"=",
"null",
")",
"path",
"+",
"=",
"'",
"?",
"'",
"+",
"q",
";",
"rsp",
"send",
"redirect",
"2",
"(",
"path",
")",
";",
"}"
] |
[
"checks",
"that",
"the",
"given",
"{",
"@",
"code",
"time",
"value",
"}",
"is",
"a",
"non",
"-",
"negative",
"multiple",
"value",
"of",
"the",
"{",
"@",
"code",
"base",
"unit",
"}",
"4",
"0",
"0ms",
"is",
"valid",
"for",
"base",
"unit",
"of",
"seconds",
"4",
"5",
"0ms",
"is",
"invalid",
"for",
"base",
"unit",
"of",
"seconds",
"but",
"valid",
"for",
"base",
"unit",
"of",
"milliseconds"
] |
[
"public",
"static",
"void",
"check",
"non",
"negative",
"multiple",
"(",
"time",
"value",
"time",
"value",
",",
"time",
"unit",
"base",
"unit",
",",
"parse",
"field",
"field",
")",
"{",
"check",
"non",
"negative",
"(",
"time",
"value",
",",
"field",
")",
";",
"check",
"multiple",
"(",
"time",
"value",
",",
"base",
"unit",
",",
"field",
")",
";",
"}"
] |
[
"get",
"the",
"number",
"of",
"times",
"this",
"vertex",
"set",
"has",
"changed"
] |
[
"public",
"long",
"get",
"modification",
"number",
"(",
")",
"{",
"return",
"this",
"modification",
"number",
";",
"}"
] |
[
"visits",
"an",
"enumeration",
"value",
"of",
"the",
"annotation"
] |
[
"public",
"void",
"visit",
"enum",
"(",
"final",
"string",
"name",
",",
"final",
"string",
"descriptor",
",",
"final",
"string",
"value",
")",
"{",
"if",
"(",
"av",
"!",
"=",
"null",
")",
"{",
"av",
"visit",
"enum",
"(",
"name",
",",
"descriptor",
",",
"value",
")",
";",
"}",
"}"
] |
[
"put",
"client",
"ip"
] |
[
"public",
"void",
"put",
"client",
"ip",
"address",
"(",
"final",
"string",
"loc",
")",
"{",
"put",
"(",
"field",
"client",
"ip",
",",
"loc",
")",
";",
"}"
] |
[
"map",
"the",
"route",
"for",
"http",
"patch",
"requests"
] |
[
"public",
"void",
"patch",
"(",
"string",
"path",
",",
"string",
"accept",
"type",
",",
"route",
"route",
")",
"{",
"add",
"route",
"(",
"http",
"method",
"patch",
",",
"create",
"route",
"impl",
"(",
"path",
",",
"accept",
"type",
",",
"route",
")",
")",
";",
"}"
] |
[
"set",
"the",
"listener",
"to",
"be",
"executed",
"when",
"an",
"allowed",
"exception",
"is",
"raised",
"when",
"performing",
"the",
"action",
"the",
"listener",
"could",
"even",
"change",
"the",
"result",
"of",
"the",
"action",
"if",
"needed"
] |
[
"public",
"@",
"non",
"null",
"builder",
"<",
"v",
">",
"with",
"during",
"action",
"exception",
"listener",
"(",
"@",
"non",
"null",
"bi",
"function",
"<",
"integer",
",",
"exception",
",",
"v",
">",
"exception",
"listener",
")",
"{",
"this",
"during",
"action",
"exception",
"listener",
"=",
"exception",
"listener",
";",
"return",
"this",
";",
"}"
] |
[
"joins",
"hits",
"with",
"rated",
"documents",
"using",
"the",
"joint",
"index",
"id",
"document",
"key"
] |
[
"static",
"list",
"<",
"rated",
"search",
"hit",
">",
"join",
"hits",
"with",
"ratings",
"(",
"search",
"hit",
"[",
"]",
"hits",
",",
"list",
"<",
"rated",
"document",
">",
"rated",
"docs",
")",
"{",
"map",
"<",
"document",
"key",
",",
"rated",
"document",
">",
"rated",
"document",
"map",
"=",
"rated",
"docs",
"stream",
"(",
")",
"collect",
"(",
"collectors",
"to",
"map",
"(",
"rated",
"document",
":",
":",
"get",
"key",
",",
"item",
"-",
">",
"item",
")",
")",
";",
"list",
"<",
"rated",
"search",
"hit",
">",
"rated",
"search",
"hits",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"hits",
"length",
")",
";",
"for",
"(",
"search",
"hit",
"hit",
":",
"hits",
")",
"{",
"document",
"key",
"key",
"=",
"new",
"document",
"key",
"(",
"hit",
"get",
"index",
"(",
")",
",",
"hit",
"get",
"id",
"(",
")",
")",
";",
"rated",
"document",
"rated",
"doc",
"=",
"rated",
"document",
"map",
"get",
"(",
"key",
")",
";",
"if",
"(",
"rated",
"doc",
"!",
"=",
"null",
")",
"{",
"rated",
"search",
"hits",
"add",
"(",
"new",
"rated",
"search",
"hit",
"(",
"hit",
",",
"optional",
"int",
"of",
"(",
"rated",
"doc",
"get",
"rating",
"(",
")",
")",
")",
")",
";",
"}",
"else",
"{",
"rated",
"search",
"hits",
"add",
"(",
"new",
"rated",
"search",
"hit",
"(",
"hit",
",",
"optional",
"int",
"empty",
"(",
")",
")",
")",
";",
"}",
"}",
"return",
"rated",
"search",
"hits",
";",
"}"
] |
[
"apply",
"an",
"appropriate",
"mask",
"for",
"the",
"resulting",
"instruction",
"bytes",
"to",
"obtain",
"the",
"corresponding",
"masked",
"bytes"
] |
[
"public",
"byte",
"[",
"]",
"get",
"masked",
"bytes",
"(",
"byte",
"[",
"]",
"mask",
")",
"{",
"if",
"(",
"prototype",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"pattern",
"is",
"not",
"complete",
"\"",
")",
";",
"}",
"if",
"(",
"mask",
"length",
"!",
"=",
"bytes",
"length",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"inappropriate",
"mask",
"\"",
")",
";",
"}",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"bytes",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"bytes",
"length",
";",
"i",
"+",
"+",
")",
"{",
"result",
"[",
"i",
"]",
"=",
"(",
"byte",
")",
"(",
"mask",
"[",
"i",
"]",
"&",
"bytes",
"[",
"i",
"]",
")",
";",
"}",
"return",
"result",
";",
"}"
] |
[
"records",
"the",
"failed",
"load",
"of",
"a",
"new",
"entry",
"this",
"method",
"should",
"be",
"called",
"when",
"a",
"cache",
"request",
"causes",
"an",
"entry",
"to",
"be",
"loaded",
"(",
"such",
"as",
"by",
"{",
"@",
"link",
"cache",
"#",
"get",
"}",
"or",
"{",
"@",
"link",
"map",
"#",
"compute",
"if",
"absent",
"}",
")",
",",
"but",
"an",
"exception",
"is",
"thrown",
"while",
"loading",
"the",
"entry",
"or",
"the",
"loading",
"function",
"returns",
"null",
"in",
"contrast",
"to",
"{",
"@",
"link",
"#",
"record",
"misses",
"}",
",",
"this",
"method",
"should",
"only",
"be",
"called",
"by",
"the",
"loading",
"thread"
] |
[
"void",
"record",
"load",
"failure",
"(",
"@",
"non",
"negative",
"long",
"load",
"time",
")",
";"
] |
[
"called",
"for",
"each",
"bucket",
"with",
"a",
"value",
"so",
"the",
"state",
"can",
"be",
"modified",
"based",
"on",
"the",
"key",
"and",
"metric",
"value",
"for",
"this",
"bucket"
] |
[
"protected",
"abstract",
"void",
"collect",
"bucket",
"value",
"(",
"string",
"bucket",
"key",
",",
"double",
"bucket",
"value",
")",
";"
] |
[
"put",
"faketest",
"-",
"query",
"-",
"paramters",
"to",
"test",
"the",
"collection",
"format",
"in",
"query",
"parameters"
] |
[
"public",
"response",
"entity",
"<",
"void",
">",
"test",
"query",
"parameter",
"collection",
"format",
"(",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"pipe",
"\"",
",",
"required",
"=",
"true",
")",
"list",
"<",
"string",
">",
"pipe",
",",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"ioutil",
"\"",
",",
"required",
"=",
"true",
")",
"list",
"<",
"string",
">",
"ioutil",
",",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"http",
"\"",
",",
"required",
"=",
"true",
")",
"list",
"<",
"string",
">",
"http",
",",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"url",
"\"",
",",
"required",
"=",
"true",
")",
"list",
"<",
"string",
">",
"url",
",",
"@",
"not",
"null",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"valid",
"@",
"request",
"param",
"(",
"value",
"=",
"\"",
"context",
"\"",
",",
"required",
"=",
"true",
")",
"list",
"<",
"string",
">",
"context",
")",
"{",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"http",
"status",
"not",
"implemented",
")",
";",
"}"
] |
[
"adds",
"a",
"text",
"button",
"to",
"the",
"button",
"table",
"null",
"will",
"be",
"passed",
"to",
"{",
"@",
"link",
"#",
"result",
"(",
"object",
")",
"}",
"if",
"this",
"button",
"is",
"clicked",
"the",
"dialog",
"must",
"have",
"been",
"constructed",
"with",
"a",
"skin",
"to",
"use",
"this",
"method"
] |
[
"public",
"dialog",
"button",
"(",
"@",
"null",
"string",
"text",
")",
"{",
"return",
"button",
"(",
"text",
",",
"null",
")",
";",
"}"
] |
[
"test",
"json",
"serialization",
"of",
"form",
"data"
] |
[
"public",
"void",
"test",
"json",
"form",
"data",
"test",
"(",
"test",
"context",
"context",
")",
"{",
"async",
"async",
"=",
"context",
"async",
"(",
")",
";",
"string",
"param",
"=",
"null",
";",
"string",
"param",
"2",
"=",
"null",
";",
"api",
"test",
"json",
"form",
"data",
"(",
"param",
",",
"param",
"2",
",",
"result",
"-",
">",
"{",
"/",
"/",
"todo",
":",
"test",
"validations",
"async",
"complete",
"(",
")",
";",
"}",
")",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"set",
"the",
"open",
"a",
"p",
"i",
"document",
"this",
"method",
"is",
"invoked",
"when",
"the",
"input",
"open",
"a",
"p",
"i",
"document",
"has",
"been",
"parsed",
"and",
"validated"
] |
[
"public",
"void",
"set",
"open",
"a",
"p",
"i",
"(",
"open",
"a",
"p",
"i",
"open",
"a",
"p",
"i",
")",
"{",
"this",
"open",
"a",
"p",
"i",
"=",
"open",
"a",
"p",
"i",
";",
"/",
"/",
"set",
"global",
"settings",
"such",
"that",
"helper",
"functions",
"in",
"model",
"utils",
"can",
"lookup",
"the",
"value",
"/",
"/",
"of",
"the",
"cli",
"option",
"model",
"utils",
"set",
"disallow",
"additional",
"properties",
"if",
"not",
"present",
"(",
"get",
"disallow",
"additional",
"properties",
"if",
"not",
"present",
"(",
")",
")",
";",
"}"
] |
[
"get",
"an",
"intent",
"to",
"launch",
"the",
"media",
"send",
"flow",
"starting",
"with",
"the",
"picker"
] |
[
"public",
"static",
"intent",
"build",
"gallery",
"intent",
"(",
"@",
"non",
"null",
"context",
"context",
",",
"@",
"non",
"null",
"recipient",
"recipient",
",",
"@",
"nullable",
"char",
"sequence",
"body",
",",
"@",
"non",
"null",
"transport",
"option",
"transport",
")",
"{",
"intent",
"intent",
"=",
"new",
"intent",
"(",
"context",
",",
"media",
"send",
"activity",
"class",
")",
";",
"intent",
"put",
"extra",
"(",
"key",
"recipient",
",",
"recipient",
"get",
"id",
"(",
")",
")",
";",
"intent",
"put",
"extra",
"(",
"key",
"transport",
",",
"transport",
")",
";",
"intent",
"put",
"extra",
"(",
"key",
"body",
",",
"body",
"=",
"=",
"null",
"?",
"\"",
"\"",
":",
"body",
")",
";",
"return",
"intent",
";",
"}"
] |
[
"return",
"the",
"version",
"of",
"the",
"protocol",
"for",
"this",
"mode"
] |
[
"public",
"abstract",
"short",
"protocol",
"version",
"(",
")",
";"
] |
[
"put",
"custom",
"login",
"form",
"fields"
] |
[
"public",
"static",
"void",
"put",
"custom",
"login",
"form",
"fields",
"(",
"final",
"request",
"context",
"context",
",",
"final",
"map",
"custom",
"login",
"form",
"fields",
")",
"{",
"context",
"get",
"flow",
"scope",
"(",
")",
"put",
"(",
"\"",
"custom",
"login",
"form",
"fields",
"\"",
",",
"custom",
"login",
"form",
"fields",
")",
";",
"}"
] |
[
"set",
"the",
"iterator",
"being",
"used",
"to",
"iterate",
"the",
"pcode",
"to",
"insert",
"within",
"a",
"block"
] |
[
"public",
"void",
"set",
"insert",
"iter",
"(",
"iterator",
"<",
"object",
">",
"iter",
")",
"{",
"insertiter",
"=",
"iter",
";",
"}",
"/",
"/",
"public",
"void",
"set",
"code",
"iter",
"(",
"iterator",
"iter",
")",
"{",
"/",
"/",
"codeiter",
"=",
"iter",
";",
"/",
"/",
"}"
] |
[
"loads",
"a",
"resource",
"as",
"a",
"shared",
"library"
] |
[
"private",
"static",
"void",
"load",
"library",
"(",
"string",
"resource",
"name",
")",
"throws",
"i",
"o",
"exception",
"{",
"path",
"dir",
"=",
"null",
";",
"path",
"temp",
"file",
"=",
"null",
";",
"try",
"{",
"dir",
"=",
"files",
"create",
"temp",
"directory",
"(",
"\"",
"bazel",
"-",
"jni",
"\"",
")",
";",
"int",
"slash",
"=",
"resource",
"name",
"last",
"index",
"of",
"(",
"'",
"/",
"'",
")",
";",
"check",
"argument",
"(",
"slash",
"!",
"=",
"-",
"1",
",",
"\"",
"resource",
"name",
"must",
"contain",
"two",
"path",
"components",
"\"",
")",
";",
"temp",
"file",
"=",
"dir",
"resolve",
"(",
"resource",
"name",
"substring",
"(",
"slash",
"+",
"1",
")",
")",
";",
"class",
"loader",
"loader",
"=",
"jni",
"loader",
"class",
"get",
"class",
"loader",
"(",
")",
";",
"try",
"(",
"input",
"stream",
"resource",
"=",
"loader",
"get",
"resource",
"as",
"stream",
"(",
"resource",
"name",
")",
")",
"{",
"if",
"(",
"resource",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"unsatisfied",
"link",
"error",
"(",
"\"",
"resource",
"\"",
"+",
"resource",
"name",
"+",
"\"",
"not",
"in",
"jar",
"\"",
")",
";",
"}",
"try",
"(",
"output",
"stream",
"disk",
"file",
"=",
"new",
"file",
"output",
"stream",
"(",
"temp",
"file",
"to",
"string",
"(",
")",
")",
")",
"{",
"byte",
"streams",
"copy",
"(",
"resource",
",",
"disk",
"file",
")",
";",
"}",
"}",
"system",
"load",
"(",
"temp",
"file",
"to",
"string",
"(",
")",
")",
";",
"/",
"/",
"remove",
"the",
"temporary",
"file",
"now",
"that",
"we",
"have",
"loaded",
"it",
"if",
"we",
"keep",
"it",
"short",
"-",
"lived",
",",
"we",
"can",
"/",
"/",
"avoid",
"the",
"file",
"system",
"from",
"persisting",
"it",
"to",
"disk",
",",
"avoiding",
"an",
"unnecessary",
"cost",
"/",
"/",
"/",
"/",
"unfortunately",
",",
"we",
"cannot",
"do",
"this",
"on",
"windows",
"because",
"the",
"dll",
"remains",
"open",
"and",
"we",
"don",
"'",
"t",
"have",
"/",
"/",
"a",
"way",
"to",
"specify",
"file",
"share",
"delete",
"in",
"the",
"system",
"load",
"(",
")",
"call",
"if",
"(",
"os",
"get",
"current",
"(",
")",
"!",
"=",
"os",
"windows",
")",
"{",
"files",
"delete",
"(",
"temp",
"file",
")",
";",
"temp",
"file",
"=",
"null",
";",
"files",
"delete",
"(",
"dir",
")",
";",
"dir",
"=",
"null",
";",
"}",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"try",
"{",
"if",
"(",
"temp",
"file",
"!",
"=",
"null",
")",
"{",
"files",
"delete",
"if",
"exists",
"(",
"temp",
"file",
")",
";",
"}",
"if",
"(",
"dir",
"!",
"=",
"null",
")",
"{",
"files",
"delete",
"(",
"dir",
")",
";",
"}",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
"2",
")",
"{",
"/",
"/",
"nothing",
"else",
"we",
"can",
"do",
"rely",
"on",
"\"",
"delete",
"on",
"exit",
"\"",
"to",
"try",
"clean",
"things",
"up",
"later",
"on",
"}",
"throw",
"e",
";",
"}",
"}"
] |
[
"the",
"callback",
"method",
"for",
"when",
"the",
"\"",
"ok",
"\"",
"button",
"is",
"pressed"
] |
[
"protected",
"void",
"ok",
"callback",
"(",
")",
"{",
"if",
"(",
"name",
"text",
"field",
"is",
"enabled",
"(",
")",
")",
"{",
"/",
"/",
"just",
"use",
"the",
"name",
"set",
"by",
"the",
"user",
"string",
"name",
"text",
"=",
"name",
"text",
"field",
"get",
"text",
"(",
")",
";",
"try",
"{",
"current",
"structure",
"set",
"name",
"(",
"name",
"text",
")",
";",
"}",
"catch",
"(",
"invalid",
"name",
"exception",
"ine",
")",
"{",
"set",
"status",
"text",
"(",
"ine",
"get",
"message",
"(",
")",
")",
";",
"return",
";",
"}",
"catch",
"(",
"duplicate",
"name",
"exception",
"dne",
")",
"{",
"set",
"status",
"text",
"(",
"dne",
"get",
"message",
"(",
")",
")",
";",
"return",
";",
"}",
"}",
"else",
"{",
"/",
"/",
"get",
"the",
"selected",
"object",
"in",
"the",
"table",
"current",
"structure",
"=",
"(",
"(",
"structure",
"wrapper",
")",
"matching",
"structures",
"table",
"get",
"value",
"at",
"(",
"matching",
"structures",
"table",
"get",
"selected",
"row",
"(",
")",
",",
"0",
")",
")",
"get",
"structure",
"(",
")",
";",
"}",
"close",
"(",
")",
";",
"}"
] |
[
"parses",
"a",
"list",
"bucket",
"v",
"2",
"response",
"xml",
"document",
"from",
"an",
"input",
"stream"
] |
[
"public",
"list",
"objects",
"v",
"2",
"handler",
"parse",
"list",
"objects",
"v",
"2",
"response",
"(",
"input",
"stream",
"input",
"stream",
",",
"final",
"boolean",
"should",
"s",
"d",
"k",
"decode",
"response",
")",
"throws",
"i",
"o",
"exception",
"{",
"list",
"objects",
"v",
"2",
"handler",
"handler",
"=",
"new",
"list",
"objects",
"v",
"2",
"handler",
"(",
"should",
"s",
"d",
"k",
"decode",
"response",
")",
";",
"parse",
"xml",
"input",
"stream",
"(",
"handler",
",",
"sanitize",
"xml",
"document",
"(",
"handler",
",",
"input",
"stream",
")",
")",
";",
"return",
"handler",
";",
"}"
] |
[
"encode",
"a",
"single",
"path",
"component",
"for",
"use",
"in",
"an",
"http",
"url",
"escapes",
"all",
"non",
"-",
"ascii",
",",
"general",
"unsafe",
"(",
"space",
"and",
"{",
"@",
"code",
"\"",
"#",
"%",
"<",
">",
"[",
"\\",
"]",
"^",
"`",
"{",
"|",
"}",
"~",
"}",
")",
"and",
"http",
"special",
"characters",
"(",
"{",
"@",
"code",
";",
":",
"?",
"}",
")",
"as",
"specified",
"in",
"rfc1738",
"(",
"so",
"alphanumeric",
"and",
"{",
"@",
"code",
"!",
"@",
"$",
"&",
"(",
")",
"-",
"=",
"+",
"'",
",",
"}",
"are",
"not",
"encoded",
")",
"note",
"that",
"slash",
"(",
"{",
"@",
"code",
"}",
")",
"is",
"encoded",
",",
"so",
"the",
"given",
"string",
"should",
"be",
"a",
"single",
"path",
"component",
"used",
"in",
"constructing",
"a",
"url",
"method",
"name",
"inspired",
"by",
"php",
"'",
"s",
"rawurlencode"
] |
[
"public",
"static",
"string",
"raw",
"encode",
"(",
"@",
"non",
"null",
"string",
"s",
")",
"{",
"boolean",
"escaped",
"=",
"false",
";",
"string",
"builder",
"out",
"=",
"null",
";",
"charset",
"encoder",
"enc",
"=",
"null",
";",
"char",
"buffer",
"buf",
"=",
"null",
";",
"char",
"c",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"m",
"=",
"s",
"length",
"(",
")",
";",
"i",
"<",
"m",
";",
"i",
"+",
"+",
")",
"{",
"int",
"code",
"point",
"=",
"character",
"code",
"point",
"at",
"(",
"s",
",",
"i",
")",
";",
"if",
"(",
"(",
"code",
"point",
"&",
"0xffffff",
"8",
"0",
")",
"=",
"=",
"0",
")",
"{",
"/",
"/",
"1",
"byte",
"c",
"=",
"s",
"char",
"at",
"(",
"i",
")",
";",
"if",
"(",
"c",
">",
"122",
"|",
"|",
"uri",
"map",
"[",
"c",
"]",
")",
"{",
"if",
"(",
"!",
"escaped",
")",
"{",
"out",
"=",
"new",
"string",
"builder",
"(",
"i",
"+",
"(",
"m",
"-",
"i",
")",
"*",
"3",
")",
";",
"out",
"append",
"(",
"s",
",",
"0",
",",
"i",
")",
";",
"escaped",
"=",
"true",
";",
"}",
"if",
"(",
"enc",
"=",
"=",
"null",
"|",
"|",
"buf",
"=",
"=",
"null",
")",
"{",
"enc",
"=",
"standard",
"charsets",
"utf",
"8",
"new",
"encoder",
"(",
")",
";",
"buf",
"=",
"char",
"buffer",
"allocate",
"(",
"1",
")",
";",
"}",
"/",
"/",
"1",
"char",
"-",
">",
"utf8",
"buf",
"put",
"(",
"0",
",",
"c",
")",
";",
"buf",
"rewind",
"(",
")",
";",
"try",
"{",
"byte",
"buffer",
"bytes",
"=",
"enc",
"encode",
"(",
"buf",
")",
";",
"while",
"(",
"bytes",
"has",
"remaining",
"(",
")",
")",
"{",
"byte",
"b",
"=",
"bytes",
"get",
"(",
")",
";",
"out",
"append",
"(",
"'",
"%",
"'",
")",
";",
"out",
"append",
"(",
"to",
"digit",
"(",
"(",
"b",
">",
">",
"4",
")",
"&",
"0x",
"f",
")",
")",
";",
"out",
"append",
"(",
"to",
"digit",
"(",
"b",
"&",
"0x",
"f",
")",
")",
";",
"}",
"}",
"catch",
"(",
"character",
"coding",
"exception",
"ex",
")",
"{",
"}",
"}",
"else",
"if",
"(",
"escaped",
")",
"{",
"out",
"append",
"(",
"c",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"!",
"escaped",
")",
"{",
"out",
"=",
"new",
"string",
"builder",
"(",
"i",
"+",
"(",
"m",
"-",
"i",
")",
"*",
"3",
")",
";",
"out",
"append",
"(",
"s",
",",
"0",
",",
"i",
")",
";",
"escaped",
"=",
"true",
";",
"}",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"string",
"(",
"new",
"int",
"[",
"]",
"{",
"code",
"point",
"}",
",",
"0",
",",
"1",
")",
"get",
"bytes",
"(",
"standard",
"charsets",
"utf",
"8",
")",
";",
"for",
"(",
"byte",
"a",
"byte",
":",
"bytes",
")",
"{",
"out",
"append",
"(",
"'",
"%",
"'",
")",
";",
"out",
"append",
"(",
"to",
"digit",
"(",
"(",
"a",
"byte",
">",
">",
"4",
")",
"&",
"0x",
"f",
")",
")",
";",
"out",
"append",
"(",
"to",
"digit",
"(",
"a",
"byte",
"&",
"0x",
"f",
")",
")",
";",
"}",
"if",
"(",
"character",
"char",
"count",
"(",
"code",
"point",
")",
">",
"1",
")",
"{",
"i",
"+",
"+",
";",
"/",
"/",
"we",
"processed",
"two",
"characters",
"}",
"}",
"}",
"return",
"escaped",
"?",
"out",
"to",
"string",
"(",
")",
":",
"s",
";",
"}"
] |
[
"returns",
"an",
"array",
"of",
"the",
"arguments",
"that",
"did",
"not",
"match",
"any",
"known",
"option"
] |
[
"string",
"[",
"]",
"get",
"unparsed",
"args",
"(",
")",
"{",
"return",
"unparsed",
"args",
";",
"}"
] |
[
"create",
"an",
"immutable",
"{",
"@",
"link",
"permission",
"status",
"}",
"object"
] |
[
"public",
"static",
"permission",
"status",
"create",
"immutable",
"(",
"string",
"user",
",",
"string",
"group",
",",
"fs",
"permission",
"permission",
")",
"{",
"return",
"new",
"permission",
"status",
"(",
"user",
",",
"group",
",",
"permission",
")",
"{",
"@",
"override",
"public",
"void",
"read",
"fields",
"(",
"data",
"input",
"in",
")",
"throws",
"i",
"o",
"exception",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
")",
";",
"}",
"}",
";",
"}"
] |
[
"get",
"prefix",
"ns",
"string"
] |
[
"public",
"string",
"get",
"prefix",
"ns",
"string",
"(",
")",
"{",
"return",
"prefix",
"ns",
"string",
";",
"}"
] |
[
"customize",
"request",
"specification"
] |
[
"public",
"test",
"enum",
"parameters",
"oper",
"req",
"spec",
"(",
"consumer",
"<",
"request",
"spec",
"builder",
">",
"req",
"spec",
"customizer",
")",
"{",
"req",
"spec",
"customizer",
"accept",
"(",
"req",
"spec",
")",
";",
"return",
"this",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"pattern",
"with",
"digits",
"and",
"delimiter",
"'"
] |
[
"public",
"void",
"pattern",
"with",
"digits",
"and",
"delimiter",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"pattern",
"with",
"digits",
"and",
"delimiter",
"}"
] |
[
",",
",",
"#",
",",
"#",
"#",
"0",
"00"
] |
[
"public",
"static",
"string",
"format",
"(",
"big",
"decimal",
"number",
",",
"string",
"pattern",
")",
"{",
"return",
"format",
"(",
"number",
"double",
"value",
"(",
")",
",",
"pattern",
")",
";",
"}"
] |
[
"verifies",
"that",
"\"",
"connection",
"reset",
"by",
"peer",
"\"",
"exceptions",
"are",
"special",
"-",
"cased",
"and",
"are",
"reported",
"as",
"an",
"instance",
"of",
"{",
"@",
"link",
"remote",
"transport",
"exception",
"}"
] |
[
"public",
"void",
"test",
"connection",
"reset",
"by",
"peer",
"(",
")",
"throws",
"throwable",
"{",
"embedded",
"channel",
"ch",
"=",
"create",
"embedded",
"channel",
"(",
")",
";",
"network",
"client",
"handler",
"handler",
"=",
"get",
"client",
"handler",
"(",
"ch",
")",
";",
"remote",
"input",
"channel",
"rich",
"=",
"add",
"input",
"channel",
"(",
"handler",
")",
";",
"final",
"throwable",
"[",
"]",
"error",
"=",
"new",
"throwable",
"[",
"1",
"]",
";",
"/",
"/",
"verify",
"the",
"exception",
"do",
"answer",
"(",
"new",
"answer",
"<",
"void",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"answer",
"(",
"invocation",
"on",
"mock",
"invocation",
")",
"throws",
"throwable",
"{",
"throwable",
"cause",
"=",
"(",
"throwable",
")",
"invocation",
"get",
"arguments",
"(",
")",
"[",
"0",
"]",
";",
"try",
"{",
"assert",
"equals",
"(",
"remote",
"transport",
"exception",
"class",
",",
"cause",
"get",
"class",
"(",
")",
")",
";",
"assert",
"not",
"equals",
"(",
"\"",
"connection",
"reset",
"by",
"peer",
"\"",
",",
"cause",
"get",
"message",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"i",
"o",
"exception",
"class",
",",
"cause",
"get",
"cause",
"(",
")",
"get",
"class",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"connection",
"reset",
"by",
"peer",
"\"",
",",
"cause",
"get",
"cause",
"(",
")",
"get",
"message",
"(",
")",
")",
";",
"}",
"catch",
"(",
"throwable",
"t",
")",
"{",
"error",
"[",
"0",
"]",
"=",
"t",
";",
"}",
"return",
"null",
";",
"}",
"}",
")",
"when",
"(",
"rich",
")",
"on",
"error",
"(",
"any",
"(",
"throwable",
"class",
")",
")",
";",
"ch",
"pipeline",
"(",
")",
"fire",
"exception",
"caught",
"(",
"new",
"i",
"o",
"exception",
"(",
"\"",
"connection",
"reset",
"by",
"peer",
"\"",
")",
")",
";",
"assert",
"null",
"(",
"error",
"[",
"0",
"]",
")",
";",
"}"
] |
[
"sets",
"the",
"<",
"code",
">",
"attribute",
"string",
"<",
"code",
">",
"property"
] |
[
"public",
"void",
"set",
"attribute",
"string",
"(",
"string",
"attribute",
"string",
")",
"{",
"this",
"attribute",
"string",
"=",
"attribute",
"string",
";",
"}"
] |
[
"finds",
"a",
"byte",
"pattern",
"within",
"an",
"address",
"set",
"note",
":",
"the",
"ranges",
"within",
"the",
"address",
"set",
"are",
"not",
"treated",
"as",
"a",
"contiguous",
"set",
"when",
"searching",
"the",
"<",
"code",
">",
"byte",
"string",
"<",
"code",
">",
"may",
"contain",
"regular",
"expressions",
"the",
"following",
"highlights",
"some",
"example",
"search",
"strings",
"(",
"note",
"the",
"use",
"of",
"double",
"backslashes",
"(",
"\"",
"\\",
"\\",
"\"",
")",
")",
":",
"\"",
"\\",
"\\",
"x",
"8",
"0",
"\"",
"-",
"a",
"basic",
"search",
"pattern",
"for",
"a",
"byte",
"value",
"of",
"0x",
"8",
"0",
"\"",
"\\",
"\\",
"x",
"5",
"0",
"{",
"0",
",",
"10",
"}",
"\\",
"\\",
"x",
"5",
"5",
"\"",
"-",
"a",
"regular",
"expression",
"string",
"that",
"searches",
"for",
"the",
"byte",
"0x",
"5",
"0",
"followed",
"by",
"0",
"-",
"10",
"occurrences",
"of",
"any",
"byte",
"value",
",",
"followed",
"by",
"the",
"byte",
"0x",
"5",
"5"
] |
[
"public",
"final",
"address",
"[",
"]",
"find",
"bytes",
"(",
"address",
"set",
"view",
"set",
",",
"string",
"byte",
"string",
",",
"int",
"match",
"limit",
",",
"int",
"alignment",
")",
"{",
"return",
"find",
"bytes",
"(",
"set",
",",
"byte",
"string",
",",
"match",
"limit",
",",
"alignment",
",",
"false",
")",
";",
"}"
] |
[
"sets",
"the",
"specified",
"value",
"on",
"the",
"stack",
",",
"without",
"disturbing",
"it"
] |
[
"public",
"void",
"set",
"bottom",
"(",
"int",
"index",
",",
"value",
"value",
")",
"{",
"values",
"[",
"index",
"]",
"=",
"value",
";",
"}"
] |
[
"to",
"test",
"class",
"name",
"in",
"snake",
"case",
"to",
"test",
"class",
"name",
"in",
"snake",
"case"
] |
[
"public",
"single",
"<",
"client",
">",
"rx",
"test",
"classname",
"(",
"client",
"body",
")",
"{",
"return",
"single",
"create",
"(",
"new",
"io",
"vertx",
"rx",
"java",
"single",
"on",
"subscribe",
"adapter",
"<",
">",
"(",
"fut",
"-",
">",
"delegate",
"test",
"classname",
"(",
"body",
",",
"fut",
")",
")",
")",
";",
"}"
] |
[
"sets",
"the",
"dynamic",
"with",
"the",
"specified",
"type",
"to",
"the",
"specified",
"value"
] |
[
"public",
"void",
"set",
"dynamic",
"value",
"(",
"long",
"type",
",",
"long",
"value",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"dynamics",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"elf",
"dynamic",
"dyn",
"=",
"dynamics",
"get",
"(",
"i",
")",
";",
"if",
"(",
"dyn",
"get",
"tag",
"(",
")",
"=",
"=",
"type",
")",
"{",
"dyn",
"set",
"value",
"(",
"value",
")",
";",
"}",
"}",
"}"
] |
[
"launches",
"a",
"specified",
"process",
"and",
"connects",
"its",
"inputoutput",
"to",
"a",
"{",
"@",
"link",
"channel",
"}",
",",
"then",
"return",
"it",
"when",
"the",
"returned",
"channel",
"is",
"terminated",
",",
"the",
"process",
"will",
"be",
"killed"
] |
[
"public",
"abstract",
"channel",
"launch",
"channel",
"(",
"@",
"non",
"null",
"string",
"[",
"]",
"cmd",
",",
"@",
"non",
"null",
"output",
"stream",
"out",
",",
"@",
"check",
"for",
"null",
"file",
"path",
"work",
"dir",
",",
"@",
"non",
"null",
"map",
"<",
"string",
",",
"string",
">",
"env",
"vars",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
";"
] |
[
"hint",
"method",
"on",
"whether",
"this",
"pattern",
"is",
"exact",
",",
"that",
"is",
"has",
"no",
"wildcard",
"or",
"other",
"patterns",
"inside"
] |
[
"default",
"boolean",
"is",
"exact",
"match",
"(",
")",
"{",
"return",
"false",
";",
"}"
] |
[
"reject",
"the",
"given",
"field",
"with",
"the",
"given",
"error",
"code",
",",
"error",
"arguments",
"and",
"default",
"message",
"if",
"the",
"value",
"is",
"empty",
"or",
"just",
"contains",
"whitespace",
"an",
"'",
"empty",
"'",
"value",
"in",
"this",
"context",
"means",
"either",
"{",
"@",
"code",
"null",
"}",
",",
"the",
"empty",
"string",
"\"",
"\"",
",",
"or",
"consisting",
"wholly",
"of",
"whitespace",
"the",
"object",
"whose",
"field",
"is",
"being",
"validated",
"does",
"not",
"need",
"to",
"be",
"passed",
"in",
"because",
"the",
"{",
"@",
"link",
"errors",
"}",
"instance",
"can",
"resolve",
"field",
"values",
"by",
"itself",
"(",
"it",
"will",
"usually",
"hold",
"an",
"internal",
"reference",
"to",
"the",
"target",
"object",
")"
] |
[
"public",
"static",
"void",
"reject",
"if",
"empty",
"or",
"whitespace",
"(",
"errors",
"errors",
",",
"string",
"field",
",",
"string",
"error",
"code",
",",
"@",
"nullable",
"object",
"[",
"]",
"error",
"args",
",",
"@",
"nullable",
"string",
"default",
"message",
")",
"{",
"assert",
"not",
"null",
"(",
"errors",
",",
"\"",
"errors",
"object",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"object",
"value",
"=",
"errors",
"get",
"field",
"value",
"(",
"field",
")",
";",
"if",
"(",
"value",
"=",
"=",
"null",
"|",
"|",
"!",
"string",
"utils",
"has",
"text",
"(",
"value",
"to",
"string",
"(",
")",
")",
")",
"{",
"errors",
"reject",
"value",
"(",
"field",
",",
"error",
"code",
",",
"error",
"args",
",",
"default",
"message",
")",
";",
"}",
"}"
] |
[
"clean",
"up",
"the",
"specified",
"attribute",
"in",
"the",
"backend",
"session",
"indicates",
"that",
"the",
"attribute",
"name",
"will",
"not",
"be",
"used",
"anymore"
] |
[
"void",
"cleanup",
"attribute",
"(",
"web",
"request",
"request",
",",
"string",
"attribute",
"name",
")",
";"
] |
[
"returns",
"the",
"total",
"number",
"of",
"indexing",
"requests",
"that",
"have",
"been",
"processed",
"(",
"note",
":",
"this",
"is",
"not",
"the",
"number",
"of",
"documents",
"that",
"have",
"been",
"indexed",
")"
] |
[
"public",
"long",
"get",
"index",
"total",
"(",
")",
"{",
"return",
"index",
"total",
";",
"}"
] |
[
"get",
"the",
"number",
"of",
"blocks"
] |
[
"public",
"long",
"get",
"num",
"blocks",
"(",
")",
"{",
"return",
"this",
"num",
"of",
"blocks",
";",
"}"
] |
[
"copy",
"all",
"attributes",
"in",
"the",
"supplied",
"{",
"@",
"code",
"map",
"}",
"into",
"this",
"{",
"@",
"code",
"map",
"}",
",",
"with",
"existing",
"objects",
"of",
"the",
"same",
"name",
"taking",
"precedence",
"(",
"i",
"e",
"not",
"getting",
"replaced",
")"
] |
[
"model",
"merge",
"attributes",
"(",
"map",
"<",
"string",
",",
"?",
">",
"attributes",
")",
";"
] |
[
"returns",
"the",
"license",
"associated",
"with",
"this",
"target"
] |
[
"license",
"get",
"license",
"(",
")",
";"
] |
[
"update",
"authentication",
"associated",
"with",
"the",
"ticket",
"-",
"granting",
"ticket",
"and",
"restore",
"changes",
"back",
"to",
"the",
"registry",
";",
"particularly",
"updated",
"authentication",
"attributes",
",",
"etc"
] |
[
"void",
"update",
"authentication",
"(",
"string",
"ticket",
"granting",
"ticket",
"id",
",",
"authentication",
"authentication",
")",
";"
] |
[
"parses",
"and",
"returns",
"in",
"an",
"int",
",",
"which",
"that",
"is",
"intended",
"to",
"be",
"used",
"as",
"a",
"<",
"b",
">",
"count",
"<",
"b",
">",
",",
"using",
"the",
"specified",
"-",
"size",
"integer",
"type",
"value",
"(",
"16",
"or",
"32",
")",
"when",
"16",
",",
"and",
"<",
"b",
">",
"unsigned",
"<",
"b",
">",
"short",
"is",
"parsed",
";",
"when",
"32",
",",
"a",
"<",
"b",
">",
"signed",
"<",
"b",
">",
"int",
"is",
"parsed"
] |
[
"public",
"int",
"parse",
"var",
"sized",
"count",
"(",
"int",
"size",
")",
"throws",
"pdb",
"exception",
"{",
"switch",
"(",
"size",
")",
"{",
"case",
"16",
":",
"return",
"parse",
"unsigned",
"short",
"val",
"(",
")",
";",
"case",
"32",
":",
"return",
"parse",
"int",
"(",
")",
";",
"}",
"throw",
"new",
"pdb",
"exception",
"(",
"\"",
"bad",
"count",
"size",
"\"",
")",
";",
"}"
] |
[
"test",
"writing",
"logs",
"to",
"the",
"local",
"file",
"system"
] |
[
"public",
"void",
"test",
"write",
"(",
")",
"throws",
"exception",
"{",
"string",
"path",
"=",
"method",
"dir",
"to",
"u",
"r",
"i",
"(",
")",
"to",
"string",
"(",
")",
";",
"metrics",
"system",
"ms",
"=",
"init",
"metrics",
"system",
"(",
"path",
",",
"false",
",",
"false",
")",
";",
"assert",
"metrics",
"contents",
"(",
"do",
"write",
"test",
"(",
"ms",
",",
"path",
",",
"1",
")",
")",
";",
"}"
] |
[
"optional",
"-",
"type",
"declaration",
"this",
"is",
"a",
"string",
"which",
"is",
"used",
"by",
"the",
"templates",
"to",
"instantiate",
"your",
"types",
"there",
"is",
"typically",
"special",
"handling",
"for",
"different",
"property",
"types"
] |
[
"public",
"string",
"get",
"type",
"declaration",
"(",
"schema",
"p",
")",
"{",
"if",
"(",
"model",
"utils",
"is",
"array",
"schema",
"(",
"p",
")",
")",
"{",
"array",
"schema",
"ap",
"=",
"(",
"array",
"schema",
")",
"p",
";",
"schema",
"inner",
"=",
"ap",
"get",
"items",
"(",
")",
";",
"return",
"get",
"schema",
"type",
"(",
"p",
")",
"+",
"\"",
"[",
"\"",
"+",
"get",
"type",
"declaration",
"(",
"inner",
")",
"+",
"\"",
"]",
"\"",
";",
"}",
"else",
"if",
"(",
"model",
"utils",
"is",
"map",
"schema",
"(",
"p",
")",
")",
"{",
"schema",
"inner",
"=",
"get",
"additional",
"properties",
"(",
"p",
")",
";",
"return",
"get",
"schema",
"type",
"(",
"p",
")",
"+",
"\"",
"[",
"string",
",",
"\"",
"+",
"get",
"type",
"declaration",
"(",
"inner",
")",
"+",
"\"",
"]",
"\"",
";",
"}",
"return",
"super",
"get",
"type",
"declaration",
"(",
"p",
")",
";",
"}"
] |
[
"enters",
"this",
"monitor",
"when",
"the",
"guard",
"is",
"satisfied",
"blocks",
"at",
"most",
"the",
"given",
"time",
",",
"including",
"both",
"the",
"time",
"to",
"acquire",
"the",
"lock",
"and",
"the",
"time",
"to",
"wait",
"for",
"the",
"guard",
"to",
"be",
"satisfied",
",",
"and",
"may",
"be",
"interrupted"
] |
[
"public",
"boolean",
"enter",
"when",
"(",
"guard",
"guard",
",",
"long",
"time",
",",
"time",
"unit",
"unit",
")",
"throws",
"interrupted",
"exception",
"{",
"final",
"long",
"timeout",
"nanos",
"=",
"to",
"safe",
"nanos",
"(",
"time",
",",
"unit",
")",
";",
"if",
"(",
"guard",
"monitor",
"!",
"=",
"this",
")",
"{",
"throw",
"new",
"illegal",
"monitor",
"state",
"exception",
"(",
")",
";",
"}",
"final",
"reentrant",
"lock",
"lock",
"=",
"this",
"lock",
";",
"boolean",
"reentrant",
"=",
"lock",
"is",
"held",
"by",
"current",
"thread",
"(",
")",
";",
"long",
"start",
"time",
"=",
"0l",
";",
"locked",
":",
"{",
"if",
"(",
"!",
"fair",
")",
"{",
"/",
"/",
"check",
"interrupt",
"status",
"to",
"get",
"behavior",
"consistent",
"with",
"fair",
"case",
"if",
"(",
"thread",
"interrupted",
"(",
")",
")",
"{",
"throw",
"new",
"interrupted",
"exception",
"(",
")",
";",
"}",
"if",
"(",
"lock",
"try",
"lock",
"(",
")",
")",
"{",
"break",
"locked",
";",
"}",
"}",
"start",
"time",
"=",
"init",
"nano",
"time",
"(",
"timeout",
"nanos",
")",
";",
"if",
"(",
"!",
"lock",
"try",
"lock",
"(",
"time",
",",
"unit",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"boolean",
"satisfied",
"=",
"false",
";",
"boolean",
"threw",
"=",
"true",
";",
"try",
"{",
"satisfied",
"=",
"guard",
"is",
"satisfied",
"(",
")",
"|",
"|",
"await",
"nanos",
"(",
"guard",
",",
"(",
"start",
"time",
"=",
"=",
"0l",
")",
"?",
"timeout",
"nanos",
":",
"remaining",
"nanos",
"(",
"start",
"time",
",",
"timeout",
"nanos",
")",
",",
"reentrant",
")",
";",
"threw",
"=",
"false",
";",
"return",
"satisfied",
";",
"}",
"finally",
"{",
"if",
"(",
"!",
"satisfied",
")",
"{",
"try",
"{",
"/",
"/",
"don",
"'",
"t",
"need",
"to",
"signal",
"if",
"timed",
"out",
",",
"but",
"do",
"if",
"interrupted",
"if",
"(",
"threw",
"&",
"&",
"!",
"reentrant",
")",
"{",
"signal",
"next",
"waiter",
"(",
")",
";",
"}",
"}",
"finally",
"{",
"lock",
"unlock",
"(",
")",
";",
"}",
"}",
"}",
"}"
] |
[
"closes",
"any",
"network",
"resources",
"created",
"implicitly",
"by",
"the",
"component",
"for",
"example",
",",
"if",
"this",
"created",
"a",
"connection",
",",
"it",
"would",
"close",
"it",
"if",
"it",
"was",
"provided",
"one",
",",
"this",
"would",
"close",
"any",
"sessions",
",",
"but",
"leave",
"the",
"connection",
"open"
] |
[
"@",
"override",
"public",
"void",
"close",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"}"
] |
[
"get",
"a",
"nullpossibly",
"empty",
"list",
"of",
"extra",
"delegation",
"token",
"issuers",
"these",
"will",
"be",
"asked",
"for",
"tokens",
"when",
"{",
"@",
"link",
"delegation",
"token",
"issuer",
"#",
"get",
"additional",
"token",
"issuers",
"(",
")",
"}",
"recursively",
"collects",
"all",
"d",
"ts",
"a",
"filesystem",
"can",
"offer"
] |
[
"public",
"delegation",
"token",
"issuer",
"[",
"]",
"get",
"additional",
"token",
"issuers",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"null",
";",
"}"
] |
[
"store",
"block",
"invalidation",
"work"
] |
[
"void",
"add",
"blocks",
"to",
"be",
"invalidated",
"(",
"list",
"<",
"block",
">",
"blocklist",
")",
"{",
"assert",
"(",
"blocklist",
"!",
"=",
"null",
"&",
"&",
"blocklist",
"size",
"(",
")",
">",
"0",
")",
";",
"synchronized",
"(",
"invalidate",
"blocks",
")",
"{",
"for",
"(",
"block",
"blk",
":",
"blocklist",
")",
"{",
"invalidate",
"blocks",
"add",
"(",
"blk",
")",
";",
"}",
"}",
"}"
] |
[
"the",
"value",
"of",
"the",
"sum"
] |
[
"public",
"double",
"value",
"(",
")",
"{",
"return",
"value",
";",
"}"
] |
[
"sets",
"reachability",
"of",
"block",
"to",
"specified",
"value"
] |
[
"public",
"void",
"set",
"reachable",
"(",
"int",
"reach",
")",
"{",
"reachable",
"=",
"reach",
";",
"}"
] |
[
"ensure",
"exception",
"if",
"we",
"publish",
"to",
"multicast",
"ipv",
"4",
"address"
] |
[
"public",
"void",
"test",
"publish",
"multicast",
"v",
"4",
"(",
")",
"throws",
"exception",
"{",
"network",
"service",
"service",
"=",
"new",
"network",
"service",
"(",
"collections",
"empty",
"list",
"(",
")",
")",
";",
"try",
"{",
"service",
"resolve",
"publish",
"host",
"addresses",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"239",
"1",
"1",
"1",
"\"",
"}",
")",
";",
"fail",
"(",
"\"",
"should",
"have",
"hit",
"exception",
"\"",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"assert",
"true",
"(",
"e",
"get",
"message",
"(",
")",
"contains",
"(",
"\"",
"invalid",
":",
"multicast",
"\"",
")",
")",
";",
"}",
"}"
] |
[
"when",
"failover",
"occurs",
",",
"no",
"namenodes",
"are",
"available",
"within",
"a",
"short",
"time",
"client",
"will",
"success",
"after",
"some",
"retries"
] |
[
"public",
"void",
"test",
"no",
"namenodes",
"available",
"(",
")",
"throws",
"exception",
"{",
"setup",
"cluster",
"(",
"false",
",",
"true",
")",
";",
"transition",
"cluster",
"n",
"s",
"to",
"standby",
"(",
"cluster",
")",
";",
"configuration",
"conf",
"=",
"cluster",
"get",
"router",
"client",
"conf",
"(",
")",
";",
"/",
"/",
"set",
"dfs",
"client",
"failover",
"random",
"order",
"false",
",",
"to",
"pick",
"1st",
"router",
"at",
"first",
"conf",
"set",
"boolean",
"(",
"\"",
"dfs",
"client",
"failover",
"random",
"order",
"\"",
",",
"false",
")",
";",
"/",
"/",
"retries",
"is",
"3",
"(",
"see",
"failover",
"on",
"network",
"exception",
"retry",
"#",
"should",
"retry",
",",
"will",
"fail",
"/",
"/",
"when",
"reties",
">",
"max",
"attempts",
")",
",",
"so",
"total",
"access",
"is",
"4",
"conf",
"set",
"int",
"(",
"\"",
"dfs",
"client",
"retry",
"max",
"attempts",
"\"",
",",
"2",
")",
";",
"d",
"f",
"s",
"client",
"router",
"client",
"=",
"new",
"d",
"f",
"s",
"client",
"(",
"new",
"uri",
"(",
"\"",
"hdfs",
":",
"/",
"/",
"fed",
"\"",
")",
",",
"conf",
")",
";",
"/",
"/",
"get",
"router",
"0",
"metrics",
"federation",
"r",
"p",
"c",
"metrics",
"rpc",
"metrics",
"0",
"=",
"cluster",
"get",
"routers",
"(",
")",
"get",
"(",
"0",
")",
"get",
"router",
"(",
")",
"get",
"rpc",
"server",
"(",
")",
"get",
"r",
"p",
"c",
"metrics",
"(",
")",
";",
"/",
"/",
"get",
"router",
"1",
"metrics",
"federation",
"r",
"p",
"c",
"metrics",
"rpc",
"metrics",
"1",
"=",
"cluster",
"get",
"routers",
"(",
")",
"get",
"(",
"1",
")",
"get",
"router",
"(",
")",
"get",
"rpc",
"server",
"(",
")",
"get",
"r",
"p",
"c",
"metrics",
"(",
")",
";",
"/",
"/",
"original",
"failures",
"long",
"original",
"router",
"0",
"failures",
"=",
"rpc",
"metrics",
"0",
"get",
"proxy",
"op",
"no",
"namenodes",
"(",
")",
";",
"long",
"original",
"router",
"1",
"failures",
"=",
"rpc",
"metrics",
"1",
"get",
"proxy",
"op",
"no",
"namenodes",
"(",
")",
";",
"/",
"/",
"get",
"file",
"info",
"will",
"throw",
"exception",
"string",
"exception",
"message",
"=",
"\"",
"org",
"apache",
"hadoop",
"hdfs",
"server",
"federation",
"\"",
"+",
"\"",
"router",
"no",
"namenodes",
"available",
"exception",
":",
"no",
"namenodes",
"available",
"\"",
"+",
"\"",
"under",
"nameservice",
"ns",
"0",
"\"",
";",
"exception",
"rule",
"expect",
"(",
"remote",
"exception",
"class",
")",
";",
"exception",
"rule",
"expect",
"message",
"(",
"exception",
"message",
")",
";",
"router",
"client",
"get",
"file",
"info",
"(",
"\"",
"/",
"\"",
")",
";",
"/",
"/",
"router",
"0",
"failures",
"will",
"increase",
"assert",
"equals",
"(",
"original",
"router",
"0",
"failures",
"+",
"4",
",",
"rpc",
"metrics",
"0",
"get",
"proxy",
"op",
"no",
"namenodes",
"(",
")",
")",
";",
"/",
"/",
"router",
"1",
"failures",
"do",
"not",
"change",
"assert",
"equals",
"(",
"original",
"router",
"1",
"failures",
",",
"rpc",
"metrics",
"1",
"get",
"proxy",
"op",
"no",
"namenodes",
"(",
")",
")",
";",
"/",
"/",
"make",
"name",
"services",
"available",
"transition",
"cluster",
"n",
"s",
"to",
"active",
"(",
"cluster",
",",
"0",
")",
";",
"for",
"(",
"router",
"context",
"router",
"context",
":",
"cluster",
"get",
"routers",
"(",
")",
")",
"{",
"/",
"/",
"manually",
"trigger",
"the",
"heartbeat",
"collection",
"<",
"namenode",
"heartbeat",
"service",
">",
"heartbeat",
"services",
"=",
"router",
"context",
"get",
"router",
"(",
")",
"get",
"namenode",
"heartbeat",
"services",
"(",
")",
";",
"for",
"(",
"namenode",
"heartbeat",
"service",
"service",
":",
"heartbeat",
"services",
")",
"{",
"service",
"periodic",
"invoke",
"(",
")",
";",
"}",
"/",
"/",
"update",
"service",
"cache",
"router",
"context",
"get",
"router",
"(",
")",
"get",
"state",
"store",
"(",
")",
"refresh",
"caches",
"(",
"true",
")",
";",
"}",
"original",
"router",
"0",
"failures",
"=",
"rpc",
"metrics",
"0",
"get",
"proxy",
"op",
"no",
"namenodes",
"(",
")",
";",
"/",
"/",
"rpc",
"call",
"must",
"be",
"successful",
"router",
"client",
"get",
"file",
"info",
"(",
"\"",
"/",
"\"",
")",
";",
"/",
"/",
"router",
"0",
"failures",
"do",
"not",
"change",
"assert",
"equals",
"(",
"original",
"router",
"0",
"failures",
",",
"rpc",
"metrics",
"0",
"get",
"proxy",
"op",
"no",
"namenodes",
"(",
")",
")",
";",
"}"
] |
[
"cause",
"the",
"suggestion",
"at",
"the",
"given",
"index",
"to",
"be",
"selected"
] |
[
"protected",
"void",
"select",
"(",
"int",
"index",
")",
"{",
"list",
"set",
"selected",
"index",
"(",
"index",
")",
";",
"list",
"ensure",
"index",
"is",
"visible",
"(",
"index",
")",
";",
"}"
] |
[
"creates",
"a",
"executor",
"and",
"invokes",
"all",
"proxies",
"concurrently",
"this",
"implementation",
"assumes",
"that",
"clients",
"have",
"configured",
"proper",
"socket",
"timeouts",
",",
"else",
"the",
"call",
"can",
"block",
"forever"
] |
[
"public",
"object",
"invoke",
"(",
"object",
"proxy",
",",
"final",
"method",
"method",
",",
"final",
"object",
"[",
"]",
"args",
")",
"throws",
"throwable",
"{",
"/",
"/",
"need",
"double",
"check",
"locking",
"to",
"guarantee",
"thread",
"-",
"safe",
"since",
"/",
"/",
"current",
"used",
"proxy",
"is",
"lazily",
"initialized",
"if",
"(",
"current",
"used",
"proxy",
"=",
"=",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"current",
"used",
"proxy",
"=",
"=",
"null",
")",
"{",
"map",
"<",
"future",
"<",
"object",
">",
",",
"proxy",
"info",
"<",
"t",
">",
">",
"proxy",
"map",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"int",
"num",
"attempts",
"=",
"0",
";",
"executor",
"service",
"executor",
"=",
"null",
";",
"completion",
"service",
"<",
"object",
">",
"completion",
"service",
";",
"try",
"{",
"/",
"/",
"optimization",
":",
"if",
"only",
"2",
"proxies",
"are",
"configured",
"and",
"one",
"had",
"/",
"/",
"failed",
"/",
"/",
"over",
",",
"then",
"we",
"dont",
"need",
"to",
"create",
"a",
"threadpool",
"etc",
"target",
"proxies",
"remove",
"(",
"to",
"ignore",
")",
";",
"if",
"(",
"target",
"proxies",
"size",
"(",
")",
"=",
"=",
"0",
")",
"{",
"log",
"trace",
"(",
"\"",
"no",
"valid",
"proxies",
"left",
"\"",
")",
";",
"throw",
"new",
"remote",
"exception",
"(",
"i",
"o",
"exception",
"class",
"get",
"name",
"(",
")",
",",
"\"",
"no",
"valid",
"proxies",
"left",
"\"",
"+",
"\"",
"all",
"name",
"node",
"proxies",
"have",
"failed",
"over",
"\"",
")",
";",
"}",
"if",
"(",
"target",
"proxies",
"size",
"(",
")",
"=",
"=",
"1",
")",
"{",
"proxy",
"info",
"<",
"t",
">",
"proxy",
"info",
"=",
"target",
"proxies",
"values",
"(",
")",
"iterator",
"(",
")",
"next",
"(",
")",
";",
"try",
"{",
"current",
"used",
"proxy",
"=",
"proxy",
"info",
";",
"object",
"ret",
"val",
"=",
"method",
"invoke",
"(",
"proxy",
"info",
"proxy",
",",
"args",
")",
";",
"log",
"debug",
"(",
"\"",
"invocation",
"successful",
"on",
"[",
"{",
"}",
"]",
"\"",
",",
"current",
"used",
"proxy",
"proxy",
"info",
")",
";",
"return",
"ret",
"val",
";",
"}",
"catch",
"(",
"invocation",
"target",
"exception",
"ex",
")",
"{",
"exception",
"unwrapped",
"exception",
"=",
"unwrap",
"invocation",
"target",
"exception",
"(",
"ex",
")",
";",
"log",
"proxy",
"exception",
"(",
"unwrapped",
"exception",
",",
"current",
"used",
"proxy",
"proxy",
"info",
")",
";",
"log",
"trace",
"(",
"\"",
"unsuccessful",
"invocation",
"on",
"[",
"{",
"}",
"]",
"\"",
",",
"current",
"used",
"proxy",
"proxy",
"info",
")",
";",
"throw",
"unwrapped",
"exception",
";",
"}",
"}",
"executor",
"=",
"executors",
"new",
"fixed",
"thread",
"pool",
"(",
"proxies",
"size",
"(",
")",
")",
";",
"completion",
"service",
"=",
"new",
"executor",
"completion",
"service",
"<",
">",
"(",
"executor",
")",
";",
"for",
"(",
"final",
"map",
"entry",
"<",
"string",
",",
"proxy",
"info",
"<",
"t",
">",
">",
"p",
"entry",
":",
"target",
"proxies",
"entry",
"set",
"(",
")",
")",
"{",
"callable",
"<",
"object",
">",
"c",
"=",
"new",
"callable",
"<",
"object",
">",
"(",
")",
"{",
"@",
"override",
"public",
"object",
"call",
"(",
")",
"throws",
"exception",
"{",
"log",
"trace",
"(",
"\"",
"invoking",
"method",
"{",
"}",
"on",
"proxy",
"{",
"}",
"\"",
",",
"method",
",",
"p",
"entry",
"get",
"value",
"(",
")",
"proxy",
"info",
")",
";",
"return",
"method",
"invoke",
"(",
"p",
"entry",
"get",
"value",
"(",
")",
"proxy",
",",
"args",
")",
";",
"}",
"}",
";",
"proxy",
"map",
"put",
"(",
"completion",
"service",
"submit",
"(",
"c",
")",
",",
"p",
"entry",
"get",
"value",
"(",
")",
")",
";",
"num",
"attempts",
"+",
"+",
";",
"}",
"map",
"<",
"string",
",",
"exception",
">",
"bad",
"results",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"while",
"(",
"num",
"attempts",
">",
"0",
")",
"{",
"future",
"<",
"object",
">",
"call",
"result",
"future",
"=",
"completion",
"service",
"take",
"(",
")",
";",
"object",
"ret",
"val",
";",
"try",
"{",
"current",
"used",
"proxy",
"=",
"proxy",
"map",
"get",
"(",
"call",
"result",
"future",
")",
";",
"ret",
"val",
"=",
"call",
"result",
"future",
"get",
"(",
")",
";",
"log",
"debug",
"(",
"\"",
"invocation",
"successful",
"on",
"[",
"{",
"}",
"]",
"\"",
",",
"current",
"used",
"proxy",
"proxy",
"info",
")",
";",
"return",
"ret",
"val",
";",
"}",
"catch",
"(",
"execution",
"exception",
"ex",
")",
"{",
"exception",
"unwrapped",
"exception",
"=",
"unwrap",
"execution",
"exception",
"(",
"ex",
")",
";",
"proxy",
"info",
"<",
"t",
">",
"t",
"proxy",
"info",
"=",
"proxy",
"map",
"get",
"(",
"call",
"result",
"future",
")",
";",
"log",
"proxy",
"exception",
"(",
"unwrapped",
"exception",
",",
"t",
"proxy",
"info",
"proxy",
"info",
")",
";",
"bad",
"results",
"put",
"(",
"t",
"proxy",
"info",
"proxy",
"info",
",",
"unwrapped",
"exception",
")",
";",
"log",
"trace",
"(",
"\"",
"unsuccessful",
"invocation",
"on",
"[",
"{",
"}",
"]",
"\"",
",",
"t",
"proxy",
"info",
"proxy",
"info",
")",
";",
"num",
"attempts",
"-",
"-",
";",
"}",
"}",
"/",
"/",
"at",
"this",
"point",
"we",
"should",
"have",
"all",
"bad",
"results",
"(",
"exceptions",
")",
"/",
"/",
"or",
"should",
"have",
"returned",
"with",
"successful",
"result",
"if",
"(",
"bad",
"results",
"size",
"(",
")",
"=",
"=",
"1",
")",
"{",
"throw",
"bad",
"results",
"values",
"(",
")",
"iterator",
"(",
")",
"next",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"multi",
"exception",
"(",
"bad",
"results",
")",
";",
"}",
"}",
"finally",
"{",
"if",
"(",
"executor",
"!",
"=",
"null",
")",
"{",
"log",
"trace",
"(",
"\"",
"shutting",
"down",
"threadpool",
"executor",
"\"",
")",
";",
"executor",
"shutdown",
"now",
"(",
")",
";",
"}",
"}",
"}",
"}",
"}",
"/",
"/",
"because",
"the",
"above",
"synchronized",
"block",
"will",
"return",
"or",
"throw",
"an",
"exception",
",",
"/",
"/",
"so",
"we",
"don",
"'",
"t",
"need",
"to",
"do",
"any",
"check",
"to",
"prevent",
"the",
"first",
"initialized",
"/",
"/",
"thread",
"from",
"stepping",
"to",
"following",
"codes",
"try",
"{",
"object",
"ret",
"val",
"=",
"method",
"invoke",
"(",
"current",
"used",
"proxy",
"proxy",
",",
"args",
")",
";",
"log",
"debug",
"(",
"\"",
"invocation",
"successful",
"on",
"[",
"{",
"}",
"]",
"\"",
",",
"current",
"used",
"proxy",
"proxy",
"info",
")",
";",
"return",
"ret",
"val",
";",
"}",
"catch",
"(",
"invocation",
"target",
"exception",
"ex",
")",
"{",
"exception",
"unwrapped",
"exception",
"=",
"unwrap",
"invocation",
"target",
"exception",
"(",
"ex",
")",
";",
"log",
"proxy",
"exception",
"(",
"unwrapped",
"exception",
",",
"current",
"used",
"proxy",
"proxy",
"info",
")",
";",
"log",
"trace",
"(",
"\"",
"unsuccessful",
"invocation",
"on",
"[",
"{",
"}",
"]",
"\"",
",",
"current",
"used",
"proxy",
"proxy",
"info",
")",
";",
"throw",
"unwrapped",
"exception",
";",
"}",
"}"
] |
[
"returns",
"a",
"base",
"6",
"4",
"encoded",
"{",
"@",
"link",
"secure",
"string",
"}",
"of",
"a",
"version",
"4",
"0",
"compatible",
"uuid",
"as",
"defined",
"here",
":",
"http",
":",
"www",
"ietf",
"orgrfcrfc",
"4",
"1",
"2",
"2",
"txt",
",",
"using",
"a",
"private",
"{",
"@",
"code",
"secure",
"random",
"}",
"instance"
] |
[
"public",
"static",
"secure",
"string",
"random",
"base",
"6",
"4",
"u",
"u",
"i",
"d",
"secure",
"string",
"(",
")",
"{",
"return",
"random",
"uuid",
"generator",
"get",
"base",
"6",
"4",
"u",
"u",
"i",
"d",
"secure",
"string",
"(",
")",
";",
"}"
] |
[
"applies",
"the",
"given",
"stack",
"map",
"frame",
"visitor",
"to",
"all",
"stack",
"map",
"frames"
] |
[
"public",
"void",
"stack",
"map",
"frames",
"accept",
"(",
"clazz",
"clazz",
",",
"method",
"method",
",",
"code",
"attribute",
"code",
"attribute",
",",
"stack",
"map",
"frame",
"visitor",
"stack",
"map",
"frame",
"visitor",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"u",
"2stack",
"map",
"frames",
"count",
";",
"index",
"+",
"+",
")",
"{",
"stack",
"map",
"frame",
"stack",
"map",
"frame",
"=",
"stack",
"map",
"frames",
"[",
"index",
"]",
";",
"/",
"/",
"note",
"that",
"the",
"byte",
"code",
"offset",
"is",
"computed",
"differently",
"for",
"the",
"/",
"/",
"first",
"stack",
"map",
"frame",
"offset",
"+",
"=",
"stack",
"map",
"frame",
"get",
"offset",
"delta",
"(",
")",
"+",
"(",
"index",
"=",
"=",
"0",
"?",
"0",
":",
"1",
")",
";",
"stack",
"map",
"frame",
"accept",
"(",
"clazz",
",",
"method",
",",
"code",
"attribute",
",",
"offset",
",",
"stack",
"map",
"frame",
"visitor",
")",
";",
"}",
"}"
] |
[
"updates",
"the",
"use",
"list",
"for",
"a",
"source",
"list",
"change"
] |
[
"/",
"*",
"package",
"*",
"/",
"void",
"on",
"sources",
"changed",
"(",
"ssa",
"insn",
"insn",
",",
"register",
"spec",
"list",
"old",
"sources",
")",
"{",
"if",
"(",
"use",
"list",
"=",
"=",
"null",
")",
"return",
";",
"if",
"(",
"old",
"sources",
"!",
"=",
"null",
")",
"{",
"remove",
"from",
"use",
"list",
"(",
"insn",
",",
"old",
"sources",
")",
";",
"}",
"register",
"spec",
"list",
"sources",
"=",
"insn",
"get",
"sources",
"(",
")",
";",
"int",
"sz",
"new",
"=",
"sources",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sz",
"new",
";",
"i",
"+",
"+",
")",
"{",
"int",
"reg",
"=",
"sources",
"get",
"(",
"i",
")",
"get",
"reg",
"(",
")",
";",
"use",
"list",
"[",
"reg",
"]",
"add",
"(",
"insn",
")",
";",
"}",
"}"
] |
[
"close",
"all",
"created",
"registries"
] |
[
"public",
"static",
"void",
"destroy",
"all",
"(",
")",
"{",
"if",
"(",
"!",
"destroyed",
"compare",
"and",
"set",
"(",
"false",
",",
"true",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"logger",
"is",
"info",
"enabled",
"(",
")",
")",
"{",
"logger",
"info",
"(",
"\"",
"close",
"all",
"registries",
"\"",
"+",
"get",
"registries",
"(",
")",
")",
";",
"}",
"/",
"/",
"lock",
"up",
"the",
"registry",
"shutdown",
"process",
"lock",
"lock",
"(",
")",
";",
"try",
"{",
"for",
"(",
"registry",
"registry",
":",
"get",
"registries",
"(",
")",
")",
"{",
"try",
"{",
"registry",
"destroy",
"(",
")",
";",
"}",
"catch",
"(",
"throwable",
"e",
")",
"{",
"logger",
"error",
"(",
"e",
"get",
"message",
"(",
")",
",",
"e",
")",
";",
"}",
"}",
"registries",
"clear",
"(",
")",
";",
"}",
"finally",
"{",
"/",
"/",
"release",
"the",
"lock",
"lock",
"unlock",
"(",
")",
";",
"}",
"}"
] |
[
"returns",
"a",
"new",
"{",
"@",
"link",
"constraint",
"setting",
"info",
"}",
"with",
"the",
"given",
"data"
] |
[
"public",
"static",
"constraint",
"setting",
"info",
"create",
"(",
"label",
"constraint",
"setting",
",",
"label",
"default",
"constraint",
"value",
")",
"{",
"return",
"new",
"constraint",
"setting",
"info",
"(",
"constraint",
"setting",
",",
"default",
"constraint",
"value",
")",
";",
"}"
] |
[
"returns",
"whether",
"to",
"preserve",
"auto",
"-",
"follow",
"patterns",
"defaults",
"to",
"not",
"preserving",
"them",
"only",
"runs",
"at",
"all",
"if",
"xpack",
"is",
"installed",
"on",
"the",
"cluster",
"being",
"tested"
] |
[
"protected",
"boolean",
"preserve",
"auto",
"follow",
"patterns",
"upon",
"completion",
"(",
")",
"{",
"return",
"false",
";",
"}"
] |
[
"visit",
"a",
"parse",
"tree",
"produced",
"by",
"the",
"{",
"@",
"code",
"null",
"}",
"labeled",
"alternative",
"in",
"{",
"@",
"link",
"painless",
"parser",
"#",
"primary",
"}"
] |
[
"t",
"visit",
"null",
"(",
"painless",
"parser",
"null",
"context",
"ctx",
")",
";"
] |
[
"reduces",
"the",
"size",
"of",
"the",
"backing",
"array",
"to",
"the",
"size",
"of",
"the",
"actual",
"items",
"this",
"is",
"useful",
"to",
"release",
"memory",
"when",
"many",
"items",
"have",
"been",
"removed",
",",
"or",
"if",
"it",
"is",
"known",
"that",
"more",
"items",
"will",
"not",
"be",
"added"
] |
[
"public",
"float",
"[",
"]",
"shrink",
"(",
")",
"{",
"if",
"(",
"items",
"length",
"!",
"=",
"size",
")",
"resize",
"(",
"size",
")",
";",
"return",
"items",
";",
"}"
] |
[
"if",
"recovery",
"is",
"enabled",
",",
"creates",
"a",
"recovery",
"directory",
"for",
"the",
"named",
"service",
"and",
"sets",
"it",
"on",
"the",
"service"
] |
[
"private",
"void",
"set",
"state",
"store",
"dir",
"(",
"string",
"s",
"name",
",",
"auxiliary",
"service",
"s",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"state",
"store",
"root",
"!",
"=",
"null",
")",
"{",
"path",
"store",
"path",
"=",
"new",
"path",
"(",
"state",
"store",
"root",
",",
"s",
"name",
")",
";",
"state",
"store",
"fs",
"mkdirs",
"(",
"store",
"path",
",",
"store",
"dir",
"perms",
")",
";",
"s",
"set",
"recovery",
"path",
"(",
"store",
"path",
")",
";",
"}",
"}"
] |
[
"finds",
"the",
"next",
"header",
",",
"by",
"scanning",
"for",
"a",
"local",
"header",
"signature",
"starting",
"at",
"{",
"@",
"code",
"offset",
"}",
"this",
"method",
"will",
"find",
"headers",
"for",
"deleted",
"or",
"updated",
"entries",
"that",
"are",
"not",
"listed",
"in",
"the",
"central",
"directory",
",",
"and",
"may",
"pickup",
"false",
"positive",
"(",
"e",
"g",
"entries",
"of",
"an",
"embedded",
"zip",
"file",
"stored",
"without",
"compression",
")",
"this",
"method",
"is",
"primarily",
"intended",
"for",
"applications",
"trying",
"to",
"recover",
"data",
"from",
"corrupt",
"archives"
] |
[
"public",
"local",
"file",
"header",
"next",
"header",
"from",
"(",
"long",
"offset",
")",
"throws",
"i",
"o",
"exception",
"{",
"int",
"skipped",
"=",
"0",
";",
"for",
"(",
"byte",
"buffer",
"buffer",
"=",
"get",
"data",
"(",
"offset",
"+",
"skipped",
",",
"max",
"header",
"size",
")",
";",
"buffer",
"limit",
"(",
")",
">",
"=",
"local",
"file",
"header",
"size",
";",
"buffer",
"=",
"get",
"data",
"(",
"offset",
"+",
"skipped",
",",
"max",
"header",
"size",
")",
")",
"{",
"int",
"marker",
"offset",
"=",
"scan",
"util",
"scan",
"to",
"(",
"header",
"sig",
",",
"buffer",
")",
";",
"if",
"(",
"marker",
"offset",
"<",
"0",
")",
"{",
"skipped",
"+",
"=",
"buffer",
"limit",
"(",
")",
"-",
"3",
";",
"}",
"else",
"{",
"skipped",
"+",
"=",
"marker",
"offset",
";",
"local",
"file",
"header",
"header",
"=",
"marker",
"offset",
"=",
"=",
"0",
"?",
"local",
"header",
"in",
"(",
"buffer",
",",
"offset",
"+",
"skipped",
")",
":",
"local",
"header",
"at",
"(",
"offset",
"+",
"skipped",
")",
";",
"if",
"(",
"header",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"skipped",
">",
"0",
")",
"{",
"system",
"out",
"println",
"(",
"\"",
"warning",
":",
"local",
"header",
"search",
":",
"skipped",
"\"",
"+",
"skipped",
"+",
"\"",
"bytes",
"\"",
")",
";",
"}",
"return",
"header",
";",
"}",
"/",
"/",
"if",
"local",
"header",
"in",
"or",
"local",
"header",
"at",
"decided",
"it",
"is",
"not",
"a",
"header",
"location",
",",
"/",
"/",
"we",
"continue",
"the",
"search",
"skipped",
"+",
"=",
"4",
";",
"}",
"}",
"return",
"null",
";",
"}"
] |
[
"sets",
"the",
"schema",
"descriptor",
"for",
"this",
"builder",
"a",
"schema",
"descriptor",
"is",
"an",
"object",
"that",
"is",
"not",
"used",
"by",
"g",
"r",
"p",
"c",
"core",
"but",
"includes",
"information",
"related",
"to",
"the",
"methods",
"the",
"type",
"of",
"the",
"object",
"is",
"specific",
"to",
"the",
"consumer",
",",
"so",
"both",
"the",
"code",
"calling",
"this",
"and",
"the",
"code",
"calling",
"{",
"@",
"link",
"method",
"descriptor",
"#",
"get",
"schema",
"descriptor",
"(",
")",
"}",
"must",
"coordinate"
] |
[
"public",
"builder",
"<",
"req",
"t",
",",
"resp",
"t",
">",
"set",
"schema",
"descriptor",
"(",
"@",
"nullable",
"object",
"schema",
"descriptor",
")",
"{",
"this",
"schema",
"descriptor",
"=",
"schema",
"descriptor",
";",
"return",
"this",
";",
"}"
] |
[
"identifies",
"invalid",
"resource",
"paths",
"by",
"default",
"rejects",
":",
"paths",
"that",
"contain",
"\"",
"web",
"-",
"inf",
"\"",
"or",
"\"",
"meta",
"-",
"inf",
"\"",
"paths",
"that",
"contain",
"\"",
"\"",
"after",
"a",
"call",
"to",
"{",
"@",
"link",
"string",
"utils",
"#",
"clean",
"path",
"}",
"paths",
"that",
"represent",
"a",
"{",
"@",
"link",
"resource",
"utils",
"#",
"is",
"url",
"valid",
"url",
"}",
"or",
"would",
"represent",
"one",
"after",
"the",
"leading",
"slash",
"is",
"removed",
"note",
":",
"this",
"method",
"assumes",
"that",
"leading",
",",
"duplicate",
"'",
"'",
"or",
"control",
"characters",
"(",
"e",
"g",
"white",
"space",
")",
"have",
"been",
"trimmed",
"so",
"that",
"the",
"path",
"starts",
"predictably",
"with",
"a",
"single",
"'",
"'",
"or",
"does",
"not",
"have",
"one"
] |
[
"protected",
"boolean",
"is",
"invalid",
"path",
"(",
"string",
"path",
")",
"{",
"if",
"(",
"path",
"contains",
"(",
"\"",
"web",
"-",
"inf",
"\"",
")",
"|",
"|",
"path",
"contains",
"(",
"\"",
"meta",
"-",
"inf",
"\"",
")",
")",
"{",
"if",
"(",
"logger",
"is",
"warn",
"enabled",
"(",
")",
")",
"{",
"logger",
"warn",
"(",
"\"",
"path",
"with",
"\\",
"\"",
"web",
"-",
"inf",
"\\",
"\"",
"or",
"\\",
"\"",
"meta",
"-",
"inf",
"\\",
"\"",
":",
"[",
"\"",
"+",
"path",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"return",
"true",
";",
"}",
"if",
"(",
"path",
"contains",
"(",
"\"",
":",
"/",
"\"",
")",
")",
"{",
"string",
"relative",
"path",
"=",
"(",
"path",
"char",
"at",
"(",
"0",
")",
"=",
"=",
"'",
"/",
"'",
"?",
"path",
"substring",
"(",
"1",
")",
":",
"path",
")",
";",
"if",
"(",
"resource",
"utils",
"is",
"url",
"(",
"relative",
"path",
")",
"|",
"|",
"relative",
"path",
"starts",
"with",
"(",
"\"",
"url",
":",
"\"",
")",
")",
"{",
"if",
"(",
"logger",
"is",
"warn",
"enabled",
"(",
")",
")",
"{",
"logger",
"warn",
"(",
"\"",
"path",
"represents",
"url",
"or",
"has",
"\\",
"\"",
"url",
":",
"\\",
"\"",
"prefix",
":",
"[",
"\"",
"+",
"path",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"return",
"true",
";",
"}",
"}",
"if",
"(",
"path",
"contains",
"(",
"\"",
"\"",
")",
"&",
"&",
"string",
"utils",
"clean",
"path",
"(",
"path",
")",
"contains",
"(",
"\"",
"/",
"\"",
")",
")",
"{",
"if",
"(",
"logger",
"is",
"warn",
"enabled",
"(",
")",
")",
"{",
"logger",
"warn",
"(",
"\"",
"path",
"contains",
"\\",
"\"",
"/",
"\\",
"\"",
"after",
"call",
"to",
"string",
"utils",
"#",
"clean",
"path",
":",
"[",
"\"",
"+",
"path",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] |
[
"customize",
"request",
"specification"
] |
[
"public",
"create",
"users",
"with",
"list",
"input",
"oper",
"req",
"spec",
"(",
"consumer",
"<",
"request",
"spec",
"builder",
">",
"req",
"spec",
"customizer",
")",
"{",
"req",
"spec",
"customizer",
"accept",
"(",
"req",
"spec",
")",
";",
"return",
"this",
";",
"}"
] |
[
"whether",
"this",
"is",
"a",
"private",
"token"
] |
[
"public",
"boolean",
"is",
"private",
"(",
")",
"{",
"return",
"true",
";",
"}"
] |
[
"tests",
"basic",
"multi",
"threaded",
"set",
"permission",
"scenario"
] |
[
"public",
"void",
"test",
"multi",
"threaded",
"page",
"blob",
"open",
"scenario",
"(",
")",
"throws",
"throwable",
"{",
"create",
"empty",
"file",
"(",
"create",
"test",
"account",
"(",
")",
",",
"test",
"path",
")",
";",
"thread",
"t",
"=",
"new",
"thread",
"(",
"new",
"delete",
"thread",
"(",
"fs",
",",
"test",
"path",
")",
")",
";",
"t",
"start",
"(",
")",
";",
"while",
"(",
"t",
"is",
"alive",
"(",
")",
")",
"{",
"input",
"stream",
"=",
"fs",
"open",
"(",
"test",
"path",
")",
";",
"input",
"stream",
"close",
"(",
")",
";",
"}",
"input",
"stream",
"=",
"fs",
"open",
"(",
"test",
"path",
")",
";",
"input",
"stream",
"close",
"(",
")",
";",
"}"
] |
[
"perform",
"the",
"exchange",
"without",
"a",
"request",
"body"
] |
[
"response",
"spec",
"exchange",
"(",
")",
";"
] |
[
"allows",
"both",
"core",
"and",
"non",
"-",
"core",
"threads",
"in",
"the",
"executor",
"to",
"be",
"terminated",
"if",
"no",
"tasks",
"arrive",
"for",
"at",
"least",
"the",
"given",
"timeout",
"milliseconds",
"use",
"{",
"@",
"link",
"#",
"no",
"thread",
"timeout",
"}",
"to",
"remove",
"a",
"previously",
"set",
"timeout"
] |
[
"public",
"builder",
"set",
"thread",
"timeout",
"millis",
"(",
"long",
"thread",
"timeout",
"millis",
")",
"{",
"this",
"thread",
"timeout",
"millis",
"=",
"thread",
"timeout",
"millis",
";",
"return",
"this",
";",
"}"
] |
[
"10",
":",
"or",
"+",
"-",
"12",
":",
"brds",
"20",
"|",
"14",
":",
"or",
"<",
"-",
"-",
"-",
"-",
"-",
"+",
"|",
"16",
":",
"ret",
"|",
"|",
"|",
"+",
"-",
">",
"20",
":",
"or",
"|",
"22",
":",
"breq",
"14",
"-",
"-",
"-",
"-",
"+",
"24",
":",
"ret",
"branch",
"into",
"delay",
"slot"
] |
[
"public",
"void",
"test",
"flow",
"unconditional",
"branch",
"delay",
"slot",
"(",
")",
"throws",
"exception",
"{",
"program",
"builder",
"add",
"bytes",
"fallthrough",
"(",
"10",
")",
";",
"program",
"builder",
"add",
"bytes",
"branch",
"with",
"delay",
"slot",
"(",
"12",
",",
"20",
")",
";",
"program",
"builder",
"add",
"bytes",
"return",
"(",
"16",
")",
";",
"program",
"builder",
"add",
"bytes",
"fallthrough",
"(",
"20",
")",
";",
"program",
"builder",
"add",
"bytes",
"branch",
"conditional",
"(",
"22",
",",
"14",
")",
";",
"program",
"builder",
"add",
"bytes",
"return",
"(",
"24",
")",
";",
"program",
"builder",
"disassemble",
"(",
"to",
"hex",
"(",
"10",
")",
",",
"6",
",",
"false",
")",
";",
"program",
"builder",
"disassemble",
"(",
"to",
"hex",
"(",
"16",
")",
",",
"2",
",",
"false",
")",
";",
"program",
"builder",
"disassemble",
"(",
"to",
"hex",
"(",
"20",
")",
",",
"6",
",",
"false",
")",
";",
"address",
"addr",
"=",
"address",
"(",
"10",
")",
";",
"address",
"set",
"address",
"set",
"=",
"new",
"address",
"set",
"(",
"addr",
")",
";",
"flow",
"type",
"[",
"]",
"flows",
"not",
"to",
"follow",
"=",
"new",
"flow",
"type",
"[",
"]",
"{",
"}",
";",
"follow",
"flow",
"follow",
"flow",
"=",
"new",
"follow",
"flow",
"(",
"program",
",",
"address",
"set",
",",
"flows",
"not",
"to",
"follow",
")",
";",
"/",
"/",
"follow",
"all",
"flows",
"address",
"set",
"flow",
"addresses",
"=",
"follow",
"flow",
"get",
"flow",
"address",
"set",
"(",
"task",
"monitor",
"adapter",
"dummy",
"monitor",
")",
";",
"address",
"set",
"expected",
"addresses",
"=",
"new",
"address",
"set",
"(",
")",
";",
"expected",
"addresses",
"add",
"(",
"address",
"(",
"10",
")",
",",
"address",
"(",
"15",
")",
")",
";",
"expected",
"addresses",
"add",
"(",
"address",
"(",
"20",
")",
",",
"address",
"(",
"25",
")",
")",
";",
"assert",
"equals",
"(",
"new",
"my",
"selection",
"(",
"expected",
"addresses",
")",
",",
"new",
"my",
"selection",
"(",
"flow",
"addresses",
")",
")",
";",
"}"
] |
[
"returns",
"an",
"unmodifiable",
"view",
"of",
"the",
"pic",
"dwo",
"files",
"set"
] |
[
"public",
"immutable",
"list",
"<",
"artifact",
">",
"get",
"pic",
"dwo",
"files",
"(",
")",
"{",
"return",
"pic",
"dwo",
"files",
";",
"}"
] |
[
"return",
"max",
"resource"
] |
[
"public",
"resource",
"get",
"max",
"resource",
"(",
")",
"{",
"return",
"max",
"resource",
";",
"}"
] |
[
"creates",
"a",
"mutable",
"copy",
"of",
"{",
"@",
"code",
"graph",
"}",
"with",
"the",
"same",
"nodes",
"and",
"edges"
] |
[
"public",
"static",
"<",
"n",
">",
"mutable",
"graph",
"<",
"n",
">",
"copy",
"of",
"(",
"graph",
"<",
"n",
">",
"graph",
")",
"{",
"mutable",
"graph",
"<",
"n",
">",
"copy",
"=",
"graph",
"builder",
"from",
"(",
"graph",
")",
"expected",
"node",
"count",
"(",
"graph",
"nodes",
"(",
")",
"size",
"(",
")",
")",
"build",
"(",
")",
";",
"for",
"(",
"n",
"node",
":",
"graph",
"nodes",
"(",
")",
")",
"{",
"copy",
"add",
"node",
"(",
"node",
")",
";",
"}",
"for",
"(",
"endpoint",
"pair",
"<",
"n",
">",
"edge",
":",
"graph",
"edges",
"(",
")",
")",
"{",
"copy",
"put",
"edge",
"(",
"edge",
"node",
"u",
"(",
")",
",",
"edge",
"node",
"v",
"(",
")",
")",
";",
"}",
"return",
"copy",
";",
"}"
] |
[
"specify",
"resource",
"locations",
"to",
"load",
"xml",
"constraint",
"mapping",
"files",
"from",
",",
"if",
"any"
] |
[
"public",
"void",
"set",
"mapping",
"locations",
"(",
"resource",
"mapping",
"locations",
")",
"{",
"this",
"mapping",
"locations",
"=",
"mapping",
"locations",
";",
"}"
] |
[
"returns",
"dividend",
"divisor",
",",
"where",
"the",
"dividend",
"and",
"divisor",
"are",
"treated",
"as",
"unsigned",
"64",
"-",
"bit",
"quantities",
"<",
"b",
">",
"java",
"8",
"users",
":",
"<",
"b",
">",
"use",
"{",
"@",
"link",
"long",
"#",
"divide",
"unsigned",
"(",
"long",
",",
"long",
")",
"}",
"instead"
] |
[
"public",
"static",
"long",
"divide",
"(",
"long",
"dividend",
",",
"long",
"divisor",
")",
"{",
"if",
"(",
"divisor",
"<",
"0",
")",
"{",
"/",
"/",
"i",
"e",
",",
"divisor",
">",
"=",
"2",
"^",
"63",
":",
"if",
"(",
"compare",
"(",
"dividend",
",",
"divisor",
")",
"<",
"0",
")",
"{",
"return",
"0",
";",
"/",
"/",
"dividend",
"<",
"divisor",
"}",
"else",
"{",
"return",
"1",
";",
"/",
"/",
"dividend",
">",
"=",
"divisor",
"}",
"}",
"/",
"/",
"optimization",
"-",
"use",
"signed",
"division",
"if",
"dividend",
"<",
"2",
"^",
"63",
"if",
"(",
"dividend",
">",
"=",
"0",
")",
"{",
"return",
"dividend",
"/",
"divisor",
";",
"}",
"/",
"*",
"*",
"otherwise",
",",
"approximate",
"the",
"quotient",
",",
"check",
",",
"and",
"correct",
"if",
"necessary",
"our",
"approximation",
"is",
"*",
"guaranteed",
"to",
"be",
"either",
"exact",
"or",
"one",
"less",
"than",
"the",
"correct",
"value",
"this",
"follows",
"from",
"fact",
"that",
"*",
"floor",
"(",
"floor",
"(",
"x",
")",
"/",
"i",
")",
"=",
"=",
"floor",
"(",
"x",
"/",
"i",
")",
"for",
"any",
"real",
"x",
"and",
"integer",
"i",
"!",
"=",
"0",
"the",
"proof",
"is",
"not",
"quite",
"*",
"trivial",
"*",
"/",
"long",
"quotient",
"=",
"(",
"(",
"dividend",
">",
">",
">",
"1",
")",
"/",
"divisor",
")",
"<",
"<",
"1",
";",
"long",
"rem",
"=",
"dividend",
"-",
"quotient",
"*",
"divisor",
";",
"return",
"quotient",
"+",
"(",
"compare",
"(",
"rem",
",",
"divisor",
")",
">",
"=",
"0",
"?",
"1",
":",
"0",
")",
";",
"}"
] |
[
"equivalent",
"to",
"calling",
"random",
"positive",
"big",
"integer",
"(",
"num",
"bits",
")",
"and",
"then",
"flipping",
"the",
"sign",
"with",
"50",
"%",
"probability"
] |
[
"static",
"big",
"integer",
"random",
"non",
"zero",
"big",
"integer",
"(",
"int",
"num",
"bits",
")",
"{",
"big",
"integer",
"result",
"=",
"random",
"positive",
"big",
"integer",
"(",
"num",
"bits",
")",
";",
"return",
"random",
"source",
"next",
"boolean",
"(",
")",
"?",
"result",
":",
"result",
"negate",
"(",
")",
";",
"}"
] |
[
"convert",
"empty",
"string",
"to",
"null"
] |
[
"public",
"static",
"string",
"fix",
"empty",
"(",
"@",
"check",
"for",
"null",
"string",
"s",
")",
"{",
"if",
"(",
"s",
"=",
"=",
"null",
"|",
"|",
"s",
"length",
"(",
")",
"=",
"=",
"0",
")",
"return",
"null",
";",
"return",
"s",
";",
"}"
] |
[
"remove",
"all",
"elements",
"from",
"the",
"set",
"and",
"return",
"them",
"in",
"order",
"traverse",
"the",
"link",
"list",
",",
"don",
"'",
"t",
"worry",
"about",
"hashtable",
"-",
"faster",
"version",
"of",
"the",
"parent",
"method"
] |
[
"public",
"list",
"<",
"t",
">",
"poll",
"all",
"(",
")",
"{",
"list",
"<",
"t",
">",
"ret",
"list",
"=",
"new",
"array",
"list",
"<",
"t",
">",
"(",
"size",
")",
";",
"while",
"(",
"head",
"!",
"=",
"null",
")",
"{",
"ret",
"list",
"add",
"(",
"head",
"element",
")",
";",
"head",
"=",
"head",
"after",
";",
"}",
"this",
"clear",
"(",
")",
";",
"return",
"ret",
"list",
";",
"}"
] |
[
"set",
"the",
"advisor",
"chain",
"factory",
"to",
"use",
"default",
"is",
"a",
"{",
"@",
"link",
"default",
"advisor",
"chain",
"factory",
"}"
] |
[
"public",
"void",
"set",
"advisor",
"chain",
"factory",
"(",
"advisor",
"chain",
"factory",
"advisor",
"chain",
"factory",
")",
"{",
"assert",
"not",
"null",
"(",
"advisor",
"chain",
"factory",
",",
"\"",
"advisor",
"chain",
"factory",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"this",
"advisor",
"chain",
"factory",
"=",
"advisor",
"chain",
"factory",
";",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.