docstring_tokens
list | code_tokens
list |
---|---|
[
"returns",
"the",
"host"
] |
[
"public",
"string",
"get",
"host",
"(",
")",
"{",
"return",
"host",
";",
"}"
] |
[
"turn",
"special",
"characters",
"into",
"html",
"character",
"references",
"handles",
"complete",
"character",
"set",
"defined",
"in",
"html",
"4",
"01",
"recommendation",
"escapes",
"all",
"special",
"characters",
"to",
"their",
"corresponding",
"entity",
"reference",
"(",
"e",
"g",
"{",
"@",
"code",
"&",
"lt",
";",
"}",
")",
"reference",
":",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"w",
"3",
"org",
"t",
"rhtml",
"4sgmlentities",
"html",
"\"",
">",
"https",
":",
"www",
"w",
"3",
"org",
"t",
"rhtml",
"4sgmlentities",
"html"
] |
[
"public",
"static",
"string",
"html",
"escape",
"(",
"string",
"input",
")",
"{",
"return",
"html",
"escape",
"(",
"input",
",",
"web",
"utils",
"default",
"character",
"encoding",
")",
";",
"}"
] |
[
"creates",
"a",
"version",
"-",
"specific",
"kafka",
"consumer"
] |
[
"protected",
"abstract",
"flink",
"kafka",
"consumer",
"base",
"<",
"row",
">",
"create",
"kafka",
"consumer",
"(",
"string",
"topic",
",",
"properties",
"properties",
",",
"deserialization",
"schema",
"<",
"row",
">",
"deserialization",
"schema",
")",
";"
] |
[
"fail",
"the",
"scan",
";",
"print",
"the",
"formatted",
"error",
"and",
"update",
"the",
"result"
] |
[
"private",
"scan",
"result",
"fail",
"scan",
"(",
"scan",
"result",
"result",
",",
"int",
"code",
",",
"string",
"message",
",",
"object",
"args",
")",
"{",
"string",
"text",
"=",
"string",
"format",
"(",
"message",
",",
"args",
")",
";",
"result",
"exit",
"code",
"=",
"code",
";",
"result",
"exit",
"text",
"=",
"text",
";",
"return",
"result",
";",
"}"
] |
[
"walks",
"a",
"list",
"of",
"names",
"of",
"directories",
"in",
"nameparts",
"(",
"stopping",
"prior",
"to",
"the",
"last",
"element",
")",
"starting",
"at",
"the",
"root",
"of",
"the",
"filesystem",
"and",
"returns",
"the",
"final",
"directory",
"directories",
"in",
"a",
"path",
"that",
"have",
"not",
"been",
"encountered",
"before",
"(",
"ie",
"a",
"file",
"'",
"s",
"path",
"references",
"a",
"directory",
"that",
"hasn",
"'",
"t",
"been",
"mentioned",
"yet",
"as",
"its",
"own",
"file",
"entry",
")",
"will",
"have",
"a",
"stub",
"entry",
"g",
"file",
"created",
"for",
"them",
"superfluous",
"slashes",
"in",
"the",
"original",
"filename",
"(",
"ie",
"namesubsubafter",
"extra",
"slash",
")",
"will",
"be",
"represented",
"as",
"empty",
"string",
"elements",
"in",
"the",
"nameparts",
"array",
"and",
"will",
"be",
"skipped",
"as",
"if",
"they",
"were",
"not",
"there"
] |
[
"protected",
"g",
"file",
"lookup",
"parent",
"(",
"string",
"[",
"]",
"nameparts",
")",
"{",
"g",
"file",
"current",
"dir",
"=",
"root",
"dir",
";",
"g",
"file",
"current",
"file",
"=",
"root",
"dir",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nameparts",
"length",
"-",
"1",
";",
"i",
"+",
"+",
")",
"{",
"map",
"<",
"string",
",",
"g",
"file",
">",
"current",
"dir",
"contents",
"=",
"get",
"directory",
"contents",
"(",
"current",
"dir",
",",
"true",
")",
";",
"string",
"name",
"=",
"nameparts",
"[",
"i",
"]",
";",
"if",
"(",
"name",
"is",
"empty",
"(",
")",
")",
"{",
"continue",
";",
"}",
"current",
"file",
"=",
"current",
"dir",
"contents",
"get",
"(",
"name",
")",
";",
"if",
"(",
"current",
"file",
"=",
"=",
"null",
")",
"{",
"current",
"file",
"=",
"create",
"new",
"file",
"(",
"current",
"dir",
",",
"name",
",",
"true",
",",
"-",
"1",
",",
"null",
")",
";",
"current",
"dir",
"contents",
"put",
"(",
"name",
",",
"current",
"file",
")",
";",
"get",
"directory",
"contents",
"(",
"current",
"file",
",",
"true",
")",
";",
"}",
"current",
"dir",
"=",
"current",
"file",
";",
"}",
"return",
"current",
"file",
";",
"}"
] |
[
"return",
"the",
"cell",
"renderer",
"text"
] |
[
"protected",
"string",
"get",
"text",
"(",
"object",
"value",
")",
"{",
"return",
"value",
"=",
"=",
"null",
"?",
"\"",
"\"",
":",
"value",
"to",
"string",
"(",
")",
";",
"}"
] |
[
"two",
"buffer",
"dirs",
"the",
"first",
"dir",
"exists",
"&",
"is",
"on",
"a",
"read",
"-",
"only",
"disk",
";",
"the",
"second",
"dir",
"exists",
"&",
"is",
"rw"
] |
[
"public",
"void",
"test",
"r",
"o",
"buffer",
"dir",
"and",
"r",
"w",
"buffer",
"dir",
"(",
")",
"throws",
"exception",
"{",
"assume",
"not",
"windows",
"(",
")",
";",
"string",
"dir",
"1",
"=",
"build",
"buffer",
"dir",
"(",
"root",
",",
"1",
")",
";",
"string",
"dir",
"2",
"=",
"build",
"buffer",
"dir",
"(",
"root",
",",
"2",
")",
";",
"try",
"{",
"conf",
"set",
"(",
"context",
",",
"dir",
"1",
"+",
"\"",
",",
"\"",
"+",
"dir",
"2",
")",
";",
"assert",
"true",
"(",
"local",
"fs",
"mkdirs",
"(",
"new",
"path",
"(",
"dir",
"2",
")",
")",
")",
";",
"buffer",
"root",
"set",
"read",
"only",
"(",
")",
";",
"validate",
"temp",
"dir",
"creation",
"(",
"dir",
"2",
")",
";",
"validate",
"temp",
"dir",
"creation",
"(",
"dir",
"2",
")",
";",
"}",
"finally",
"{",
"shell",
"exec",
"command",
"(",
"shell",
"get",
"set",
"permission",
"command",
"(",
"\"",
"u",
"+",
"w",
"\"",
",",
"false",
",",
"buffer",
"dir",
"root",
")",
")",
";",
"rm",
"buffer",
"dirs",
"(",
")",
";",
"}",
"}"
] |
[
"this",
"helper",
"writes",
"an",
"editor",
"value",
"to",
"a",
"value",
"that",
"is",
"not",
"a",
"field",
"of",
"a",
"class",
"if",
"the",
"value",
"is",
"a",
"field",
",",
"use",
"{",
"@",
"link",
"#",
"write",
"(",
"class",
",",
"field",
",",
"object",
",",
"editor",
"value",
")",
"}",
"instead"
] |
[
"public",
"static",
"<",
"t",
">",
"written",
"value",
"<",
"t",
">",
"write",
"value",
"that",
"is",
"not",
"a",
"field",
"(",
"final",
"class",
"<",
"t",
">",
"c",
",",
"t",
"value",
",",
"final",
"editor",
"value",
"values",
")",
"{",
"final",
"transient",
"field",
"<",
"t",
">",
"wrapper",
"=",
"new",
"transient",
"field",
"<",
">",
"(",
"value",
")",
";",
"final",
"boolean",
"result",
"=",
"write",
"(",
"c",
",",
"transient",
"field",
"content",
"field",
",",
"wrapper",
",",
"values",
")",
";",
"return",
"new",
"written",
"value",
"<",
"t",
">",
"(",
")",
"{",
"@",
"override",
"@",
"nullable",
"public",
"boolean",
"has",
"updated",
"(",
")",
"{",
"return",
"result",
";",
"}",
"@",
"override",
"public",
"t",
"value",
"(",
")",
"{",
"return",
"wrapper",
"content",
";",
"}",
"}",
";",
"}"
] |
[
"decodes",
"all",
"of",
"the",
"provided",
"data",
",",
"starting",
"at",
"in",
"pos",
",",
"for",
"in",
"avail",
"bytes",
"should",
"be",
"called",
"at",
"least",
"twice",
":",
"once",
"with",
"the",
"data",
"to",
"decode",
",",
"and",
"once",
"with",
"in",
"avail",
"set",
"to",
"\"",
"-",
"1",
"\"",
"to",
"alert",
"decoder",
"that",
"eof",
"has",
"been",
"reached",
"the",
"\"",
"-",
"1",
"\"",
"call",
"is",
"not",
"necessary",
"when",
"decoding",
",",
"but",
"it",
"doesn",
"'",
"t",
"hurt",
",",
"either",
"ignores",
"all",
"non",
"-",
"base",
"6",
"4",
"characters",
"this",
"is",
"how",
"chunked",
"(",
"e",
"g",
"76",
"character",
")",
"data",
"is",
"handled",
",",
"since",
"cr",
"and",
"lf",
"are",
"silently",
"ignored",
",",
"but",
"has",
"implications",
"for",
"other",
"bytes",
",",
"too",
"this",
"method",
"subscribes",
"to",
"the",
"garbage",
"-",
"in",
",",
"garbage",
"-",
"out",
"philosophy",
":",
"it",
"will",
"not",
"check",
"the",
"provided",
"data",
"for",
"validity",
"thanks",
"to",
"\"",
"commons",
"\"",
"project",
"in",
"ws",
"apache",
"org",
"for",
"the",
"bitwise",
"operations",
",",
"and",
"general",
"approach",
"http",
":",
"svn",
"apache",
"orgreposasfwebservicescommonstrunkmodulesutil"
] |
[
"void",
"decode",
"(",
"byte",
"[",
"]",
"in",
",",
"int",
"in",
"pos",
",",
"int",
"in",
"avail",
")",
"{",
"if",
"(",
"eof",
")",
"{",
"return",
";",
"}",
"if",
"(",
"in",
"avail",
"<",
"0",
")",
"{",
"eof",
"=",
"true",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"in",
"avail",
";",
"i",
"+",
"+",
")",
"{",
"ensure",
"buffer",
"size",
"(",
"decode",
"size",
")",
";",
"byte",
"b",
"=",
"in",
"[",
"in",
"pos",
"+",
"+",
"]",
";",
"if",
"(",
"b",
"=",
"=",
"pad",
")",
"{",
"/",
"/",
"we",
"'",
"re",
"done",
"eof",
"=",
"true",
";",
"break",
";",
"}",
"else",
"{",
"if",
"(",
"b",
">",
"=",
"0",
"&",
"&",
"b",
"<",
"decode",
"table",
"length",
")",
"{",
"int",
"result",
"=",
"decode",
"table",
"[",
"b",
"]",
";",
"if",
"(",
"result",
">",
"=",
"0",
")",
"{",
"modulus",
"=",
"(",
"modulus",
"+",
"1",
")",
"%",
"bytes",
"per",
"encoded",
"block",
";",
"bit",
"work",
"area",
"=",
"(",
"bit",
"work",
"area",
"<",
"<",
"bits",
"per",
"encoded",
"byte",
")",
"+",
"result",
";",
"if",
"(",
"modulus",
"=",
"=",
"0",
")",
"{",
"buffer",
"[",
"pos",
"+",
"+",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"bit",
"work",
"area",
">",
">",
"16",
")",
"&",
"mask",
"8bits",
")",
";",
"buffer",
"[",
"pos",
"+",
"+",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"bit",
"work",
"area",
">",
">",
"8",
")",
"&",
"mask",
"8bits",
")",
";",
"buffer",
"[",
"pos",
"+",
"+",
"]",
"=",
"(",
"byte",
")",
"(",
"bit",
"work",
"area",
"&",
"mask",
"8bits",
")",
";",
"}",
"}",
"}",
"}",
"}",
"/",
"/",
"two",
"forms",
"of",
"eof",
"as",
"far",
"as",
"base",
"6",
"4",
"decoder",
"is",
"concerned",
":",
"actual",
"/",
"/",
"eof",
"(",
"-",
"1",
")",
"and",
"first",
"time",
"'",
"=",
"'",
"character",
"is",
"encountered",
"in",
"stream",
"/",
"/",
"this",
"approach",
"makes",
"the",
"'",
"=",
"'",
"padding",
"characters",
"completely",
"optional",
"if",
"(",
"eof",
"&",
"&",
"modulus",
"!",
"=",
"0",
")",
"{",
"ensure",
"buffer",
"size",
"(",
"decode",
"size",
")",
";",
"/",
"/",
"we",
"have",
"some",
"spare",
"bits",
"remaining",
"/",
"/",
"output",
"all",
"whole",
"multiples",
"of",
"8",
"bits",
"and",
"ignore",
"the",
"rest",
"switch",
"(",
"modulus",
")",
"{",
"/",
"/",
"case",
"1",
":",
"/",
"/",
"6",
"bits",
"-",
"ignore",
"entirely",
"/",
"/",
"break",
";",
"case",
"2",
":",
"bit",
"work",
"area",
"=",
"bit",
"work",
"area",
">",
">",
"4",
";",
"buffer",
"[",
"pos",
"+",
"+",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"bit",
"work",
"area",
")",
"&",
"mask",
"8bits",
")",
";",
"break",
";",
"case",
"3",
":",
"bit",
"work",
"area",
"=",
"bit",
"work",
"area",
">",
">",
"2",
";",
"buffer",
"[",
"pos",
"+",
"+",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"bit",
"work",
"area",
">",
">",
"8",
")",
"&",
"mask",
"8bits",
")",
";",
"buffer",
"[",
"pos",
"+",
"+",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"bit",
"work",
"area",
")",
"&",
"mask",
"8bits",
")",
";",
"break",
";",
"default",
":",
"break",
";",
"}",
"}",
"}"
] |
[
"configure",
"one",
"more",
"simple",
"patterns",
"(",
"as",
"described",
"in",
"{",
"@",
"link",
"pattern",
"match",
"utils",
"#",
"simple",
"match",
"}",
")",
"to",
"use",
"in",
"order",
"to",
"recognize",
"custom",
"redirect",
"prefixes",
"in",
"addition",
"to",
"\"",
"redirect",
":",
"\"",
"note",
"that",
"simply",
"configuring",
"this",
"property",
"will",
"not",
"make",
"a",
"custom",
"redirect",
"prefix",
"work",
"there",
"must",
"be",
"a",
"custom",
"{",
"@",
"link",
"view",
"}",
"that",
"recognizes",
"the",
"prefix",
"as",
"well"
] |
[
"public",
"void",
"set",
"redirect",
"patterns",
"(",
"@",
"nullable",
"string",
"redirect",
"patterns",
")",
"{",
"this",
"redirect",
"patterns",
"=",
"redirect",
"patterns",
";",
"}"
] |
[
"reset",
"and",
"initialize",
"typed",
"readers",
"and",
"object",
"readers"
] |
[
"protected",
"void",
"init",
"readers",
"(",
")",
"{",
"init",
"typed",
"readers",
"(",
")",
";",
"init",
"object",
"readers",
"(",
")",
";",
"}"
] |
[
"reports",
"the",
"details",
"of",
"the",
"access",
"failure",
"in",
"http",
"headers",
"to",
"assist",
"diagnosis"
] |
[
"public",
"void",
"report",
"as",
"headers",
"(",
"http",
"servlet",
"response",
"rsp",
")",
"{",
"rsp",
"add",
"header",
"(",
"\"",
"x",
"-",
"you",
"-",
"are",
"-",
"authenticated",
"-",
"as",
"\"",
",",
"authentication",
"get",
"name",
"(",
")",
")",
";",
"if",
"(",
"report",
"group",
"headers",
")",
"{",
"for",
"(",
"granted",
"authority",
"auth",
":",
"authentication",
"get",
"authorities",
"(",
")",
")",
"{",
"rsp",
"add",
"header",
"(",
"\"",
"x",
"-",
"you",
"-",
"are",
"-",
"in",
"-",
"group",
"\"",
",",
"auth",
"get",
"authority",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"rsp",
"add",
"header",
"(",
"\"",
"x",
"-",
"you",
"-",
"are",
"-",
"in",
"-",
"group",
"-",
"disabled",
"\"",
",",
"\"",
"jenkins",
"-",
"39402",
":",
"use",
"-",
"dhudson",
"security",
"access",
"denied",
"exception",
"2",
"report",
"group",
"headers",
"=",
"true",
"or",
"use",
"/",
"who",
"am",
"i",
"to",
"diagnose",
"\"",
")",
";",
"}",
"rsp",
"add",
"header",
"(",
"\"",
"x",
"-",
"required",
"-",
"permission",
"\"",
",",
"permission",
"get",
"id",
"(",
")",
")",
";",
"for",
"(",
"permission",
"p",
"=",
"permission",
"implied",
"by",
";",
"p",
"!",
"=",
"null",
";",
"p",
"=",
"p",
"implied",
"by",
")",
"{",
"rsp",
"add",
"header",
"(",
"\"",
"x",
"-",
"permission",
"-",
"implied",
"-",
"by",
"\"",
",",
"p",
"get",
"id",
"(",
")",
")",
";",
"}",
"}"
] |
[
"create",
"a",
"cache",
"with",
"a",
"given",
"semaphore",
"size"
] |
[
"private",
"file",
"system",
"cache",
"semaphored",
"cache",
"(",
"final",
"int",
"semaphores",
")",
"{",
"final",
"configuration",
"conf",
"1",
"=",
"new",
"configuration",
"(",
")",
";",
"conf",
"1",
"set",
"int",
"(",
"fs",
"creation",
"parallel",
"count",
",",
"semaphores",
")",
";",
"file",
"system",
"cache",
"cache",
"=",
"new",
"file",
"system",
"cache",
"(",
"conf",
"1",
")",
";",
"return",
"cache",
";",
"}"
] |
[
"response",
"for",
"rpc",
"call",
"{",
"@",
"link",
"mount",
"interface",
"mntproc",
"#",
"dump",
"}"
] |
[
"public",
"static",
"xdr",
"write",
"mount",
"list",
"(",
"xdr",
"xdr",
",",
"int",
"xid",
",",
"list",
"<",
"mount",
"entry",
">",
"mounts",
")",
"{",
"rpc",
"accepted",
"reply",
"get",
"accept",
"instance",
"(",
"xid",
",",
"new",
"verifier",
"none",
"(",
")",
")",
"write",
"(",
"xdr",
")",
";",
"for",
"(",
"mount",
"entry",
"mount",
"entry",
":",
"mounts",
")",
"{",
"xdr",
"write",
"boolean",
"(",
"true",
")",
";",
"/",
"/",
"value",
"follows",
"yes",
"xdr",
"write",
"string",
"(",
"mount",
"entry",
"get",
"host",
"(",
")",
")",
";",
"xdr",
"write",
"string",
"(",
"mount",
"entry",
"get",
"path",
"(",
")",
")",
";",
"}",
"xdr",
"write",
"boolean",
"(",
"false",
")",
";",
"/",
"/",
"value",
"follows",
"no",
"return",
"xdr",
";",
"}"
] |
[
"returns",
"the",
"data",
"streams",
"that",
"are",
"currently",
"being",
"snapshotted",
"(",
"with",
"partial",
"=",
"=",
"false",
")",
"and",
"that",
"are",
"contained",
"in",
"the",
"indices",
"-",
"to",
"-",
"check",
"set"
] |
[
"public",
"static",
"set",
"<",
"string",
">",
"snapshotting",
"data",
"streams",
"(",
"final",
"cluster",
"state",
"current",
"state",
",",
"final",
"set",
"<",
"string",
">",
"data",
"streams",
"to",
"check",
")",
"{",
"final",
"snapshots",
"in",
"progress",
"snapshots",
"=",
"current",
"state",
"custom",
"(",
"snapshots",
"in",
"progress",
"type",
")",
";",
"if",
"(",
"snapshots",
"=",
"=",
"null",
")",
"{",
"return",
"empty",
"set",
"(",
")",
";",
"}",
"map",
"<",
"string",
",",
"data",
"stream",
">",
"data",
"streams",
"=",
"current",
"state",
"metadata",
"(",
")",
"data",
"streams",
"(",
")",
";",
"return",
"snapshots",
"entries",
"(",
")",
"stream",
"(",
")",
"filter",
"(",
"e",
"-",
">",
"e",
"partial",
"(",
")",
"=",
"=",
"false",
")",
"flat",
"map",
"(",
"e",
"-",
">",
"e",
"data",
"streams",
"(",
")",
"stream",
"(",
")",
")",
"filter",
"(",
"ds",
"-",
">",
"data",
"streams",
"contains",
"key",
"(",
"ds",
")",
"&",
"&",
"data",
"streams",
"to",
"check",
"contains",
"(",
"ds",
")",
")",
"collect",
"(",
"collectors",
"to",
"set",
"(",
")",
")",
";",
"}"
] |
[
"read",
"session",
"global",
"session"
] |
[
"public",
"global",
"session",
"read",
"session",
"(",
"string",
"xid",
")",
"{",
"return",
"this",
"read",
"session",
"(",
"xid",
",",
"true",
")",
";",
"}"
] |
[
"updates",
"settings",
"for",
"building",
"clients",
"any",
"client",
"cache",
"is",
"cleared",
"future",
"client",
"requests",
"will",
"use",
"the",
"new",
"refreshed",
"settings"
] |
[
"public",
"void",
"refresh",
"settings",
"(",
"map",
"<",
"string",
",",
"azure",
"storage",
"settings",
">",
"clients",
"settings",
")",
"{",
"this",
"storage",
"settings",
"=",
"map",
"copy",
"of",
"(",
"clients",
"settings",
")",
";",
"/",
"/",
"clients",
"are",
"built",
"lazily",
"by",
"{",
"@",
"link",
"client",
"(",
"string",
",",
"location",
"mode",
")",
"}",
"}"
] |
[
"returns",
"a",
"new",
"{",
"@",
"link",
"builder",
"}",
"for",
"{",
"@",
"link",
"csv",
"reporter",
"}"
] |
[
"public",
"static",
"builder",
"for",
"registry",
"(",
"metric",
"registry",
"registry",
")",
"{",
"return",
"new",
"builder",
"(",
"registry",
")",
";",
"}"
] |
[
"gets",
"a",
"property",
"from",
"the",
"configuration",
"this",
"is",
"the",
"most",
"basic",
"get",
"method",
"for",
"retrieving",
"values",
"of",
"properties",
"in",
"a",
"typical",
"implementation",
"of",
"the",
"{",
"@",
"code",
"configuration",
"}",
"interface",
"the",
"other",
"get",
"methods",
"(",
"that",
"return",
"specific",
"data",
"types",
")",
"will",
"internally",
"make",
"use",
"of",
"this",
"method",
"on",
"this",
"level",
"variable",
"substitution",
"is",
"not",
"yet",
"performed",
"the",
"returned",
"object",
"is",
"an",
"internal",
"representation",
"of",
"the",
"property",
"value",
"for",
"the",
"passed",
"in",
"key",
"it",
"is",
"owned",
"by",
"the",
"{",
"@",
"code",
"configuration",
"}",
"object",
"so",
"a",
"caller",
"should",
"not",
"modify",
"this",
"object",
"it",
"cannot",
"be",
"guaranteed",
"that",
"this",
"object",
"will",
"stay",
"constant",
"over",
"time",
"(",
"i",
"e",
"further",
"update",
"operations",
"on",
"the",
"configuration",
"may",
"change",
"its",
"internal",
"state",
")"
] |
[
"default",
"object",
"get",
"property",
"(",
"string",
"key",
")",
"{",
"return",
"get",
"property",
"(",
"key",
",",
"null",
")",
";",
"}"
] |
[
"returns",
"true",
"if",
"this",
"range",
"only",
"represents",
"a",
"single",
"number"
] |
[
"public",
"boolean",
"is",
"single",
"(",
")",
"{",
"return",
"end",
"-",
"1",
"=",
"=",
"start",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"shape",
"type",
"'"
] |
[
"public",
"void",
"shape",
"type",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"shape",
"type",
"}"
] |
[
"find",
"the",
"requested",
"number",
"of",
"available",
"udp",
"ports",
",",
"each",
"randomly",
"selected",
"from",
"the",
"range",
"[",
"{",
"@",
"value",
"#",
"port",
"range",
"min",
"}",
",",
"{",
"@",
"value",
"#",
"port",
"range",
"max",
"}",
"]"
] |
[
"public",
"static",
"sorted",
"set",
"<",
"integer",
">",
"find",
"available",
"udp",
"ports",
"(",
"int",
"num",
"requested",
")",
"{",
"return",
"find",
"available",
"udp",
"ports",
"(",
"num",
"requested",
",",
"port",
"range",
"min",
",",
"port",
"range",
"max",
")",
";",
"}"
] |
[
"process",
"a",
"get",
"request",
"for",
"the",
"specified",
"resource"
] |
[
"public",
"void",
"do",
"get",
"(",
"http",
"servlet",
"request",
"request",
",",
"http",
"servlet",
"response",
"response",
")",
"{",
"try",
"{",
"if",
"(",
"!",
"is",
"instrumentation",
"access",
"allowed",
"(",
"request",
",",
"response",
")",
")",
"{",
"return",
";",
"}",
"json",
"generator",
"jg",
"=",
"null",
";",
"print",
"writer",
"writer",
"=",
"null",
";",
"try",
"{",
"writer",
"=",
"response",
"get",
"writer",
"(",
")",
";",
"response",
"set",
"content",
"type",
"(",
"\"",
"application",
"/",
"json",
";",
"charset",
"=",
"utf",
"8",
"\"",
")",
";",
"response",
"set",
"header",
"(",
"access",
"control",
"allow",
"methods",
",",
"\"",
"get",
"\"",
")",
";",
"response",
"set",
"header",
"(",
"access",
"control",
"allow",
"origin",
",",
"\"",
"*",
"\"",
")",
";",
"jg",
"=",
"json",
"factory",
"create",
"generator",
"(",
"writer",
")",
";",
"jg",
"disable",
"(",
"json",
"generator",
"feature",
"auto",
"close",
"target",
")",
";",
"jg",
"use",
"default",
"pretty",
"printer",
"(",
")",
";",
"jg",
"write",
"start",
"object",
"(",
")",
";",
"/",
"/",
"query",
"per",
"mbean",
"attribute",
"string",
"getmethod",
"=",
"request",
"get",
"parameter",
"(",
"\"",
"get",
"\"",
")",
";",
"if",
"(",
"getmethod",
"!",
"=",
"null",
")",
"{",
"string",
"[",
"]",
"split",
"strings",
"=",
"getmethod",
"split",
"(",
"\"",
"\\",
"\\",
":",
"\\",
"\\",
":",
"\"",
")",
";",
"if",
"(",
"split",
"strings",
"length",
"!",
"=",
"2",
")",
"{",
"jg",
"write",
"string",
"field",
"(",
"\"",
"result",
"\"",
",",
"\"",
"error",
"\"",
")",
";",
"jg",
"write",
"string",
"field",
"(",
"\"",
"message",
"\"",
",",
"\"",
"query",
"format",
"is",
"not",
"as",
"expected",
"\"",
")",
";",
"jg",
"flush",
"(",
")",
";",
"response",
"set",
"status",
"(",
"http",
"servlet",
"response",
"sc",
"bad",
"request",
")",
";",
"return",
";",
"}",
"list",
"beans",
"(",
"jg",
",",
"new",
"object",
"name",
"(",
"split",
"strings",
"[",
"0",
"]",
")",
",",
"split",
"strings",
"[",
"1",
"]",
",",
"response",
")",
";",
"return",
";",
"}",
"/",
"/",
"query",
"per",
"mbean",
"string",
"qry",
"=",
"request",
"get",
"parameter",
"(",
"\"",
"qry",
"\"",
")",
";",
"if",
"(",
"qry",
"=",
"=",
"null",
")",
"{",
"qry",
"=",
"\"",
"*",
":",
"*",
"\"",
";",
"}",
"list",
"beans",
"(",
"jg",
",",
"new",
"object",
"name",
"(",
"qry",
")",
",",
"null",
",",
"response",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"jg",
"!",
"=",
"null",
")",
"{",
"jg",
"close",
"(",
")",
";",
"}",
"if",
"(",
"writer",
"!",
"=",
"null",
")",
"{",
"writer",
"close",
"(",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"log",
"error",
"(",
"\"",
"caught",
"an",
"exception",
"while",
"processing",
"jmx",
"request",
"\"",
",",
"e",
")",
";",
"response",
"set",
"status",
"(",
"http",
"servlet",
"response",
"sc",
"internal",
"server",
"error",
")",
";",
"}",
"catch",
"(",
"malformed",
"object",
"name",
"exception",
"e",
")",
"{",
"log",
"error",
"(",
"\"",
"caught",
"an",
"exception",
"while",
"processing",
"jmx",
"request",
"\"",
",",
"e",
")",
";",
"response",
"set",
"status",
"(",
"http",
"servlet",
"response",
"sc",
"bad",
"request",
")",
";",
"}",
"}"
] |
[
"namespaces",
"defined",
"on",
"this",
"element",
"<",
"code",
">",
"repeated",
"aapt",
"pb",
"xml",
"namespace",
"namespace",
"declaration",
"=",
"1",
";",
"<",
"code",
">"
] |
[
"public",
"builder",
"add",
"all",
"namespace",
"declaration",
"(",
"java",
"lang",
"iterable",
"<",
"?",
"extends",
"com",
"android",
"aapt",
"resources",
"xml",
"namespace",
">",
"values",
")",
"{",
"copy",
"on",
"write",
"(",
")",
";",
"instance",
"add",
"all",
"namespace",
"declaration",
"(",
"values",
")",
";",
"return",
"this",
";",
"}"
] |
[
"for",
"debugging",
"and",
"testing"
] |
[
"public",
"static",
"void",
"main",
"(",
"string",
"[",
"]",
"args",
")",
"throws",
"exception",
"{",
"int",
"count",
"=",
"1024",
"*",
"1024",
";",
"int",
"megabytes",
"=",
"1",
";",
"int",
"factor",
"=",
"10",
";",
"boolean",
"create",
"=",
"true",
";",
"boolean",
"rwonly",
"=",
"false",
";",
"boolean",
"check",
"=",
"false",
";",
"boolean",
"fast",
"=",
"false",
";",
"boolean",
"merge",
"=",
"false",
";",
"string",
"compress",
"type",
"=",
"\"",
"none",
"\"",
";",
"string",
"compression",
"codec",
"=",
"\"",
"org",
"apache",
"hadoop",
"io",
"compress",
"default",
"codec",
"\"",
";",
"path",
"file",
"=",
"null",
";",
"int",
"seed",
"=",
"new",
"random",
"(",
")",
"next",
"int",
"(",
")",
";",
"string",
"usage",
"=",
"\"",
"usage",
":",
"testsequencefile",
"\"",
"+",
"\"",
"[",
"-",
"count",
"n",
"]",
"\"",
"+",
"\"",
"[",
"-",
"seed",
"#",
"]",
"[",
"-",
"check",
"]",
"[",
"-",
"compress",
"type",
"<",
"none",
"|",
"record",
"|",
"block",
">",
"]",
"\"",
"+",
"\"",
"-",
"codec",
"<",
"compression",
"codec",
">",
"\"",
"+",
"\"",
"[",
"[",
"-",
"rwonly",
"]",
"|",
"{",
"[",
"-",
"megabytes",
"m",
"]",
"[",
"-",
"factor",
"f",
"]",
"[",
"-",
"nocreate",
"]",
"[",
"-",
"fast",
"]",
"[",
"-",
"merge",
"]",
"}",
"]",
"\"",
"+",
"\"",
"file",
"\"",
";",
"if",
"(",
"args",
"length",
"=",
"=",
"0",
")",
"{",
"system",
"err",
"println",
"(",
"usage",
")",
";",
"system",
"exit",
"(",
"-",
"1",
")",
";",
"}",
"file",
"system",
"fs",
"=",
"null",
";",
"try",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
"length",
";",
"+",
"+",
"i",
")",
"{",
"/",
"/",
"parse",
"command",
"line",
"if",
"(",
"args",
"[",
"i",
"]",
"=",
"=",
"null",
")",
"{",
"continue",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"count",
"\"",
")",
")",
"{",
"count",
"=",
"integer",
"parse",
"int",
"(",
"args",
"[",
"+",
"+",
"i",
"]",
")",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"megabytes",
"\"",
")",
")",
"{",
"megabytes",
"=",
"integer",
"parse",
"int",
"(",
"args",
"[",
"+",
"+",
"i",
"]",
")",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"factor",
"\"",
")",
")",
"{",
"factor",
"=",
"integer",
"parse",
"int",
"(",
"args",
"[",
"+",
"+",
"i",
"]",
")",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"seed",
"\"",
")",
")",
"{",
"seed",
"=",
"integer",
"parse",
"int",
"(",
"args",
"[",
"+",
"+",
"i",
"]",
")",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"rwonly",
"\"",
")",
")",
"{",
"rwonly",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"nocreate",
"\"",
")",
")",
"{",
"create",
"=",
"false",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"check",
"\"",
")",
")",
"{",
"check",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"fast",
"\"",
")",
")",
"{",
"fast",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"merge",
"\"",
")",
")",
"{",
"merge",
"=",
"true",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"compress",
"type",
"\"",
")",
")",
"{",
"compress",
"type",
"=",
"args",
"[",
"+",
"+",
"i",
"]",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"i",
"]",
"equals",
"(",
"\"",
"-",
"codec",
"\"",
")",
")",
"{",
"compression",
"codec",
"=",
"args",
"[",
"+",
"+",
"i",
"]",
";",
"}",
"else",
"{",
"/",
"/",
"file",
"is",
"required",
"parameter",
"file",
"=",
"new",
"path",
"(",
"args",
"[",
"i",
"]",
")",
";",
"}",
"}",
"test",
"sequence",
"file",
"test",
"=",
"new",
"test",
"sequence",
"file",
"(",
")",
";",
"fs",
"=",
"file",
"get",
"file",
"system",
"(",
"test",
"conf",
")",
";",
"log",
"info",
"(",
"\"",
"count",
"=",
"\"",
"+",
"count",
")",
";",
"log",
"info",
"(",
"\"",
"megabytes",
"=",
"\"",
"+",
"megabytes",
")",
";",
"log",
"info",
"(",
"\"",
"factor",
"=",
"\"",
"+",
"factor",
")",
";",
"log",
"info",
"(",
"\"",
"create",
"=",
"\"",
"+",
"create",
")",
";",
"log",
"info",
"(",
"\"",
"seed",
"=",
"\"",
"+",
"seed",
")",
";",
"log",
"info",
"(",
"\"",
"rwonly",
"=",
"\"",
"+",
"rwonly",
")",
";",
"log",
"info",
"(",
"\"",
"check",
"=",
"\"",
"+",
"check",
")",
";",
"log",
"info",
"(",
"\"",
"fast",
"=",
"\"",
"+",
"fast",
")",
";",
"log",
"info",
"(",
"\"",
"merge",
"=",
"\"",
"+",
"merge",
")",
";",
"log",
"info",
"(",
"\"",
"compress",
"type",
"=",
"\"",
"+",
"compress",
"type",
")",
";",
"log",
"info",
"(",
"\"",
"compression",
"codec",
"=",
"\"",
"+",
"compression",
"codec",
")",
";",
"log",
"info",
"(",
"\"",
"file",
"=",
"\"",
"+",
"file",
")",
";",
"if",
"(",
"rwonly",
"&",
"&",
"(",
"!",
"create",
"|",
"|",
"merge",
"|",
"|",
"fast",
")",
")",
"{",
"system",
"err",
"println",
"(",
"usage",
")",
";",
"system",
"exit",
"(",
"-",
"1",
")",
";",
"}",
"compression",
"type",
"compression",
"type",
"=",
"compression",
"type",
"value",
"of",
"(",
"compress",
"type",
")",
";",
"compression",
"codec",
"codec",
"=",
"(",
"compression",
"codec",
")",
"reflection",
"utils",
"new",
"instance",
"(",
"test",
"conf",
"get",
"class",
"by",
"name",
"(",
"compression",
"codec",
")",
",",
"test",
"conf",
")",
";",
"if",
"(",
"rwonly",
"|",
"|",
"(",
"create",
"&",
"&",
"!",
"merge",
")",
")",
"{",
"test",
"write",
"test",
"(",
"fs",
",",
"count",
",",
"seed",
",",
"file",
",",
"compression",
"type",
",",
"codec",
")",
";",
"test",
"read",
"test",
"(",
"fs",
",",
"count",
",",
"seed",
",",
"file",
")",
";",
"}",
"if",
"(",
"!",
"rwonly",
")",
"{",
"if",
"(",
"merge",
")",
"{",
"test",
"merge",
"test",
"(",
"fs",
",",
"count",
",",
"seed",
",",
"file",
",",
"compression",
"type",
",",
"fast",
",",
"factor",
",",
"megabytes",
")",
";",
"}",
"else",
"{",
"test",
"sort",
"test",
"(",
"fs",
",",
"count",
",",
"megabytes",
",",
"factor",
",",
"fast",
",",
"file",
")",
";",
"}",
"}",
"if",
"(",
"check",
")",
"{",
"test",
"check",
"sort",
"(",
"fs",
",",
"count",
",",
"seed",
",",
"file",
")",
";",
"}",
"}",
"finally",
"{",
"if",
"(",
"fs",
"!",
"=",
"null",
")",
"{",
"fs",
"close",
"(",
")",
";",
"}",
"}",
"}"
] |
[
"returns",
"an",
"artifact",
"that",
"represents",
"a",
"tree",
"artifact",
";",
"that",
"is",
",",
"a",
"directory",
"containing",
"some",
"tree",
"of",
"artifact",
"files",
"unknown",
"at",
"analysis",
"time",
"the",
"root",
"must",
"be",
"below",
"the",
"exec",
"root",
"parent",
",",
"and",
"the",
"exec",
"path",
"of",
"the",
"resulting",
"artifact",
"is",
"computed",
"as",
"{",
"@",
"code",
"root",
"get",
"relative",
"(",
"root",
"relative",
"path",
")",
"relative",
"to",
"(",
"root",
"exec",
"root",
")",
"}"
] |
[
"public",
"artifact",
"special",
"artifact",
"get",
"tree",
"artifact",
"(",
"path",
"fragment",
"root",
"relative",
"path",
",",
"artifact",
"root",
"root",
",",
"artifact",
"owner",
"owner",
")",
"{",
"validate",
"path",
"(",
"root",
"relative",
"path",
",",
"root",
")",
";",
"return",
"(",
"artifact",
"special",
"artifact",
")",
"get",
"artifact",
"(",
"root",
",",
"root",
"get",
"exec",
"path",
"(",
")",
"get",
"relative",
"(",
"root",
"relative",
"path",
")",
",",
"owner",
",",
"special",
"artifact",
"type",
"tree",
",",
"/",
"*",
"content",
"based",
"path",
"=",
"*",
"/",
"false",
")",
";",
"}"
] |
[
"configure",
"the",
"{",
"@",
"link",
"org",
"springframework",
"messaging",
"message",
"channel",
"}",
"used",
"for",
"outbound",
"messages",
"to",
"web",
"socket",
"clients",
"by",
"default",
"the",
"channel",
"is",
"backed",
"by",
"a",
"thread",
"pool",
"of",
"size",
"1",
"it",
"is",
"recommended",
"to",
"customize",
"thread",
"pool",
"settings",
"for",
"production",
"use"
] |
[
"default",
"void",
"configure",
"client",
"outbound",
"channel",
"(",
"channel",
"registration",
"registration",
")",
"{",
"}"
] |
[
"{",
"@",
"inherit",
"doc",
"}"
] |
[
"public",
"type",
"get",
"type",
"(",
"int",
"n",
")",
"{",
"int",
"idx",
"=",
"bytes",
"get",
"unsigned",
"short",
"(",
"n",
"*",
"2",
")",
";",
"return",
"(",
"(",
"cst",
"type",
")",
"pool",
"get",
"(",
"idx",
")",
")",
"get",
"class",
"type",
"(",
")",
";",
"}"
] |
[
"resets",
"the",
"bindreuse",
"counts"
] |
[
"public",
"void",
"reset",
"counts",
"(",
")",
";"
] |
[
"reads",
"one",
"flac",
"metadata",
"block",
"if",
"no",
"exception",
"is",
"thrown",
",",
"the",
"peek",
"position",
"of",
"{",
"@",
"code",
"input",
"}",
"is",
"aligned",
"with",
"the",
"read",
"position"
] |
[
"public",
"static",
"boolean",
"read",
"metadata",
"block",
"(",
"extractor",
"input",
"input",
",",
"flac",
"stream",
"metadata",
"holder",
"metadata",
"holder",
")",
"throws",
"i",
"o",
"exception",
"{",
"input",
"reset",
"peek",
"position",
"(",
")",
";",
"parsable",
"bit",
"array",
"scratch",
"=",
"new",
"parsable",
"bit",
"array",
"(",
"new",
"byte",
"[",
"4",
"]",
")",
";",
"input",
"peek",
"fully",
"(",
"scratch",
"data",
",",
"0",
",",
"flac",
"constants",
"metadata",
"block",
"header",
"size",
")",
";",
"boolean",
"is",
"last",
"metadata",
"block",
"=",
"scratch",
"read",
"bit",
"(",
")",
";",
"int",
"type",
"=",
"scratch",
"read",
"bits",
"(",
"7",
")",
";",
"int",
"length",
"=",
"flac",
"constants",
"metadata",
"block",
"header",
"size",
"+",
"scratch",
"read",
"bits",
"(",
"24",
")",
";",
"if",
"(",
"type",
"=",
"=",
"flac",
"constants",
"metadata",
"type",
"stream",
"info",
")",
"{",
"metadata",
"holder",
"flac",
"stream",
"metadata",
"=",
"read",
"stream",
"info",
"block",
"(",
"input",
")",
";",
"}",
"else",
"{",
"@",
"nullable",
"flac",
"stream",
"metadata",
"flac",
"stream",
"metadata",
"=",
"metadata",
"holder",
"flac",
"stream",
"metadata",
";",
"if",
"(",
"flac",
"stream",
"metadata",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
")",
";",
"}",
"if",
"(",
"type",
"=",
"=",
"flac",
"constants",
"metadata",
"type",
"seek",
"table",
")",
"{",
"flac",
"stream",
"metadata",
"seek",
"table",
"seek",
"table",
"=",
"read",
"seek",
"table",
"metadata",
"block",
"(",
"input",
",",
"length",
")",
";",
"metadata",
"holder",
"flac",
"stream",
"metadata",
"=",
"flac",
"stream",
"metadata",
"copy",
"with",
"seek",
"table",
"(",
"seek",
"table",
")",
";",
"}",
"else",
"if",
"(",
"type",
"=",
"=",
"flac",
"constants",
"metadata",
"type",
"vorbis",
"comment",
")",
"{",
"list",
"<",
"string",
">",
"vorbis",
"comments",
"=",
"read",
"vorbis",
"comment",
"metadata",
"block",
"(",
"input",
",",
"length",
")",
";",
"metadata",
"holder",
"flac",
"stream",
"metadata",
"=",
"flac",
"stream",
"metadata",
"copy",
"with",
"vorbis",
"comments",
"(",
"vorbis",
"comments",
")",
";",
"}",
"else",
"if",
"(",
"type",
"=",
"=",
"flac",
"constants",
"metadata",
"type",
"picture",
")",
"{",
"picture",
"frame",
"picture",
"frame",
"=",
"read",
"picture",
"metadata",
"block",
"(",
"input",
",",
"length",
")",
";",
"metadata",
"holder",
"flac",
"stream",
"metadata",
"=",
"flac",
"stream",
"metadata",
"copy",
"with",
"picture",
"frames",
"(",
"collections",
"singleton",
"list",
"(",
"picture",
"frame",
")",
")",
";",
"}",
"else",
"{",
"input",
"skip",
"fully",
"(",
"length",
")",
";",
"}",
"}",
"return",
"is",
"last",
"metadata",
"block",
";",
"}"
] |
[
"wait",
"for",
"the",
"state",
"store",
"to",
"initialize",
"its",
"driver"
] |
[
"public",
"static",
"void",
"wait",
"state",
"store",
"(",
"state",
"store",
"service",
"state",
"store",
",",
"long",
"timeout",
"ms",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
"{",
"long",
"starting",
"time",
"=",
"time",
"monotonic",
"now",
"(",
")",
";",
"while",
"(",
"!",
"state",
"store",
"is",
"driver",
"ready",
"(",
")",
")",
"{",
"thread",
"sleep",
"(",
"100",
")",
";",
"if",
"(",
"time",
"monotonic",
"now",
"(",
")",
"-",
"starting",
"time",
">",
"timeout",
"ms",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"timeout",
"waiting",
"for",
"state",
"store",
"to",
"connect",
"\"",
")",
";",
"}",
"}",
"}"
] |
[
"get",
"the",
"value",
"of",
"the",
"<",
"code",
">",
"name",
"<",
"code",
">",
"property",
"as",
"a",
"<",
"code",
">",
"class",
"<",
"code",
">",
"implementing",
"the",
"interface",
"specified",
"by",
"<",
"code",
">",
"xface",
"<",
"code",
">",
"if",
"no",
"such",
"property",
"is",
"specified",
",",
"then",
"<",
"code",
">",
"default",
"value",
"<",
"code",
">",
"is",
"returned",
"an",
"exception",
"is",
"thrown",
"if",
"the",
"returned",
"class",
"does",
"not",
"implement",
"the",
"named",
"interface"
] |
[
"public",
"<",
"u",
">",
"class",
"<",
"?",
"extends",
"u",
">",
"get",
"class",
"(",
"string",
"name",
",",
"class",
"<",
"?",
"extends",
"u",
">",
"default",
"value",
",",
"class",
"<",
"u",
">",
"xface",
")",
"{",
"try",
"{",
"class",
"<",
"?",
">",
"the",
"class",
"=",
"get",
"class",
"(",
"name",
",",
"default",
"value",
")",
";",
"if",
"(",
"the",
"class",
"!",
"=",
"null",
"&",
"&",
"!",
"xface",
"is",
"assignable",
"from",
"(",
"the",
"class",
")",
")",
"throw",
"new",
"runtime",
"exception",
"(",
"the",
"class",
"+",
"\"",
"not",
"\"",
"+",
"xface",
"get",
"name",
"(",
")",
")",
";",
"else",
"if",
"(",
"the",
"class",
"!",
"=",
"null",
")",
"return",
"the",
"class",
"as",
"subclass",
"(",
"xface",
")",
";",
"else",
"return",
"null",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"assert",
"that",
"the",
"authoritative",
"paths",
"from",
"a",
"source",
"list",
"are",
"that",
"expected"
] |
[
"private",
"void",
"assert",
"auth",
"paths",
"(",
"string",
"[",
"]",
"src",
",",
"string",
"expected",
")",
"{",
"configuration",
"conf",
"=",
"auth",
"paths",
"conf",
"(",
"src",
")",
";",
"list",
"<",
"string",
">",
"collect",
"=",
"arrays",
"stream",
"(",
"expected",
")",
"map",
"(",
"s",
"-",
">",
"base",
"+",
"s",
")",
"collect",
"(",
"collectors",
"to",
"list",
"(",
")",
")",
";",
"collection",
"<",
"string",
">",
"paths",
"=",
"get",
"authoritative",
"paths",
"(",
"conf",
")",
";",
"assert",
"that",
"(",
"paths",
")",
"contains",
"exactly",
"in",
"any",
"order",
"elements",
"of",
"(",
"collect",
")",
";",
"}"
] |
[
"returns",
"the",
"omf",
"globals"
] |
[
"public",
"list",
"<",
"o",
"m",
"f",
"global",
">",
"get",
"o",
"m",
"f",
"globals",
"(",
")",
"{",
"return",
"globals",
"list",
";",
"}"
] |
[
"there",
"are",
"certain",
"integrations",
"of",
"the",
"credential",
"provider",
"api",
"in",
"which",
"a",
"recursive",
"dependency",
"between",
"the",
"provider",
"and",
"the",
"hadoop",
"filesystem",
"abstraction",
"causes",
"a",
"problem",
"these",
"integration",
"points",
"need",
"to",
"leverage",
"this",
"utility",
"method",
"to",
"remove",
"problematic",
"provider",
"types",
"from",
"the",
"existing",
"provider",
"path",
"within",
"the",
"configuration"
] |
[
"public",
"static",
"configuration",
"exclude",
"incompatible",
"credential",
"providers",
"(",
"configuration",
"config",
",",
"class",
"<",
"?",
"extends",
"file",
"system",
">",
"file",
"system",
"class",
")",
"throws",
"i",
"o",
"exception",
"{",
"string",
"provider",
"path",
"=",
"config",
"get",
"(",
"credential",
"provider",
"factory",
"credential",
"provider",
"path",
")",
";",
"if",
"(",
"provider",
"path",
"=",
"=",
"null",
")",
"{",
"return",
"config",
";",
"}",
"string",
"buffer",
"new",
"provider",
"path",
"=",
"new",
"string",
"buffer",
"(",
")",
";",
"string",
"[",
"]",
"providers",
"=",
"provider",
"path",
"split",
"(",
"\"",
",",
"\"",
")",
";",
"path",
"path",
"=",
"null",
";",
"for",
"(",
"string",
"provider",
":",
"providers",
")",
"{",
"try",
"{",
"path",
"=",
"unnest",
"uri",
"(",
"new",
"uri",
"(",
"provider",
")",
")",
";",
"class",
"<",
"?",
"extends",
"file",
"system",
">",
"clazz",
"=",
"null",
";",
"try",
"{",
"string",
"scheme",
"=",
"path",
"to",
"uri",
"(",
")",
"get",
"scheme",
"(",
")",
";",
"clazz",
"=",
"file",
"system",
"get",
"file",
"system",
"class",
"(",
"scheme",
",",
"config",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ioe",
")",
"{",
"/",
"/",
"not",
"all",
"providers",
"are",
"filesystem",
"based",
"/",
"/",
"for",
"instance",
"user",
":",
"/",
"/",
"/",
"will",
"not",
"be",
"able",
"to",
"/",
"/",
"have",
"a",
"filesystem",
"class",
"associated",
"with",
"it",
"if",
"(",
"new",
"provider",
"path",
"length",
"(",
")",
">",
"0",
")",
"{",
"new",
"provider",
"path",
"append",
"(",
"\"",
",",
"\"",
")",
";",
"}",
"new",
"provider",
"path",
"append",
"(",
"provider",
")",
";",
"}",
"if",
"(",
"clazz",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"file",
"system",
"class",
"is",
"assignable",
"from",
"(",
"clazz",
")",
")",
"{",
"log",
"debug",
"(",
"\"",
"filesystem",
"based",
"provider",
"excluded",
"from",
"provider",
"\"",
"+",
"\"",
"path",
"due",
"to",
"recursive",
"dependency",
":",
"{",
"}",
"\"",
",",
"provider",
")",
";",
"}",
"else",
"{",
"if",
"(",
"new",
"provider",
"path",
"length",
"(",
")",
">",
"0",
")",
"{",
"new",
"provider",
"path",
"append",
"(",
"\"",
",",
"\"",
")",
";",
"}",
"new",
"provider",
"path",
"append",
"(",
"provider",
")",
";",
"}",
"}",
"}",
"catch",
"(",
"u",
"r",
"i",
"syntax",
"exception",
"e",
")",
"{",
"log",
"warn",
"(",
"\"",
"credential",
"provider",
"uri",
"is",
"invalid",
"\"",
"+",
"provider",
")",
";",
"}",
"}",
"string",
"effective",
"path",
"=",
"new",
"provider",
"path",
"to",
"string",
"(",
")",
";",
"if",
"(",
"effective",
"path",
"equals",
"(",
"provider",
"path",
")",
")",
"{",
"return",
"config",
";",
"}",
"configuration",
"conf",
"=",
"new",
"configuration",
"(",
"config",
")",
";",
"if",
"(",
"effective",
"path",
"equals",
"(",
"\"",
"\"",
")",
")",
"{",
"conf",
"unset",
"(",
"credential",
"provider",
"factory",
"credential",
"provider",
"path",
")",
";",
"}",
"else",
"{",
"conf",
"set",
"(",
"credential",
"provider",
"factory",
"credential",
"provider",
"path",
",",
"effective",
"path",
")",
";",
"}",
"return",
"conf",
";",
"}"
] |
[
"the",
"process",
"instance",
"id",
"associated",
"with",
"this",
"identity",
"link"
] |
[
"string",
"get",
"process",
"instance",
"id",
"(",
")",
";"
] |
[
"checks",
"the",
"number",
"of",
"dateline",
"intersections",
"detected",
"for",
"a",
"component",
"if",
"there",
"is",
"only",
"one",
",",
"it",
"clears",
"it",
"as",
"it",
"means",
"that",
"the",
"component",
"just",
"touches",
"the",
"dateline"
] |
[
"private",
"static",
"boolean",
"clear",
"component",
"touching",
"dateline",
"(",
"edge",
"[",
"]",
"edges",
",",
"int",
"component",
")",
"{",
"edge",
"intersection",
"=",
"null",
";",
"for",
"(",
"edge",
"edge",
":",
"edges",
")",
"{",
"if",
"(",
"edge",
"intersect",
"!",
"=",
"edge",
"max",
"coordinate",
"&",
"&",
"edge",
"component",
"=",
"=",
"component",
")",
"{",
"if",
"(",
"intersection",
"=",
"=",
"null",
")",
"{",
"intersection",
"=",
"edge",
";",
"}",
"else",
"{",
"return",
"false",
";",
"}",
"}",
"}",
"if",
"(",
"intersection",
"!",
"=",
"null",
")",
"{",
"intersection",
"intersect",
"=",
"edge",
"max",
"coordinate",
";",
"}",
"return",
"intersection",
"!",
"=",
"null",
";",
"}"
] |
[
"finds",
"pets",
"by",
"status",
"multiple",
"status",
"values",
"can",
"be",
"provided",
"with",
"comma",
"separated",
"strings",
"this",
"tests",
"the",
"overload",
"of",
"the",
"method",
"that",
"uses",
"a",
"map",
"for",
"query",
"parameters",
"instead",
"of",
"listing",
"them",
"out",
"individually"
] |
[
"public",
"void",
"find",
"pets",
"by",
"status",
"test",
"query",
"map",
"(",
")",
"{",
"pet",
"api",
"find",
"pets",
"by",
"status",
"query",
"params",
"query",
"params",
"=",
"new",
"pet",
"api",
"find",
"pets",
"by",
"status",
"query",
"params",
"(",
")",
"status",
"(",
"null",
")",
";",
"/",
"/",
"list",
"<",
"pet",
">",
"response",
"=",
"api",
"find",
"pets",
"by",
"status",
"(",
"query",
"params",
")",
";",
"/",
"/",
"todo",
":",
"test",
"validations",
"}"
] |
[
"adds",
"10",
"lines",
"of",
"source",
"to",
"each",
"syntax",
"error",
"very",
"useful",
"for",
"debugging"
] |
[
"private",
"list",
"<",
"string",
">",
"get",
"output",
"with",
"source",
"context",
"(",
"path",
"aapt",
",",
"list",
"<",
"string",
">",
"lines",
")",
"throws",
"i",
"o",
"exception",
"{",
"list",
"<",
"string",
">",
"output",
"with",
"source",
"context",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"string",
"line",
":",
"lines",
")",
"{",
"if",
"(",
"line",
"contains",
"(",
"\"",
"duplicate",
"file",
"\"",
")",
"|",
"|",
"line",
"contains",
"(",
"\"",
"original",
"\"",
")",
")",
"{",
"string",
"[",
"]",
"parts",
"=",
"line",
"split",
"(",
"\"",
":",
"\"",
")",
";",
"string",
"file",
"name",
"=",
"parts",
"[",
"0",
"]",
"trim",
"(",
")",
";",
"output",
"with",
"source",
"context",
"add",
"(",
"\"",
"\\",
"n",
"\"",
"+",
"file",
"name",
"+",
"\"",
":",
"\\",
"n",
"\\",
"t",
"\"",
")",
";",
"output",
"with",
"source",
"context",
"add",
"(",
"joiner",
"on",
"(",
"\"",
"\\",
"n",
"\\",
"t",
"\"",
")",
"join",
"(",
"files",
"read",
"all",
"lines",
"(",
"aapt",
"get",
"file",
"system",
"(",
")",
"get",
"path",
"(",
"file",
"name",
")",
",",
"standard",
"charsets",
"utf",
"8",
")",
")",
")",
";",
"}",
"else",
"if",
"(",
"line",
"contains",
"(",
"\"",
"error",
"\"",
")",
")",
"{",
"string",
"[",
"]",
"parts",
"=",
"line",
"split",
"(",
"\"",
":",
"\"",
")",
";",
"string",
"file",
"name",
"=",
"parts",
"[",
"0",
"]",
"trim",
"(",
")",
";",
"try",
"{",
"int",
"line",
"number",
"=",
"integer",
"value",
"of",
"(",
"parts",
"[",
"1",
"]",
"trim",
"(",
")",
")",
";",
"string",
"builder",
"expanded",
"error",
"=",
"new",
"string",
"builder",
"(",
"\"",
"\\",
"n",
"error",
"at",
"\"",
"+",
"line",
"number",
"+",
"\"",
":",
"\"",
"+",
"line",
")",
";",
"list",
"<",
"string",
">",
"error",
"source",
"=",
"files",
"read",
"all",
"lines",
"(",
"aapt",
"get",
"file",
"system",
"(",
")",
"get",
"path",
"(",
"file",
"name",
")",
",",
"standard",
"charsets",
"utf",
"8",
")",
";",
"for",
"(",
"int",
"i",
"=",
"math",
"max",
"(",
"line",
"number",
"-",
"5",
",",
"0",
")",
";",
"i",
"<",
"math",
"min",
"(",
"line",
"number",
"+",
"5",
",",
"error",
"source",
"size",
"(",
")",
")",
";",
"i",
"+",
"+",
")",
"{",
"expanded",
"error",
"append",
"(",
"\"",
"\\",
"n",
"\"",
")",
"append",
"(",
"i",
")",
"append",
"(",
"\"",
"\\",
"t",
":",
"\"",
")",
"append",
"(",
"error",
"source",
"get",
"(",
"i",
")",
")",
";",
"}",
"output",
"with",
"source",
"context",
"add",
"(",
"expanded",
"error",
"to",
"string",
"(",
")",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"|",
"number",
"format",
"exception",
"format",
"error",
")",
"{",
"output",
"with",
"source",
"context",
"add",
"(",
"\"",
"error",
"parsing",
"line",
"\"",
"+",
"line",
")",
";",
"std",
"logger",
"error",
"(",
"format",
"error",
",",
"\"",
"error",
"during",
"reading",
"source",
"%",
"s",
"\"",
",",
"file",
"name",
")",
";",
"}",
"}",
"else",
"{",
"output",
"with",
"source",
"context",
"add",
"(",
"line",
")",
";",
"}",
"}",
"return",
"output",
"with",
"source",
"context",
";",
"}"
] |
[
"<",
"code",
">",
"optional",
"aapt",
"pb",
"raw",
"string",
"raw",
"str",
"=",
"3",
";",
"<",
"code",
">"
] |
[
"public",
"builder",
"clear",
"raw",
"str",
"(",
")",
"{",
"copy",
"on",
"write",
"(",
")",
";",
"instance",
"clear",
"raw",
"str",
"(",
")",
";",
"return",
"this",
";",
"}"
] |
[
"scenario",
":",
"an",
"image",
"changes",
"priority",
"and",
"then",
"fails",
"we",
"expect",
"it",
"to",
"be",
"re",
"-",
"queued",
"in",
"the",
"new",
"priority",
"queue"
] |
[
"public",
"void",
"test",
"infinite",
"retries",
"change",
"pri",
"then",
"fail",
"(",
")",
"{",
"recording",
"network",
"fetcher",
"recording",
"network",
"fetcher",
"=",
"new",
"recording",
"network",
"fetcher",
"(",
")",
";",
"/",
"/",
"max",
"hi",
"-",
"pri",
":",
"1",
",",
"max",
"low",
"-",
"pri",
":",
"0",
"priority",
"network",
"fetcher",
"<",
"fetch",
"state",
">",
"fetcher",
"=",
"new",
"priority",
"network",
"fetcher",
"<",
">",
"(",
"recording",
"network",
"fetcher",
",",
"false",
",",
"1",
",",
"0",
",",
"true",
",",
"true",
")",
";",
"priority",
"fetch",
"state",
"<",
"fetch",
"state",
">",
"hipri",
"1",
"=",
"fetch",
"(",
"fetcher",
",",
"\"",
"hipri",
"1",
"\"",
",",
"callback",
",",
"true",
")",
";",
"priority",
"fetch",
"state",
"<",
"fetch",
"state",
">",
"hipri",
"2",
"=",
"fetch",
"(",
"fetcher",
",",
"\"",
"hipri",
"2",
"\"",
",",
"callback",
",",
"true",
")",
";",
"assert",
"that",
"(",
"fetcher",
"get",
"currently",
"fetching",
"(",
")",
")",
"contains",
"exactly",
"(",
"hipri",
"1",
")",
";",
"assert",
"that",
"(",
"fetcher",
"get",
"hi",
"pri",
"queue",
"(",
")",
")",
"contains",
"exactly",
"(",
"hipri",
"2",
")",
";",
"assert",
"that",
"(",
"fetcher",
"get",
"low",
"pri",
"queue",
"(",
")",
")",
"is",
"empty",
"(",
")",
";",
"(",
"(",
"settable",
"producer",
"context",
")",
"hipri",
"1",
"get",
"context",
"(",
")",
")",
"set",
"priority",
"(",
"low",
")",
";",
"/",
"/",
"simulate",
"a",
"failure",
"in",
"hipri",
"1",
"get",
"only",
"element",
"(",
"recording",
"network",
"fetcher",
"callbacks",
"get",
"(",
"hipri",
"1",
"delegated",
"state",
")",
")",
"on",
"failure",
"(",
"new",
"exception",
"(",
")",
")",
";",
"assert",
"that",
"(",
"fetcher",
"get",
"currently",
"fetching",
"(",
")",
")",
"contains",
"exactly",
"(",
"hipri",
"2",
")",
";",
"assert",
"that",
"(",
"fetcher",
"get",
"hi",
"pri",
"queue",
"(",
")",
")",
"is",
"empty",
"(",
")",
";",
"assert",
"that",
"(",
"fetcher",
"get",
"low",
"pri",
"queue",
"(",
")",
")",
"contains",
"exactly",
"(",
"hipri",
"1",
")",
";",
"assert",
"that",
"(",
"hipri",
"1",
"requeue",
"count",
")",
"is",
"equal",
"to",
"(",
"1",
")",
";",
"}"
] |
[
"convenience",
"method",
"to",
"create",
"a",
"model",
"with",
"a",
"single",
"node",
"containing",
"a",
"sphere",
"shape",
"the",
"resources",
"the",
"material",
"might",
"contain",
"are",
"not",
"managed",
",",
"use",
"{",
"@",
"link",
"model",
"#",
"manage",
"disposable",
"(",
"disposable",
")",
"}",
"to",
"add",
"those",
"to",
"the",
"model"
] |
[
"public",
"model",
"create",
"sphere",
"(",
"float",
"width",
",",
"float",
"height",
",",
"float",
"depth",
",",
"int",
"divisions",
"u",
",",
"int",
"divisions",
"v",
",",
"int",
"primitive",
"type",
",",
"final",
"material",
"material",
",",
"final",
"long",
"attributes",
")",
"{",
"return",
"create",
"sphere",
"(",
"width",
",",
"height",
",",
"depth",
",",
"divisions",
"u",
",",
"divisions",
"v",
",",
"primitive",
"type",
",",
"material",
",",
"attributes",
",",
"0",
",",
"360",
",",
"0",
",",
"180",
")",
";",
"}"
] |
[
"added",
"in",
"api",
"level",
"23"
] |
[
"public",
"void",
"on",
"attach",
"(",
"@",
"non",
"null",
"context",
"context",
")",
"{",
"super",
"on",
"attach",
"(",
"context",
")",
";",
"/",
"/",
"bug",
":",
"in",
"api",
"<",
"23",
"this",
"is",
"never",
"called",
"/",
"/",
"so",
"m",
"activity",
"=",
"null",
"/",
"/",
"so",
"app",
"crashes",
"with",
"null",
"-",
"pointer",
"exception",
"m",
"context",
"=",
"context",
";",
"}"
] |
[
"create",
"a",
"deep",
"copy",
"of",
"\"",
"this",
"\"",
"instance"
] |
[
"public",
"table",
"stats",
"copy",
"(",
")",
"{",
"table",
"stats",
"copy",
"=",
"new",
"table",
"stats",
"(",
"this",
"row",
"count",
")",
";",
"for",
"(",
"map",
"entry",
"<",
"string",
",",
"column",
"stats",
">",
"entry",
":",
"this",
"col",
"stats",
"entry",
"set",
"(",
")",
")",
"{",
"copy",
"col",
"stats",
"put",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
"copy",
"(",
")",
")",
";",
"}",
"return",
"copy",
";",
"}"
] |
[
"get",
"name",
"wrapped",
"array"
] |
[
"public",
"list",
"<",
"integer",
">",
"get",
"name",
"wrapped",
"array",
"(",
")",
"{",
"return",
"name",
"wrapped",
"array",
";",
"}"
] |
[
"returns",
"cache",
"for",
"child",
"objects",
"creates",
"cache",
"i",
"it",
"doesn",
"'",
"t",
"exists"
] |
[
"public",
"d",
"b",
"s",
"object",
"cache",
"<",
"object",
",",
"child",
">",
"get",
"children",
"cache",
"(",
"final",
"object",
"for",
"object",
")",
"{",
"synchronized",
"(",
"children",
"cache",
")",
"{",
"simple",
"object",
"cache",
"<",
"object",
",",
"child",
">",
"nested",
"cache",
"=",
"children",
"cache",
"get",
"(",
"for",
"object",
")",
";",
"if",
"(",
"nested",
"cache",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"create",
"new",
"empty",
"children",
"cache",
"/",
"/",
"this",
"may",
"happen",
"only",
"when",
"invoked",
"for",
"newly",
"created",
"object",
"(",
"e",
"g",
"when",
"we",
"create",
"new",
"column",
"/",
"/",
"in",
"a",
"new",
"created",
"table",
")",
"nested",
"cache",
"=",
"new",
"simple",
"object",
"cache",
"<",
">",
"(",
")",
";",
"nested",
"cache",
"set",
"cache",
"(",
"new",
"array",
"list",
"<",
">",
"(",
")",
")",
";",
"children",
"cache",
"put",
"(",
"for",
"object",
",",
"nested",
"cache",
")",
";",
"}",
"return",
"nested",
"cache",
";",
"}",
"}"
] |
[
"start",
"the",
"index",
"lifecycle",
"management",
"feature",
"see",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchclientjava",
"-",
"restcurrent",
"java",
"-",
"rest",
"-",
"high",
"-",
"ilm",
"-",
"ilm",
"-",
"start",
"-",
"ilm",
"html",
"for",
"more"
] |
[
"public",
"acknowledged",
"response",
"start",
"i",
"l",
"m",
"(",
"start",
"i",
"l",
"m",
"request",
"request",
",",
"request",
"options",
"options",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"rest",
"high",
"level",
"client",
"perform",
"request",
"and",
"parse",
"entity",
"(",
"request",
",",
"index",
"lifecycle",
"request",
"converters",
":",
":",
"start",
"i",
"l",
"m",
",",
"options",
",",
"acknowledged",
"response",
":",
":",
"from",
"x",
"content",
",",
"empty",
"set",
"(",
")",
")",
";",
"}"
] |
[
"sets",
"the",
"name",
"on",
"the",
"vertex"
] |
[
"public",
"void",
"set",
"name",
"(",
"string",
"name",
")",
"{",
"set",
"attribute",
"(",
"\"",
"name",
"\"",
",",
"name",
")",
";",
"}"
] |
[
"reverse",
"the",
"jsonml",
"transformation",
",",
"making",
"an",
"xml",
"text",
"from",
"a",
"j",
"s",
"o",
"n",
"object",
"the",
"j",
"s",
"o",
"n",
"object",
"must",
"contain",
"a",
"\"",
"tag",
"name",
"\"",
"property",
"if",
"it",
"has",
"children",
",",
"then",
"it",
"must",
"have",
"a",
"\"",
"child",
"nodes",
"\"",
"property",
"containing",
"an",
"array",
"of",
"objects",
"the",
"other",
"properties",
"are",
"attributes",
"with",
"string",
"values"
] |
[
"public",
"static",
"string",
"to",
"string",
"(",
"j",
"s",
"o",
"n",
"object",
"jo",
")",
"throws",
"j",
"s",
"o",
"n",
"exception",
"{",
"string",
"builder",
"sb",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"object",
"e",
";",
"int",
"i",
";",
"j",
"s",
"o",
"n",
"array",
"ja",
";",
"string",
"k",
";",
"iterator",
"keys",
";",
"int",
"len",
";",
"string",
"tag",
"name",
";",
"string",
"v",
";",
"/",
"/",
"emit",
"<",
"tag",
"name",
"tag",
"name",
"=",
"jo",
"opt",
"string",
"(",
"\"",
"tag",
"name",
"\"",
")",
";",
"if",
"(",
"tag",
"name",
"=",
"=",
"null",
")",
"{",
"return",
"xml",
"escape",
"(",
"jo",
"to",
"string",
"(",
")",
")",
";",
"}",
"xml",
"no",
"space",
"(",
"tag",
"name",
")",
";",
"tag",
"name",
"=",
"xml",
"escape",
"(",
"tag",
"name",
")",
";",
"sb",
"append",
"(",
"'",
"<",
"'",
")",
";",
"sb",
"append",
"(",
"tag",
"name",
")",
";",
"/",
"/",
"emit",
"the",
"attributes",
"keys",
"=",
"jo",
"keys",
"(",
")",
";",
"while",
"(",
"keys",
"has",
"next",
"(",
")",
")",
"{",
"k",
"=",
"keys",
"next",
"(",
")",
"to",
"string",
"(",
")",
";",
"if",
"(",
"!",
"k",
"equals",
"(",
"\"",
"tag",
"name",
"\"",
")",
"&",
"&",
"!",
"k",
"equals",
"(",
"\"",
"child",
"nodes",
"\"",
")",
")",
"{",
"xml",
"no",
"space",
"(",
"k",
")",
";",
"v",
"=",
"jo",
"opt",
"string",
"(",
"k",
")",
";",
"if",
"(",
"v",
"!",
"=",
"null",
")",
"{",
"sb",
"append",
"(",
"'",
"'",
")",
";",
"sb",
"append",
"(",
"xml",
"escape",
"(",
"k",
")",
")",
";",
"sb",
"append",
"(",
"'",
"=",
"'",
")",
";",
"sb",
"append",
"(",
"'",
"\"",
"'",
")",
";",
"sb",
"append",
"(",
"xml",
"escape",
"(",
"v",
")",
")",
";",
"sb",
"append",
"(",
"'",
"\"",
"'",
")",
";",
"}",
"}",
"}",
"/",
"/",
"emit",
"content",
"in",
"body",
"ja",
"=",
"jo",
"opt",
"j",
"s",
"o",
"n",
"array",
"(",
"\"",
"child",
"nodes",
"\"",
")",
";",
"if",
"(",
"ja",
"=",
"=",
"null",
")",
"{",
"sb",
"append",
"(",
"'",
"/",
"'",
")",
";",
"sb",
"append",
"(",
"'",
">",
"'",
")",
";",
"}",
"else",
"{",
"sb",
"append",
"(",
"'",
">",
"'",
")",
";",
"len",
"=",
"ja",
"length",
"(",
")",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
"+",
"=",
"1",
")",
"{",
"e",
"=",
"ja",
"get",
"(",
"i",
")",
";",
"if",
"(",
"e",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"e",
"instanceof",
"string",
")",
"{",
"sb",
"append",
"(",
"xml",
"escape",
"(",
"e",
"to",
"string",
"(",
")",
")",
")",
";",
"}",
"else",
"if",
"(",
"e",
"instanceof",
"j",
"s",
"o",
"n",
"object",
")",
"{",
"sb",
"append",
"(",
"to",
"string",
"(",
"(",
"j",
"s",
"o",
"n",
"object",
")",
"e",
")",
")",
";",
"}",
"else",
"if",
"(",
"e",
"instanceof",
"j",
"s",
"o",
"n",
"array",
")",
"{",
"sb",
"append",
"(",
"to",
"string",
"(",
"(",
"j",
"s",
"o",
"n",
"array",
")",
"e",
")",
")",
";",
"}",
"}",
"}",
"sb",
"append",
"(",
"'",
"<",
"'",
")",
";",
"sb",
"append",
"(",
"'",
"/",
"'",
")",
";",
"sb",
"append",
"(",
"tag",
"name",
")",
";",
"sb",
"append",
"(",
"'",
">",
"'",
")",
";",
"}",
"return",
"sb",
"to",
"string",
"(",
")",
";",
"}"
] |
[
"specifies",
"the",
"if",
"headers",
"that",
"should",
"be",
"returned",
"in",
"the",
"cors",
"'",
"access",
"-",
"control",
"-",
"allow",
"-",
"headers",
"'",
"response",
"header",
"if",
"a",
"client",
"specifies",
"headers",
"on",
"the",
"request",
",",
"for",
"example",
"by",
"calling",
":",
"xhr",
"set",
"request",
"header",
"(",
"'",
"my",
"-",
"custom",
"-",
"header",
"'",
",",
"\"",
"some",
"value",
"\"",
")",
";",
"the",
"server",
"will",
"receive",
"the",
"above",
"header",
"name",
"in",
"the",
"'",
"access",
"-",
"control",
"-",
"request",
"-",
"headers",
"'",
"of",
"the",
"preflight",
"request",
"the",
"server",
"will",
"then",
"decide",
"if",
"it",
"allows",
"this",
"header",
"to",
"be",
"sent",
"for",
"the",
"real",
"request",
"(",
"remember",
"that",
"a",
"preflight",
"is",
"not",
"the",
"real",
"request",
"but",
"a",
"request",
"asking",
"the",
"server",
"if",
"it",
"allow",
"a",
"request",
")"
] |
[
"public",
"cors",
"config",
"builder",
"allowed",
"request",
"headers",
"(",
"final",
"string",
"headers",
")",
"{",
"request",
"headers",
"add",
"all",
"(",
"arrays",
"as",
"list",
"(",
"headers",
")",
")",
";",
"return",
"this",
";",
"}"
] |
[
"resolve",
"the",
"given",
"v",
"2",
"template",
"into",
"a",
"collected",
"{",
"@",
"link",
"settings",
"}",
"object"
] |
[
"public",
"static",
"settings",
"resolve",
"settings",
"(",
"final",
"metadata",
"metadata",
",",
"final",
"string",
"template",
"name",
")",
"{",
"final",
"composable",
"index",
"template",
"template",
"=",
"metadata",
"templates",
"v",
"2",
"(",
")",
"get",
"(",
"template",
"name",
")",
";",
"assert",
"template",
"!",
"=",
"null",
":",
"\"",
"attempted",
"to",
"resolve",
"settings",
"for",
"a",
"template",
"[",
"\"",
"+",
"template",
"name",
"+",
"\"",
"]",
"that",
"did",
"not",
"exist",
"in",
"the",
"cluster",
"state",
"\"",
";",
"if",
"(",
"template",
"=",
"=",
"null",
")",
"{",
"return",
"settings",
"empty",
";",
"}",
"return",
"resolve",
"settings",
"(",
"metadata",
",",
"template",
")",
";",
"}"
] |
[
"returns",
"a",
"new",
"bimap",
"with",
"the",
"same",
"mappings",
"as",
"the",
"specified",
"map",
"if",
"the",
"specified",
"map",
"is",
"an",
"{",
"@",
"code",
"enum",
"bi",
"map",
"}",
",",
"the",
"new",
"bimap",
"has",
"the",
"same",
"types",
"as",
"the",
"provided",
"map",
"otherwise",
",",
"the",
"specified",
"map",
"must",
"contain",
"at",
"least",
"one",
"mapping",
",",
"in",
"order",
"to",
"determine",
"the",
"key",
"and",
"value",
"types"
] |
[
"public",
"static",
"<",
"k",
"extends",
"enum",
"<",
"k",
">",
",",
"v",
"extends",
"enum",
"<",
"v",
">",
">",
"enum",
"bi",
"map",
"<",
"k",
",",
"v",
">",
"create",
"(",
"map",
"<",
"k",
",",
"v",
">",
"map",
")",
"{",
"enum",
"bi",
"map",
"<",
"k",
",",
"v",
">",
"bimap",
"=",
"create",
"(",
"infer",
"key",
"type",
"(",
"map",
")",
",",
"infer",
"value",
"type",
"(",
"map",
")",
")",
";",
"bimap",
"put",
"all",
"(",
"map",
")",
";",
"return",
"bimap",
";",
"}"
] |
[
"build",
"the",
"real",
"function",
"from",
"this",
"one",
"and",
"resolution",
"metadata"
] |
[
"protected",
"abstract",
"function",
"build",
"resolved",
"(",
"unresolved",
"function",
"uf",
",",
"configuration",
"cfg",
",",
"function",
"definition",
"def",
")",
";"
] |
[
"model",
"tests",
"for",
"class",
"model"
] |
[
"public",
"void",
"test",
"class",
"model",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"class",
"model",
"}"
] |
[
"sets",
"the",
"progress",
"bar",
"image",
"and",
"its",
"scale",
"type"
] |
[
"public",
"generic",
"drawee",
"hierarchy",
"builder",
"set",
"progress",
"bar",
"image",
"(",
"int",
"resource",
"id",
",",
"@",
"nullable",
"scaling",
"utils",
"scale",
"type",
"progress",
"bar",
"image",
"scale",
"type",
")",
"{",
"m",
"progress",
"bar",
"image",
"=",
"m",
"resources",
"get",
"drawable",
"(",
"resource",
"id",
")",
";",
"m",
"progress",
"bar",
"image",
"scale",
"type",
"=",
"progress",
"bar",
"image",
"scale",
"type",
";",
"return",
"this",
";",
"}"
] |
[
"the",
"topic",
"name"
] |
[
"public",
"string",
"topic",
"(",
")",
"{",
"return",
"topic",
";",
"}"
] |
[
"we",
"need",
"skip",
"bytes",
"to",
"read",
"when",
"the",
"remain",
"bytes",
"of",
"current",
"segment",
"is",
"not",
"enough",
"to",
"read",
"window",
"part"
] |
[
"private",
"void",
"check",
"skip",
"read",
"for",
"fix",
"length",
"part",
"(",
"abstract",
"paged",
"input",
"view",
"source",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"skip",
"if",
"there",
"is",
"no",
"enough",
"size",
"/",
"/",
"note",
":",
"use",
"current",
"segment",
"limit",
"instead",
"of",
"segment",
"size",
"int",
"available",
"=",
"source",
"get",
"current",
"segment",
"limit",
"(",
")",
"-",
"source",
"get",
"current",
"position",
"in",
"segment",
"(",
")",
";",
"if",
"(",
"available",
"<",
"get",
"serialized",
"fixed",
"part",
"length",
"(",
")",
")",
"{",
"source",
"advance",
"(",
")",
";",
"}",
"}"
] |
[
"write",
"out",
"my",
"data",
"state"
] |
[
"public",
"void",
"write",
"data",
"state",
"(",
"save",
"state",
"save",
"state",
")",
"{",
"/",
"/",
"only",
"remember",
"programs",
"from",
"non",
"-",
"transient",
"projects",
"array",
"list",
"<",
"program",
">",
"programs",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"program",
"p",
":",
"program",
"mgr",
"get",
"all",
"programs",
"(",
")",
")",
"{",
"project",
"locator",
"project",
"locator",
"=",
"p",
"get",
"domain",
"file",
"(",
")",
"get",
"project",
"locator",
"(",
")",
";",
"if",
"(",
"project",
"locator",
"!",
"=",
"null",
"&",
"&",
"!",
"project",
"locator",
"is",
"transient",
"(",
")",
")",
"{",
"programs",
"add",
"(",
"p",
")",
";",
"}",
"}",
"save",
"state",
"put",
"int",
"(",
"\"",
"num",
"programs",
"\"",
",",
"programs",
"size",
"(",
")",
")",
";",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"program",
"p",
":",
"programs",
")",
"{",
"write",
"program",
"info",
"(",
"p",
",",
"save",
"state",
",",
"i",
"+",
"+",
")",
";",
"}",
"program",
"p",
"=",
"program",
"mgr",
"get",
"current",
"program",
"(",
")",
";",
"if",
"(",
"p",
"!",
"=",
"null",
")",
"{",
"project",
"locator",
"project",
"locator",
"=",
"p",
"get",
"domain",
"file",
"(",
")",
"get",
"project",
"locator",
"(",
")",
";",
"if",
"(",
"project",
"locator",
"!",
"=",
"null",
"&",
"&",
"!",
"project",
"locator",
"is",
"transient",
"(",
")",
")",
"{",
"save",
"state",
"put",
"string",
"(",
"\"",
"current",
"file",
"\"",
",",
"p",
"get",
"domain",
"file",
"(",
")",
"get",
"name",
"(",
")",
")",
";",
"if",
"(",
"current",
"location",
"!",
"=",
"null",
")",
"{",
"current",
"location",
"save",
"state",
"(",
"save",
"state",
")",
";",
"}",
"}",
"}",
"}"
] |
[
"parse",
"an",
"animation",
"from",
"rawres",
"this",
"is",
"recommended",
"over",
"putting",
"your",
"animation",
"in",
"assets",
"because",
"it",
"uses",
"a",
"hard",
"reference",
"to",
"r",
"the",
"resource",
"id",
"will",
"be",
"used",
"as",
"a",
"cache",
"key",
"so",
"future",
"usages",
"won",
"'",
"t",
"parse",
"the",
"json",
"again",
"note",
":",
"to",
"correctly",
"load",
"dark",
"mode",
"(",
"-",
"night",
")",
"resources",
",",
"make",
"sure",
"you",
"pass",
"activity",
"as",
"a",
"context",
"(",
"instead",
"of",
"e",
"g",
"the",
"application",
"context",
")",
"the",
"activity",
"won",
"'",
"t",
"be",
"leaked",
"pass",
"null",
"as",
"the",
"cache",
"key",
"to",
"skip",
"caching"
] |
[
"public",
"static",
"lottie",
"task",
"<",
"lottie",
"composition",
">",
"from",
"raw",
"res",
"(",
"context",
"context",
",",
"@",
"raw",
"res",
"final",
"int",
"raw",
"res",
",",
"@",
"nullable",
"final",
"string",
"cache",
"key",
")",
"{",
"/",
"/",
"prevent",
"accidentally",
"leaking",
"an",
"activity",
"final",
"weak",
"reference",
"<",
"context",
">",
"context",
"ref",
"=",
"new",
"weak",
"reference",
"<",
">",
"(",
"context",
")",
";",
"final",
"context",
"app",
"context",
"=",
"context",
"get",
"application",
"context",
"(",
")",
";",
"return",
"cache",
"(",
"cache",
"key",
",",
"new",
"callable",
"<",
"lottie",
"result",
"<",
"lottie",
"composition",
">",
">",
"(",
")",
"{",
"@",
"override",
"public",
"lottie",
"result",
"<",
"lottie",
"composition",
">",
"call",
"(",
")",
"{",
"@",
"nullable",
"context",
"original",
"context",
"=",
"context",
"ref",
"get",
"(",
")",
";",
"context",
"context",
"=",
"original",
"context",
"!",
"=",
"null",
"?",
"original",
"context",
":",
"app",
"context",
";",
"return",
"from",
"raw",
"res",
"sync",
"(",
"context",
",",
"raw",
"res",
",",
"cache",
"key",
")",
";",
"}",
"}",
")",
";",
"}"
] |
[
"returns",
"all",
"the",
"registered",
"{",
"@",
"link",
"captcha",
"support",
"}",
"descriptors"
] |
[
"public",
"static",
"descriptor",
"extension",
"list",
"<",
"captcha",
"support",
",",
"descriptor",
"<",
"captcha",
"support",
">",
">",
"all",
"(",
")",
"{",
"return",
"jenkins",
"get",
"(",
")",
"get",
"descriptor",
"list",
"(",
"captcha",
"support",
"class",
")",
";",
"}"
] |
[
"associates",
"an",
"index",
"routing",
"value",
"to",
"the",
"alias"
] |
[
"public",
"alias",
"index",
"routing",
"(",
"string",
"index",
"routing",
")",
"{",
"this",
"index",
"routing",
"=",
"index",
"routing",
";",
"return",
"this",
";",
"}"
] |
[
"notify",
"listeners",
"of",
"repository",
"connection",
"state",
"change"
] |
[
"private",
"void",
"fire",
"state",
"changed",
"(",
")",
"{",
"for",
"(",
"remote",
"adapter",
"listener",
"listener",
":",
"listener",
"list",
")",
"{",
"listener",
"connection",
"state",
"changed",
"(",
"this",
")",
";",
"}",
"}"
] |
[
"stubs",
"add",
"controller",
"listener"
] |
[
"public",
"static",
"controller",
"listener",
"stub",
"controller",
"listener",
"(",
"final",
"drawee",
"controller",
"controller",
")",
"{",
"final",
"forwarding",
"controller",
"listener",
"forwarding",
"listener",
"=",
"new",
"forwarding",
"controller",
"listener",
"(",
")",
";",
"if",
"(",
"!",
"(",
"controller",
"instanceof",
"abstract",
"drawee",
"controller",
")",
")",
"{",
"return",
"null",
";",
"}",
"abstract",
"drawee",
"controller",
"abstract",
"controller",
"=",
"(",
"abstract",
"drawee",
"controller",
")",
"controller",
";",
"do",
"answer",
"(",
"new",
"answer",
"(",
")",
"{",
"@",
"override",
"public",
"object",
"answer",
"(",
"invocation",
"on",
"mock",
"invocation",
")",
"throws",
"throwable",
"{",
"forwarding",
"listener",
"add",
"listener",
"(",
"(",
"controller",
"listener",
")",
"invocation",
"get",
"arguments",
"(",
")",
"[",
"0",
"]",
")",
";",
"return",
"null",
";",
"}",
"}",
")",
"when",
"(",
"abstract",
"controller",
")",
"add",
"controller",
"listener",
"(",
"any",
"(",
"controller",
"listener",
"class",
")",
")",
";",
"return",
"forwarding",
"listener",
";",
"}"
] |
[
"returns",
"a",
"substring",
"of",
"the",
"input",
"character",
"sequence",
"that",
"omits",
"all",
"matching",
"bmp",
"characters",
"from",
"the",
"beginning",
"of",
"the",
"string",
"for",
"example",
":",
"{",
"@",
"code",
"char",
"matcher",
"any",
"of",
"(",
"\"",
"ab",
"\"",
")",
"trim",
"leading",
"from",
"(",
"\"",
"abacatbab",
"\"",
")",
"}",
"returns",
"{",
"@",
"code",
"\"",
"catbab",
"\"",
"}"
] |
[
"public",
"string",
"trim",
"leading",
"from",
"(",
"char",
"sequence",
"sequence",
")",
"{",
"int",
"len",
"=",
"sequence",
"length",
"(",
")",
";",
"for",
"(",
"int",
"first",
"=",
"0",
";",
"first",
"<",
"len",
";",
"first",
"+",
"+",
")",
"{",
"if",
"(",
"!",
"matches",
"(",
"sequence",
"char",
"at",
"(",
"first",
")",
")",
")",
"{",
"return",
"sequence",
"sub",
"sequence",
"(",
"first",
",",
"len",
")",
"to",
"string",
"(",
")",
";",
"}",
"}",
"return",
"\"",
"\"",
";",
"}"
] |
[
"gets",
"local",
"address"
] |
[
"public",
"static",
"inet",
"address",
"get",
"local",
"address",
"(",
")",
"{",
"if",
"(",
"local",
"address",
"!",
"=",
"null",
")",
"{",
"return",
"local",
"address",
";",
"}",
"inet",
"address",
"local",
"address",
"=",
"get",
"local",
"address",
"0",
"(",
")",
";",
"local",
"address",
"=",
"local",
"address",
";",
"return",
"local",
"address",
";",
"}"
] |
[
"build",
"the",
"level",
"index",
"for",
"the",
"given",
"node"
] |
[
"static",
"void",
"build",
"level",
"index",
"(",
"long",
"node",
",",
"int",
"level",
",",
"memory",
"segment",
"key",
"segment",
",",
"int",
"key",
"offset",
",",
"level",
"index",
"header",
"level",
"index",
"header",
",",
"allocator",
"space",
"allocator",
")",
"{",
"int",
"curr",
"level",
"=",
"level",
";",
"long",
"prev",
"node",
"=",
"find",
"predecessor",
"(",
"key",
"segment",
",",
"key",
"offset",
",",
"curr",
"level",
",",
"level",
"index",
"header",
",",
"space",
"allocator",
")",
";",
"long",
"current",
"node",
"=",
"help",
"get",
"next",
"node",
"(",
"prev",
"node",
",",
"curr",
"level",
",",
"level",
"index",
"header",
",",
"space",
"allocator",
")",
";",
"for",
"(",
";",
";",
")",
"{",
"if",
"(",
"current",
"node",
"!",
"=",
"nil",
"node",
")",
"{",
"int",
"c",
"=",
"compare",
"segment",
"and",
"node",
"(",
"key",
"segment",
",",
"key",
"offset",
",",
"current",
"node",
",",
"space",
"allocator",
")",
";",
"if",
"(",
"c",
">",
"0",
")",
"{",
"prev",
"node",
"=",
"current",
"node",
";",
"current",
"node",
"=",
"help",
"get",
"next",
"node",
"(",
"current",
"node",
",",
"curr",
"level",
",",
"level",
"index",
"header",
",",
"space",
"allocator",
")",
";",
"continue",
";",
"}",
"}",
"help",
"set",
"prev",
"and",
"next",
"node",
"(",
"node",
",",
"prev",
"node",
",",
"current",
"node",
",",
"curr",
"level",
",",
"space",
"allocator",
")",
";",
"help",
"set",
"next",
"node",
"(",
"prev",
"node",
",",
"node",
",",
"curr",
"level",
",",
"level",
"index",
"header",
",",
"space",
"allocator",
")",
";",
"help",
"set",
"prev",
"node",
"(",
"current",
"node",
",",
"node",
",",
"curr",
"level",
",",
"space",
"allocator",
")",
";",
"curr",
"level",
"-",
"-",
";",
"if",
"(",
"curr",
"level",
"=",
"=",
"0",
")",
"{",
"break",
";",
"}",
"current",
"node",
"=",
"help",
"get",
"next",
"node",
"(",
"prev",
"node",
",",
"curr",
"level",
",",
"level",
"index",
"header",
",",
"space",
"allocator",
")",
";",
"}",
"}"
] |
[
"returns",
"the",
"initial",
"ip",
"value"
] |
[
"public",
"short",
"e",
"ip",
"(",
")",
"{",
"return",
"e",
"ip",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"configures",
"the",
"embedded",
"web",
"server",
"'",
"s",
"thread",
"pool"
] |
[
"public",
"static",
"void",
"thread",
"pool",
"(",
"int",
"max",
"threads",
",",
"int",
"min",
"threads",
",",
"int",
"idle",
"timeout",
"millis",
")",
"{",
"get",
"instance",
"(",
")",
"thread",
"pool",
"(",
"max",
"threads",
",",
"min",
"threads",
",",
"idle",
"timeout",
"millis",
")",
";",
"}"
] |
[
"get",
"the",
"leader",
"epoch",
"corresponding",
"to",
"the",
"offset",
"that",
"was",
"found",
"(",
"if",
"one",
"exists",
")",
"this",
"can",
"be",
"provided",
"to",
"seek",
"(",
")",
"to",
"ensure",
"that",
"the",
"log",
"hasn",
"'",
"t",
"been",
"truncated",
"prior",
"to",
"fetching"
] |
[
"public",
"optional",
"<",
"integer",
">",
"leader",
"epoch",
"(",
")",
"{",
"return",
"leader",
"epoch",
";",
"}"
] |
[
"skip",
"characters",
"until",
"the",
"next",
"character",
"is",
"the",
"requested",
"character",
"if",
"the",
"requested",
"character",
"is",
"not",
"found",
",",
"no",
"characters",
"are",
"skipped"
] |
[
"public",
"char",
"skip",
"to",
"(",
"char",
"to",
")",
"throws",
"j",
"s",
"o",
"n",
"exception",
"{",
"char",
"c",
";",
"try",
"{",
"int",
"start",
"index",
"=",
"this",
"index",
";",
"int",
"start",
"character",
"=",
"this",
"character",
";",
"int",
"start",
"line",
"=",
"this",
"line",
";",
"reader",
"mark",
"(",
"integer",
"max",
"value",
")",
";",
"do",
"{",
"c",
"=",
"next",
"(",
")",
";",
"if",
"(",
"c",
"=",
"=",
"0",
")",
"{",
"reader",
"reset",
"(",
")",
";",
"this",
"index",
"=",
"start",
"index",
";",
"this",
"character",
"=",
"start",
"character",
";",
"this",
"line",
"=",
"start",
"line",
";",
"return",
"c",
";",
"}",
"}",
"while",
"(",
"c",
"!",
"=",
"to",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"exc",
")",
"{",
"throw",
"new",
"j",
"s",
"o",
"n",
"exception",
"(",
"exc",
")",
";",
"}",
"back",
"(",
")",
";",
"return",
"c",
";",
"}"
] |
[
"asynchronously",
"starts",
"a",
"trial",
"license",
"on",
"the",
"cluster"
] |
[
"public",
"cancellable",
"start",
"trial",
"async",
"(",
"start",
"trial",
"request",
"request",
",",
"request",
"options",
"options",
",",
"action",
"listener",
"<",
"start",
"trial",
"response",
">",
"listener",
")",
"{",
"return",
"rest",
"high",
"level",
"client",
"perform",
"request",
"async",
"and",
"parse",
"entity",
"(",
"request",
",",
"license",
"request",
"converters",
":",
":",
"start",
"trial",
",",
"options",
",",
"start",
"trial",
"response",
":",
":",
"from",
"x",
"content",
",",
"listener",
",",
"singleton",
"(",
"403",
")",
")",
";",
"}"
] |
[
"get",
"outer",
"enum"
] |
[
"public",
"outer",
"enum",
"get",
"outer",
"enum",
"(",
")",
"{",
"return",
"outer",
"enum",
";",
"}"
] |
[
"apply",
"alpha",
"for",
"the",
"view",
"'",
"s",
"background"
] |
[
"public",
"static",
"void",
"apply",
"pressed",
"bg",
"alpha",
"(",
"view",
"view",
",",
"float",
"alpha",
")",
"{",
"apply",
"pressed",
"bg",
"style",
"(",
"view",
",",
"pressed",
"bg",
"alpha",
"style",
",",
"alpha",
")",
";",
"}"
] |
[
"get",
"integer",
"item"
] |
[
"public",
"integer",
"get",
"integer",
"item",
"(",
")",
"{",
"return",
"integer",
"item",
";",
"}"
] |
[
"timestamp",
"expressed",
"in",
"seconds",
"since",
"the",
"epoch",
"(",
"rather",
"than",
"java",
"'",
"s",
"convention",
"of",
"milliseconds",
")"
] |
[
"public",
"long",
"get",
"epoch",
"(",
")",
"{",
"return",
"timestamp",
"get",
"time",
"(",
")",
"/",
"1000",
";",
"}"
] |
[
"returns",
"an",
"instance",
"of",
"{",
"@",
"link",
"extended",
"servlet",
"request",
"data",
"binder",
"}"
] |
[
"protected",
"servlet",
"request",
"data",
"binder",
"create",
"binder",
"instance",
"(",
"@",
"nullable",
"object",
"target",
",",
"string",
"object",
"name",
",",
"native",
"web",
"request",
"request",
")",
"throws",
"exception",
"{",
"return",
"new",
"extended",
"servlet",
"request",
"data",
"binder",
"(",
"target",
",",
"object",
"name",
")",
";",
"}"
] |
[
"@",
"inherit",
"doc"
] |
[
"public",
"int",
"elements",
"(",
")",
"{",
"return",
"bits",
"bit",
"count",
"(",
"bits",
")",
";",
"}"
] |
[
"this",
"test",
"validates",
"the",
"correctness",
"of",
"the",
"metric",
":",
"failed",
"to",
"submit",
"apps"
] |
[
"public",
"void",
"test",
"apps",
"failed",
"submitted",
"(",
")",
"{",
"long",
"total",
"badbefore",
"=",
"metrics",
"get",
"apps",
"failed",
"submitted",
"(",
")",
";",
"bad",
"sub",
"cluster",
"submit",
"application",
"(",
")",
";",
"assert",
"assert",
"equals",
"(",
"total",
"badbefore",
"+",
"1",
",",
"metrics",
"get",
"apps",
"failed",
"submitted",
"(",
")",
")",
";",
"}"
] |
[
"returns",
"the",
"current",
"port",
"number",
",",
"with",
"a",
"default",
"if",
"no",
"port",
"is",
"defined"
] |
[
"public",
"int",
"get",
"port",
"or",
"default",
"(",
"int",
"default",
"port",
")",
"{",
"return",
"has",
"port",
"(",
")",
"?",
"port",
":",
"default",
"port",
";",
"}"
] |
[
"return",
"a",
"{",
"@",
"link",
"x",
"m",
"l",
"stream",
"writer",
"}",
"that",
"writes",
"to",
"a",
"{",
"@",
"link",
"x",
"m",
"l",
"event",
"writer",
"}"
] |
[
"public",
"static",
"x",
"m",
"l",
"stream",
"writer",
"create",
"event",
"stream",
"writer",
"(",
"x",
"m",
"l",
"event",
"writer",
"event",
"writer",
",",
"x",
"m",
"l",
"event",
"factory",
"event",
"factory",
")",
"{",
"return",
"new",
"x",
"m",
"l",
"event",
"stream",
"writer",
"(",
"event",
"writer",
",",
"event",
"factory",
")",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"shape",
"type",
"'"
] |
[
"public",
"void",
"shape",
"type",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"shape",
"type",
"}"
] |
[
"sets",
"a",
"{",
"@",
"link",
"request",
"listener",
"}",
"to",
"monitor",
"the",
"resource",
"load",
"it",
"'",
"s",
"best",
"to",
"create",
"a",
"single",
"instance",
"of",
"an",
"exception",
"handler",
"per",
"type",
"of",
"request",
"(",
"usually",
"activityfragment",
")",
"rather",
"than",
"pass",
"one",
"in",
"per",
"request",
"to",
"avoid",
"some",
"redundant",
"object",
"allocation",
"subsequent",
"calls",
"to",
"this",
"method",
"will",
"replace",
"previously",
"set",
"listeners",
"to",
"set",
"multiple",
"listeners",
",",
"use",
"{",
"@",
"link",
"#",
"add",
"listener",
"}",
"instead"
] |
[
"public",
"request",
"builder",
"<",
"transcode",
"type",
">",
"listener",
"(",
"@",
"nullable",
"request",
"listener",
"<",
"transcode",
"type",
">",
"request",
"listener",
")",
"{",
"if",
"(",
"is",
"auto",
"clone",
"enabled",
"(",
")",
")",
"{",
"return",
"clone",
"(",
")",
"listener",
"(",
"request",
"listener",
")",
";",
"}",
"this",
"request",
"listeners",
"=",
"null",
";",
"return",
"add",
"listener",
"(",
"request",
"listener",
")",
";",
"}"
] |
[
"get",
"aggregated",
"value",
"list",
"for",
"entire",
"sliding",
"window",
"the",
"list",
"will",
"only",
"contain",
"value",
"from",
"\"",
"valid",
"\"",
"buckets"
] |
[
"public",
"list",
"<",
"t",
">",
"values",
"(",
")",
"{",
"return",
"values",
"(",
"time",
"util",
"current",
"time",
"millis",
"(",
")",
")",
";",
"}"
] |
[
"returns",
"whether",
"the",
"given",
"internal",
"type",
"is",
"a",
"plain",
"class",
"type",
"(",
"including",
"an",
"array",
"type",
"of",
"a",
"plain",
"class",
"type",
")"
] |
[
"public",
"static",
"boolean",
"is",
"internal",
"class",
"type",
"(",
"string",
"internal",
"type",
")",
"{",
"int",
"length",
"=",
"internal",
"type",
"length",
"(",
")",
";",
"return",
"length",
">",
"1",
"&",
"&",
"/",
"/",
"internal",
"type",
"char",
"at",
"(",
"0",
")",
"=",
"=",
"class",
"constants",
"type",
"class",
"start",
"&",
"&",
"internal",
"type",
"char",
"at",
"(",
"length",
"-",
"1",
")",
"=",
"=",
"class",
"constants",
"type",
"class",
"end",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"bool",
"item",
"'"
] |
[
"public",
"void",
"bool",
"item",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"bool",
"item",
"}"
] |
[
"returns",
"type",
"information",
"for",
"a",
"table",
"api",
"sql",
"date",
"or",
"sql",
"date",
"type"
] |
[
"public",
"static",
"type",
"information",
"<",
"java",
"sql",
"date",
">",
"sql",
"date",
"(",
")",
"{",
"return",
"org",
"apache",
"flink",
"api",
"common",
"typeinfo",
"types",
"sql",
"date",
";",
"}"
] |
[
"returns",
"the",
"used",
"{",
"@",
"link",
"download",
"index",
"}"
] |
[
"public",
"download",
"index",
"get",
"download",
"index",
"(",
")",
"{",
"return",
"download",
"index",
";",
"}"
] |
[
"converts",
"the",
"object",
"to",
"string",
"using",
"starlark",
"syntax"
] |
[
"public",
"void",
"repr",
"(",
"printer",
"printer",
")",
"{",
"boolean",
"first",
"=",
"true",
";",
"printer",
"append",
"(",
"\"",
"struct",
"(",
"\"",
")",
";",
"for",
"(",
"string",
"field",
"name",
":",
"ordering",
"natural",
"(",
")",
"sorted",
"copy",
"(",
"get",
"field",
"names",
"(",
")",
")",
")",
"{",
"if",
"(",
"!",
"first",
")",
"{",
"printer",
"append",
"(",
"\"",
",",
"\"",
")",
";",
"}",
"first",
"=",
"false",
";",
"printer",
"append",
"(",
"field",
"name",
")",
";",
"printer",
"append",
"(",
"\"",
"=",
"\"",
")",
";",
"printer",
"repr",
"(",
"get",
"value",
"or",
"null",
"(",
"field",
"name",
")",
")",
";",
"}",
"printer",
"append",
"(",
"\"",
")",
"\"",
")",
";",
"}"
] |
[
"this",
"test",
"writes",
"a",
"file",
"and",
"gets",
"the",
"block",
"locations",
"without",
"closing",
"the",
"file",
",",
"and",
"tests",
"the",
"block",
"token",
"in",
"the",
"last",
"block",
"block",
"token",
"is",
"verified",
"by",
"ensuring",
"it",
"is",
"of",
"correct",
"kind"
] |
[
"private",
"void",
"test",
"block",
"token",
"in",
"last",
"located",
"block",
"(",
"boolean",
"enable",
"protobuf",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"hdfs",
"configuration",
"(",
")",
";",
"conf",
"set",
"boolean",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"block",
"access",
"token",
"enable",
"key",
",",
"true",
")",
";",
"conf",
"set",
"int",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"block",
"size",
"key",
",",
"512",
")",
";",
"conf",
"set",
"boolean",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"block",
"access",
"token",
"protobuf",
"enable",
",",
"enable",
"protobuf",
")",
";",
"mini",
"d",
"f",
"s",
"cluster",
"cluster",
"=",
"new",
"mini",
"d",
"f",
"s",
"cluster",
"builder",
"(",
"conf",
")",
"num",
"data",
"nodes",
"(",
"1",
")",
"build",
"(",
")",
";",
"cluster",
"wait",
"active",
"(",
")",
";",
"try",
"{",
"file",
"system",
"fs",
"=",
"cluster",
"get",
"file",
"system",
"(",
")",
";",
"string",
"file",
"name",
"=",
"\"",
"/",
"test",
"block",
"token",
"in",
"last",
"located",
"block",
"\"",
";",
"path",
"file",
"path",
"=",
"new",
"path",
"(",
"file",
"name",
")",
";",
"f",
"s",
"data",
"output",
"stream",
"out",
"=",
"fs",
"create",
"(",
"file",
"path",
",",
"(",
"short",
")",
"1",
")",
";",
"out",
"write",
"(",
"new",
"byte",
"[",
"1000",
"]",
")",
";",
"/",
"/",
"ensure",
"that",
"the",
"first",
"block",
"is",
"written",
"out",
"(",
"see",
"f",
"s",
"output",
"summer",
"#",
"flush",
")",
"out",
"flush",
"(",
")",
";",
"located",
"blocks",
"located",
"blocks",
"=",
"cluster",
"get",
"name",
"node",
"rpc",
"(",
")",
"get",
"block",
"locations",
"(",
"file",
"name",
",",
"0",
",",
"1000",
")",
";",
"while",
"(",
"located",
"blocks",
"get",
"last",
"located",
"block",
"(",
")",
"=",
"=",
"null",
")",
"{",
"thread",
"sleep",
"(",
"100",
")",
";",
"located",
"blocks",
"=",
"cluster",
"get",
"name",
"node",
"rpc",
"(",
")",
"get",
"block",
"locations",
"(",
"file",
"name",
",",
"0",
",",
"1000",
")",
";",
"}",
"token",
"<",
"block",
"token",
"identifier",
">",
"token",
"=",
"located",
"blocks",
"get",
"last",
"located",
"block",
"(",
")",
"get",
"block",
"token",
"(",
")",
";",
"assert",
"assert",
"equals",
"(",
"block",
"token",
"identifier",
"kind",
"name",
",",
"token",
"get",
"kind",
"(",
")",
")",
";",
"out",
"close",
"(",
")",
";",
"}",
"finally",
"{",
"cluster",
"shutdown",
"(",
")",
";",
"}",
"}"
] |
[
"assert",
"the",
"response",
"status",
"code",
"is",
"{",
"@",
"code",
"http",
"status",
"precondition",
"required",
"}",
"(",
"428",
")"
] |
[
"public",
"result",
"matcher",
"is",
"precondition",
"required",
"(",
")",
"{",
"return",
"matcher",
"(",
"http",
"status",
"value",
"of",
"(",
"428",
")",
")",
";",
"}"
] |
[
"is",
"html",
"escaping",
"using",
"the",
"response",
"encoding",
"by",
"default",
"?",
"if",
"enabled",
",",
"only",
"xml",
"markup",
"significant",
"characters",
"will",
"be",
"escaped",
"with",
"utf",
"-",
"encodings",
"falls",
"back",
"to",
"{",
"@",
"code",
"true",
"}",
"in",
"case",
"of",
"no",
"explicit",
"default",
"given",
",",
"as",
"of",
"spring",
"4",
"2"
] |
[
"public",
"boolean",
"is",
"response",
"encoded",
"html",
"escape",
"(",
")",
"{",
"return",
"(",
"this",
"response",
"encoded",
"html",
"escape",
"=",
"=",
"null",
"|",
"|",
"this",
"response",
"encoded",
"html",
"escape",
"boolean",
"value",
"(",
")",
")",
";",
"}"
] |
[
"create",
"a",
"{",
"@",
"link",
"client",
"datanode",
"protocol",
"}",
"proxy"
] |
[
"public",
"static",
"client",
"datanode",
"protocol",
"create",
"client",
"datanode",
"protocol",
"proxy",
"(",
"inet",
"socket",
"address",
"addr",
",",
"user",
"group",
"information",
"ticket",
",",
"configuration",
"conf",
",",
"socket",
"factory",
"factory",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"new",
"client",
"datanode",
"protocol",
"translator",
"p",
"b",
"(",
"addr",
",",
"ticket",
",",
"conf",
",",
"factory",
")",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"pem",
"-",
"encodes",
"the",
"given",
"x509",
"certificate",
"and",
"private",
"key",
"(",
"compatible",
"with",
"open",
"s",
"s",
"l",
")",
",",
"optionally",
"protecting",
"the",
"private",
"key",
"with",
"a",
"password",
"concatenates",
"them",
"both",
"and",
"returns",
"the",
"result",
"as",
"a",
"single",
"string",
"this",
"creates",
"the",
"pem",
"encoding",
"of",
"a",
"key",
"store"
] |
[
"public",
"static",
"string",
"pem",
"encode",
"cert",
"and",
"private",
"key",
"(",
"x",
"5",
"0",
"9",
"certificate",
"cert",
",",
"private",
"key",
"private",
"key",
",",
"string",
"key",
"password",
")",
"throws",
"i",
"o",
"exception",
",",
"operator",
"creation",
"exception",
"{",
"return",
"pem",
"encode",
"x",
"5",
"0",
"9",
"certificate",
"(",
"cert",
")",
"+",
"\"",
"\\",
"n",
"\"",
"+",
"pem",
"encode",
"private",
"key",
"(",
"private",
"key",
",",
"key",
"password",
")",
";",
"}"
] |
[
"update",
"the",
"labels",
"for",
"the",
"node"
] |
[
"public",
"void",
"update",
"labels",
"(",
"set",
"<",
"string",
">",
"labels",
")",
"{",
"this",
"labels",
"=",
"labels",
";",
"}"
] |
[
"defines",
"the",
"equivalence",
"relation",
":",
"all",
"builtin",
"providers",
"of",
"the",
"same",
"java",
"class",
"are",
"equal",
",",
"regardless",
"of",
"{",
"@",
"code",
"name",
"}",
"or",
"{",
"@",
"code",
"value",
"class",
"}"
] |
[
"public",
"final",
"boolean",
"equals",
"(",
"@",
"nullable",
"object",
"other",
")",
"{",
"return",
"other",
"!",
"=",
"null",
"&",
"&",
"this",
"get",
"class",
"(",
")",
"equals",
"(",
"other",
"get",
"class",
"(",
")",
")",
";",
"}"
] |
[
"process",
"the",
"result",
"of",
"the",
"asynchronous",
"call",
"on",
"success",
",",
"rc",
"is",
"{",
"@",
"link",
"keeper",
"exception",
"code",
"#",
"ok",
"}",
"on",
"failure",
",",
"rc",
"is",
"set",
"to",
"the",
"corresponding",
"failure",
"code",
"in",
"{",
"@",
"link",
"keeper",
"exception",
"}",
"{",
"@",
"link",
"keeper",
"exception",
"code",
"#",
"nonode",
"}",
"-",
"the",
"node",
"on",
"given",
"path",
"doesn",
"'",
"t",
"exist",
"for",
"some",
"api",
"calls",
"{",
"@",
"link",
"keeper",
"exception",
"code",
"#",
"badversion",
"}",
"-",
"the",
"given",
"version",
"doesn",
"'",
"t",
"match",
"the",
"node",
"'",
"s",
"version",
"for",
"some",
"api",
"calls",
"{",
"@",
"link",
"keeper",
"exception",
"code",
"#",
"notempty",
"}",
"-",
"the",
"node",
"has",
"children",
"and",
"some",
"api",
"calls",
"cannot",
"succeed",
",",
"e",
"g",
"{",
"@",
"link",
"zoo",
"keeper",
"#",
"delete",
"(",
"string",
",",
"int",
",",
"async",
"callback",
"void",
"callback",
",",
"object",
")",
"}"
] |
[
"void",
"process",
"result",
"(",
"int",
"rc",
",",
"string",
"path",
",",
"object",
"ctx",
")",
";"
] |
[
"compute",
"the",
"path",
"where",
"the",
"output",
"of",
"pending",
"task",
"attempts",
"are",
"stored"
] |
[
"private",
"static",
"path",
"get",
"pending",
"task",
"attempts",
"path",
"(",
"job",
"context",
"context",
",",
"path",
"out",
")",
"{",
"return",
"new",
"path",
"(",
"get",
"job",
"attempt",
"path",
"(",
"context",
",",
"out",
")",
",",
"temporary",
")",
";",
"}"
] |
[
"{",
"@",
"link",
"files",
"#",
"copy",
"}"
] |
[
"public",
"static",
"void",
"copy",
"file",
"(",
"@",
"not",
"null",
"file",
"from",
",",
"@",
"not",
"null",
"file",
"to",
")",
"throws",
"i",
"o",
"exception",
"{",
"validate",
"not",
"null",
"(",
"from",
")",
";",
"validate",
"not",
"null",
"(",
"to",
")",
";",
"copy",
"file",
"(",
"from",
"to",
"path",
"(",
")",
",",
"to",
"to",
"path",
"(",
")",
")",
";",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.