docstring_tokens
list | code_tokens
list |
---|---|
[
"returns",
"underlying",
"channel",
"used",
"by",
"this",
"stream",
"this",
"is",
"useful",
"in",
"certain",
"cases",
"like",
"channel",
"for",
"{",
"@",
"link",
"file",
"channel",
"#",
"transfer",
"to",
"(",
"long",
",",
"long",
",",
"writable",
"byte",
"channel",
")",
"}"
]
| [
"public",
"writable",
"byte",
"channel",
"get",
"channel",
"(",
")",
"{",
"return",
"writer",
"channel",
";",
"}"
]
|
[
"gets",
"account",
"no",
"which",
"the",
"money",
"comes",
"from"
]
| [
"public",
"int",
"get",
"account",
"no",
"from",
"(",
")",
"{",
"return",
"account",
"no",
"from",
";",
"}"
]
|
[
"obtain",
"the",
"next",
"{",
"@",
"link",
"bind",
"marker",
"}",
"increments",
"{",
"@",
"link",
"bind",
"markers",
"}",
"state"
]
| [
"public",
"bind",
"marker",
"next",
"marker",
"(",
")",
"{",
"return",
"this",
"markers",
"next",
"(",
")",
";",
"}"
]
|
[
"sets",
"the",
"minimum",
"and",
"maximum",
"vector",
"to",
"positive",
"and",
"negative",
"infinity"
]
| [
"public",
"bounding",
"box",
"inf",
"(",
")",
"{",
"min",
"set",
"(",
"float",
"positive",
"infinity",
",",
"float",
"positive",
"infinity",
",",
"float",
"positive",
"infinity",
")",
";",
"max",
"set",
"(",
"float",
"negative",
"infinity",
",",
"float",
"negative",
"infinity",
",",
"float",
"negative",
"infinity",
")",
";",
"cnt",
"set",
"(",
"0",
",",
"0",
",",
"0",
")",
";",
"dim",
"set",
"(",
"0",
",",
"0",
",",
"0",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"get",
"alternate",
"path",
"for",
"delegation",
"token",
"if",
"path",
"according",
"to",
"configured",
"split",
"index",
"does",
"not",
"exist",
"we",
"look",
"for",
"path",
"based",
"on",
"all",
"possible",
"split",
"indices"
]
| [
"private",
"znode",
"split",
"info",
"get",
"alternate",
"d",
"t",
"path",
"(",
"int",
"rm",
"d",
"t",
"sequence",
"number",
")",
"throws",
"exception",
"{",
"/",
"/",
"check",
"all",
"possible",
"paths",
"until",
"we",
"find",
"it",
"for",
"(",
"int",
"split",
"index",
":",
"rm",
"delegation",
"token",
"hierarchies",
"key",
"set",
"(",
")",
")",
"{",
"if",
"(",
"split",
"index",
"!",
"=",
"delegation",
"token",
"node",
"split",
"index",
")",
"{",
"string",
"alternate",
"path",
"=",
"get",
"leaf",
"delegation",
"token",
"node",
"path",
"(",
"rm",
"d",
"t",
"sequence",
"number",
",",
"false",
",",
"split",
"index",
")",
";",
"if",
"(",
"exists",
"(",
"alternate",
"path",
")",
")",
"{",
"return",
"new",
"znode",
"split",
"info",
"(",
"alternate",
"path",
",",
"split",
"index",
")",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}"
]
|
[
"parses",
"a",
"time",
"in",
"test",
"xml",
"format"
]
| [
"private",
"long",
"parse",
"time",
"(",
"string",
"string",
")",
"{",
"/",
"/",
"this",
"is",
"ugly",
"for",
"historical",
"reasons",
",",
"we",
"have",
"to",
"check",
"whether",
"the",
"number",
"/",
"/",
"contains",
"a",
"decimal",
"point",
"or",
"not",
"if",
"it",
"does",
",",
"the",
"number",
"is",
"expressed",
"in",
"/",
"/",
"milliseconds",
",",
"otherwise",
",",
"in",
"seconds",
"if",
"(",
"string",
"contains",
"(",
"\"",
"\"",
")",
")",
"{",
"return",
"math",
"round",
"(",
"float",
"parse",
"float",
"(",
"string",
")",
"*",
"1000",
")",
";",
"}",
"else",
"{",
"return",
"long",
"parse",
"long",
"(",
"string",
")",
";",
"}",
"}"
]
|
[
"split",
"a",
"string",
"using",
"the",
"given",
"separator",
",",
"with",
"no",
"escaping",
"performed"
]
| [
"public",
"static",
"string",
"[",
"]",
"split",
"(",
"string",
"str",
",",
"char",
"separator",
")",
"{",
"/",
"/",
"string",
"split",
"returns",
"a",
"single",
"empty",
"result",
"for",
"splitting",
"the",
"empty",
"/",
"/",
"string",
"if",
"(",
"str",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"new",
"string",
"[",
"]",
"{",
"\"",
"\"",
"}",
";",
"}",
"array",
"list",
"<",
"string",
">",
"str",
"list",
"=",
"new",
"array",
"list",
"<",
"string",
">",
"(",
")",
";",
"int",
"start",
"index",
"=",
"0",
";",
"int",
"next",
"index",
"=",
"0",
";",
"while",
"(",
"(",
"next",
"index",
"=",
"str",
"index",
"of",
"(",
"separator",
",",
"start",
"index",
")",
")",
"!",
"=",
"-",
"1",
")",
"{",
"str",
"list",
"add",
"(",
"str",
"substring",
"(",
"start",
"index",
",",
"next",
"index",
")",
")",
";",
"start",
"index",
"=",
"next",
"index",
"+",
"1",
";",
"}",
"str",
"list",
"add",
"(",
"str",
"substring",
"(",
"start",
"index",
")",
")",
";",
"/",
"/",
"remove",
"trailing",
"empty",
"split",
"(",
"s",
")",
"int",
"last",
"=",
"str",
"list",
"size",
"(",
")",
";",
"/",
"/",
"last",
"split",
"while",
"(",
"-",
"-",
"last",
">",
"=",
"0",
"&",
"&",
"\"",
"\"",
"equals",
"(",
"str",
"list",
"get",
"(",
"last",
")",
")",
")",
"{",
"str",
"list",
"remove",
"(",
"last",
")",
";",
"}",
"return",
"str",
"list",
"to",
"array",
"(",
"new",
"string",
"[",
"str",
"list",
"size",
"(",
")",
"]",
")",
";",
"}"
]
|
[
"replaces",
"all",
"escape",
"characters",
"(",
"'",
"\\",
"'",
")",
"by",
"escaping",
"that",
"character",
"(",
"'",
"\\",
"\\",
"'",
")",
"note",
":",
"this",
"method",
"will",
"not",
"escape",
"characters",
"that",
"are",
"escaping",
"a",
"globbing",
"character",
"(",
"see",
"{",
"@",
"link",
"#",
"non",
"glob",
"backslash",
"pattern",
"}"
]
| [
"private",
"static",
"string",
"escape",
"escape",
"characters",
"(",
"string",
"input",
")",
"{",
"/",
"/",
"replace",
"all",
"'",
"\\",
"'",
"chars",
"that",
"are",
"not",
"followed",
"by",
"*",
"known",
"*",
"special",
"chars",
"matcher",
"backslash",
"matcher",
"=",
"non",
"glob",
"backslash",
"pattern",
"matcher",
"(",
"input",
")",
";",
"return",
"backslash",
"matcher",
"replace",
"all",
"(",
"\"",
"\\",
"\\",
"\\",
"\\",
"\\",
"\\",
"\\",
"\\",
"\"",
")",
";",
"}"
]
|
[
"indicates",
"whether",
"the",
"given",
"class",
"is",
"supported",
"by",
"this",
"converter"
]
| [
"protected",
"abstract",
"boolean",
"supports",
"(",
"class",
"<",
"?",
">",
"clazz",
")",
";"
]
|
[
"returns",
"the",
"unique",
"name",
"of",
"the",
"{",
"@",
"link",
"certificate",
"provider",
"}",
"plugin"
]
| [
"string",
"get",
"name",
"(",
")",
";"
]
|
[
"creates",
"track",
"selections",
"for",
"the",
"provided",
"{",
"@",
"link",
"definition",
"definitions",
"}",
"implementations",
"that",
"create",
"at",
"most",
"one",
"adaptive",
"track",
"selection",
"may",
"use",
"{",
"@",
"link",
"track",
"selection",
"util",
"#",
"create",
"track",
"selections",
"for",
"definitions",
"}"
]
| [
"track",
"selection",
"[",
"]",
"create",
"track",
"selections",
"(",
"@",
"nullable",
"type",
"definition",
"[",
"]",
"definitions",
",",
"bandwidth",
"meter",
"bandwidth",
"meter",
")",
";"
]
|
[
"when",
"enabled",
",",
"a",
"receipt",
"header",
"is",
"automatically",
"added",
"to",
"future",
"{",
"@",
"code",
"send",
"}",
"and",
"{",
"@",
"code",
"subscribe",
"}",
"operations",
"on",
"this",
"session",
",",
"which",
"causes",
"the",
"server",
"to",
"return",
"a",
"receipt",
"an",
"application",
"can",
"then",
"use",
"the",
"{",
"@",
"link",
"stomp",
"session",
"receiptable",
"receiptable",
"}",
"returned",
"from",
"the",
"operation",
"to",
"track",
"the",
"receipt",
"a",
"receipt",
"header",
"can",
"also",
"be",
"added",
"manually",
"through",
"the",
"overloaded",
"methods",
"that",
"accept",
"{",
"@",
"code",
"stomp",
"headers",
"}"
]
| [
"void",
"set",
"auto",
"receipt",
"(",
"boolean",
"enabled",
")",
";"
]
|
[
"get",
"the",
"admin",
"interface",
"for",
"a",
"router"
]
| [
"public",
"static",
"router",
"client",
"get",
"admin",
"client",
"(",
"final",
"router",
"router",
")",
"throws",
"i",
"o",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"hdfs",
"configuration",
"(",
")",
";",
"inet",
"socket",
"address",
"router",
"socket",
"=",
"router",
"get",
"admin",
"server",
"address",
"(",
")",
";",
"return",
"new",
"router",
"client",
"(",
"router",
"socket",
",",
"conf",
")",
";",
"}"
]
|
[
"creates",
"a",
"{",
"@",
"link",
"data",
"sink",
"}",
"instance"
]
| [
"data",
"sink",
"create",
"data",
"sink",
"(",
")",
";"
]
|
[
"model",
"tests",
"for",
"tag"
]
| [
"public",
"void",
"test",
"tag",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"tag",
"}"
]
|
[
"return",
"the",
"current",
"input",
"symbol",
"index",
"0",
"n",
"where",
"n",
"indicates",
"the",
"last",
"symbol",
"has",
"been",
"read",
"the",
"index",
"is",
"the",
"index",
"of",
"char",
"to",
"be",
"returned",
"from",
"la",
"(",
"1",
")"
]
| [
"public",
"int",
"index",
"(",
")",
"{",
"return",
"p",
";",
"}"
]
|
[
"finds",
"your",
"{",
"@",
"link",
"account",
"}",
"at",
"the",
"acme",
"server",
"it",
"will",
"be",
"found",
"by",
"your",
"user",
"'",
"s",
"public",
"key",
"if",
"your",
"key",
"is",
"not",
"known",
"to",
"the",
"server",
"yet",
",",
"a",
"new",
"account",
"will",
"be",
"created"
]
| [
"private",
"static",
"account",
"find",
"or",
"register",
"account",
"(",
"final",
"session",
"session",
",",
"final",
"key",
"pair",
"account",
"key",
")",
"throws",
"acme",
"exception",
"{",
"val",
"tos",
"=",
"session",
"get",
"metadata",
"(",
")",
"get",
"terms",
"of",
"service",
"(",
")",
";",
"logger",
"debug",
"(",
"\"",
"accepted",
"terms",
"of",
"service",
"url",
":",
"[",
"{",
"}",
"]",
"\"",
",",
"tos",
")",
";",
"val",
"account",
"=",
"new",
"account",
"builder",
"(",
")",
"agree",
"to",
"terms",
"of",
"service",
"(",
")",
"use",
"key",
"pair",
"(",
"account",
"key",
")",
"create",
"(",
"session",
")",
";",
"logger",
"info",
"(",
"\"",
"registered",
"new",
"user",
"w",
"/",
"url",
":",
"[",
"{",
"}",
"]",
"\"",
",",
"account",
"get",
"location",
"(",
")",
")",
";",
"return",
"account",
";",
"}"
]
|
[
"clear",
"the",
"entire",
"transaction",
"synchronization",
"state",
"for",
"the",
"current",
"thread",
":",
"registered",
"synchronizations",
"as",
"well",
"as",
"the",
"various",
"transaction",
"characteristics"
]
| [
"public",
"static",
"void",
"clear",
"(",
")",
"{",
"synchronizations",
"remove",
"(",
")",
";",
"current",
"transaction",
"name",
"remove",
"(",
")",
";",
"current",
"transaction",
"read",
"only",
"remove",
"(",
")",
";",
"current",
"transaction",
"isolation",
"level",
"remove",
"(",
")",
";",
"actual",
"transaction",
"active",
"remove",
"(",
")",
";",
"}"
]
|
[
"returns",
"the",
"greatest",
"of",
"the",
"specified",
"values",
"according",
"to",
"this",
"ordering",
"if",
"there",
"are",
"multiple",
"greatest",
"values",
",",
"the",
"first",
"of",
"those",
"is",
"returned",
"the",
"iterator",
"will",
"be",
"left",
"exhausted",
":",
"its",
"{",
"@",
"code",
"has",
"next",
"(",
")",
"}",
"method",
"will",
"return",
"{",
"@",
"code",
"false",
"}",
"<",
"b",
">",
"java",
"8",
"users",
":",
"<",
"b",
">",
"use",
"{",
"@",
"code",
"streams",
"stream",
"(",
"iterator",
")",
"max",
"(",
"this",
"comparator",
")",
"get",
"(",
")",
"}",
"instead",
"(",
"but",
"note",
"that",
"it",
"does",
"not",
"guarantee",
"which",
"tied",
"maximum",
"element",
"is",
"returned",
")"
]
| [
"public",
"<",
"e",
"extends",
"t",
">",
"e",
"max",
"(",
"iterator",
"<",
"e",
">",
"iterator",
")",
"{",
"/",
"/",
"let",
"this",
"throw",
"no",
"such",
"element",
"exception",
"as",
"necessary",
"e",
"max",
"so",
"far",
"=",
"iterator",
"next",
"(",
")",
";",
"while",
"(",
"iterator",
"has",
"next",
"(",
")",
")",
"{",
"max",
"so",
"far",
"=",
"max",
"(",
"max",
"so",
"far",
",",
"iterator",
"next",
"(",
")",
")",
";",
"}",
"return",
"max",
"so",
"far",
";",
"}"
]
|
[
"end",
"to",
"end",
"test",
"for",
"request",
"and",
"response",
"headers",
"exercises",
"the",
"mock",
"http",
"client",
"ability",
"to",
"send",
"back",
"whatever",
"headers",
"it",
"has",
"received"
]
| [
"public",
"void",
"test",
"headers",
"(",
")",
"throws",
"exception",
"{",
"for",
"(",
"string",
"method",
":",
"get",
"http",
"methods",
"(",
")",
")",
"{",
"final",
"header",
"[",
"]",
"request",
"headers",
"=",
"rest",
"client",
"test",
"util",
"random",
"headers",
"(",
"get",
"random",
"(",
")",
",",
"\"",
"header",
"\"",
")",
";",
"final",
"int",
"status",
"code",
"=",
"random",
"status",
"code",
"(",
"get",
"random",
"(",
")",
")",
";",
"request",
"request",
"=",
"new",
"request",
"(",
"method",
",",
"\"",
"/",
"\"",
"+",
"status",
"code",
")",
";",
"request",
"options",
"builder",
"options",
"=",
"request",
"get",
"options",
"(",
")",
"to",
"builder",
"(",
")",
";",
"for",
"(",
"header",
"request",
"header",
":",
"request",
"headers",
")",
"{",
"options",
"add",
"header",
"(",
"request",
"header",
"get",
"name",
"(",
")",
",",
"request",
"header",
"get",
"value",
"(",
")",
")",
";",
"}",
"request",
"set",
"options",
"(",
"options",
")",
";",
"response",
"es",
"response",
";",
"try",
"{",
"es",
"response",
"=",
"perform",
"request",
"sync",
"or",
"async",
"(",
"rest",
"client",
",",
"request",
")",
";",
"}",
"catch",
"(",
"response",
"exception",
"e",
")",
"{",
"es",
"response",
"=",
"e",
"get",
"response",
"(",
")",
";",
"}",
"assert",
"that",
"(",
"es",
"response",
"get",
"status",
"line",
"(",
")",
"get",
"status",
"code",
"(",
")",
",",
"equal",
"to",
"(",
"status",
"code",
")",
")",
";",
"assert",
"headers",
"(",
"default",
"headers",
",",
"request",
"headers",
",",
"es",
"response",
"get",
"headers",
"(",
")",
",",
"collections",
"<",
"string",
">",
"empty",
"set",
"(",
")",
")",
";",
"assert",
"false",
"(",
"es",
"response",
"has",
"warnings",
"(",
")",
")",
";",
"}",
"}"
]
|
[
"get",
"snake",
"case"
]
| [
"public",
"integer",
"get",
"snake",
"case",
"(",
")",
"{",
"return",
"snake",
"case",
";",
"}"
]
|
[
"whether",
"the",
"symbol",
"can",
"be",
"merged",
"into",
"another",
"resource",
"table",
"without",
"there",
"being",
"an",
"existing",
"definition",
"to",
"override",
"used",
"for",
"overlays",
"and",
"set",
"to",
"true",
"when",
"&",
"lt",
";",
"add",
"-",
"resource",
"&",
"gt",
";",
"is",
"specified",
"<",
"code",
">",
"optional",
"bool",
"allow",
"new",
"=",
"4",
";",
"<",
"code",
">"
]
| [
"public",
"builder",
"clear",
"allow",
"new",
"(",
")",
"{",
"copy",
"on",
"write",
"(",
")",
";",
"instance",
"clear",
"allow",
"new",
"(",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"visit",
"a",
"parse",
"tree",
"produced",
"by",
"{",
"@",
"link",
"sql",
"base",
"parser",
"#",
"named",
"query",
"}"
]
| [
"t",
"visit",
"named",
"query",
"(",
"sql",
"base",
"parser",
"named",
"query",
"context",
"ctx",
")",
";"
]
|
[
"get",
"map",
"map",
"of",
"string"
]
| [
"public",
"map",
"<",
"string",
",",
"map",
"<",
"string",
",",
"string",
">",
">",
"get",
"map",
"map",
"of",
"string",
"(",
")",
"{",
"return",
"map",
"map",
"of",
"string",
";",
"}"
]
|
[
"if",
"set",
",",
"only",
"perform",
"this",
"update",
"request",
"if",
"the",
"document",
"was",
"last",
"modification",
"was",
"assigned",
"this",
"sequence",
"number",
"if",
"the",
"document",
"last",
"modification",
"was",
"assigned",
"a",
"different",
"sequence",
"number",
"a",
"{",
"@",
"link",
"org",
"elasticsearch",
"index",
"engine",
"version",
"conflict",
"engine",
"exception",
"}",
"will",
"be",
"thrown"
]
| [
"public",
"long",
"if",
"seq",
"no",
"(",
")",
"{",
"return",
"if",
"seq",
"no",
";",
"}"
]
|
[
"check",
"events",
"related",
"to",
"process",
"instance",
"delete",
"and",
"standalone",
"task",
"delete"
]
| [
"public",
"void",
"test",
"delete",
"event",
"does",
"not",
"dispath",
"complete",
"(",
")",
"throws",
"exception",
"{",
"process",
"instance",
"process",
"instance",
"=",
"runtime",
"service",
"start",
"process",
"instance",
"by",
"key",
"(",
"\"",
"one",
"task",
"process",
"\"",
")",
";",
"assert",
"that",
"(",
"process",
"instance",
")",
"is",
"not",
"null",
"(",
")",
";",
"listener",
"clear",
"events",
"received",
"(",
")",
";",
"task",
"task",
"=",
"task",
"service",
"create",
"task",
"query",
"(",
")",
"process",
"instance",
"id",
"(",
"process",
"instance",
"get",
"id",
"(",
")",
")",
"single",
"result",
"(",
")",
";",
"assert",
"that",
"(",
"task",
")",
"is",
"not",
"null",
"(",
")",
";",
"/",
"/",
"delete",
"process",
",",
"should",
"delete",
"task",
"as",
"well",
",",
"but",
"not",
"complete",
"runtime",
"service",
"delete",
"process",
"instance",
"(",
"process",
"instance",
"get",
"id",
"(",
")",
",",
"\"",
"testing",
"task",
"delete",
"events",
"\"",
")",
";",
"assert",
"that",
"(",
"listener",
"get",
"events",
"received",
"(",
")",
")",
"has",
"size",
"(",
"1",
")",
";",
"activiti",
"entity",
"event",
"event",
"=",
"(",
"activiti",
"entity",
"event",
")",
"listener",
"get",
"events",
"received",
"(",
")",
"get",
"(",
"0",
")",
";",
"assert",
"that",
"(",
"event",
"get",
"type",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"activiti",
"event",
"type",
"entity",
"deleted",
")",
";",
"assert",
"that",
"(",
"event",
"get",
"entity",
"(",
")",
")",
"is",
"instance",
"of",
"(",
"task",
"class",
")",
";",
"task",
"task",
"from",
"event",
"=",
"(",
"task",
")",
"event",
"get",
"entity",
"(",
")",
";",
"assert",
"that",
"(",
"task",
"from",
"event",
"get",
"id",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"task",
"get",
"id",
"(",
")",
")",
";",
"assert",
"execution",
"details",
"(",
"event",
",",
"process",
"instance",
")",
";",
"try",
"{",
"task",
"=",
"task",
"service",
"new",
"task",
"(",
")",
";",
"task",
"set",
"category",
"(",
"\"",
"123",
"\"",
")",
";",
"task",
"set",
"description",
"(",
"\"",
"description",
"\"",
")",
";",
"task",
"service",
"save",
"task",
"(",
"task",
")",
";",
"listener",
"clear",
"events",
"received",
"(",
")",
";",
"/",
"/",
"delete",
"standalone",
"task",
",",
"only",
"a",
"delete",
"-",
"event",
"should",
"be",
"dispatched",
"task",
"service",
"delete",
"task",
"(",
"task",
"get",
"id",
"(",
")",
")",
";",
"assert",
"that",
"(",
"listener",
"get",
"events",
"received",
"(",
")",
")",
"has",
"size",
"(",
"1",
")",
";",
"event",
"=",
"(",
"activiti",
"entity",
"event",
")",
"listener",
"get",
"events",
"received",
"(",
")",
"get",
"(",
"0",
")",
";",
"assert",
"that",
"(",
"event",
"get",
"type",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"activiti",
"event",
"type",
"entity",
"deleted",
")",
";",
"assert",
"that",
"(",
"event",
"get",
"entity",
"(",
")",
")",
"is",
"instance",
"of",
"(",
"task",
"class",
")",
";",
"task",
"from",
"event",
"=",
"(",
"task",
")",
"event",
"get",
"entity",
"(",
")",
";",
"assert",
"that",
"(",
"task",
"from",
"event",
"get",
"id",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"task",
"get",
"id",
"(",
")",
")",
";",
"assert",
"that",
"(",
"event",
"get",
"process",
"definition",
"id",
"(",
")",
")",
"is",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"event",
"get",
"process",
"instance",
"id",
"(",
")",
")",
"is",
"null",
"(",
")",
";",
"assert",
"that",
"(",
"event",
"get",
"execution",
"id",
"(",
")",
")",
"is",
"null",
"(",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"task",
"!",
"=",
"null",
")",
"{",
"string",
"task",
"id",
"=",
"task",
"get",
"id",
"(",
")",
";",
"task",
"=",
"task",
"service",
"create",
"task",
"query",
"(",
")",
"task",
"id",
"(",
"task",
"id",
")",
"single",
"result",
"(",
")",
";",
"if",
"(",
"task",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"if",
"task",
"still",
"exists",
",",
"delete",
"it",
"to",
"have",
"a",
"clean",
"db",
"after",
"/",
"/",
"test",
"task",
"service",
"delete",
"task",
"(",
"task",
"id",
")",
";",
"}",
"history",
"service",
"delete",
"historic",
"task",
"instance",
"(",
"task",
"id",
")",
";",
"}",
"}",
"}"
]
|
[
"set",
"the",
"default",
"{",
"@",
"link",
"cache",
"resolver",
"}",
"that",
"this",
"cache",
"aspect",
"should",
"delegate",
"to",
"if",
"no",
"specific",
"cache",
"resolver",
"has",
"been",
"set",
"for",
"the",
"operation",
"the",
"default",
"resolver",
"resolves",
"the",
"caches",
"against",
"their",
"names",
"and",
"the",
"default",
"cache",
"manager"
]
| [
"public",
"void",
"set",
"cache",
"resolver",
"(",
"@",
"nullable",
"cache",
"resolver",
"cache",
"resolver",
")",
"{",
"this",
"cache",
"resolver",
"=",
"singleton",
"supplier",
"of",
"nullable",
"(",
"cache",
"resolver",
")",
";",
"}"
]
|
[
"decodes",
"the",
"client",
"connection",
"preface",
"string",
"from",
"the",
"input",
"buffer"
]
| [
"private",
"boolean",
"read",
"client",
"preface",
"string",
"(",
"byte",
"buf",
"in",
")",
"throws",
"http",
"2",
"exception",
"{",
"if",
"(",
"client",
"preface",
"string",
"=",
"=",
"null",
")",
"{",
"return",
"true",
";",
"}",
"int",
"preface",
"remaining",
"=",
"client",
"preface",
"string",
"readable",
"bytes",
"(",
")",
";",
"int",
"bytes",
"read",
"=",
"min",
"(",
"in",
"readable",
"bytes",
"(",
")",
",",
"preface",
"remaining",
")",
";",
"/",
"/",
"if",
"the",
"input",
"so",
"far",
"doesn",
"'",
"t",
"match",
"the",
"preface",
",",
"break",
"the",
"connection",
"if",
"(",
"bytes",
"read",
"=",
"=",
"0",
"|",
"|",
"!",
"byte",
"buf",
"util",
"equals",
"(",
"in",
",",
"in",
"reader",
"index",
"(",
")",
",",
"client",
"preface",
"string",
",",
"client",
"preface",
"string",
"reader",
"index",
"(",
")",
",",
"bytes",
"read",
")",
")",
"{",
"int",
"max",
"search",
"=",
"1024",
";",
"/",
"/",
"picked",
"because",
"512",
"is",
"too",
"little",
",",
"and",
"2048",
"too",
"much",
"int",
"http",
"1",
"index",
"=",
"byte",
"buf",
"util",
"index",
"of",
"(",
"http",
"1",
"x",
"buf",
",",
"in",
"slice",
"(",
"in",
"reader",
"index",
"(",
")",
",",
"min",
"(",
"in",
"readable",
"bytes",
"(",
")",
",",
"max",
"search",
")",
")",
")",
";",
"if",
"(",
"http",
"1",
"index",
"!",
"=",
"-",
"1",
")",
"{",
"string",
"chunk",
"=",
"in",
"to",
"string",
"(",
"in",
"reader",
"index",
"(",
")",
",",
"http",
"1",
"index",
"-",
"in",
"reader",
"index",
"(",
")",
",",
"charset",
"util",
"us",
"ascii",
")",
";",
"throw",
"connection",
"error",
"(",
"protocol",
"error",
",",
"\"",
"unexpected",
"http",
"/",
"1",
"x",
"request",
":",
"%",
"s",
"\"",
",",
"chunk",
")",
";",
"}",
"string",
"received",
"bytes",
"=",
"hex",
"dump",
"(",
"in",
",",
"in",
"reader",
"index",
"(",
")",
",",
"min",
"(",
"in",
"readable",
"bytes",
"(",
")",
",",
"client",
"preface",
"string",
"readable",
"bytes",
"(",
")",
")",
")",
";",
"throw",
"connection",
"error",
"(",
"protocol",
"error",
",",
"\"",
"http",
"/",
"2",
"client",
"preface",
"string",
"missing",
"or",
"corrupt",
"\"",
"+",
"\"",
"hex",
"dump",
"for",
"received",
"bytes",
":",
"%",
"s",
"\"",
",",
"received",
"bytes",
")",
";",
"}",
"in",
"skip",
"bytes",
"(",
"bytes",
"read",
")",
";",
"client",
"preface",
"string",
"skip",
"bytes",
"(",
"bytes",
"read",
")",
";",
"if",
"(",
"!",
"client",
"preface",
"string",
"is",
"readable",
"(",
")",
")",
"{",
"/",
"/",
"entire",
"preface",
"has",
"been",
"read",
"client",
"preface",
"string",
"release",
"(",
")",
";",
"client",
"preface",
"string",
"=",
"null",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
]
|
[
"test",
"that",
"after",
"renaming",
",",
"the",
"nested",
"subdirectory",
"is",
"moved",
"along",
"with",
"all",
"its",
"ancestors"
]
| [
"public",
"void",
"test",
"rename",
"populates",
"directory",
"ancestors",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"final",
"file",
"system",
"fs",
"=",
"get",
"file",
"system",
"(",
")",
";",
"final",
"path",
"src",
"=",
"path",
"(",
"\"",
"test",
"rename",
"populates",
"directory",
"ancestors",
"/",
"source",
"\"",
")",
";",
"fs",
"mkdirs",
"(",
"src",
")",
";",
"final",
"string",
"nested",
"dir",
"=",
"\"",
"/",
"dir",
"1",
"/",
"dir",
"2",
"/",
"dir",
"3",
"/",
"dir",
"4",
"\"",
";",
"fs",
"mkdirs",
"(",
"path",
"(",
"src",
"+",
"nested",
"dir",
")",
")",
";",
"path",
"dst",
"=",
"path",
"(",
"\"",
"test",
"rename",
"populates",
"directory",
"ancestors",
"new",
"\"",
")",
";",
"fs",
"rename",
"(",
"src",
",",
"dst",
")",
";",
"validate",
"ancestors",
"moved",
"(",
"src",
",",
"dst",
",",
"nested",
"dir",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"this",
"shards",
"is",
"search",
"idle"
]
| [
"public",
"final",
"boolean",
"is",
"search",
"idle",
"(",
")",
"{",
"return",
"(",
"thread",
"pool",
"relative",
"time",
"in",
"millis",
"(",
")",
"-",
"last",
"searcher",
"access",
"get",
"(",
")",
")",
">",
"=",
"index",
"settings",
"get",
"search",
"idle",
"after",
"(",
")",
"get",
"millis",
"(",
")",
";",
"}"
]
|
[
"return",
"the",
"additional",
"(",
"undeclared",
")",
"property",
"with",
"the",
"specified",
"name"
]
| [
"public",
"list",
"get",
"additional",
"property",
"(",
"string",
"key",
")",
"{",
"if",
"(",
"this",
"additional",
"properties",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"this",
"additional",
"properties",
"get",
"(",
"key",
")",
";",
"}"
]
|
[
"determine",
"the",
"type",
"for",
"the",
"given",
"factory",
"bean"
]
| [
"protected",
"class",
"<",
"?",
">",
"get",
"type",
"for",
"factory",
"bean",
"(",
"factory",
"bean",
"<",
"?",
">",
"factory",
"bean",
")",
"{",
"try",
"{",
"if",
"(",
"system",
"get",
"security",
"manager",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"access",
"controller",
"do",
"privileged",
"(",
"(",
"privileged",
"action",
"<",
"class",
"<",
"?",
">",
">",
")",
"factory",
"bean",
":",
":",
"get",
"object",
"type",
",",
"get",
"access",
"control",
"context",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"factory",
"bean",
"get",
"object",
"type",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"throwable",
"ex",
")",
"{",
"/",
"/",
"thrown",
"from",
"the",
"factory",
"bean",
"'",
"s",
"get",
"object",
"type",
"implementation",
"logger",
"info",
"(",
"\"",
"factory",
"bean",
"threw",
"exception",
"from",
"get",
"object",
"type",
",",
"despite",
"the",
"contract",
"saying",
"\"",
"+",
"\"",
"that",
"it",
"should",
"return",
"null",
"if",
"the",
"type",
"of",
"its",
"object",
"cannot",
"be",
"determined",
"yet",
"\"",
",",
"ex",
")",
";",
"return",
"null",
";",
"}",
"}"
]
|
[
"returns",
"a",
"view",
"of",
"a",
"slice",
"of",
"this",
"byte",
"source",
"that",
"is",
"at",
"most",
"{",
"@",
"code",
"length",
"}",
"bytes",
"long",
"starting",
"at",
"the",
"given",
"{",
"@",
"code",
"offset",
"}",
"if",
"{",
"@",
"code",
"offset",
"}",
"is",
"greater",
"than",
"the",
"size",
"of",
"this",
"source",
",",
"the",
"returned",
"source",
"will",
"be",
"empty",
"if",
"{",
"@",
"code",
"offset",
"+",
"length",
"}",
"is",
"greater",
"than",
"the",
"size",
"of",
"this",
"source",
",",
"the",
"returned",
"source",
"will",
"contain",
"the",
"slice",
"starting",
"at",
"{",
"@",
"code",
"offset",
"}",
"and",
"ending",
"at",
"the",
"end",
"of",
"this",
"source"
]
| [
"public",
"byte",
"source",
"slice",
"(",
"long",
"offset",
",",
"long",
"length",
")",
"{",
"return",
"new",
"sliced",
"byte",
"source",
"(",
"offset",
",",
"length",
")",
";",
"}"
]
|
[
"schedules",
"the",
"specified",
"object",
"to",
"be",
"released",
"when",
"the",
"caller",
"thread",
"terminates",
"note",
"that",
"this",
"operation",
"is",
"intended",
"to",
"simplify",
"reference",
"counting",
"of",
"ephemeral",
"objects",
"during",
"unit",
"tests",
"do",
"not",
"use",
"it",
"beyond",
"the",
"intended",
"use",
"case"
]
| [
"public",
"static",
"<",
"t",
">",
"t",
"release",
"later",
"(",
"t",
"msg",
")",
"{",
"return",
"release",
"later",
"(",
"msg",
",",
"1",
")",
";",
"}"
]
|
[
"add",
"custom",
"{",
"@",
"link",
"converter",
"converters",
"}",
"and",
"{",
"@",
"link",
"formatter",
"formatters",
"}",
"for",
"performing",
"type",
"conversion",
"and",
"formatting",
"of",
"annotated",
"controller",
"method",
"arguments"
]
| [
"default",
"void",
"add",
"formatters",
"(",
"formatter",
"registry",
"registry",
")",
"{",
"}"
]
|
[
"convenient",
"method",
"to",
"find",
"a",
"single",
"object",
"given",
"a",
"single",
"int",
"parameter"
]
| [
"public",
"t",
"find",
"object",
"(",
"int",
"p",
"1",
")",
"throws",
"data",
"access",
"exception",
"{",
"return",
"find",
"object",
"(",
"p",
"1",
",",
"null",
")",
";",
"}"
]
|
[
"return",
"the",
"draw",
"feedback",
"state"
]
| [
"boolean",
"get",
"draw",
"feedback",
"state",
"(",
")",
"{",
"return",
"draw",
"feedback",
";",
"}"
]
|
[
"returns",
"a",
"{",
"@",
"link",
"list",
"}",
"of",
"{",
"@",
"link",
"address",
"gap",
"}",
"gaps"
]
| [
"public",
"list",
"<",
"address",
"gap",
">",
"get",
"address",
"gap",
"list",
"(",
")",
"{",
"return",
"address",
"gap",
"list",
";",
"}"
]
|
[
"called",
"when",
"the",
"visible",
"bounds",
"change",
"to",
"perform",
"incremental",
"mount",
"this",
"is",
"always",
"called",
"on",
"a",
"non",
"-",
"dirty",
"mount",
"with",
"a",
"non",
"-",
"null",
"local",
"visible",
"rect"
]
| [
"public",
"void",
"on",
"visible",
"bounds",
"changed",
"(",
"final",
"extension",
"state",
"<",
"incremental",
"mount",
"extension",
"state",
">",
"extension",
"state",
",",
"final",
"rect",
"local",
"visible",
"rect",
")",
"{",
"assert",
"main",
"thread",
"(",
")",
";",
"final",
"incremental",
"mount",
"extension",
"state",
"state",
"=",
"extension",
"state",
"get",
"state",
"(",
")",
";",
"if",
"(",
"state",
"m",
"input",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"something",
"notified",
"the",
"host",
"that",
"the",
"visible",
"bounds",
"changed",
",",
"but",
"nothing",
"was",
"mounted",
"yet",
"/",
"/",
"nothing",
"to",
"do",
"return",
";",
"}",
"if",
"(",
"local",
"visible",
"rect",
"is",
"empty",
"(",
")",
"&",
"&",
"state",
"m",
"previous",
"local",
"visible",
"rect",
"is",
"empty",
"(",
")",
")",
"{",
"return",
";",
"}",
"/",
"/",
"horizontally",
"scrolling",
"or",
"no",
"visible",
"rect",
"can",
"'",
"t",
"incrementally",
"mount",
"if",
"(",
"state",
"m",
"previous",
"local",
"visible",
"rect",
"is",
"empty",
"(",
")",
"|",
"|",
"local",
"visible",
"rect",
"is",
"empty",
"(",
")",
"|",
"|",
"local",
"visible",
"rect",
"left",
"!",
"=",
"state",
"m",
"previous",
"local",
"visible",
"rect",
"left",
"|",
"|",
"local",
"visible",
"rect",
"right",
"!",
"=",
"state",
"m",
"previous",
"local",
"visible",
"rect",
"right",
")",
"{",
"init",
"incremental",
"mount",
"(",
"extension",
"state",
",",
"local",
"visible",
"rect",
",",
"true",
")",
";",
"}",
"else",
"{",
"perform",
"incremental",
"mount",
"(",
"extension",
"state",
",",
"local",
"visible",
"rect",
")",
";",
"}",
"set",
"visible",
"rect",
"(",
"state",
",",
"local",
"visible",
"rect",
")",
";",
"}"
]
|
[
"register",
"a",
"listener",
"that",
"will",
"be",
"called",
"when",
"this",
"model",
"is",
"bound",
"to",
"a",
"view",
"the",
"listener",
"will",
"contribute",
"to",
"this",
"model",
"'",
"s",
"hash",
"code",
"state",
"per",
"the",
"{",
"@",
"link",
"com",
"airbnb",
"epoxy",
"epoxy",
"attribute",
"option",
"#",
"do",
"not",
"hash",
"}",
"rules",
"you",
"may",
"clear",
"the",
"listener",
"by",
"setting",
"a",
"null",
"value",
",",
"or",
"by",
"calling",
"{",
"@",
"link",
"#",
"reset",
"(",
")",
"}"
]
| [
"public",
"group",
"prop",
"multiple",
"supported",
"attribute",
"different",
"name",
"model",
"view",
"model",
"on",
"bind",
"(",
"on",
"model",
"bound",
"listener",
"<",
"group",
"prop",
"multiple",
"supported",
"attribute",
"different",
"name",
"model",
"view",
"model",
",",
"group",
"prop",
"multiple",
"supported",
"attribute",
"different",
"name",
"model",
"view",
">",
"listener",
")",
"{",
"on",
"mutation",
"(",
")",
";",
"this",
"on",
"model",
"bound",
"listener",
"epoxy",
"generated",
"model",
"=",
"listener",
";",
"return",
"this",
";",
"}"
]
|
[
"tests",
"that",
"repeated",
"local",
"{",
"@",
"link",
"partition",
"not",
"found",
"exception",
"}",
"s",
"ultimately",
"fail",
"the",
"receiver"
]
| [
"public",
"void",
"test",
"local",
"partition",
"not",
"found",
"(",
")",
"throws",
"exception",
"{",
"resource",
"i",
"d",
"producer",
"location",
"=",
"resource",
"i",
"d",
"generate",
"(",
")",
";",
"netty",
"shuffle",
"descriptor",
"shuffle",
"descriptor",
"=",
"create",
"remote",
"with",
"id",
"and",
"location",
"(",
"new",
"intermediate",
"result",
"partition",
"i",
"d",
"(",
")",
",",
"producer",
"location",
")",
";",
"task",
"deployment",
"descriptor",
"tdd",
"=",
"create",
"receiver",
"(",
"shuffle",
"descriptor",
")",
";",
"execution",
"attempt",
"i",
"d",
"eid",
"=",
"tdd",
"get",
"execution",
"attempt",
"id",
"(",
")",
";",
"configuration",
"config",
"=",
"new",
"configuration",
"(",
")",
";",
"config",
"set",
"integer",
"(",
"netty",
"shuffle",
"environment",
"options",
"network",
"request",
"backoff",
"initial",
",",
"100",
")",
";",
"config",
"set",
"integer",
"(",
"netty",
"shuffle",
"environment",
"options",
"network",
"request",
"backoff",
"max",
",",
"200",
")",
";",
"final",
"completable",
"future",
"<",
"void",
">",
"task",
"running",
"future",
"=",
"new",
"completable",
"future",
"<",
">",
"(",
")",
";",
"final",
"completable",
"future",
"<",
"void",
">",
"task",
"failed",
"future",
"=",
"new",
"completable",
"future",
"<",
">",
"(",
")",
";",
"try",
"(",
"task",
"submission",
"test",
"environment",
"env",
"=",
"new",
"task",
"submission",
"test",
"environment",
"builder",
"(",
"job",
"id",
")",
"set",
"resource",
"i",
"d",
"(",
"producer",
"location",
")",
"set",
"slot",
"size",
"(",
"1",
")",
"add",
"task",
"manager",
"action",
"listener",
"(",
"eid",
",",
"execution",
"state",
"running",
",",
"task",
"running",
"future",
")",
"add",
"task",
"manager",
"action",
"listener",
"(",
"eid",
",",
"execution",
"state",
"failed",
",",
"task",
"failed",
"future",
")",
"set",
"configuration",
"(",
"config",
")",
"use",
"real",
"non",
"mock",
"shuffle",
"environment",
"(",
")",
"build",
"(",
")",
")",
"{",
"task",
"executor",
"gateway",
"tm",
"gateway",
"=",
"env",
"get",
"task",
"executor",
"gateway",
"(",
")",
";",
"task",
"slot",
"table",
"<",
"task",
">",
"task",
"slot",
"table",
"=",
"env",
"get",
"task",
"slot",
"table",
"(",
")",
";",
"task",
"slot",
"table",
"allocate",
"slot",
"(",
"0",
",",
"job",
"id",
",",
"tdd",
"get",
"allocation",
"id",
"(",
")",
",",
"time",
"seconds",
"(",
"60",
")",
")",
";",
"tm",
"gateway",
"submit",
"task",
"(",
"tdd",
",",
"env",
"get",
"job",
"master",
"id",
"(",
")",
",",
"timeout",
")",
"get",
"(",
")",
";",
"task",
"running",
"future",
"get",
"(",
")",
";",
"task",
"failed",
"future",
"get",
"(",
")",
";",
"assert",
"same",
"(",
"task",
"slot",
"table",
"get",
"task",
"(",
"eid",
")",
"get",
"execution",
"state",
"(",
")",
",",
"execution",
"state",
"failed",
")",
";",
"assert",
"that",
"(",
"task",
"slot",
"table",
"get",
"task",
"(",
"eid",
")",
"get",
"failure",
"cause",
"(",
")",
",",
"instance",
"of",
"(",
"partition",
"not",
"found",
"exception",
"class",
")",
")",
";",
"}",
"}"
]
|
[
"checks",
"the",
"get",
"operation",
"fails",
"when",
"the",
"downloaded",
"file",
"(",
"from",
"ha",
"store",
")",
"is",
"corrupt",
",",
"i",
"e",
"its",
"content",
"'",
"s",
"hash",
"does",
"not",
"match",
"the",
"{",
"@",
"link",
"blob",
"key",
"}",
"'",
"s",
"hash",
",",
"using",
"a",
"permanent",
"blob"
]
| [
"public",
"static",
"void",
"test",
"get",
"fails",
"from",
"corrupt",
"file",
"(",
"job",
"i",
"d",
"job",
"id",
",",
"configuration",
"config",
",",
"blob",
"store",
"blob",
"store",
",",
"expected",
"exception",
"expected",
"exception",
")",
"throws",
"i",
"o",
"exception",
"{",
"test",
"get",
"fails",
"from",
"corrupt",
"file",
"(",
"job",
"id",
",",
"permanent",
"blob",
",",
"true",
",",
"config",
",",
"blob",
"store",
",",
"expected",
"exception",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"connection",
"get",
"connection",
"(",
")",
"throws",
"s",
"q",
"l",
"exception",
"{",
"if",
"(",
"is",
"closed",
"(",
")",
")",
"{",
"throw",
"new",
"s",
"q",
"l",
"exception",
"(",
"\"",
"hikari",
"data",
"source",
"\"",
"+",
"this",
"+",
"\"",
"has",
"been",
"closed",
"\"",
")",
";",
"}",
"if",
"(",
"fast",
"path",
"pool",
"!",
"=",
"null",
")",
"{",
"return",
"fast",
"path",
"pool",
"get",
"connection",
"(",
")",
";",
"}",
"/",
"/",
"see",
"http",
":",
"/",
"/",
"en",
"wikipedia",
"org",
"/",
"wiki",
"/",
"double",
"-",
"checked",
"locking",
"#",
"usage",
"in",
"java",
"hikari",
"pool",
"result",
"=",
"pool",
";",
"if",
"(",
"result",
"=",
"=",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"result",
"=",
"pool",
";",
"if",
"(",
"result",
"=",
"=",
"null",
")",
"{",
"validate",
"(",
")",
";",
"logger",
"info",
"(",
"\"",
"{",
"}",
"-",
"starting",
"\"",
",",
"get",
"pool",
"name",
"(",
")",
")",
";",
"try",
"{",
"pool",
"=",
"result",
"=",
"new",
"hikari",
"pool",
"(",
"this",
")",
";",
"this",
"seal",
"(",
")",
";",
"}",
"catch",
"(",
"pool",
"initialization",
"exception",
"pie",
")",
"{",
"if",
"(",
"pie",
"get",
"cause",
"(",
")",
"instanceof",
"s",
"q",
"l",
"exception",
")",
"{",
"throw",
"(",
"s",
"q",
"l",
"exception",
")",
"pie",
"get",
"cause",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"pie",
";",
"}",
"}",
"logger",
"info",
"(",
"\"",
"{",
"}",
"-",
"start",
"completed",
"\"",
",",
"get",
"pool",
"name",
"(",
")",
")",
";",
"}",
"}",
"}",
"return",
"result",
"get",
"connection",
"(",
")",
";",
"}"
]
|
[
"visit",
"a",
"parse",
"tree",
"produced",
"by",
"the",
"{",
"@",
"code",
"subquery",
"expression",
"}",
"labeled",
"alternative",
"in",
"{",
"@",
"link",
"sql",
"base",
"parser",
"#",
"primary",
"expression",
"}"
]
| [
"t",
"visit",
"subquery",
"expression",
"(",
"sql",
"base",
"parser",
"subquery",
"expression",
"context",
"ctx",
")",
";"
]
|
[
"returns",
"the",
"base",
"-",
"2",
"logarithm",
"of",
"{",
"@",
"code",
"x",
"}",
",",
"rounded",
"according",
"to",
"the",
"specified",
"rounding",
"mode"
]
| [
"public",
"static",
"int",
"log",
"2",
"(",
"long",
"x",
",",
"rounding",
"mode",
"mode",
")",
"{",
"check",
"positive",
"(",
"\"",
"x",
"\"",
",",
"x",
")",
";",
"switch",
"(",
"mode",
")",
"{",
"case",
"unnecessary",
":",
"check",
"rounding",
"unnecessary",
"(",
"is",
"power",
"of",
"two",
"(",
"x",
")",
")",
";",
"/",
"/",
"fall",
"through",
"case",
"down",
":",
"case",
"floor",
":",
"return",
"(",
"long",
"size",
"-",
"1",
")",
"-",
"long",
"number",
"of",
"leading",
"zeros",
"(",
"x",
")",
";",
"case",
"up",
":",
"case",
"ceiling",
":",
"return",
"long",
"size",
"-",
"long",
"number",
"of",
"leading",
"zeros",
"(",
"x",
"-",
"1",
")",
";",
"case",
"half",
"down",
":",
"case",
"half",
"up",
":",
"case",
"half",
"even",
":",
"/",
"/",
"since",
"sqrt",
"(",
"2",
")",
"is",
"irrational",
",",
"log",
"2",
"(",
"x",
")",
"-",
"log",
"floor",
"cannot",
"be",
"exactly",
"0",
"5",
"int",
"leading",
"zeros",
"=",
"long",
"number",
"of",
"leading",
"zeros",
"(",
"x",
")",
";",
"long",
"cmp",
"=",
"max",
"power",
"of",
"sqrt2",
"unsigned",
">",
">",
">",
"leading",
"zeros",
";",
"/",
"/",
"floor",
"(",
"2",
"^",
"(",
"log",
"floor",
"+",
"0",
"5",
")",
")",
"int",
"log",
"floor",
"=",
"(",
"long",
"size",
"-",
"1",
")",
"-",
"leading",
"zeros",
";",
"return",
"log",
"floor",
"+",
"less",
"than",
"branch",
"free",
"(",
"cmp",
",",
"x",
")",
";",
"default",
":",
"throw",
"new",
"assertion",
"error",
"(",
"\"",
"impossible",
"\"",
")",
";",
"}",
"}"
]
|
[
"creates",
"list",
"of",
"users",
"with",
"given",
"input",
"array"
]
| [
"public",
"void",
"create",
"users",
"with",
"list",
"input",
"(",
"list",
"<",
"user",
">",
"body",
")",
"throws",
"api",
"exception",
"{",
"object",
"local",
"var",
"post",
"body",
"=",
"body",
";",
"/",
"/",
"verify",
"the",
"required",
"parameter",
"'",
"body",
"'",
"is",
"set",
"if",
"(",
"body",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"api",
"exception",
"(",
"400",
",",
"\"",
"missing",
"the",
"required",
"parameter",
"'",
"body",
"'",
"when",
"calling",
"create",
"users",
"with",
"list",
"input",
"\"",
")",
";",
"}",
"/",
"/",
"create",
"path",
"and",
"map",
"variables",
"string",
"local",
"var",
"path",
"=",
"\"",
"/",
"user",
"/",
"create",
"with",
"list",
"\"",
";",
"/",
"/",
"query",
"params",
"list",
"<",
"pair",
">",
"local",
"var",
"query",
"params",
"=",
"new",
"array",
"list",
"<",
"pair",
">",
"(",
")",
";",
"list",
"<",
"pair",
">",
"local",
"var",
"collection",
"query",
"params",
"=",
"new",
"array",
"list",
"<",
"pair",
">",
"(",
")",
";",
"map",
"<",
"string",
",",
"string",
">",
"local",
"var",
"header",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"map",
"<",
"string",
",",
"string",
">",
"local",
"var",
"cookie",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"map",
"<",
"string",
",",
"object",
">",
"local",
"var",
"form",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"object",
">",
"(",
")",
";",
"final",
"string",
"[",
"]",
"local",
"var",
"accepts",
"=",
"{",
"}",
";",
"final",
"string",
"local",
"var",
"accept",
"=",
"api",
"client",
"select",
"header",
"accept",
"(",
"local",
"var",
"accepts",
")",
";",
"final",
"string",
"[",
"]",
"local",
"var",
"content",
"types",
"=",
"{",
"}",
";",
"final",
"string",
"local",
"var",
"content",
"type",
"=",
"api",
"client",
"select",
"header",
"content",
"type",
"(",
"local",
"var",
"content",
"types",
")",
";",
"string",
"[",
"]",
"local",
"var",
"auth",
"names",
"=",
"new",
"string",
"[",
"]",
"{",
"}",
";",
"api",
"client",
"invoke",
"a",
"p",
"i",
"(",
"local",
"var",
"path",
",",
"\"",
"post",
"\"",
",",
"local",
"var",
"query",
"params",
",",
"local",
"var",
"collection",
"query",
"params",
",",
"local",
"var",
"post",
"body",
",",
"local",
"var",
"header",
"params",
",",
"local",
"var",
"cookie",
"params",
",",
"local",
"var",
"form",
"params",
",",
"local",
"var",
"accept",
",",
"local",
"var",
"content",
"type",
",",
"local",
"var",
"auth",
"names",
",",
"null",
")",
";",
"}"
]
|
[
"whether",
"to",
"handle",
"http",
"options",
"requests",
"this",
"is",
"delegated",
"to",
"{",
"@",
"link",
"configurable",
"mock",
"mvc",
"builder",
"#",
"dispatch",
"options",
"(",
"boolean",
")",
"}"
]
| [
"<",
"t",
"extends",
"b",
">",
"t",
"dispatch",
"options",
"(",
"boolean",
"dispatch",
"options",
")",
";"
]
|
[
"returns",
"the",
"segment",
"portion",
"of",
"the",
"entry",
"point"
]
| [
"public",
"short",
"get",
"entry",
"point",
"segment",
"(",
")",
"{",
"return",
"(",
"short",
")",
"(",
"(",
"ne",
"csip",
">",
">",
"16",
")",
"&",
"0xffff",
")",
";",
"}"
]
|
[
"get",
"first",
"name"
]
| [
"public",
"string",
"get",
"first",
"name",
"(",
")",
"{",
"return",
"first",
"name",
";",
"}"
]
|
[
"create",
"a",
"new",
"mutable",
"{",
"@",
"link",
"annotation",
"attributes",
"}",
"instance",
"from",
"this",
"merged",
"annotation",
"the",
"{",
"@",
"link",
"adapt",
"adaptations",
"}",
"may",
"be",
"used",
"to",
"change",
"the",
"way",
"that",
"values",
"are",
"added"
]
| [
"annotation",
"attributes",
"as",
"annotation",
"attributes",
"(",
"adapt",
"adaptations",
")",
";"
]
|
[
"add",
"an",
"accept",
"entry",
"for",
"the",
"given",
"state",
"at",
"the",
"end",
"of",
"input"
]
| [
"public",
"boolean",
"put",
"accept",
"(",
"int",
"from",
"state",
")",
"{",
"return",
"put",
"(",
"from",
"state",
",",
"assembly",
"e",
"o",
"i",
"eoi",
",",
"accept",
"action",
"accept",
")",
";",
"}"
]
|
[
"equivalent",
"to",
"arrays",
"copy",
"of",
"range",
"(",
"source",
",",
"from",
",",
"to",
",",
"array",
"of",
"type",
"get",
"class",
"(",
")",
")"
]
| [
"static",
"<",
"t",
">",
"t",
"[",
"]",
"copy",
"(",
"object",
"[",
"]",
"source",
",",
"int",
"from",
",",
"int",
"to",
",",
"t",
"[",
"]",
"array",
"of",
"type",
")",
"{",
"return",
"arrays",
"copy",
"of",
"range",
"(",
"source",
",",
"from",
",",
"to",
",",
"(",
"class",
"<",
"?",
"extends",
"t",
"[",
"]",
">",
")",
"array",
"of",
"type",
"get",
"class",
"(",
")",
")",
";",
"}"
]
|
[
"return",
"the",
"name",
"of",
"the",
"default",
"listener",
"method",
"to",
"delegate",
"to"
]
| [
"protected",
"string",
"get",
"default",
"listener",
"method",
"(",
")",
"{",
"return",
"this",
"default",
"listener",
"method",
";",
"}"
]
|
[
"transforms",
"an",
"list",
"of",
"entry",
"into",
"a",
"float",
"array",
"containing",
"the",
"x",
"and",
"y",
"values",
"transformed",
"with",
"all",
"matrices",
"for",
"the",
"scatterchart"
]
| [
"public",
"float",
"[",
"]",
"generate",
"transformed",
"values",
"scatter",
"(",
"i",
"scatter",
"data",
"set",
"data",
",",
"float",
"phase",
"x",
",",
"float",
"phase",
"y",
",",
"int",
"from",
",",
"int",
"to",
")",
"{",
"final",
"int",
"count",
"=",
"(",
"int",
")",
"(",
"(",
"to",
"-",
"from",
")",
"*",
"phase",
"x",
"+",
"1",
")",
"*",
"2",
";",
"if",
"(",
"value",
"points",
"for",
"generate",
"transformed",
"values",
"scatter",
"length",
"!",
"=",
"count",
")",
"{",
"value",
"points",
"for",
"generate",
"transformed",
"values",
"scatter",
"=",
"new",
"float",
"[",
"count",
"]",
";",
"}",
"float",
"[",
"]",
"value",
"points",
"=",
"value",
"points",
"for",
"generate",
"transformed",
"values",
"scatter",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"count",
";",
"j",
"+",
"=",
"2",
")",
"{",
"entry",
"e",
"=",
"data",
"get",
"entry",
"for",
"index",
"(",
"j",
"/",
"2",
"+",
"from",
")",
";",
"if",
"(",
"e",
"!",
"=",
"null",
")",
"{",
"value",
"points",
"[",
"j",
"]",
"=",
"e",
"get",
"x",
"(",
")",
";",
"value",
"points",
"[",
"j",
"+",
"1",
"]",
"=",
"e",
"get",
"y",
"(",
")",
"*",
"phase",
"y",
";",
"}",
"else",
"{",
"value",
"points",
"[",
"j",
"]",
"=",
"0",
";",
"value",
"points",
"[",
"j",
"+",
"1",
"]",
"=",
"0",
";",
"}",
"}",
"get",
"value",
"to",
"pixel",
"matrix",
"(",
")",
"map",
"points",
"(",
"value",
"points",
")",
";",
"return",
"value",
"points",
";",
"}"
]
|
[
"this",
"method",
"actually",
"executes",
"the",
"server",
"-",
"side",
"sasl",
"handshake"
]
| [
"private",
"i",
"o",
"stream",
"pair",
"do",
"sasl",
"handshake",
"(",
"peer",
"peer",
",",
"output",
"stream",
"underlying",
"out",
",",
"input",
"stream",
"underlying",
"in",
",",
"map",
"<",
"string",
",",
"string",
">",
"sasl",
"props",
",",
"callback",
"handler",
"callback",
"handler",
")",
"throws",
"i",
"o",
"exception",
"{",
"data",
"input",
"stream",
"in",
"=",
"new",
"data",
"input",
"stream",
"(",
"underlying",
"in",
")",
";",
"data",
"output",
"stream",
"out",
"=",
"new",
"data",
"output",
"stream",
"(",
"underlying",
"out",
")",
";",
"int",
"magic",
"number",
"=",
"in",
"read",
"int",
"(",
")",
";",
"if",
"(",
"magic",
"number",
"!",
"=",
"sasl",
"transfer",
"magic",
"number",
")",
"{",
"throw",
"new",
"invalid",
"magic",
"number",
"exception",
"(",
"magic",
"number",
",",
"dn",
"conf",
"get",
"encrypt",
"data",
"transfer",
"(",
")",
")",
";",
"}",
"try",
"{",
"/",
"/",
"step",
"1",
"sasl",
"message",
"with",
"handshake",
"message",
"=",
"read",
"sasl",
"message",
"with",
"handshake",
"secret",
"(",
"in",
")",
";",
"byte",
"[",
"]",
"secret",
"=",
"message",
"get",
"secret",
"(",
")",
";",
"string",
"bpid",
"=",
"message",
"get",
"bpid",
"(",
")",
";",
"if",
"(",
"secret",
"!",
"=",
"null",
"|",
"|",
"bpid",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"sanity",
"check",
",",
"if",
"one",
"is",
"null",
",",
"the",
"other",
"must",
"also",
"not",
"be",
"null",
"assert",
"(",
"secret",
"!",
"=",
"null",
"&",
"&",
"bpid",
"!",
"=",
"null",
")",
";",
"string",
"qop",
"=",
"new",
"string",
"(",
"secret",
",",
"charsets",
"utf",
"8",
")",
";",
"sasl",
"props",
"put",
"(",
"sasl",
"qop",
",",
"qop",
")",
";",
"}",
"sasl",
"participant",
"sasl",
"=",
"sasl",
"participant",
"create",
"server",
"sasl",
"participant",
"(",
"sasl",
"props",
",",
"callback",
"handler",
")",
";",
"byte",
"[",
"]",
"remote",
"response",
"=",
"message",
"get",
"payload",
"(",
")",
";",
"byte",
"[",
"]",
"local",
"response",
"=",
"sasl",
"evaluate",
"challenge",
"or",
"response",
"(",
"remote",
"response",
")",
";",
"send",
"sasl",
"message",
"(",
"out",
",",
"local",
"response",
")",
";",
"/",
"/",
"step",
"2",
"(",
"server",
"-",
"side",
"only",
")",
"list",
"<",
"cipher",
"option",
">",
"cipher",
"options",
"=",
"lists",
"new",
"array",
"list",
"(",
")",
";",
"remote",
"response",
"=",
"read",
"sasl",
"message",
"and",
"negotiation",
"cipher",
"options",
"(",
"in",
",",
"cipher",
"options",
")",
";",
"local",
"response",
"=",
"sasl",
"evaluate",
"challenge",
"or",
"response",
"(",
"remote",
"response",
")",
";",
"/",
"/",
"sasl",
"handshake",
"is",
"complete",
"check",
"sasl",
"complete",
"(",
"sasl",
",",
"sasl",
"props",
")",
";",
"cipher",
"option",
"cipher",
"option",
"=",
"null",
";",
"negotiated",
"q",
"o",
"p",
"=",
"sasl",
"get",
"negotiated",
"qop",
"(",
")",
";",
"if",
"(",
"sasl",
"is",
"negotiated",
"qop",
"privacy",
"(",
")",
")",
"{",
"/",
"/",
"negotiate",
"a",
"cipher",
"option",
"configuration",
"conf",
"=",
"dn",
"conf",
"get",
"conf",
"(",
")",
";",
"cipher",
"option",
"=",
"negotiate",
"cipher",
"option",
"(",
"conf",
",",
"cipher",
"options",
")",
";",
"if",
"(",
"log",
"is",
"debug",
"enabled",
"(",
")",
")",
"{",
"if",
"(",
"cipher",
"option",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"no",
"cipher",
"suite",
"is",
"negotiated",
"string",
"cipher",
"suites",
"=",
"conf",
"get",
"(",
"dfs",
"encrypt",
"data",
"transfer",
"cipher",
"suites",
"key",
")",
";",
"if",
"(",
"cipher",
"suites",
"!",
"=",
"null",
"&",
"&",
"!",
"cipher",
"suites",
"is",
"empty",
"(",
")",
")",
"{",
"/",
"/",
"the",
"server",
"accepts",
"some",
"cipher",
"suites",
",",
"but",
"the",
"client",
"does",
"not",
"log",
"debug",
"(",
"\"",
"server",
"accepts",
"cipher",
"suites",
"{",
"}",
",",
"\"",
"+",
"\"",
"but",
"client",
"{",
"}",
"does",
"not",
"accept",
"any",
"of",
"them",
"\"",
",",
"cipher",
"suites",
",",
"peer",
"get",
"remote",
"address",
"string",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"log",
"debug",
"(",
"\"",
"server",
"using",
"cipher",
"suite",
"{",
"}",
"with",
"client",
"{",
"}",
"\"",
",",
"cipher",
"option",
"get",
"cipher",
"suite",
"(",
")",
"get",
"name",
"(",
")",
",",
"peer",
"get",
"remote",
"address",
"string",
"(",
")",
")",
";",
"}",
"}",
"}",
"/",
"/",
"if",
"negotiated",
"cipher",
"option",
"is",
"not",
"null",
",",
"wrap",
"it",
"before",
"sending",
"send",
"sasl",
"message",
"and",
"negotiated",
"cipher",
"option",
"(",
"out",
",",
"local",
"response",
",",
"wrap",
"(",
"cipher",
"option",
",",
"sasl",
")",
")",
";",
"/",
"/",
"if",
"negotiated",
"cipher",
"option",
"is",
"not",
"null",
",",
"we",
"will",
"use",
"it",
"to",
"create",
"/",
"/",
"stream",
"pair",
"return",
"cipher",
"option",
"!",
"=",
"null",
"?",
"create",
"stream",
"pair",
"(",
"dn",
"conf",
"get",
"conf",
"(",
")",
",",
"cipher",
"option",
",",
"underlying",
"out",
",",
"underlying",
"in",
",",
"true",
")",
":",
"sasl",
"create",
"stream",
"pair",
"(",
"out",
",",
"in",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ioe",
")",
"{",
"if",
"(",
"ioe",
"instanceof",
"sasl",
"exception",
"&",
"&",
"ioe",
"get",
"cause",
"(",
")",
"!",
"=",
"null",
"&",
"&",
"ioe",
"get",
"cause",
"(",
")",
"instanceof",
"invalid",
"encryption",
"key",
"exception",
")",
"{",
"/",
"/",
"this",
"could",
"just",
"be",
"because",
"the",
"client",
"is",
"long",
"-",
"lived",
"and",
"hasn",
"'",
"t",
"gotten",
"/",
"/",
"a",
"new",
"encryption",
"key",
"from",
"the",
"nn",
"in",
"a",
"while",
"upon",
"receiving",
"this",
"/",
"/",
"error",
",",
"the",
"client",
"will",
"get",
"a",
"new",
"encryption",
"key",
"from",
"the",
"nn",
"and",
"retry",
"/",
"/",
"connecting",
"to",
"this",
"dn",
"send",
"invalid",
"key",
"sasl",
"error",
"message",
"(",
"out",
",",
"ioe",
"get",
"cause",
"(",
")",
"get",
"message",
"(",
")",
")",
";",
"}",
"else",
"{",
"send",
"generic",
"sasl",
"error",
"message",
"(",
"out",
",",
"ioe",
"get",
"message",
"(",
")",
")",
";",
"}",
"throw",
"ioe",
";",
"}",
"}"
]
|
[
"number",
"of",
"invocations",
"for",
"a",
"build"
]
| [
"public",
"long",
"get",
"num",
"collections",
"(",
")",
"{",
"return",
"num",
"collections",
";",
"}"
]
|
[
"returns",
"the",
"number",
"of",
"thread",
"local",
"variables",
"bound",
"to",
"the",
"current",
"thread"
]
| [
"public",
"static",
"int",
"size",
"(",
")",
"{",
"internal",
"thread",
"local",
"map",
"thread",
"local",
"map",
"=",
"internal",
"thread",
"local",
"map",
"get",
"if",
"set",
"(",
")",
";",
"if",
"(",
"thread",
"local",
"map",
"=",
"=",
"null",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{",
"return",
"thread",
"local",
"map",
"size",
"(",
")",
";",
"}",
"}"
]
|
[
"this",
"method",
"is",
"the",
"main",
"logic",
"of",
"the",
"action",
",",
"it",
"shall",
"determine",
"based",
"on",
"the",
"mapping",
"context",
",",
"what",
"should",
"be",
"the",
"action",
"'",
"s",
"result"
]
| [
"public",
"abstract",
"mapping",
"rule",
"result",
"execute",
"(",
"variable",
"context",
"variables",
")",
";"
]
|
[
"transfers",
"the",
"specified",
"source",
"buffer",
"'",
"s",
"data",
"to",
"this",
"buffer",
"starting",
"at",
"the",
"current",
"{",
"@",
"code",
"writer",
"index",
"}",
"and",
"increases",
"the",
"{",
"@",
"code",
"writer",
"index",
"}",
"by",
"the",
"number",
"of",
"the",
"transferred",
"bytes",
"(",
"=",
"{",
"@",
"code",
"length",
"}",
")",
"if",
"{",
"@",
"code",
"this",
"writable",
"bytes",
"}",
"is",
"less",
"than",
"{",
"@",
"code",
"length",
"}",
",",
"{",
"@",
"link",
"#",
"ensure",
"writable",
"(",
"int",
")",
"}",
"will",
"be",
"called",
"in",
"an",
"attempt",
"to",
"expand",
"capacity",
"to",
"accommodate"
]
| [
"public",
"abstract",
"byte",
"buf",
"write",
"bytes",
"(",
"byte",
"buf",
"src",
",",
"int",
"src",
"index",
",",
"int",
"length",
")",
";"
]
|
[
"inserts",
"z",
"nodes",
"as",
"new",
"predecessors",
"for",
"every",
"node",
"that",
"has",
"multiple",
"successors",
"and",
"multiple",
"predecessors"
]
| [
"private",
"static",
"void",
"edge",
"split",
"predecessors",
"(",
"ssa",
"method",
"result",
")",
"{",
"array",
"list",
"<",
"ssa",
"basic",
"block",
">",
"blocks",
"=",
"result",
"get",
"blocks",
"(",
")",
";",
"/",
"*",
"*",
"new",
"blocks",
"are",
"added",
"to",
"the",
"end",
"of",
"the",
"block",
"list",
"during",
"*",
"this",
"iteration",
"*",
"/",
"for",
"(",
"int",
"i",
"=",
"blocks",
"size",
"(",
")",
"-",
"1",
";",
"i",
">",
"=",
"0",
";",
"i",
"-",
"-",
")",
"{",
"ssa",
"basic",
"block",
"block",
"=",
"blocks",
"get",
"(",
"i",
")",
";",
"if",
"(",
"node",
"needs",
"unique",
"predecessor",
"(",
"block",
")",
")",
"{",
"block",
"insert",
"new",
"predecessor",
"(",
")",
";",
"}",
"}",
"}"
]
|
[
"get",
"number",
"minimum",
":",
"32",
"1",
"maximum",
":",
"543",
"2"
]
| [
"public",
"big",
"decimal",
"get",
"number",
"(",
")",
"{",
"return",
"number",
";",
"}"
]
|
[
"returns",
"the",
"icon",
"bytes"
]
| [
"public",
"byte",
"[",
"]",
"get",
"icon",
"bytes",
"(",
")",
"{",
"return",
"icon",
"bytes",
";",
"}"
]
|
[
"invoke",
"api",
"by",
"sending",
"http",
"request",
"with",
"the",
"given",
"options"
]
| [
"public",
"<",
"t",
">",
"void",
"invoke",
"a",
"p",
"i",
"(",
"string",
"path",
",",
"string",
"method",
",",
"list",
"<",
"pair",
">",
"query",
"params",
",",
"object",
"body",
",",
"multi",
"map",
"header",
"params",
",",
"multi",
"map",
"cookie",
"params",
",",
"map",
"<",
"string",
",",
"object",
">",
"form",
"params",
",",
"string",
"[",
"]",
"accepts",
",",
"string",
"[",
"]",
"content",
"types",
",",
"string",
"[",
"]",
"auth",
"names",
",",
"auth",
"info",
"auth",
"info",
",",
"type",
"reference",
"<",
"t",
">",
"return",
"type",
",",
"handler",
"<",
"async",
"result",
"<",
"t",
">",
">",
"result",
"handler",
")",
"{",
"update",
"params",
"for",
"auth",
"(",
"auth",
"names",
",",
"auth",
"info",
",",
"query",
"params",
",",
"header",
"params",
",",
"cookie",
"params",
")",
";",
"if",
"(",
"accepts",
"!",
"=",
"null",
"&",
"&",
"accepts",
"length",
">",
"0",
")",
"{",
"header",
"params",
"add",
"(",
"http",
"headers",
"accept",
",",
"select",
"header",
"accept",
"(",
"accepts",
")",
")",
";",
"}",
"if",
"(",
"content",
"types",
"!",
"=",
"null",
")",
"{",
"header",
"params",
"add",
"(",
"http",
"headers",
"content",
"type",
",",
"select",
"header",
"content",
"type",
"(",
"content",
"types",
")",
")",
";",
"}",
"http",
"method",
"http",
"method",
"=",
"http",
"method",
"value",
"of",
"(",
"method",
")",
";",
"http",
"request",
"<",
"buffer",
">",
"request",
"=",
"get",
"web",
"client",
"(",
")",
"request",
"abs",
"(",
"http",
"method",
",",
"base",
"path",
"+",
"path",
")",
";",
"request",
"timeout",
"(",
"this",
"timeout",
")",
";",
"if",
"(",
"http",
"method",
"=",
"=",
"http",
"method",
"patch",
")",
"{",
"request",
"put",
"header",
"(",
"\"",
"x",
"-",
"http",
"-",
"method",
"-",
"override",
"\"",
",",
"\"",
"patch",
"\"",
")",
";",
"}",
"query",
"params",
"for",
"each",
"(",
"entry",
"-",
">",
"{",
"if",
"(",
"entry",
"get",
"value",
"(",
")",
"!",
"=",
"null",
")",
"{",
"request",
"add",
"query",
"param",
"(",
"entry",
"get",
"name",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"header",
"params",
"for",
"each",
"(",
"entry",
"-",
">",
"{",
"if",
"(",
"entry",
"get",
"value",
"(",
")",
"!",
"=",
"null",
")",
"{",
"request",
"put",
"header",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"default",
"headers",
"for",
"each",
"(",
"entry",
"-",
">",
"{",
"if",
"(",
"entry",
"get",
"value",
"(",
")",
"!",
"=",
"null",
")",
"{",
"request",
"put",
"header",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"final",
"multi",
"map",
"cookies",
"=",
"multi",
"map",
"case",
"insensitive",
"multi",
"map",
"(",
")",
"add",
"all",
"(",
"cookie",
"params",
")",
"add",
"all",
"(",
"default",
"cookies",
")",
";",
"request",
"put",
"header",
"(",
"\"",
"cookie",
"\"",
",",
"build",
"cookie",
"header",
"(",
"cookies",
")",
")",
";",
"handler",
"<",
"async",
"result",
"<",
"http",
"response",
"<",
"buffer",
">",
">",
">",
"response",
"handler",
"=",
"build",
"response",
"handler",
"(",
"return",
"type",
",",
"result",
"handler",
")",
";",
"if",
"(",
"body",
"!",
"=",
"null",
")",
"{",
"send",
"body",
"(",
"request",
",",
"response",
"handler",
",",
"body",
")",
";",
"}",
"else",
"if",
"(",
"form",
"params",
"!",
"=",
"null",
"&",
"&",
"!",
"form",
"params",
"is",
"empty",
"(",
")",
")",
"{",
"map",
"<",
"string",
",",
"string",
">",
"form",
"map",
"=",
"form",
"params",
"entry",
"set",
"(",
")",
"stream",
"(",
")",
"collect",
"(",
"to",
"map",
"(",
"map",
"entry",
":",
":",
"get",
"key",
",",
"entry",
"-",
">",
"parameter",
"to",
"string",
"(",
"entry",
"get",
"value",
"(",
")",
")",
")",
")",
";",
"multi",
"map",
"form",
"=",
"multi",
"map",
"case",
"insensitive",
"multi",
"map",
"(",
")",
"add",
"all",
"(",
"form",
"map",
")",
";",
"request",
"send",
"form",
"(",
"form",
",",
"response",
"handler",
")",
";",
"}",
"else",
"{",
"request",
"send",
"(",
"response",
"handler",
")",
";",
"}",
"}"
]
|
[
"say",
"hello",
"to",
"server"
]
| [
"public",
"void",
"greet",
"(",
"string",
"name",
")",
"{",
"logger",
"info",
"(",
"\"",
"will",
"try",
"to",
"greet",
"\"",
"+",
"name",
"+",
"\"",
"\"",
")",
";",
"hello",
"request",
"request",
"=",
"hello",
"request",
"new",
"builder",
"(",
")",
"set",
"name",
"(",
"name",
")",
"build",
"(",
")",
";",
"hello",
"reply",
"response",
";",
"try",
"{",
"/",
"/",
"this",
"enables",
"compression",
"for",
"requests",
"independent",
"of",
"this",
"setting",
",",
"servers",
"choose",
"whether",
"/",
"/",
"to",
"compress",
"responses",
"response",
"=",
"blocking",
"stub",
"with",
"compression",
"(",
"\"",
"gzip",
"\"",
")",
"say",
"hello",
"(",
"request",
")",
";",
"}",
"catch",
"(",
"status",
"runtime",
"exception",
"e",
")",
"{",
"logger",
"log",
"(",
"level",
"warning",
",",
"\"",
"rpc",
"failed",
":",
"{",
"0",
"}",
"\"",
",",
"e",
"get",
"status",
"(",
")",
")",
";",
"return",
";",
"}",
"logger",
"info",
"(",
"\"",
"greeting",
":",
"\"",
"+",
"response",
"get",
"message",
"(",
")",
")",
";",
"}"
]
|
[
"set",
"the",
"h",
"base",
"table",
"name",
",",
"required"
]
| [
"public",
"h",
"base",
"table",
"name",
"(",
"string",
"table",
"name",
")",
"{",
"properties",
"put",
"string",
"(",
"connector",
"table",
"name",
",",
"table",
"name",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"get",
"prefix",
"ns",
"integer"
]
| [
"public",
"integer",
"get",
"prefix",
"ns",
"integer",
"(",
")",
"{",
"return",
"prefix",
"ns",
"integer",
";",
"}"
]
|
[
"test",
"use",
"of",
"sts",
"for",
"requesting",
"temporary",
"credentials",
"the",
"property",
"test",
"sts",
"endpoint",
"can",
"be",
"set",
"to",
"point",
"this",
"at",
"different",
"sts",
"endpoints",
"this",
"test",
"will",
"use",
"the",
"aws",
"credentials",
"(",
"if",
"provided",
")",
"for",
"s3a",
"tests",
"to",
"request",
"temporary",
"credentials",
",",
"then",
"attempt",
"to",
"use",
"those",
"credentials",
"instead"
]
| [
"public",
"void",
"test",
"s",
"t",
"s",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"configuration",
"conf",
"=",
"get",
"contract",
"(",
")",
"get",
"conf",
"(",
")",
";",
"s",
"3",
"a",
"file",
"system",
"test",
"f",
"s",
"=",
"get",
"file",
"system",
"(",
")",
";",
"credentials",
"=",
"test",
"f",
"s",
"share",
"credentials",
"(",
"\"",
"test",
"s",
"t",
"s",
"\"",
")",
";",
"string",
"bucket",
"=",
"test",
"f",
"s",
"get",
"bucket",
"(",
")",
";",
"a",
"w",
"s",
"security",
"token",
"service",
"client",
"builder",
"builder",
"=",
"s",
"t",
"s",
"client",
"factory",
"builder",
"(",
"conf",
",",
"bucket",
",",
"credentials",
",",
"get",
"sts",
"endpoint",
"(",
"conf",
")",
",",
"get",
"sts",
"region",
"(",
"conf",
")",
")",
";",
"s",
"t",
"s",
"client",
"factory",
"s",
"t",
"s",
"client",
"client",
"connection",
"=",
"s",
"t",
"s",
"client",
"factory",
"create",
"client",
"connection",
"(",
"builder",
"build",
"(",
")",
",",
"new",
"invoker",
"(",
"new",
"s",
"3",
"a",
"retry",
"policy",
"(",
"conf",
")",
",",
"invoker",
"log",
"event",
")",
")",
";",
"credentials",
"session",
"creds",
"=",
"client",
"connection",
"request",
"session",
"credentials",
"(",
"test",
"session",
"token",
"duration",
"seconds",
",",
"time",
"unit",
"seconds",
")",
";",
"/",
"/",
"clone",
"configuration",
"so",
"changes",
"here",
"do",
"not",
"affect",
"the",
"base",
"fs",
"configuration",
"conf",
"2",
"=",
"new",
"configuration",
"(",
"conf",
")",
";",
"s",
"3",
"a",
"utils",
"clear",
"bucket",
"option",
"(",
"conf",
"2",
",",
"bucket",
",",
"aws",
"credentials",
"provider",
")",
";",
"s",
"3",
"a",
"utils",
"clear",
"bucket",
"option",
"(",
"conf",
"2",
",",
"bucket",
",",
"access",
"key",
")",
";",
"s",
"3",
"a",
"utils",
"clear",
"bucket",
"option",
"(",
"conf",
"2",
",",
"bucket",
",",
"secret",
"key",
")",
";",
"s",
"3",
"a",
"utils",
"clear",
"bucket",
"option",
"(",
"conf",
"2",
",",
"bucket",
",",
"session",
"token",
")",
";",
"marshalled",
"credentials",
"mc",
"=",
"from",
"s",
"t",
"s",
"credentials",
"(",
"session",
"creds",
")",
";",
"update",
"config",
"with",
"session",
"creds",
"(",
"conf",
"2",
",",
"mc",
")",
";",
"conf",
"2",
"set",
"(",
"aws",
"credentials",
"provider",
",",
"temporary",
"aws",
"credentials",
")",
";",
"/",
"/",
"with",
"valid",
"credentials",
",",
"we",
"can",
"set",
"properties",
"try",
"(",
"s",
"3",
"a",
"file",
"system",
"fs",
"=",
"s",
"3",
"a",
"test",
"utils",
"create",
"test",
"file",
"system",
"(",
"conf",
"2",
")",
")",
"{",
"create",
"and",
"verify",
"file",
"(",
"fs",
",",
"path",
"(",
"\"",
"test",
"s",
"t",
"s",
"\"",
")",
",",
"test",
"file",
"size",
")",
";",
"}",
"/",
"/",
"now",
"create",
"an",
"invalid",
"set",
"of",
"credentials",
"by",
"changing",
"the",
"session",
"/",
"/",
"token",
"conf",
"2",
"set",
"(",
"session",
"token",
",",
"\"",
"invalid",
"-",
"\"",
"+",
"session",
"creds",
"get",
"session",
"token",
"(",
")",
")",
";",
"try",
"(",
"s",
"3",
"a",
"file",
"system",
"fs",
"=",
"s",
"3",
"a",
"test",
"utils",
"create",
"test",
"file",
"system",
"(",
"conf",
"2",
")",
")",
"{",
"create",
"and",
"verify",
"file",
"(",
"fs",
",",
"path",
"(",
"\"",
"test",
"s",
"t",
"s",
"invalid",
"token",
"\"",
")",
",",
"test",
"file",
"size",
")",
";",
"fail",
"(",
"\"",
"expected",
"an",
"access",
"exception",
",",
"but",
"file",
"access",
"to",
"\"",
"+",
"fs",
"get",
"uri",
"(",
")",
"+",
"\"",
"was",
"allowed",
":",
"\"",
"+",
"fs",
")",
";",
"}",
"catch",
"(",
"a",
"w",
"s",
"s",
"3",
"i",
"o",
"exception",
"|",
"a",
"w",
"s",
"bad",
"request",
"exception",
"ex",
")",
"{",
"log",
"info",
"(",
"\"",
"expected",
"exception",
":",
"{",
"}",
"\"",
",",
"ex",
"to",
"string",
"(",
")",
")",
";",
"log",
"debug",
"(",
"\"",
"expected",
"exception",
":",
"{",
"}",
"\"",
",",
"ex",
",",
"ex",
")",
";",
"}",
"}"
]
|
[
"returns",
"the",
"underlying",
"builder"
]
| [
"public",
"string",
"builder",
"get",
"builder",
"(",
")",
"{",
"return",
"builder",
";",
"}"
]
|
[
"set",
"the",
"{",
"@",
"link",
"open",
"ssl",
"private",
"key",
"method",
"}",
"to",
"use",
"this",
"allows",
"to",
"offload",
"private",
"-",
"key",
"operations",
"if",
"needed",
"this",
"method",
"is",
"currently",
"only",
"supported",
"when",
"{",
"@",
"code",
"boring",
"s",
"s",
"l",
"}",
"is",
"used"
]
| [
"public",
"final",
"void",
"set",
"private",
"key",
"method",
"(",
"open",
"ssl",
"private",
"key",
"method",
"method",
")",
"{",
"object",
"util",
"check",
"not",
"null",
"(",
"method",
",",
"\"",
"method",
"\"",
")",
";",
"lock",
"writer",
"lock",
"=",
"ctx",
"lock",
"write",
"lock",
"(",
")",
";",
"writer",
"lock",
"lock",
"(",
")",
";",
"try",
"{",
"s",
"s",
"l",
"context",
"set",
"private",
"key",
"method",
"(",
"ctx",
",",
"new",
"private",
"key",
"method",
"(",
"engine",
"map",
",",
"method",
")",
")",
";",
"}",
"finally",
"{",
"writer",
"lock",
"unlock",
"(",
")",
";",
"}",
"}"
]
|
[
"create",
"an",
"application",
"-",
"managed",
"extended",
"entity",
"manager",
"proxy"
]
| [
"public",
"static",
"entity",
"manager",
"create",
"application",
"managed",
"entity",
"manager",
"(",
"entity",
"manager",
"raw",
"entity",
"manager",
",",
"entity",
"manager",
"factory",
"info",
"emf",
"info",
",",
"boolean",
"synchronized",
"with",
"transaction",
")",
"{",
"return",
"create",
"proxy",
"(",
"raw",
"entity",
"manager",
",",
"emf",
"info",
",",
"false",
",",
"synchronized",
"with",
"transaction",
")",
";",
"}"
]
|
[
"de",
"-",
"serializes",
"the",
"failure",
"message",
"sent",
"to",
"the",
"{",
"@",
"link",
"org",
"apache",
"flink",
"queryablestate",
"network",
"client",
"}",
"in",
"case",
"of",
"server",
"related",
"errors",
"<",
"b",
">",
"the",
"buffer",
"is",
"expected",
"to",
"be",
"at",
"the",
"correct",
"position",
"<",
"b",
">"
]
| [
"public",
"static",
"throwable",
"deserialize",
"server",
"failure",
"(",
"final",
"byte",
"buf",
"buf",
")",
"throws",
"i",
"o",
"exception",
",",
"class",
"not",
"found",
"exception",
"{",
"try",
"(",
"byte",
"buf",
"input",
"stream",
"bis",
"=",
"new",
"byte",
"buf",
"input",
"stream",
"(",
"buf",
")",
";",
"object",
"input",
"stream",
"in",
"=",
"new",
"object",
"input",
"stream",
"(",
"bis",
")",
")",
"{",
"return",
"(",
"throwable",
")",
"in",
"read",
"object",
"(",
")",
";",
"}",
"}"
]
|
[
"asserts",
"that",
"the",
"actions",
"creating",
"descriptor",
"sets",
"for",
"rule",
"r",
",",
"take",
"as",
"input",
"(",
"=",
"depend",
"on",
")",
"all",
"of",
"the",
"descriptor",
"sets",
"of",
"the",
"transitive",
"dependencies",
"of",
"r",
"this",
"is",
"needed",
"so",
"that",
"building",
"r",
",",
"that",
"has",
"a",
"dependency",
"r",
"'",
"which",
"violates",
"strict",
"proto",
"deps",
",",
"would",
"break"
]
| [
"public",
"void",
"descriptor",
"sets",
"depend",
"on",
"children",
"(",
")",
"throws",
"exception",
"{",
"scratch",
"file",
"(",
"\"",
"x",
"/",
"build",
"\"",
",",
"test",
"constants",
"load",
"proto",
"library",
",",
"\"",
"proto",
"library",
"(",
"name",
"=",
"'",
"alias",
"'",
",",
"deps",
"=",
"[",
"'",
"foo",
"'",
"]",
")",
"\"",
",",
"\"",
"proto",
"library",
"(",
"name",
"=",
"'",
"foo",
"'",
",",
"srcs",
"=",
"[",
"'",
"foo",
"proto",
"'",
"]",
",",
"deps",
"=",
"[",
"'",
"bar",
"'",
"]",
")",
"\"",
",",
"\"",
"proto",
"library",
"(",
"name",
"=",
"'",
"bar",
"'",
",",
"srcs",
"=",
"[",
"'",
"bar",
"proto",
"'",
"]",
")",
"\"",
",",
"\"",
"proto",
"library",
"(",
"name",
"=",
"'",
"alias",
"to",
"no",
"srcs",
"'",
",",
"deps",
"=",
"[",
"'",
"no",
"srcs",
"'",
"]",
")",
"\"",
",",
"\"",
"proto",
"library",
"(",
"name",
"=",
"'",
"no",
"srcs",
"'",
")",
"\"",
")",
";",
"assert",
"that",
"(",
"get",
"deps",
"descriptor",
"sets",
"(",
"get",
"descriptor",
"output",
"(",
"\"",
"/",
"/",
"x",
":",
"alias",
"\"",
")",
")",
")",
"contains",
"exactly",
"(",
"\"",
"x",
"/",
"foo",
"-",
"descriptor",
"-",
"set",
"proto",
"bin",
"\"",
",",
"\"",
"x",
"/",
"bar",
"-",
"descriptor",
"-",
"set",
"proto",
"bin",
"\"",
")",
";",
"assert",
"that",
"(",
"get",
"deps",
"descriptor",
"sets",
"(",
"get",
"descriptor",
"output",
"(",
"\"",
"/",
"/",
"x",
":",
"foo",
"\"",
")",
")",
")",
"contains",
"exactly",
"(",
"\"",
"x",
"/",
"bar",
"-",
"descriptor",
"-",
"set",
"proto",
"bin",
"\"",
")",
";",
"assert",
"that",
"(",
"get",
"deps",
"descriptor",
"sets",
"(",
"get",
"descriptor",
"output",
"(",
"\"",
"/",
"/",
"x",
":",
"bar",
"\"",
")",
")",
")",
"is",
"empty",
"(",
")",
";",
"assert",
"that",
"(",
"get",
"deps",
"descriptor",
"sets",
"(",
"get",
"descriptor",
"output",
"(",
"\"",
"/",
"/",
"x",
":",
"alias",
"to",
"no",
"srcs",
"\"",
")",
")",
")",
"contains",
"exactly",
"(",
"\"",
"x",
"/",
"no",
"srcs",
"-",
"descriptor",
"-",
"set",
"proto",
"bin",
"\"",
")",
";",
"assert",
"that",
"(",
"get",
"deps",
"descriptor",
"sets",
"(",
"get",
"descriptor",
"output",
"(",
"\"",
"/",
"/",
"x",
":",
"no",
"srcs",
"\"",
")",
")",
")",
"is",
"empty",
"(",
")",
";",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"returns",
"a",
"boolean",
"value"
]
| [
"boolean",
"get",
"as",
"boolean",
"(",
")",
"throws",
"throwable",
";",
"/",
"/",
"nopmd"
]
|
[
"returns",
"the",
"value",
"for",
"the",
"specified",
"key",
",",
"or",
"the",
"default",
"value",
"if",
"the",
"key",
"is",
"not",
"in",
"the",
"map"
]
| [
"public",
"int",
"get",
"(",
"k",
"key",
",",
"int",
"default",
"value",
")",
"{",
"int",
"i",
"=",
"locate",
"key",
"(",
"key",
")",
";",
"return",
"i",
"<",
"0",
"?",
"default",
"value",
":",
"value",
"table",
"[",
"i",
"]",
";",
"}"
]
|
[
"test",
"to",
"all",
"the",
"commands",
"by",
"passing",
"the",
"fully",
"qualified",
"path"
]
| [
"public",
"void",
"test",
"quota",
"commands",
"with",
"u",
"r",
"i",
"(",
")",
"throws",
"exception",
"{",
"d",
"f",
"s",
"admin",
"dfs",
"admin",
"=",
"new",
"d",
"f",
"s",
"admin",
"(",
"conf",
")",
";",
"final",
"path",
"dir",
"=",
"new",
"path",
"(",
"\"",
"/",
"\"",
"+",
"this",
"get",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
",",
"generic",
"test",
"utils",
"get",
"method",
"name",
"(",
")",
")",
";",
"assert",
"true",
"(",
"dfs",
"mkdirs",
"(",
"dir",
")",
")",
";",
"/",
"*",
"set",
"space",
"quota",
"*",
"/",
"test",
"set",
"and",
"clear",
"space",
"quota",
"regular",
"internal",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"set",
"space",
"quota",
"\"",
",",
"\"",
"1024",
"\"",
",",
"dfs",
"get",
"uri",
"(",
")",
"+",
"\"",
"/",
"\"",
"+",
"dir",
"to",
"string",
"(",
")",
"}",
",",
"dir",
",",
"0",
",",
"1024",
")",
";",
"/",
"*",
"clear",
"space",
"quota",
"*",
"/",
"test",
"set",
"and",
"clear",
"space",
"quota",
"regular",
"internal",
"(",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"clr",
"space",
"quota",
"\"",
",",
"dfs",
"get",
"uri",
"(",
")",
"+",
"\"",
"/",
"\"",
"+",
"dir",
"to",
"string",
"(",
")",
"}",
",",
"dir",
",",
"0",
",",
"-",
"1",
")",
";",
"run",
"command",
"(",
"dfs",
"admin",
",",
"false",
",",
"\"",
"-",
"set",
"quota",
"\"",
",",
"\"",
"1000",
"\"",
",",
"dfs",
"get",
"uri",
"(",
")",
"+",
"\"",
"/",
"\"",
"+",
"dir",
"to",
"string",
"(",
")",
")",
";",
"run",
"command",
"(",
"dfs",
"admin",
",",
"false",
",",
"\"",
"-",
"clr",
"quota",
"\"",
",",
"dfs",
"get",
"uri",
"(",
")",
"+",
"\"",
"/",
"\"",
"+",
"dir",
"to",
"string",
"(",
")",
")",
";",
"}"
]
|
[
"testing",
"data",
"type",
"shared",
"with",
"the",
"scala",
"tests"
]
| [
"static",
"data",
"type",
"get",
"complex",
"pojo",
"data",
"type",
"(",
"class",
"<",
"?",
">",
"complex",
"pojo",
"class",
",",
"class",
"<",
"?",
">",
"simple",
"pojo",
"class",
")",
"{",
"final",
"structured",
"type",
"builder",
"builder",
"=",
"structured",
"type",
"new",
"builder",
"(",
"complex",
"pojo",
"class",
")",
";",
"builder",
"attributes",
"(",
"arrays",
"as",
"list",
"(",
"new",
"structured",
"attribute",
"(",
"\"",
"map",
"field",
"\"",
",",
"new",
"map",
"type",
"(",
"new",
"var",
"char",
"type",
"(",
"var",
"char",
"type",
"max",
"length",
")",
",",
"new",
"int",
"type",
"(",
")",
")",
")",
",",
"new",
"structured",
"attribute",
"(",
"\"",
"simple",
"pojo",
"field",
"\"",
",",
"get",
"simple",
"pojo",
"data",
"type",
"(",
"simple",
"pojo",
"class",
")",
"get",
"logical",
"type",
"(",
")",
")",
",",
"new",
"structured",
"attribute",
"(",
"\"",
"some",
"object",
"\"",
",",
"new",
"type",
"information",
"raw",
"type",
"<",
">",
"(",
"new",
"generic",
"type",
"info",
"<",
">",
"(",
"object",
"class",
")",
")",
")",
")",
")",
";",
"builder",
"set",
"final",
"(",
"true",
")",
";",
"builder",
"set",
"instantiable",
"(",
"true",
")",
";",
"final",
"structured",
"type",
"structured",
"type",
"=",
"builder",
"build",
"(",
")",
";",
"final",
"list",
"<",
"data",
"type",
">",
"field",
"data",
"types",
"=",
"arrays",
"as",
"list",
"(",
"data",
"types",
"map",
"(",
"data",
"types",
"string",
"(",
")",
",",
"data",
"types",
"int",
"(",
")",
")",
",",
"get",
"simple",
"pojo",
"data",
"type",
"(",
"simple",
"pojo",
"class",
")",
",",
"data",
"types",
"raw",
"(",
"new",
"generic",
"type",
"info",
"<",
">",
"(",
"object",
"class",
")",
")",
")",
";",
"return",
"new",
"fields",
"data",
"type",
"(",
"structured",
"type",
",",
"complex",
"pojo",
"class",
",",
"field",
"data",
"types",
")",
";",
"}"
]
|
[
"write",
"r",
"java"
]
| [
"public",
"static",
"void",
"write",
"r",
"java",
"(",
"string",
"output",
"directory",
",",
"string",
"package",
"name",
",",
"map",
"<",
"r",
"type",
",",
"set",
"<",
"com",
"tencent",
"tinker",
"build",
"aapt",
"r",
"dot",
"txt",
"entry",
">",
">",
"r",
"type",
"resource",
"map",
",",
"boolean",
"is",
"final",
")",
"{",
"string",
"output",
"full",
"filename",
"=",
"new",
"file",
"(",
"output",
"directory",
")",
"get",
"absolute",
"path",
"(",
")",
"+",
"constant",
"symbol",
"slash",
"left",
"+",
"(",
"package",
"name",
"replace",
"(",
"constant",
"symbol",
"dot",
",",
"constant",
"symbol",
"slash",
"left",
")",
"+",
"constant",
"symbol",
"slash",
"left",
"+",
"\"",
"r",
"\"",
"+",
"constant",
"symbol",
"dot",
"+",
"constant",
"file",
"java",
")",
";",
"file",
"util",
"create",
"file",
"(",
"output",
"full",
"filename",
")",
";",
"print",
"writer",
"writer",
"=",
"null",
";",
"try",
"{",
"writer",
"=",
"new",
"print",
"writer",
"(",
"new",
"file",
"output",
"stream",
"(",
"output",
"full",
"filename",
")",
")",
";",
"writer",
"format",
"(",
"\"",
"package",
"%",
"s",
";",
"\\",
"n",
"\\",
"n",
"\"",
",",
"package",
"name",
")",
";",
"writer",
"println",
"(",
"\"",
"public",
"final",
"class",
"r",
"{",
"\\",
"n",
"\"",
")",
";",
"for",
"(",
"r",
"type",
"r",
"type",
":",
"r",
"type",
"resource",
"map",
"key",
"set",
"(",
")",
")",
"{",
"/",
"/",
"now",
"start",
"the",
"block",
"for",
"the",
"new",
"type",
"writer",
"format",
"(",
"\"",
"public",
"static",
"final",
"class",
"%",
"s",
"{",
"\\",
"n",
"\"",
",",
"r",
"type",
"to",
"string",
"(",
")",
")",
";",
"for",
"(",
"com",
"tencent",
"tinker",
"build",
"aapt",
"r",
"dot",
"txt",
"entry",
"r",
"dot",
"txt",
"entry",
":",
"r",
"type",
"resource",
"map",
"get",
"(",
"r",
"type",
")",
")",
"{",
"/",
"/",
"write",
"out",
"the",
"resource",
"/",
"/",
"write",
"as",
"an",
"int",
"writer",
"format",
"(",
"\"",
"public",
"static",
"%",
"s",
"%",
"s",
"%",
"s",
"=",
"%",
"s",
";",
"\\",
"n",
"\"",
",",
"is",
"final",
"?",
"\"",
"final",
"\"",
":",
"\"",
"\"",
",",
"r",
"dot",
"txt",
"entry",
"id",
"type",
",",
"r",
"dot",
"txt",
"entry",
"name",
",",
"r",
"dot",
"txt",
"entry",
"id",
"value",
"trim",
"(",
")",
")",
";",
"}",
"writer",
"println",
"(",
"\"",
"}",
"\\",
"n",
"\"",
")",
";",
"}",
"/",
"/",
"close",
"the",
"class",
"definition",
"writer",
"println",
"(",
"\"",
"}",
"\"",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"throw",
"new",
"aapt",
"util",
"exception",
"(",
"e",
")",
";",
"}",
"finally",
"{",
"i",
"o",
"helper",
"close",
"quietly",
"(",
"writer",
")",
";",
"}",
"}"
]
|
[
"get",
"all",
"directly",
"declared",
"annotations",
"of",
"the",
"specified",
"type",
"and",
"its",
"'",
"all",
"hierarchical",
"types",
",",
"not",
"including",
"meta",
"annotations"
]
| [
"static",
"list",
"<",
"annotation",
">",
"get",
"all",
"declared",
"annotations",
"(",
"class",
"<",
"?",
">",
"type",
",",
"predicate",
"<",
"annotation",
">",
"annotations",
"to",
"filter",
")",
"{",
"if",
"(",
"type",
"=",
"=",
"null",
")",
"{",
"return",
"empty",
"list",
"(",
")",
";",
"}",
"list",
"<",
"annotation",
">",
"all",
"annotations",
"=",
"new",
"linked",
"list",
"<",
">",
"(",
")",
";",
"/",
"/",
"all",
"types",
"set",
"<",
"class",
"<",
"?",
">",
">",
"all",
"types",
"=",
"new",
"linked",
"hash",
"set",
"<",
">",
"(",
")",
";",
"/",
"/",
"add",
"current",
"type",
"all",
"types",
"add",
"(",
"type",
")",
";",
"/",
"/",
"add",
"all",
"inherited",
"types",
"all",
"types",
"add",
"all",
"(",
"get",
"all",
"inherited",
"types",
"(",
"type",
",",
"t",
"-",
">",
"!",
"object",
"class",
"equals",
"(",
"t",
")",
")",
")",
";",
"for",
"(",
"class",
"<",
"?",
">",
"t",
":",
"all",
"types",
")",
"{",
"all",
"annotations",
"add",
"all",
"(",
"get",
"declared",
"annotations",
"(",
"t",
",",
"annotations",
"to",
"filter",
")",
")",
";",
"}",
"return",
"unmodifiable",
"list",
"(",
"all",
"annotations",
")",
";",
"}"
]
|
[
"method",
"to",
"get",
"the",
"apk",
"'",
"s",
"sha1",
"key",
"see",
"https",
":",
"stackoverflow",
"comquestions",
"9",
"2",
"9",
"3",
"0",
"1",
"9",
"#",
"22506133"
]
| [
"private",
"static",
"string",
"get",
"certificate",
"s",
"h",
"a",
"1",
"fingerprint",
"(",
"@",
"non",
"null",
"final",
"application",
"application",
")",
"{",
"final",
"package",
"info",
"package",
"info",
";",
"try",
"{",
"package",
"info",
"=",
"application",
"get",
"package",
"manager",
"(",
")",
"get",
"package",
"info",
"(",
"application",
"get",
"package",
"name",
"(",
")",
",",
"package",
"manager",
"get",
"signatures",
")",
";",
"}",
"catch",
"(",
"final",
"package",
"manager",
"name",
"not",
"found",
"exception",
"e",
")",
"{",
"error",
"activity",
"report",
"error",
"(",
"application",
",",
"e",
",",
"null",
",",
"null",
",",
"error",
"info",
"make",
"(",
"user",
"action",
"something",
"else",
",",
"\"",
"none",
"\"",
",",
"\"",
"could",
"not",
"find",
"package",
"info",
"\"",
",",
"r",
"string",
"app",
"ui",
"crash",
")",
")",
";",
"return",
"\"",
"\"",
";",
"}",
"final",
"x",
"5",
"0",
"9",
"certificate",
"c",
";",
"try",
"{",
"final",
"signature",
"[",
"]",
"signatures",
"=",
"package",
"info",
"signatures",
";",
"final",
"byte",
"[",
"]",
"cert",
"=",
"signatures",
"[",
"0",
"]",
"to",
"byte",
"array",
"(",
")",
";",
"final",
"input",
"stream",
"input",
"=",
"new",
"byte",
"array",
"input",
"stream",
"(",
"cert",
")",
";",
"final",
"certificate",
"factory",
"cf",
"=",
"certificate",
"factory",
"get",
"instance",
"(",
"\"",
"x509",
"\"",
")",
";",
"c",
"=",
"(",
"x",
"5",
"0",
"9",
"certificate",
")",
"cf",
"generate",
"certificate",
"(",
"input",
")",
";",
"}",
"catch",
"(",
"final",
"certificate",
"exception",
"e",
")",
"{",
"error",
"activity",
"report",
"error",
"(",
"application",
",",
"e",
",",
"null",
",",
"null",
",",
"error",
"info",
"make",
"(",
"user",
"action",
"something",
"else",
",",
"\"",
"none",
"\"",
",",
"\"",
"certificate",
"error",
"\"",
",",
"r",
"string",
"app",
"ui",
"crash",
")",
")",
";",
"return",
"\"",
"\"",
";",
"}",
"try",
"{",
"final",
"message",
"digest",
"md",
"=",
"message",
"digest",
"get",
"instance",
"(",
"\"",
"sha1",
"\"",
")",
";",
"final",
"byte",
"[",
"]",
"public",
"key",
"=",
"md",
"digest",
"(",
"c",
"get",
"encoded",
"(",
")",
")",
";",
"return",
"byte",
"2",
"hex",
"formatted",
"(",
"public",
"key",
")",
";",
"}",
"catch",
"(",
"no",
"such",
"algorithm",
"exception",
"|",
"certificate",
"encoding",
"exception",
"e",
")",
"{",
"error",
"activity",
"report",
"error",
"(",
"application",
",",
"e",
",",
"null",
",",
"null",
",",
"error",
"info",
"make",
"(",
"user",
"action",
"something",
"else",
",",
"\"",
"none",
"\"",
",",
"\"",
"could",
"not",
"retrieve",
"sha1",
"key",
"\"",
",",
"r",
"string",
"app",
"ui",
"crash",
")",
")",
";",
"return",
"\"",
"\"",
";",
"}",
"}"
]
|
[
"test",
"that",
"the",
"command",
"finishing",
"after",
"a",
"timeout",
"(",
"because",
"thread",
"continues",
"in",
"background",
")",
"does",
"not",
"register",
"a",
"success"
]
| [
"public",
"void",
"test",
"counters",
"on",
"execution",
"timeout",
"(",
")",
"throws",
"exception",
"{",
"test",
"hystrix",
"command",
"<",
"integer",
">",
"command",
"=",
"get",
"command",
"(",
"execution",
"isolation",
"strategy",
"thread",
",",
"abstract",
"test",
"hystrix",
"command",
"execution",
"result",
"success",
",",
"200",
",",
"abstract",
"test",
"hystrix",
"command",
"fallback",
"result",
"success",
",",
"50",
")",
";",
"command",
"execute",
"(",
")",
";",
"/",
"*",
"wait",
"long",
"enough",
"for",
"the",
"command",
"to",
"have",
"finished",
"*",
"/",
"thread",
"sleep",
"(",
"200",
")",
";",
"/",
"*",
"response",
"should",
"still",
"be",
"the",
"same",
"as",
"'",
"test",
"circuit",
"breaker",
"on",
"execution",
"timeout",
"'",
"*",
"/",
"assert",
"true",
"(",
"command",
"is",
"response",
"from",
"fallback",
"(",
")",
")",
";",
"assert",
"false",
"(",
"command",
"is",
"circuit",
"breaker",
"open",
"(",
")",
")",
";",
"assert",
"false",
"(",
"command",
"is",
"response",
"short",
"circuited",
"(",
")",
")",
";",
"assert",
"true",
"(",
"command",
"get",
"execution",
"time",
"in",
"milliseconds",
"(",
")",
">",
"-",
"1",
")",
";",
"assert",
"true",
"(",
"command",
"is",
"response",
"timed",
"out",
"(",
")",
")",
";",
"assert",
"false",
"(",
"command",
"is",
"successful",
"execution",
"(",
")",
")",
";",
"assert",
"not",
"null",
"(",
"command",
"get",
"execution",
"exception",
"(",
")",
")",
";",
"assert",
"command",
"execution",
"events",
"(",
"command",
",",
"hystrix",
"event",
"type",
"timeout",
",",
"hystrix",
"event",
"type",
"fallback",
"success",
")",
";",
"assert",
"equals",
"(",
"0",
",",
"command",
"get",
"builder",
"(",
")",
"metrics",
"get",
"current",
"concurrent",
"execution",
"count",
"(",
")",
")",
";",
"assert",
"sane",
"hystrix",
"request",
"log",
"(",
"1",
")",
";",
"}"
]
|
[
"constructs",
"a",
"py",
"provider",
"struct",
"with",
"the",
"given",
"field",
"values",
"and",
"with",
"default",
"values",
"for",
"any",
"field",
"not",
"specified",
"the",
"struct",
"is",
"constructed",
"directly",
",",
"rather",
"than",
"using",
"{",
"@",
"link",
"py",
"struct",
"utils",
"builder",
"}",
",",
"so",
"that",
"the",
"resulting",
"instance",
"is",
"suitable",
"for",
"asserting",
"on",
"{",
"@",
"code",
"py",
"struct",
"utils",
"}",
"'",
"s",
"operations",
"over",
"structs",
"with",
"known",
"contents",
"{",
"@",
"code",
"overrides",
"}",
"is",
"applied",
"directly",
"without",
"validating",
"the",
"fields",
"'",
"names",
"or",
"types"
]
| [
"private",
"struct",
"impl",
"make",
"struct",
"(",
"map",
"<",
"string",
",",
"object",
">",
"overrides",
")",
"{",
"map",
"<",
"string",
",",
"object",
">",
"fields",
"=",
"new",
"linked",
"hash",
"map",
"<",
">",
"(",
")",
";",
"fields",
"put",
"(",
"py",
"struct",
"utils",
"transitive",
"sources",
",",
"depset",
"of",
"(",
"artifact",
"type",
",",
"nested",
"set",
"builder",
"empty",
"set",
"(",
"order",
"compile",
"order",
")",
")",
")",
";",
"fields",
"put",
"(",
"py",
"struct",
"utils",
"uses",
"shared",
"libraries",
",",
"false",
")",
";",
"fields",
"put",
"(",
"py",
"struct",
"utils",
"imports",
",",
"depset",
"of",
"(",
"depset",
"element",
"type",
"string",
",",
"nested",
"set",
"builder",
"empty",
"set",
"(",
"order",
"compile",
"order",
")",
")",
")",
";",
"fields",
"put",
"(",
"py",
"struct",
"utils",
"has",
"py2",
"only",
"sources",
",",
"false",
")",
";",
"fields",
"put",
"(",
"py",
"struct",
"utils",
"has",
"py3",
"only",
"sources",
",",
"false",
")",
";",
"fields",
"put",
"all",
"(",
"overrides",
")",
";",
"return",
"struct",
"provider",
"struct",
"create",
"(",
"fields",
",",
"\"",
"no",
"such",
"attribute",
"'",
"%",
"s",
"'",
"\"",
")",
";",
"}"
]
|
[
"test",
"that",
"the",
"relevant",
"rating",
"threshold",
"can",
"be",
"set",
"to",
"something",
"larger",
"than",
"1",
"e",
"g",
"we",
"set",
"it",
"to",
"2",
"here",
"and",
"expect",
"docs",
"0",
"-",
"1",
"to",
"be",
"not",
"relevant",
",",
"docs",
"2",
"-",
"4",
"to",
"be",
"relevant",
",",
"and",
"only",
"0",
"-",
"3",
"are",
"hits"
]
| [
"public",
"void",
"test",
"relevance",
"threshold",
"(",
")",
"{",
"list",
"<",
"rated",
"document",
">",
"rated",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"rated",
"add",
"(",
"create",
"rated",
"doc",
"(",
"\"",
"test",
"\"",
",",
"\"",
"0",
"\"",
",",
"0",
")",
")",
";",
"/",
"/",
"not",
"relevant",
",",
"hit",
"rated",
"add",
"(",
"create",
"rated",
"doc",
"(",
"\"",
"test",
"\"",
",",
"\"",
"1",
"\"",
",",
"1",
")",
")",
";",
"/",
"/",
"not",
"relevant",
",",
"hit",
"rated",
"add",
"(",
"create",
"rated",
"doc",
"(",
"\"",
"test",
"\"",
",",
"\"",
"2",
"\"",
",",
"2",
")",
")",
";",
"/",
"/",
"relevant",
",",
"hit",
"rated",
"add",
"(",
"create",
"rated",
"doc",
"(",
"\"",
"test",
"\"",
",",
"\"",
"3",
"\"",
",",
"3",
")",
")",
";",
"/",
"/",
"relevant",
"rated",
"add",
"(",
"create",
"rated",
"doc",
"(",
"\"",
"test",
"\"",
",",
"\"",
"4",
"\"",
",",
"4",
")",
")",
";",
"/",
"/",
"relevant",
"recall",
"at",
"k",
"recall",
"at",
"n",
"=",
"new",
"recall",
"at",
"k",
"(",
"2",
",",
"5",
")",
";",
"eval",
"query",
"quality",
"evaluated",
"=",
"recall",
"at",
"n",
"evaluate",
"(",
"\"",
"id",
"\"",
",",
"to",
"search",
"hits",
"(",
"rated",
"sub",
"list",
"(",
"0",
",",
"3",
")",
",",
"\"",
"test",
"\"",
")",
",",
"rated",
")",
";",
"assert",
"equals",
"(",
"(",
"double",
")",
"1",
"/",
"3",
",",
"evaluated",
"metric",
"score",
"(",
")",
",",
"0",
"00001",
")",
";",
"assert",
"equals",
"(",
"1",
",",
"(",
"(",
"recall",
"at",
"k",
"detail",
")",
"evaluated",
"get",
"metric",
"details",
"(",
")",
")",
"get",
"relevant",
"retrieved",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"3",
",",
"(",
"(",
"recall",
"at",
"k",
"detail",
")",
"evaluated",
"get",
"metric",
"details",
"(",
")",
")",
"get",
"relevant",
"(",
")",
")",
";",
"}"
]
|
[
"parse",
"string",
"as",
"key",
"-",
"value",
"string",
"and",
"return",
"the",
"value",
"matches",
"key",
"name",
"example",
":",
"keyvalue",
"(",
"'",
"k",
"1",
"=",
"v",
"1",
";",
"k",
"2",
"=",
"v",
"2",
"'",
",",
"'",
";",
"'",
",",
"'",
"=",
"'",
",",
"'",
"k",
"2",
"'",
")",
"=",
"'",
"v",
"2",
"'",
"keyvalue",
"(",
"'",
"k",
"1",
":",
"v",
"1",
",",
"k",
"2",
":",
"v",
"2",
"'",
",",
"'",
",",
"'",
",",
"'",
":",
"'",
",",
"'",
"k",
"3",
"'",
")",
"=",
"null"
]
| [
"public",
"static",
"binary",
"string",
"data",
"key",
"value",
"(",
"binary",
"string",
"data",
"str",
",",
"binary",
"string",
"data",
"pair",
"separator",
",",
"binary",
"string",
"data",
"kv",
"separator",
",",
"binary",
"string",
"data",
"key",
"name",
")",
"{",
"if",
"(",
"str",
"=",
"=",
"null",
"|",
"|",
"str",
"get",
"size",
"in",
"bytes",
"(",
")",
"=",
"=",
"0",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"pair",
"separator",
"!",
"=",
"null",
"&",
"&",
"pair",
"separator",
"get",
"size",
"in",
"bytes",
"(",
")",
"=",
"=",
"1",
"&",
"&",
"kv",
"separator",
"!",
"=",
"null",
"&",
"&",
"kv",
"separator",
"get",
"size",
"in",
"bytes",
"(",
")",
"=",
"=",
"1",
")",
"{",
"return",
"binary",
"string",
"data",
"util",
"key",
"value",
"(",
"str",
",",
"pair",
"separator",
"byte",
"at",
"(",
"0",
")",
",",
"kv",
"separator",
"byte",
"at",
"(",
"0",
")",
",",
"key",
"name",
")",
";",
"}",
"else",
"{",
"return",
"binary",
"string",
"data",
"from",
"string",
"(",
"key",
"value",
"(",
"binary",
"string",
"data",
"util",
"safe",
"to",
"string",
"(",
"str",
")",
",",
"binary",
"string",
"data",
"util",
"safe",
"to",
"string",
"(",
"pair",
"separator",
")",
",",
"binary",
"string",
"data",
"util",
"safe",
"to",
"string",
"(",
"kv",
"separator",
")",
",",
"binary",
"string",
"data",
"util",
"safe",
"to",
"string",
"(",
"key",
"name",
")",
")",
")",
";",
"}",
"}"
]
|
[
"returns",
"the",
"path",
"string",
",",
"or",
"'",
"'",
"if",
"the",
"path",
"is",
"empty"
]
| [
"public",
"string",
"get",
"safe",
"path",
"string",
"(",
")",
"{",
"return",
"!",
"normalized",
"path",
"is",
"empty",
"(",
")",
"?",
"normalized",
"path",
":",
"\"",
"\"",
";",
"}"
]
|
[
"updates",
"the",
"table",
"bounds",
"in",
"the",
"model",
"so",
"that",
"the",
"same",
"bounds",
"can",
"be",
"restored",
"after",
"saving"
]
| [
"public",
"void",
"set",
"table",
"model",
"bounds",
"(",
")",
"{",
"list",
"<",
"?",
">",
"entity",
"parts",
"=",
"get",
"children",
"(",
")",
";",
"for",
"(",
"object",
"child",
":",
"entity",
"parts",
")",
"{",
"if",
"(",
"child",
"instanceof",
"node",
"part",
")",
"{",
"node",
"part",
"entity",
"part",
"=",
"(",
"node",
"part",
")",
"child",
";",
"i",
"figure",
"entity",
"figure",
"=",
"entity",
"part",
"get",
"figure",
"(",
")",
";",
"/",
"/",
"if",
"we",
"don",
"'",
"t",
"find",
"a",
"node",
"for",
"one",
"of",
"the",
"children",
"then",
"we",
"should",
"/",
"/",
"continue",
"if",
"(",
"entity",
"figure",
"=",
"=",
"null",
")",
"{",
"continue",
";",
"}",
"rectangle",
"bounds",
"=",
"entity",
"figure",
"get",
"bounds",
"(",
")",
"get",
"copy",
"(",
")",
";",
"entity",
"part",
"set",
"bounds",
"(",
"bounds",
")",
";",
"}",
"}",
"}"
]
|
[
"stops",
"tracking",
"the",
"given",
"non",
"-",
"runnable",
"app"
]
| [
"public",
"void",
"untrack",
"non",
"runnable",
"app",
"(",
"f",
"s",
"app",
"attempt",
"app",
")",
"{",
"users",
"non",
"runnable",
"apps",
"remove",
"(",
"app",
"get",
"user",
"(",
")",
",",
"app",
")",
";",
"}"
]
|
[
"to",
"test",
"\\",
"&",
"quot",
";",
"client",
"\\",
"&",
"quot",
";",
"model",
"(",
"asynchronously",
")",
"to",
"test",
"\\",
"&",
"quot",
";",
"client",
"\\",
"&",
"quot",
";",
"model"
]
| [
"public",
"okhttp",
"3",
"call",
"test",
"client",
"model",
"async",
"(",
"client",
"body",
",",
"final",
"api",
"callback",
"<",
"client",
">",
"callback",
")",
"throws",
"api",
"exception",
"{",
"okhttp",
"3",
"call",
"local",
"var",
"call",
"=",
"test",
"client",
"model",
"validate",
"before",
"call",
"(",
"body",
",",
"callback",
")",
";",
"type",
"local",
"var",
"return",
"type",
"=",
"new",
"type",
"token",
"<",
"client",
">",
"(",
")",
"{",
"}",
"get",
"type",
"(",
")",
";",
"local",
"var",
"api",
"client",
"execute",
"async",
"(",
"local",
"var",
"call",
",",
"local",
"var",
"return",
"type",
",",
"callback",
")",
";",
"return",
"local",
"var",
"call",
";",
"}"
]
|
[
"deserializes",
"the",
"data",
"using",
"the",
"provided",
"classloader"
]
| [
"protected",
"abstract",
"object",
"deserialize",
"(",
"a",
"data",
",",
"class",
"loader",
"class",
"loader",
")",
";"
]
|
[
"set",
"the",
"value",
"that",
"should",
"be",
"appended",
"to",
"the",
"log",
"message",
"written",
"after",
"a",
"request",
"is",
"processed"
]
| [
"public",
"void",
"set",
"after",
"message",
"suffix",
"(",
"string",
"after",
"message",
"suffix",
")",
"{",
"this",
"after",
"message",
"suffix",
"=",
"after",
"message",
"suffix",
";",
"}"
]
|
[
"the",
"same",
"as",
"{",
"@",
"link",
"#",
"single",
"optional",
"value",
"(",
"class",
",",
"supplier",
")",
"}",
"but",
"for",
"a",
"non",
"-",
"deferred",
",",
"async",
"type",
"such",
"as",
"{",
"@",
"link",
"java",
"util",
"concurrent",
"completable",
"future",
"}"
]
| [
"public",
"static",
"reactive",
"type",
"descriptor",
"non",
"deferred",
"async",
"value",
"(",
"class",
"<",
"?",
">",
"type",
",",
"supplier",
"<",
"?",
">",
"empty",
"supplier",
")",
"{",
"return",
"new",
"reactive",
"type",
"descriptor",
"(",
"type",
",",
"false",
",",
"false",
",",
"empty",
"supplier",
",",
"false",
")",
";",
"}"
]
|
[
"<",
"code",
">",
"repeated",
"bytes",
"bytes",
"list",
"=",
"10",
";",
"<",
"code",
">"
]
| [
"public",
"int",
"get",
"bytes",
"list",
"count",
"(",
")",
"{",
"return",
"bytes",
"list",
"size",
"(",
")",
";",
"}"
]
|
[
"taken",
"from",
"https",
":",
"regex",
"1",
"0",
"1",
"comrvkij",
"kf",
"1",
"via",
"https",
":",
"semver",
"org"
]
| [
"public",
"void",
"test",
"sem",
"ver",
"validation",
"(",
")",
"{",
"string",
"[",
"]",
"valid",
"semver",
"versions",
"=",
"new",
"string",
"[",
"]",
"{",
"\"",
"0",
"0",
"4",
"\"",
",",
"\"",
"1",
"2",
"3",
"\"",
",",
"\"",
"10",
"20",
"30",
"\"",
",",
"\"",
"1",
"1",
"2",
"-",
"prerelease",
"+",
"meta",
"\"",
",",
"\"",
"1",
"1",
"2",
"+",
"meta",
"\"",
",",
"\"",
"1",
"1",
"2",
"+",
"meta",
"-",
"valid",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"beta",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"beta",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"beta",
"1",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"1",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"0",
"valid",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"0valid",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"-",
"a",
"b",
"-",
"c",
"-",
"somethinglong",
"+",
"build",
"1",
"-",
"aef",
"1",
"-",
"its",
"-",
"okay",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"rc",
"1",
"+",
"build",
"1",
"\"",
",",
"\"",
"2",
"0",
"0",
"-",
"rc",
"1",
"+",
"build",
"123",
"\"",
",",
"\"",
"1",
"2",
"3",
"-",
"beta",
"\"",
",",
"\"",
"10",
"2",
"3",
"-",
"dev",
"-",
"snapshot",
"\"",
",",
"\"",
"1",
"2",
"3",
"-",
"snapshot",
"-",
"123",
"\"",
",",
"\"",
"1",
"0",
"0",
"\"",
",",
"\"",
"2",
"0",
"0",
"\"",
",",
"\"",
"1",
"1",
"7",
"\"",
",",
"\"",
"2",
"0",
"0",
"+",
"build",
"1848",
"\"",
",",
"\"",
"2",
"0",
"1",
"-",
"alpha",
"1227",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"+",
"beta",
"\"",
",",
"\"",
"1",
"2",
"3",
"-",
"-",
"-",
"-",
"rc",
"-",
"snapshot",
"12",
"9",
"1",
"-",
"-",
"12",
"+",
"788",
"\"",
",",
"\"",
"1",
"2",
"3",
"-",
"-",
"-",
"-",
"r",
"-",
"s",
"12",
"9",
"1",
"-",
"-",
"12",
"+",
"meta",
"\"",
",",
"\"",
"1",
"2",
"3",
"-",
"-",
"-",
"-",
"rc",
"-",
"snapshot",
"12",
"9",
"1",
"-",
"-",
"12",
"\"",
",",
"\"",
"1",
"0",
"0",
"+",
"0",
"build",
"1",
"-",
"rc",
"1",
"0",
"0",
"0",
"0aaa",
"-",
"kk",
"-",
"0",
"1",
"\"",
",",
"\"",
"999999999",
"999999999",
"999999999",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"0a",
"is",
"legal",
"\"",
",",
"/",
"/",
"the",
"following",
"are",
"not",
"strict",
"semver",
"but",
"we",
"allow",
"them",
"\"",
"1",
"2",
"-",
"snapshot",
"\"",
",",
"\"",
"1",
"2",
"-",
"rc",
"-",
"snapshot",
"\"",
",",
"\"",
"1",
"\"",
",",
"\"",
"1",
"2",
"3",
"4",
"\"",
"}",
";",
"for",
"(",
"string",
"version",
":",
"valid",
"semver",
"versions",
")",
"{",
"assert",
"true",
"(",
"\"",
"should",
"be",
"valid",
":",
"\"",
"+",
"version",
",",
"version",
"encoder",
"encode",
"version",
"(",
"version",
")",
"is",
"legal",
")",
";",
"/",
"/",
"since",
"we",
"'",
"re",
"here",
",",
"also",
"check",
"encoding",
"/",
"decoding",
"rountrip",
"assert",
"equals",
"(",
"version",
",",
"decode",
"version",
"(",
"encode",
"version",
"(",
"version",
")",
")",
")",
";",
"}",
"string",
"[",
"]",
"invalid",
"semver",
"versions",
"=",
"new",
"string",
"[",
"]",
"{",
"\"",
"\"",
",",
"\"",
"1",
"2",
"3",
"-",
"0123",
"\"",
",",
"\"",
"1",
"2",
"3",
"-",
"0123",
"0123",
"\"",
",",
"\"",
"1",
"1",
"2",
"+",
"123",
"\"",
",",
"\"",
"+",
"invalid",
"\"",
",",
"\"",
"-",
"invalid",
"\"",
",",
"\"",
"-",
"invalid",
"+",
"invalid",
"\"",
",",
"\"",
"-",
"invalid",
"01",
"\"",
",",
"\"",
"alpha",
"\"",
",",
"\"",
"alpha",
"beta",
"\"",
",",
"\"",
"alpha",
"beta",
"1",
"\"",
",",
"\"",
"alpha",
"1",
"\"",
",",
"\"",
"alpha",
"+",
"beta",
"\"",
",",
"\"",
"alpha",
"beta",
"\"",
",",
"\"",
"alpha",
"\"",
",",
"\"",
"alpha",
"\"",
",",
"\"",
"beta",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"beta",
"\"",
",",
"\"",
"-",
"alpha",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"1",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"1",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"1",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"1",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"1",
"\"",
",",
"\"",
"1",
"0",
"0",
"-",
"alpha",
"1",
"\"",
",",
"\"",
"01",
"1",
"1",
"\"",
",",
"\"",
"1",
"01",
"1",
"\"",
",",
"\"",
"1",
"1",
"01",
"\"",
",",
"\"",
"1",
"2",
"3",
"dev",
"\"",
",",
"\"",
"1",
"2",
"31",
"2",
"3",
"-",
"-",
"-",
"-",
"rc",
"-",
"snapshot",
"12",
"09",
"1",
"-",
"-",
"12",
"+",
"788",
"\"",
",",
"\"",
"-",
"1",
"0",
"3",
"-",
"gamma",
"+",
"b",
"7",
"7",
"1",
"8",
"\"",
",",
"\"",
"+",
"justmeta",
"\"",
",",
"\"",
"9",
"8",
"7",
"+",
"meta",
"+",
"meta",
"\"",
",",
"\"",
"9",
"8",
"7",
"-",
"whatever",
"+",
"meta",
"+",
"meta",
"\"",
",",
"\"",
"999999999",
"999999999",
"999999999",
"-",
"-",
"-",
"-",
"rc",
"-",
"snapshot",
"12",
"09",
"1",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"12",
"\"",
",",
"\"",
"12",
"el",
"2",
"\"",
",",
"\"",
"12",
"el",
"2",
"-",
"1",
"0",
"-",
"rc",
"5",
"\"",
",",
"\"",
"6",
"nüll",
"7",
"\"",
"/",
"/",
"make",
"sure",
"extended",
"ascii",
"-",
"range",
"(",
"128",
"-",
"255",
")",
"in",
"invalid",
"versions",
"is",
"decoded",
"correctly",
"}",
";",
"for",
"(",
"string",
"version",
":",
"invalid",
"semver",
"versions",
")",
"{",
"assert",
"false",
"(",
"\"",
"should",
"be",
"invalid",
":",
"\"",
"+",
"version",
",",
"version",
"encoder",
"encode",
"version",
"(",
"version",
")",
"is",
"legal",
")",
";",
"/",
"/",
"since",
"we",
"'",
"re",
"here",
",",
"also",
"check",
"encoding",
"/",
"decoding",
"rountrip",
"assert",
"equals",
"(",
"version",
",",
"decode",
"version",
"(",
"encode",
"version",
"(",
"version",
")",
")",
")",
";",
"}",
"}"
]
|
[
"simulates",
"a",
"focus",
"event",
"on",
"the",
"given",
"component"
]
| [
"private",
"static",
"void",
"trigger",
"focus",
"gained",
"(",
"component",
"component",
")",
"{",
"focus",
"listener",
"[",
"]",
"listeners",
"=",
"component",
"get",
"focus",
"listeners",
"(",
")",
";",
"focus",
"event",
"e",
"=",
"new",
"focus",
"event",
"(",
"component",
",",
"(",
"int",
")",
"system",
"current",
"time",
"millis",
"(",
")",
")",
";",
"run",
"swing",
"(",
"(",
")",
"-",
">",
"{",
"for",
"(",
"focus",
"listener",
"l",
":",
"listeners",
")",
"{",
"l",
"focus",
"gained",
"(",
"e",
")",
";",
"}",
"}",
")",
";",
"}"
]
|
[
"return",
"generated",
"{",
"@",
"link",
"allocate",
"request",
"}",
"object"
]
| [
"public",
"allocate",
"request",
"build",
"(",
")",
"{",
"return",
"allocate",
"request",
";",
"}"
]
|
[
"register",
"a",
"listener",
"that",
"will",
"be",
"called",
"when",
"this",
"model",
"visibility",
"state",
"has",
"changed",
"the",
"listener",
"will",
"contribute",
"to",
"this",
"model",
"'",
"s",
"hash",
"code",
"state",
"per",
"the",
"{",
"@",
"link",
"com",
"airbnb",
"epoxy",
"epoxy",
"attribute",
"option",
"#",
"do",
"not",
"hash",
"}",
"rules"
]
| [
"public",
"model",
"with",
"all",
"private",
"field",
"types",
"on",
"visibility",
"state",
"changed",
"(",
"on",
"model",
"visibility",
"state",
"changed",
"listener",
"<",
"model",
"with",
"all",
"private",
"field",
"types",
",",
"object",
">",
"listener",
")",
"{",
"on",
"mutation",
"(",
")",
";",
"this",
"on",
"model",
"visibility",
"state",
"changed",
"listener",
"epoxy",
"generated",
"model",
"=",
"listener",
";",
"return",
"this",
";",
"}"
]
|
[
"each",
"argument",
"is",
"formatted",
"via",
"{",
"@",
"link",
"single",
"string",
"arg",
"formatter",
"#",
"format",
"}"
]
| [
"public",
"static",
"builder",
"format",
"(",
"@",
"compile",
"time",
"constant",
"string",
"format",
"each",
")",
"{",
"return",
"new",
"builder",
"(",
")",
"format",
"(",
"format",
"each",
")",
";",
"}"
]
|
[
"the",
"maximum",
"number",
"of",
"primary",
"shards",
"an",
"index",
"has"
]
| [
"public",
"int",
"get",
"max",
"index",
"primary",
"shards",
"(",
")",
"{",
"return",
"this",
"max",
"index",
"primary",
"shards",
";",
"}"
]
|
[
"if",
"the",
"length",
"of",
"the",
"content",
"is",
"unknown",
",",
"{",
"@",
"link",
"http",
"content",
"encoder",
"}",
"should",
"not",
"skip",
"encoding",
"the",
"content",
"even",
"if",
"the",
"actual",
"length",
"is",
"turned",
"out",
"to",
"be",
"0"
]
| [
"public",
"void",
"test",
"empty",
"split",
"content",
"(",
")",
"throws",
"exception",
"{",
"embedded",
"channel",
"ch",
"=",
"new",
"embedded",
"channel",
"(",
"new",
"test",
"encoder",
"(",
")",
")",
";",
"ch",
"write",
"inbound",
"(",
"new",
"default",
"full",
"http",
"request",
"(",
"http",
"version",
"http",
"1",
"1",
",",
"http",
"method",
"get",
",",
"\"",
"/",
"\"",
")",
")",
";",
"ch",
"write",
"outbound",
"(",
"new",
"default",
"http",
"response",
"(",
"http",
"version",
"http",
"1",
"1",
",",
"http",
"response",
"status",
"ok",
")",
")",
";",
"assert",
"encoded",
"response",
"(",
"ch",
")",
";",
"ch",
"write",
"outbound",
"(",
"last",
"http",
"content",
"empty",
"last",
"content",
")",
";",
"http",
"content",
"chunk",
"=",
"ch",
"read",
"outbound",
"(",
")",
";",
"assert",
"that",
"(",
"chunk",
"content",
"(",
")",
"to",
"string",
"(",
"charset",
"util",
"us",
"ascii",
")",
",",
"is",
"(",
"\"",
"0",
"\"",
")",
")",
";",
"assert",
"that",
"(",
"chunk",
",",
"is",
"(",
"instance",
"of",
"(",
"http",
"content",
"class",
")",
")",
")",
";",
"chunk",
"release",
"(",
")",
";",
"chunk",
"=",
"ch",
"read",
"outbound",
"(",
")",
";",
"assert",
"that",
"(",
"chunk",
"content",
"(",
")",
"is",
"readable",
"(",
")",
",",
"is",
"(",
"false",
")",
")",
";",
"assert",
"that",
"(",
"chunk",
",",
"is",
"(",
"instance",
"of",
"(",
"last",
"http",
"content",
"class",
")",
")",
")",
";",
"chunk",
"release",
"(",
")",
";",
"assert",
"that",
"(",
"ch",
"read",
"outbound",
"(",
")",
",",
"is",
"(",
"null",
"value",
"(",
")",
")",
")",
";",
"}"
]
|
[
"writes",
"any",
"remaining",
"output",
"data",
"to",
"the",
"output",
"stream",
"and",
"closes",
"it"
]
| [
"public",
"void",
"close",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"!",
"finished",
")",
"{",
"finish",
"(",
")",
";",
"}",
"if",
"(",
"resource",
"out",
"!",
"=",
"null",
")",
"{",
"resource",
"out",
"close",
"(",
")",
";",
"}",
"for",
"(",
"zip",
"out",
"zo",
":",
"zip",
"outs",
")",
"{",
"zo",
"close",
"(",
")",
";",
"}",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.