docstring_tokens
list | code_tokens
list |
---|---|
[
"return",
"the",
"friendly",
"time",
"span",
"by",
"now"
]
| [
"public",
"static",
"string",
"get",
"friendly",
"time",
"span",
"by",
"now",
"(",
"final",
"string",
"time",
",",
"@",
"non",
"null",
"final",
"date",
"format",
"format",
")",
"{",
"return",
"get",
"friendly",
"time",
"span",
"by",
"now",
"(",
"string",
"2",
"millis",
"(",
"time",
",",
"format",
")",
")",
";",
"}"
]
|
[
"create",
"a",
"builder",
"with",
"the",
"given",
"publisher"
]
| [
"static",
"<",
"t",
",",
"p",
"extends",
"publisher",
"<",
"t",
">",
">",
"builder",
"<",
"p",
">",
"from",
"publisher",
"(",
"p",
"publisher",
",",
"class",
"<",
"t",
">",
"element",
"class",
")",
"{",
"return",
"new",
"default",
"entity",
"response",
"builder",
"<",
">",
"(",
"publisher",
",",
"body",
"inserters",
"from",
"publisher",
"(",
"publisher",
",",
"element",
"class",
")",
")",
";",
"}"
]
|
[
"get",
"counter",
"mode"
]
| [
"public",
"static",
"counter",
"mode",
"get",
"counter",
"mode",
"(",
"meter",
"id",
"meter",
"id",
",",
"skywalking",
"config",
"config",
")",
"{",
"return",
"config",
"is",
"rate",
"counter",
"(",
"meter",
"id",
"get",
"name",
"(",
")",
")",
"?",
"counter",
"mode",
"rate",
":",
"counter",
"mode",
"increment",
";",
"}"
]
|
[
"has",
"the",
"job",
"opened",
"or",
"not"
]
| [
"public",
"boolean",
"is",
"opened",
"(",
")",
"{",
"return",
"opened",
";",
"}"
]
|
[
"add",
"one",
"or",
"more",
"{",
"@",
"link",
"mesh",
"part",
"}",
"instances",
"to",
"this",
"bt",
"triangle",
"index",
"vertex",
"array",
"the",
"specified",
"meshes",
"must",
"be",
"indexed",
"and",
"triangulated",
"and",
"must",
"outlive",
"this",
"bt",
"triangle",
"index",
"vertex",
"array",
"the",
"buffers",
"for",
"the",
"vertices",
"and",
"indices",
"are",
"shared",
"amongst",
"both"
]
| [
"public",
"bt",
"triangle",
"index",
"vertex",
"array",
"add",
"mesh",
"parts",
"(",
"final",
"mesh",
"part",
"mesh",
"parts",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mesh",
"parts",
"length",
";",
"i",
"+",
"+",
")",
"add",
"mesh",
"part",
"(",
"mesh",
"parts",
"[",
"i",
"]",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"returns",
"the",
"template",
"name"
]
| [
"public",
"string",
"get",
"template",
"name",
"(",
")",
"{",
"return",
"template",
"name",
";",
"}"
]
|
[
"set",
"the",
"session",
"to",
"use",
"for",
"the",
"exchange",
"this",
"method",
"is",
"mutually",
"exclusive",
"with",
"{",
"@",
"link",
"#",
"session",
"manager",
"(",
"web",
"session",
"manager",
")",
"}"
]
| [
"public",
"builder",
"session",
"(",
"web",
"session",
"session",
")",
"{",
"this",
"session",
"manager",
"=",
"exchange",
"-",
">",
"mono",
"just",
"(",
"session",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"wrapper",
"for",
"{",
"@",
"link",
"map",
"#",
"get",
"(",
"object",
")",
"}",
"that",
"forces",
"the",
"caller",
"to",
"pass",
"in",
"a",
"key",
"of",
"the",
"same",
"type",
"as",
"the",
"map",
"besides",
"being",
"slightly",
"shorter",
"than",
"code",
"that",
"uses",
"{",
"@",
"link",
"#",
"get",
"map",
"(",
")",
"}",
",",
"it",
"also",
"ensures",
"that",
"callers",
"don",
"'",
"t",
"pass",
"an",
"{",
"@",
"link",
"entry",
"}",
"by",
"mistake"
]
| [
"protected",
"v",
"get",
"(",
"k",
"key",
")",
"{",
"return",
"get",
"map",
"(",
")",
"get",
"(",
"key",
")",
";",
"}"
]
|
[
"read",
"and",
"return",
"the",
"next",
"record",
"length",
",",
"potentially",
"skipping",
"over",
"a",
"sync",
"block"
]
| [
"private",
"synchronized",
"int",
"read",
"record",
"length",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"in",
"get",
"pos",
"(",
")",
">",
"=",
"end",
")",
"{",
"return",
"-",
"1",
";",
"}",
"int",
"length",
"=",
"in",
"read",
"int",
"(",
")",
";",
"if",
"(",
"version",
">",
"1",
"&",
"&",
"sync",
"!",
"=",
"null",
"&",
"&",
"length",
"=",
"=",
"sync",
"escape",
")",
"{",
"/",
"/",
"process",
"a",
"sync",
"entry",
"in",
"read",
"fully",
"(",
"sync",
"check",
")",
";",
"/",
"/",
"read",
"sync",
"check",
"if",
"(",
"!",
"arrays",
"equals",
"(",
"sync",
",",
"sync",
"check",
")",
")",
"/",
"/",
"check",
"it",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"file",
"is",
"corrupt",
"!",
"\"",
")",
";",
"sync",
"seen",
"=",
"true",
";",
"if",
"(",
"in",
"get",
"pos",
"(",
")",
">",
"=",
"end",
")",
"{",
"return",
"-",
"1",
";",
"}",
"length",
"=",
"in",
"read",
"int",
"(",
")",
";",
"/",
"/",
"re",
"-",
"read",
"length",
"}",
"else",
"{",
"sync",
"seen",
"=",
"false",
";",
"}",
"return",
"length",
";",
"}",
"/",
"*",
"*",
"read",
"the",
"next",
"key",
"/",
"value",
"pair",
"in",
"the",
"file",
"into",
"<",
"code",
">",
"buffer",
"<",
"/",
"code",
">",
"*",
"returns",
"the",
"length",
"of",
"the",
"key",
"read",
",",
"or",
"-",
"1",
"if",
"at",
"end",
"of",
"file",
"the",
"length",
"*",
"of",
"the",
"value",
"may",
"be",
"computed",
"by",
"calling",
"buffer",
"get",
"length",
"(",
")",
"before",
"and",
"*",
"after",
"calls",
"to",
"this",
"method",
"*",
"/"
]
|
[
"un",
"retry",
"committing",
"lock"
]
| [
"public",
"static",
"boolean",
"un",
"retry",
"committing",
"lock",
"(",
")",
"{",
"return",
"get",
"root",
"session",
"manager",
"(",
")",
"un",
"scheduled",
"lock",
"(",
"retry",
"committing",
")",
";",
"}"
]
|
[
"returns",
"whether",
"there",
"was",
"a",
"previous",
"get",
"value",
"[",
"s",
"]",
"[",
"or",
"throw",
"]",
"that",
"indicated",
"a",
"missing",
"dependency",
"formally",
",",
"returns",
"true",
"iff",
"at",
"least",
"one",
"of",
"the",
"following",
"occurred",
":",
"get",
"value",
"[",
"or",
"throw",
"]",
"(",
"k",
"[",
",",
"c",
"]",
")",
"returned",
"{",
"@",
"code",
"null",
"}",
"for",
"some",
"k",
"get",
"values",
"(",
"ks",
")",
"get",
"(",
"k",
")",
"=",
"=",
"{",
"@",
"code",
"null",
"}",
"for",
"some",
"ks",
"and",
"k",
"such",
"that",
"ks",
"contains",
"(",
"k",
")",
"get",
"values",
"or",
"throw",
"(",
"ks",
",",
"c",
")",
"get",
"(",
"k",
")",
"get",
"(",
")",
"=",
"=",
"{",
"@",
"code",
"null",
"}",
"for",
"some",
"ks",
"and",
"k",
"such",
"that",
"ks",
"contains",
"(",
"k",
")",
"if",
"this",
"returns",
"true",
",",
"the",
"{",
"@",
"link",
"sky",
"function",
"}",
"must",
"return",
"{",
"@",
"code",
"null",
"}"
]
| [
"boolean",
"values",
"missing",
"(",
")",
";"
]
|
[
"links",
"the",
"element",
"to",
"the",
"back",
"of",
"the",
"deque",
"so",
"that",
"it",
"becomes",
"the",
"last",
"element"
]
| [
"void",
"link",
"last",
"(",
"final",
"e",
"e",
")",
"{",
"final",
"e",
"l",
"=",
"last",
";",
"last",
"=",
"e",
";",
"if",
"(",
"l",
"=",
"=",
"null",
")",
"{",
"first",
"=",
"e",
";",
"}",
"else",
"{",
"set",
"next",
"(",
"l",
",",
"e",
")",
";",
"set",
"previous",
"(",
"e",
",",
"l",
")",
";",
"}",
"}"
]
|
[
"kicks",
"the",
"swing",
"update",
"manager",
"to",
"immediately",
"process",
"any",
"accumulated",
"addremoves"
]
| [
"public",
"void",
"update",
"now",
"(",
")",
"{",
"add",
"remove",
"updater",
"update",
"now",
"(",
")",
";",
"}"
]
|
[
"see",
"{",
"@",
"link",
"mutable",
"configuration",
"#",
"set",
"types",
"}"
]
| [
"public",
"void",
"set",
"types",
"(",
"class",
"<",
"k",
">",
"key",
"type",
",",
"class",
"<",
"v",
">",
"value",
"type",
")",
"{",
"delegate",
"set",
"types",
"(",
"key",
"type",
",",
"value",
"type",
")",
";",
"}"
]
|
[
"this",
"is",
"populated",
"when",
"the",
"previously",
"received",
"resources",
"could",
"not",
"be",
"applied",
"the",
"message",
"field",
"in",
"error",
"details",
"provides",
"the",
"source",
"internal",
"error",
"related",
"to",
"the",
"failure",
"<",
"code",
">",
"google",
"rpc",
"status",
"error",
"detail",
"=",
"5",
";",
"<",
"code",
">"
]
| [
"public",
"builder",
"merge",
"error",
"detail",
"(",
"com",
"google",
"rpc",
"status",
"value",
")",
"{",
"if",
"(",
"error",
"detail",
"builder",
"=",
"=",
"null",
")",
"{",
"if",
"(",
"error",
"detail",
"!",
"=",
"null",
")",
"{",
"error",
"detail",
"=",
"com",
"google",
"rpc",
"status",
"new",
"builder",
"(",
"error",
"detail",
")",
"merge",
"from",
"(",
"value",
")",
"build",
"partial",
"(",
")",
";",
"}",
"else",
"{",
"error",
"detail",
"=",
"value",
";",
"}",
"on",
"changed",
"(",
")",
";",
"}",
"else",
"{",
"error",
"detail",
"builder",
"merge",
"from",
"(",
"value",
")",
";",
"}",
"return",
"this",
";",
"}"
]
|
[
"mark",
"the",
"resource",
"transaction",
"as",
"rollback",
"-",
"only"
]
| [
"public",
"void",
"set",
"rollback",
"only",
"(",
")",
"{",
"this",
"rollback",
"only",
"=",
"true",
";",
"}"
]
|
[
"obtain",
"the",
"request",
"id",
"to",
"use",
",",
"or",
"{",
"@",
"code",
"null",
"}",
"in",
"which",
"case",
"the",
"object",
"identity",
"of",
"this",
"request",
"instance",
"is",
"used"
]
| [
"protected",
"string",
"init",
"id",
"(",
")",
"{",
"return",
"null",
";",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"initialize",
"the",
"hash",
"using",
"the",
"specified",
"{",
"@",
"code",
"seed",
"}"
]
| [
"public",
"static",
"int",
"initialize",
"(",
"int",
"seed",
")",
"{",
"return",
"seed",
";",
"}"
]
|
[
"calculates",
"the",
"extent",
"of",
"a",
"point",
",",
"which",
"is",
"the",
"point",
"itself"
]
| [
"public",
"static",
"extent",
"from",
"point",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"return",
"new",
"extent",
"(",
"y",
",",
"y",
",",
"x",
"<",
"0",
"?",
"x",
":",
"integer",
"max",
"value",
",",
"x",
"<",
"0",
"?",
"x",
":",
"integer",
"min",
"value",
",",
"x",
">",
"=",
"0",
"?",
"x",
":",
"integer",
"max",
"value",
",",
"x",
">",
"=",
"0",
"?",
"x",
":",
"integer",
"min",
"value",
")",
";",
"}"
]
|
[
"clears",
"the",
"outbound",
"rules",
"associated",
"with",
"the",
"provided",
"delegate",
"service"
]
| [
"public",
"void",
"clear",
"outbound",
"rules",
"(",
"transport",
"service",
"transport",
"service",
")",
"{",
"for",
"(",
"transport",
"address",
"transport",
"address",
":",
"extract",
"transport",
"addresses",
"(",
"transport",
"service",
")",
")",
"{",
"clear",
"outbound",
"rules",
"(",
"transport",
"address",
")",
";",
"}",
"}"
]
|
[
"an",
"optional",
"list",
"of",
"hex",
"-",
"encoded",
"sha",
"-",
"256",
"hashes",
"of",
"the",
"authorized",
"client",
"certificates",
"both",
"simple",
"and",
"colon",
"separated",
"formats",
"are",
"acceptable",
"note",
":",
"when",
"both",
"verify",
"certificate",
"hash",
"and",
"verify",
"certificate",
"spki",
"are",
"specified",
",",
"a",
"hash",
"matching",
"either",
"value",
"will",
"result",
"in",
"the",
"certificate",
"being",
"accepted",
"<",
"code",
">",
"repeated",
"string",
"verify",
"certificate",
"hash",
"=",
"12",
";",
"<",
"code",
">"
]
| [
"public",
"java",
"lang",
"string",
"get",
"verify",
"certificate",
"hash",
"(",
"int",
"index",
")",
"{",
"return",
"verify",
"certificate",
"hash",
"get",
"(",
"index",
")",
";",
"}"
]
|
[
"enforce",
"singleton",
"pattern",
"when",
"serializingdeserializing"
]
| [
"private",
"object",
"read",
"resolve",
"(",
")",
"{",
"return",
"instance",
";",
"}"
]
|
[
"returns",
"the",
"{",
"@",
"link",
"m",
"d",
"string",
"}",
"from",
"the",
"basic",
"name",
"if",
"it",
"is",
"a",
"symbol",
"of",
"that",
"type",
";",
"else",
"returns",
"null"
]
| [
"public",
"m",
"d",
"string",
"get",
"m",
"d",
"string",
"(",
")",
"{",
"if",
"(",
"is",
"string",
"(",
")",
")",
"{",
"return",
"qualified",
"name",
"get",
"m",
"d",
"string",
"(",
")",
";",
"}",
"return",
"null",
";",
"}"
]
|
[
"internal",
"use",
"only",
"considers",
"identity",
"scope"
]
| [
"final",
"protected",
"<",
"o",
">",
"o",
"load",
"current",
"other",
"(",
"abstract",
"dao",
"<",
"o",
",",
"?",
">",
"dao",
",",
"cursor",
"cursor",
",",
"int",
"offset",
")",
"{",
"return",
"dao",
"load",
"current",
"(",
"cursor",
",",
"offset",
",",
"/",
"*",
"todo",
"check",
"this",
"*",
"/",
"true",
")",
";",
"}"
]
|
[
"creates",
"a",
"new",
"async",
"stub",
"that",
"supports",
"all",
"call",
"types",
"for",
"the",
"service"
]
| [
"public",
"static",
"route",
"lookup",
"service",
"stub",
"new",
"stub",
"(",
"io",
"grpc",
"channel",
"channel",
")",
"{",
"io",
"grpc",
"stub",
"abstract",
"stub",
"stub",
"factory",
"<",
"route",
"lookup",
"service",
"stub",
">",
"factory",
"=",
"new",
"io",
"grpc",
"stub",
"abstract",
"stub",
"stub",
"factory",
"<",
"route",
"lookup",
"service",
"stub",
">",
"(",
")",
"{",
"@",
"java",
"lang",
"override",
"public",
"route",
"lookup",
"service",
"stub",
"new",
"stub",
"(",
"io",
"grpc",
"channel",
"channel",
",",
"io",
"grpc",
"call",
"options",
"call",
"options",
")",
"{",
"return",
"new",
"route",
"lookup",
"service",
"stub",
"(",
"channel",
",",
"call",
"options",
")",
";",
"}",
"}",
";",
"return",
"route",
"lookup",
"service",
"stub",
"new",
"stub",
"(",
"factory",
",",
"channel",
")",
";",
"}"
]
|
[
"one",
"nbsp",
"per",
"10",
"pixels",
"in",
"given",
"size",
",",
"which",
"may",
"be",
"a",
"plain",
"number",
"or",
"\"",
"nx",
"n",
"\"",
"(",
"like",
"an",
"icon",
"size",
")",
"useful",
"in",
"a",
"sortable",
"table",
"heading"
]
| [
"public",
"static",
"string",
"nbsp",
"indent",
"(",
"string",
"size",
")",
"{",
"int",
"i",
"=",
"size",
"index",
"of",
"(",
"'",
"x",
"'",
")",
";",
"i",
"=",
"integer",
"parse",
"int",
"(",
"i",
">",
"0",
"?",
"size",
"substring",
"(",
"0",
",",
"i",
")",
":",
"size",
")",
"/",
"10",
";",
"string",
"builder",
"buf",
"=",
"new",
"string",
"builder",
"(",
"30",
")",
";",
"for",
"(",
"int",
"j",
"=",
"2",
";",
"j",
"<",
"=",
"i",
";",
"j",
"+",
"+",
")",
"buf",
"append",
"(",
"\"",
"&",
"nbsp",
";",
"\"",
")",
";",
"return",
"buf",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"initialize",
"the",
"internal",
"{",
"@",
"link",
"producer",
"}",
";",
"note",
"this",
"function",
"should",
"be",
"made",
"idempotent"
]
| [
"void",
"initialize",
"(",
")",
";"
]
|
[
"gets",
"a",
"descriptive",
"report",
"about",
"why",
"the",
"tasktracker",
"was",
"blacklisted"
]
| [
"public",
"string",
"get",
"black",
"list",
"report",
"(",
")",
"{",
"return",
"black",
"list",
"report",
";",
"}"
]
|
[
"block",
"of",
"description",
"add"
]
| [
"public",
"description",
"builder",
"add",
"(",
"block",
"element",
"block",
")",
"{",
"blocks",
"add",
"(",
"block",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"gets",
"the",
"grid",
"queue",
"name",
"to",
"run",
"on",
"using",
"config",
"and",
"default",
"only"
]
| [
"string",
"get",
"queue",
"name",
"(",
")",
"{",
"return",
"get",
"queue",
"name",
"(",
"null",
")",
";",
"}"
]
|
[
"returns",
"whether",
"it",
"is",
"possible",
"to",
"adapt",
"the",
"decoder",
"seamlessly",
"from",
"{",
"@",
"code",
"old",
"format",
"}",
"to",
"{",
"@",
"code",
"new",
"format",
"}",
"if",
"{",
"@",
"code",
"new",
"format",
"}",
"may",
"not",
"be",
"completely",
"populated",
",",
"pass",
"{",
"@",
"code",
"false",
"}",
"for",
"{",
"@",
"code",
"is",
"new",
"format",
"complete",
"}"
]
| [
"public",
"boolean",
"is",
"seamless",
"adaptation",
"supported",
"(",
"format",
"old",
"format",
",",
"format",
"new",
"format",
",",
"boolean",
"is",
"new",
"format",
"complete",
")",
"{",
"if",
"(",
"is",
"video",
")",
"{",
"return",
"assertions",
"check",
"not",
"null",
"(",
"old",
"format",
"sample",
"mime",
"type",
")",
"equals",
"(",
"new",
"format",
"sample",
"mime",
"type",
")",
"&",
"&",
"old",
"format",
"rotation",
"degrees",
"=",
"=",
"new",
"format",
"rotation",
"degrees",
"&",
"&",
"(",
"adaptive",
"|",
"|",
"(",
"old",
"format",
"width",
"=",
"=",
"new",
"format",
"width",
"&",
"&",
"old",
"format",
"height",
"=",
"=",
"new",
"format",
"height",
")",
")",
"&",
"&",
"(",
"(",
"!",
"is",
"new",
"format",
"complete",
"&",
"&",
"new",
"format",
"color",
"info",
"=",
"=",
"null",
")",
"|",
"|",
"util",
"are",
"equal",
"(",
"old",
"format",
"color",
"info",
",",
"new",
"format",
"color",
"info",
")",
")",
";",
"}",
"else",
"{",
"if",
"(",
"!",
"mime",
"types",
"audio",
"aac",
"equals",
"(",
"mime",
"type",
")",
"|",
"|",
"!",
"assertions",
"check",
"not",
"null",
"(",
"old",
"format",
"sample",
"mime",
"type",
")",
"equals",
"(",
"new",
"format",
"sample",
"mime",
"type",
")",
"|",
"|",
"old",
"format",
"channel",
"count",
"!",
"=",
"new",
"format",
"channel",
"count",
"|",
"|",
"old",
"format",
"sample",
"rate",
"!",
"=",
"new",
"format",
"sample",
"rate",
")",
"{",
"return",
"false",
";",
"}",
"/",
"/",
"check",
"the",
"codec",
"profile",
"levels",
"support",
"adaptation",
"@",
"nullable",
"pair",
"<",
"integer",
",",
"integer",
">",
"old",
"codec",
"profile",
"level",
"=",
"media",
"codec",
"util",
"get",
"codec",
"profile",
"and",
"level",
"(",
"old",
"format",
")",
";",
"@",
"nullable",
"pair",
"<",
"integer",
",",
"integer",
">",
"new",
"codec",
"profile",
"level",
"=",
"media",
"codec",
"util",
"get",
"codec",
"profile",
"and",
"level",
"(",
"new",
"format",
")",
";",
"if",
"(",
"old",
"codec",
"profile",
"level",
"=",
"=",
"null",
"|",
"|",
"new",
"codec",
"profile",
"level",
"=",
"=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"int",
"old",
"profile",
"=",
"old",
"codec",
"profile",
"level",
"first",
";",
"int",
"new",
"profile",
"=",
"new",
"codec",
"profile",
"level",
"first",
";",
"return",
"old",
"profile",
"=",
"=",
"codec",
"profile",
"level",
"a",
"a",
"c",
"object",
"x",
"h",
"e",
"&",
"&",
"new",
"profile",
"=",
"=",
"codec",
"profile",
"level",
"a",
"a",
"c",
"object",
"x",
"h",
"e",
";",
"}",
"}"
]
|
[
"model",
"tests",
"for",
"has",
"only",
"read",
"only"
]
| [
"public",
"void",
"test",
"has",
"only",
"read",
"only",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"has",
"only",
"read",
"only",
"}"
]
|
[
"returns",
"<",
"code",
">",
"true",
"<",
"code",
">",
"iff",
"the",
"resource",
"behind",
"this",
"entity",
"is",
"still",
"open",
"ie",
"entities",
"associated",
"with",
"it",
"can",
"remain",
"in",
"the",
"cache",
"ie",
"index",
"shard",
"is",
"still",
"open"
]
| [
"boolean",
"is",
"open",
"(",
")",
";"
]
|
[
"helper",
"method",
"to",
"set",
"api",
"key",
"value",
"for",
"the",
"first",
"api",
"key",
"authentication"
]
| [
"public",
"api",
"client",
"set",
"api",
"key",
"(",
"string",
"api",
"key",
")",
"{",
"for",
"(",
"authentication",
"auth",
":",
"authentications",
"values",
"(",
")",
")",
"{",
"if",
"(",
"auth",
"instanceof",
"api",
"key",
"auth",
")",
"{",
"(",
"(",
"api",
"key",
"auth",
")",
"auth",
")",
"set",
"api",
"key",
"(",
"api",
"key",
")",
";",
"return",
"this",
";",
"}",
"}",
"throw",
"new",
"runtime",
"exception",
"(",
"\"",
"no",
"api",
"key",
"authentication",
"configured",
"!",
"\"",
")",
";",
"}"
]
|
[
"returns",
"the",
"value",
"of",
"the",
"given",
"calendar",
"field"
]
| [
"public",
"static",
"int",
"get",
"value",
"by",
"calendar",
"field",
"(",
"final",
"long",
"millis",
",",
"final",
"int",
"field",
")",
"{",
"calendar",
"cal",
"=",
"calendar",
"get",
"instance",
"(",
")",
";",
"cal",
"set",
"time",
"in",
"millis",
"(",
"millis",
")",
";",
"return",
"cal",
"get",
"(",
"field",
")",
";",
"}"
]
|
[
"for",
"this",
"test",
",",
"the",
"body",
"for",
"this",
"request",
"much",
"reference",
"a",
"schema",
"named",
"&",
"#",
"x",
"6",
"0",
";",
"file",
"&",
"#",
"x",
"6",
"0",
";"
]
| [
"public",
"void",
"test",
"body",
"with",
"file",
"schema",
"(",
"file",
"schema",
"test",
"class",
"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",
"test",
"body",
"with",
"file",
"schema",
"\"",
")",
";",
"}",
"/",
"/",
"create",
"path",
"and",
"map",
"variables",
"string",
"local",
"var",
"path",
"=",
"\"",
"/",
"fake",
"/",
"body",
"-",
"with",
"-",
"file",
"-",
"schema",
"\"",
"replace",
"all",
"(",
"\"",
"\\",
"\\",
"{",
"format",
"\\",
"\\",
"}",
"\"",
",",
"\"",
"json",
"\"",
")",
";",
"/",
"/",
"query",
"params",
"list",
"<",
"pair",
">",
"local",
"var",
"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",
"=",
"{",
"\"",
"application",
"/",
"json",
"\"",
"}",
";",
"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",
",",
"\"",
"put",
"\"",
",",
"local",
"var",
"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",
")",
";",
"}"
]
|
[
"test",
"the",
"proper",
"handling",
"of",
"removalcancel",
"of",
"resource",
"requests"
]
| [
"public",
"void",
"test",
"resource",
"request",
"cleanup",
"(",
")",
"throws",
"yarn",
"exception",
",",
"i",
"o",
"exception",
"{",
"/",
"/",
"ask",
"for",
"two",
"containers",
",",
"one",
"with",
"location",
"preference",
"this",
"asks",
"add",
"(",
"create",
"resource",
"request",
"(",
"0",
",",
"\"",
"node",
"\"",
",",
"2048",
",",
"1",
",",
"1",
",",
"execution",
"type",
"guaranteed",
",",
"1",
")",
")",
";",
"this",
"asks",
"add",
"(",
"create",
"resource",
"request",
"(",
"0",
",",
"\"",
"rack",
"\"",
",",
"2048",
",",
"1",
",",
"1",
",",
"execution",
"type",
"guaranteed",
",",
"1",
")",
")",
";",
"this",
"asks",
"add",
"(",
"create",
"resource",
"request",
"(",
"0",
",",
"resource",
"request",
"any",
",",
"2048",
",",
"1",
",",
"1",
",",
"execution",
"type",
"guaranteed",
",",
"2",
")",
")",
";",
"this",
"relayer",
"allocate",
"(",
"get",
"allocate",
"request",
"(",
")",
")",
";",
"assert",
"asks",
"and",
"releases",
"(",
"3",
",",
"0",
")",
";",
"assert",
"assert",
"equals",
"(",
"1",
",",
"this",
"relayer",
"get",
"remote",
"pending",
"asks",
"(",
")",
"size",
"(",
")",
")",
";",
"resource",
"request",
"set",
"set",
"=",
"this",
"relayer",
"get",
"remote",
"pending",
"asks",
"(",
")",
"values",
"(",
")",
"iterator",
"(",
")",
"next",
"(",
")",
";",
"assert",
"assert",
"equals",
"(",
"3",
",",
"set",
"get",
"asks",
"(",
")",
"size",
"(",
")",
")",
";",
"clear",
"allocate",
"request",
"lists",
"(",
")",
";",
"/",
"/",
"cancel",
"one",
"ask",
"this",
"asks",
"add",
"(",
"create",
"resource",
"request",
"(",
"0",
",",
"\"",
"node",
"\"",
",",
"2048",
",",
"1",
",",
"1",
",",
"execution",
"type",
"guaranteed",
",",
"0",
")",
")",
";",
"this",
"asks",
"add",
"(",
"create",
"resource",
"request",
"(",
"0",
",",
"resource",
"request",
"any",
",",
"2048",
",",
"1",
",",
"1",
",",
"execution",
"type",
"guaranteed",
",",
"1",
")",
")",
";",
"this",
"relayer",
"allocate",
"(",
"get",
"allocate",
"request",
"(",
")",
")",
";",
"assert",
"asks",
"and",
"releases",
"(",
"2",
",",
"0",
")",
";",
"assert",
"assert",
"equals",
"(",
"1",
",",
"relayer",
"get",
"remote",
"pending",
"asks",
"(",
")",
"size",
"(",
")",
")",
";",
"set",
"=",
"this",
"relayer",
"get",
"remote",
"pending",
"asks",
"(",
")",
"values",
"(",
")",
"iterator",
"(",
")",
"next",
"(",
")",
";",
"assert",
"assert",
"equals",
"(",
"2",
",",
"set",
"get",
"asks",
"(",
")",
"size",
"(",
")",
")",
";",
"clear",
"allocate",
"request",
"lists",
"(",
")",
";",
"/",
"/",
"cancel",
"the",
"other",
"ask",
",",
"the",
"pending",
"ask",
"set",
"should",
"be",
"removed",
"this",
"asks",
"add",
"(",
"create",
"resource",
"request",
"(",
"0",
",",
"resource",
"request",
"any",
",",
"2048",
",",
"1",
",",
"1",
",",
"execution",
"type",
"guaranteed",
",",
"0",
")",
")",
";",
"this",
"relayer",
"allocate",
"(",
"allocate",
"request",
"new",
"instance",
"(",
"0",
",",
"0",
",",
"asks",
",",
"null",
",",
"null",
")",
")",
";",
"assert",
"asks",
"and",
"releases",
"(",
"1",
",",
"0",
")",
";",
"assert",
"assert",
"equals",
"(",
"0",
",",
"this",
"relayer",
"get",
"remote",
"pending",
"asks",
"(",
")",
"size",
"(",
")",
")",
";",
"}"
]
|
[
"gets",
"the",
"maximum",
"number",
"of",
"registers",
"that",
"may",
"be",
"in",
"this",
"instance",
",",
"which",
"is",
"also",
"the",
"maximum",
"-",
"plus",
"-",
"one",
"of",
"register",
"numbers",
"that",
"may",
"be",
"represented"
]
| [
"public",
"int",
"get",
"max",
"size",
"(",
")",
"{",
"return",
"specs",
"length",
";",
"}"
]
|
[
"returns",
"true",
"if",
"this",
"chain",
"will",
"reuse",
"the",
"last",
"successful",
"credentials",
"provider",
"for",
"future",
"credentials",
"requests",
",",
"otherwise",
",",
"false",
"if",
"it",
"will",
"search",
"through",
"the",
"chain",
"each",
"time"
]
| [
"public",
"boolean",
"get",
"reuse",
"last",
"provider",
"(",
")",
"{",
"return",
"reuse",
"last",
"provider",
";",
"}"
]
|
[
"returns",
"an",
"immediate",
"{",
"@",
"link",
"watermark",
"output",
"}",
"for",
"the",
"given",
"output",
"id",
">",
"see",
"{",
"@",
"link",
"watermark",
"output",
"multiplexer",
"}",
"for",
"a",
"description",
"of",
"immediate",
"and",
"deferred",
"outputs"
]
| [
"public",
"watermark",
"output",
"get",
"immediate",
"output",
"(",
"string",
"output",
"id",
")",
"{",
"final",
"output",
"state",
"output",
"state",
"=",
"watermark",
"per",
"output",
"id",
"get",
"(",
"output",
"id",
")",
";",
"preconditions",
"check",
"argument",
"(",
"output",
"state",
"!",
"=",
"null",
",",
"\"",
"no",
"output",
"registered",
"under",
"id",
"%",
"s",
"\"",
",",
"output",
"id",
")",
";",
"return",
"new",
"immediate",
"output",
"(",
"output",
"state",
")",
";",
"}"
]
|
[
"this",
"test",
"attempts",
"to",
"different",
"types",
"of",
"datanode",
"report"
]
| [
"public",
"void",
"test",
"datanode",
"report",
"(",
")",
"throws",
"exception",
"{",
"conf",
"set",
"int",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"namenode",
"heartbeat",
"recheck",
"interval",
"key",
",",
"500",
")",
";",
"/",
"/",
"0",
"5s",
"conf",
"set",
"long",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"heartbeat",
"interval",
"key",
",",
"1l",
")",
";",
"mini",
"d",
"f",
"s",
"cluster",
"cluster",
"=",
"new",
"mini",
"d",
"f",
"s",
"cluster",
"builder",
"(",
"conf",
")",
"num",
"data",
"nodes",
"(",
"num",
"of",
"datanodes",
")",
"build",
"(",
")",
";",
"try",
"{",
"/",
"/",
"wait",
"until",
"the",
"cluster",
"is",
"up",
"cluster",
"wait",
"active",
"(",
")",
";",
"final",
"string",
"bpid",
"=",
"cluster",
"get",
"namesystem",
"(",
")",
"get",
"block",
"pool",
"id",
"(",
")",
";",
"final",
"list",
"<",
"data",
"node",
">",
"datanodes",
"=",
"cluster",
"get",
"data",
"nodes",
"(",
")",
";",
"final",
"d",
"f",
"s",
"client",
"client",
"=",
"cluster",
"get",
"file",
"system",
"(",
")",
"dfs",
";",
"assert",
"reports",
"(",
"num",
"of",
"datanodes",
",",
"datanode",
"report",
"type",
"all",
",",
"client",
",",
"datanodes",
",",
"bpid",
")",
";",
"assert",
"reports",
"(",
"num",
"of",
"datanodes",
",",
"datanode",
"report",
"type",
"live",
",",
"client",
",",
"datanodes",
",",
"bpid",
")",
";",
"assert",
"reports",
"(",
"0",
",",
"datanode",
"report",
"type",
"dead",
",",
"client",
",",
"datanodes",
",",
"bpid",
")",
";",
"/",
"/",
"bring",
"down",
"one",
"datanode",
"final",
"data",
"node",
"last",
"=",
"datanodes",
"get",
"(",
"datanodes",
"size",
"(",
")",
"-",
"1",
")",
";",
"log",
"info",
"(",
"\"",
"xxx",
"shutdown",
"datanode",
"\"",
"+",
"last",
"get",
"datanode",
"uuid",
"(",
")",
")",
";",
"last",
"shutdown",
"(",
")",
";",
"datanode",
"info",
"[",
"]",
"node",
"info",
"=",
"client",
"datanode",
"report",
"(",
"datanode",
"report",
"type",
"dead",
")",
";",
"while",
"(",
"node",
"info",
"length",
"!",
"=",
"1",
")",
"{",
"try",
"{",
"thread",
"sleep",
"(",
"500",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"}",
"node",
"info",
"=",
"client",
"datanode",
"report",
"(",
"datanode",
"report",
"type",
"dead",
")",
";",
"}",
"assert",
"reports",
"(",
"num",
"of",
"datanodes",
",",
"datanode",
"report",
"type",
"all",
",",
"client",
",",
"datanodes",
",",
"null",
")",
";",
"assert",
"reports",
"(",
"num",
"of",
"datanodes",
"-",
"1",
",",
"datanode",
"report",
"type",
"live",
",",
"client",
",",
"datanodes",
",",
"null",
")",
";",
"assert",
"reports",
"(",
"1",
",",
"datanode",
"report",
"type",
"dead",
",",
"client",
",",
"datanodes",
",",
"null",
")",
";",
"thread",
"sleep",
"(",
"5000",
")",
";",
"assert",
"gauge",
"(",
"\"",
"expired",
"heartbeats",
"\"",
",",
"1",
",",
"get",
"metrics",
"(",
"\"",
"f",
"s",
"namesystem",
"\"",
")",
")",
";",
"}",
"finally",
"{",
"cluster",
"shutdown",
"(",
")",
";",
"}",
"}"
]
|
[
"create",
"new",
"service",
"ticket"
]
| [
"public",
"response",
"entity",
"<",
"string",
">",
"create",
"service",
"ticket",
"(",
"final",
"http",
"servlet",
"request",
"http",
"servlet",
"request",
",",
"@",
"request",
"body",
"(",
"required",
"=",
"false",
")",
"final",
"multi",
"value",
"map",
"<",
"string",
",",
"string",
">",
"request",
"body",
",",
"@",
"path",
"variable",
"(",
"\"",
"tgt",
"id",
"\"",
")",
"final",
"string",
"tgt",
"id",
")",
"{",
"try",
"{",
"val",
"authn",
"=",
"this",
"ticket",
"registry",
"support",
"get",
"authentication",
"from",
"(",
"tgt",
"id",
")",
";",
"authentication",
"credentials",
"thread",
"local",
"binder",
"bind",
"current",
"(",
"authn",
")",
";",
"if",
"(",
"authn",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"invalid",
"ticket",
"exception",
"(",
"tgt",
"id",
")",
";",
"}",
"val",
"service",
"=",
"this",
"argument",
"extractor",
"extract",
"service",
"(",
"http",
"servlet",
"request",
")",
";",
"if",
"(",
"service",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"target",
"service",
"/",
"application",
"is",
"unspecified",
"or",
"unrecognized",
"in",
"the",
"request",
"\"",
")",
";",
"}",
"if",
"(",
"boolean",
"utils",
"to",
"boolean",
"(",
"http",
"servlet",
"request",
"get",
"parameter",
"(",
"cas",
"protocol",
"constants",
"parameter",
"renew",
")",
")",
")",
"{",
"val",
"credential",
"=",
"this",
"credential",
"factory",
"from",
"request",
"(",
"http",
"servlet",
"request",
",",
"request",
"body",
")",
";",
"if",
"(",
"credential",
"=",
"=",
"null",
"|",
"|",
"credential",
"is",
"empty",
"(",
")",
")",
"{",
"throw",
"new",
"bad",
"rest",
"request",
"exception",
"(",
"\"",
"no",
"credentials",
"are",
"provided",
"or",
"extracted",
"to",
"authenticate",
"the",
"rest",
"request",
"\"",
")",
";",
"}",
"val",
"authentication",
"result",
"=",
"authentication",
"system",
"support",
"handle",
"and",
"finalize",
"single",
"authentication",
"transaction",
"(",
"service",
",",
"credential",
")",
";",
"return",
"this",
"service",
"ticket",
"resource",
"entity",
"response",
"factory",
"build",
"(",
"tgt",
"id",
",",
"service",
",",
"authentication",
"result",
")",
";",
"}",
"val",
"builder",
"=",
"new",
"default",
"authentication",
"result",
"builder",
"(",
")",
";",
"val",
"authentication",
"result",
"=",
"builder",
"collect",
"(",
"authn",
")",
"build",
"(",
"this",
"authentication",
"system",
"support",
"get",
"principal",
"election",
"strategy",
"(",
")",
",",
"service",
")",
";",
"return",
"this",
"service",
"ticket",
"resource",
"entity",
"response",
"factory",
"build",
"(",
"tgt",
"id",
",",
"service",
",",
"authentication",
"result",
")",
";",
"}",
"catch",
"(",
"final",
"invalid",
"ticket",
"exception",
"e",
")",
"{",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"tgt",
"id",
"+",
"\"",
"could",
"not",
"be",
"found",
"or",
"is",
"considered",
"invalid",
"\"",
",",
"http",
"status",
"not",
"found",
")",
";",
"}",
"catch",
"(",
"final",
"authentication",
"exception",
"e",
")",
"{",
"return",
"rest",
"resource",
"utils",
"create",
"response",
"entity",
"for",
"authn",
"failure",
"(",
"e",
",",
"http",
"servlet",
"request",
",",
"application",
"context",
")",
";",
"}",
"catch",
"(",
"final",
"bad",
"rest",
"request",
"exception",
"e",
")",
"{",
"logging",
"utils",
"error",
"(",
"logger",
",",
"e",
")",
";",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"e",
"get",
"message",
"(",
")",
",",
"http",
"status",
"bad",
"request",
")",
";",
"}",
"catch",
"(",
"final",
"exception",
"e",
")",
"{",
"logging",
"utils",
"error",
"(",
"logger",
",",
"e",
")",
";",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"e",
"get",
"message",
"(",
")",
",",
"http",
"status",
"internal",
"server",
"error",
")",
";",
"}",
"finally",
"{",
"authentication",
"credentials",
"thread",
"local",
"binder",
"clear",
"(",
")",
";",
"}",
"}"
]
|
[
"does",
"the",
"extraction"
]
| [
"private",
"local",
"variable",
"info",
"doit",
"(",
")",
"{",
"/",
"/",
"fixme",
"why",
"is",
"this",
"needed",
"here",
"?",
"if",
"(",
"method",
"get",
"reg",
"count",
"(",
")",
">",
"0",
")",
"{",
"for",
"(",
"int",
"bi",
"=",
"method",
"get",
"entry",
"block",
"index",
"(",
")",
";",
"bi",
">",
"=",
"0",
";",
"bi",
"=",
"work",
"set",
"next",
"set",
"bit",
"(",
"0",
")",
")",
"{",
"work",
"set",
"clear",
"(",
"bi",
")",
";",
"process",
"block",
"(",
"bi",
")",
";",
"}",
"}",
"result",
"info",
"set",
"immutable",
"(",
")",
";",
"return",
"result",
"info",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}",
"the",
"default",
"implementation",
"returns",
"the",
"result",
"of",
"calling",
"{",
"@",
"link",
"#",
"visit",
"children",
"}",
"on",
"{",
"@",
"code",
"ctx",
"}"
]
| [
"@",
"override",
"public",
"t",
"visit",
"interval",
"(",
"sql",
"base",
"parser",
"interval",
"context",
"ctx",
")",
"{",
"return",
"visit",
"children",
"(",
"ctx",
")",
";",
"}"
]
|
[
"writes",
"a",
"{",
"@",
"link",
"java",
"nio",
"byte",
"buffer",
"}",
"to",
"a",
"{",
"@",
"link",
"java",
"nio",
"channels",
"writable",
"byte",
"channel",
"}"
]
| [
"public",
"static",
"void",
"write",
"to",
"channel",
"(",
"byte",
"buffer",
"byte",
"buffer",
",",
"writable",
"byte",
"channel",
"channel",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"byte",
"buffer",
"is",
"direct",
"(",
")",
"|",
"|",
"(",
"byte",
"buffer",
"remaining",
"(",
")",
"<",
"=",
"write",
"chunk",
"size",
")",
")",
"{",
"while",
"(",
"byte",
"buffer",
"has",
"remaining",
"(",
")",
")",
"{",
"channel",
"write",
"(",
"byte",
"buffer",
")",
";",
"}",
"}",
"else",
"{",
"/",
"/",
"duplicate",
"the",
"buffer",
"in",
"order",
"to",
"be",
"able",
"to",
"change",
"the",
"limit",
"byte",
"buffer",
"tmp",
"buffer",
"=",
"byte",
"buffer",
"duplicate",
"(",
")",
";",
"try",
"{",
"while",
"(",
"byte",
"buffer",
"has",
"remaining",
"(",
")",
")",
"{",
"tmp",
"buffer",
"limit",
"(",
"math",
"min",
"(",
"byte",
"buffer",
"limit",
"(",
")",
",",
"tmp",
"buffer",
"position",
"(",
")",
"+",
"write",
"chunk",
"size",
")",
")",
";",
"while",
"(",
"tmp",
"buffer",
"has",
"remaining",
"(",
")",
")",
"{",
"channel",
"write",
"(",
"tmp",
"buffer",
")",
";",
"}",
"byte",
"buffer",
"position",
"(",
"tmp",
"buffer",
"position",
"(",
")",
")",
";",
"}",
"}",
"finally",
"{",
"/",
"/",
"make",
"sure",
"we",
"update",
"byte",
"buffer",
"to",
"indicate",
"how",
"far",
"we",
"came",
"byte",
"buffer",
"position",
"(",
"tmp",
"buffer",
"position",
"(",
")",
")",
";",
"}",
"}",
"}"
]
|
[
"returns",
"the",
"batch",
"update",
"exception",
"that",
"caused",
"the",
"nested",
"executor",
"to",
"fail",
"that",
"exception",
"contains",
"an",
"array",
"of",
"row",
"counts",
"that",
"can",
"be",
"used",
"to",
"determine",
"exactly",
"which",
"statement",
"of",
"the",
"executor",
"caused",
"the",
"failure",
"(",
"or",
"failures",
")"
]
| [
"public",
"batch",
"update",
"exception",
"get",
"batch",
"update",
"exception",
"(",
")",
"{",
"return",
"batch",
"update",
"exception",
";",
"}"
]
|
[
"returns",
"the",
"maximum",
"length",
"in",
"pixels",
"across",
"all",
"legend",
"labels",
"+",
"formsize",
"+",
"formtotextspace"
]
| [
"public",
"float",
"get",
"maximum",
"entry",
"width",
"(",
"paint",
"p",
")",
"{",
"float",
"max",
"=",
"0f",
";",
"float",
"max",
"form",
"size",
"=",
"0f",
";",
"float",
"form",
"to",
"text",
"space",
"=",
"utils",
"convert",
"dp",
"to",
"pixel",
"(",
"m",
"form",
"to",
"text",
"space",
")",
";",
"for",
"(",
"legend",
"entry",
"entry",
":",
"m",
"entries",
")",
"{",
"final",
"float",
"form",
"size",
"=",
"utils",
"convert",
"dp",
"to",
"pixel",
"(",
"float",
"is",
"na",
"n",
"(",
"entry",
"form",
"size",
")",
"?",
"m",
"form",
"size",
":",
"entry",
"form",
"size",
")",
";",
"if",
"(",
"form",
"size",
">",
"max",
"form",
"size",
")",
"max",
"form",
"size",
"=",
"form",
"size",
";",
"string",
"label",
"=",
"entry",
"label",
";",
"if",
"(",
"label",
"=",
"=",
"null",
")",
"continue",
";",
"float",
"length",
"=",
"(",
"float",
")",
"utils",
"calc",
"text",
"width",
"(",
"p",
",",
"label",
")",
";",
"if",
"(",
"length",
">",
"max",
")",
"max",
"=",
"length",
";",
"}",
"return",
"max",
"+",
"max",
"form",
"size",
"+",
"form",
"to",
"text",
"space",
";",
"}"
]
|
[
"sets",
"{",
"@",
"code",
"num",
"hash",
"functions",
"}",
"bits",
"of",
"the",
"given",
"bit",
"array",
",",
"by",
"hashing",
"a",
"user",
"element",
"returns",
"whether",
"any",
"bits",
"changed",
"as",
"a",
"result",
"of",
"this",
"operation"
]
| [
"<",
"t",
">",
"boolean",
"put",
"(",
"t",
"object",
",",
"funnel",
"<",
"?",
"super",
"t",
">",
"funnel",
",",
"int",
"num",
"hash",
"functions",
",",
"lock",
"free",
"bit",
"array",
"bits",
")",
";"
]
|
[
"test",
"the",
"property",
"'",
"prefix",
"array",
"'"
]
| [
"public",
"void",
"prefix",
"array",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"prefix",
"array",
"}"
]
|
[
"get",
"integer",
"item"
]
| [
"public",
"integer",
"get",
"integer",
"item",
"(",
")",
"{",
"return",
"integer",
"item",
";",
"}"
]
|
[
"get",
"attribute",
"integer"
]
| [
"public",
"integer",
"get",
"attribute",
"integer",
"(",
")",
"{",
"return",
"attribute",
"integer",
";",
"}"
]
|
[
"check",
"the",
"type",
"to",
"see",
"if",
"it",
"needs",
"import",
"the",
"librarymodulepackage"
]
| [
"protected",
"boolean",
"need",
"to",
"import",
"(",
"string",
"type",
")",
"{",
"return",
"string",
"utils",
"is",
"not",
"blank",
"(",
"type",
")",
"&",
"&",
"!",
"default",
"includes",
"contains",
"(",
"type",
")",
"&",
"&",
"!",
"language",
"specific",
"primitives",
"contains",
"(",
"type",
")",
";",
"}"
]
|
[
"performs",
"base",
"6",
"4",
"encoding",
"on",
"the",
"<",
"code",
">",
"raw",
"<",
"code",
">",
"byte",
"buffer",
",",
"writing",
"it",
"to",
"the",
"<",
"code",
">",
"encoded",
"<",
"code",
">",
"char",
"buffer",
"this",
"is",
"an",
"experimental",
"feature",
"currently",
"it",
"does",
"not",
"pass",
"along",
"any",
"options",
"(",
"such",
"as",
"{",
"@",
"link",
"#",
"do",
"break",
"lines",
"}",
"or",
"{",
"@",
"link",
"#",
"gzip",
"}"
]
| [
"public",
"static",
"void",
"encode",
"(",
"java",
"nio",
"byte",
"buffer",
"raw",
",",
"java",
"nio",
"char",
"buffer",
"encoded",
")",
"{",
"byte",
"[",
"]",
"raw",
"3",
"=",
"new",
"byte",
"[",
"3",
"]",
";",
"byte",
"[",
"]",
"enc",
"4",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"while",
"(",
"raw",
"has",
"remaining",
"(",
")",
")",
"{",
"int",
"rem",
"=",
"math",
"min",
"(",
"3",
",",
"raw",
"remaining",
"(",
")",
")",
";",
"raw",
"get",
"(",
"raw",
"3",
",",
"0",
",",
"rem",
")",
";",
"base",
"6",
"4",
"encode",
"3to",
"4",
"(",
"enc",
"4",
",",
"raw",
"3",
",",
"rem",
",",
"base",
"6",
"4",
"no",
"options",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"4",
";",
"i",
"+",
"+",
")",
"{",
"encoded",
"put",
"(",
"(",
"char",
")",
"(",
"enc",
"4",
"[",
"i",
"]",
"&",
"0x",
"f",
"f",
")",
")",
";",
"}",
"}",
"/",
"/",
"end",
"input",
"remaining",
"}"
]
|
[
"base",
"6",
"4",
"-",
"encode",
"the",
"given",
"byte",
"array",
"to",
"a",
"string",
"using",
"the",
"rfc",
"4648",
"\"",
"url",
"and",
"filename",
"safe",
"alphabet",
"\""
]
| [
"public",
"static",
"string",
"encode",
"to",
"url",
"safe",
"string",
"(",
"byte",
"[",
"]",
"src",
")",
"{",
"return",
"new",
"string",
"(",
"encode",
"url",
"safe",
"(",
"src",
")",
",",
"default",
"charset",
")",
";",
"}"
]
|
[
"template",
"method",
"to",
"create",
"an",
"advised",
"object",
"given",
"the",
"target",
"object",
"and",
"transaction",
"setup",
"creates",
"a",
"transaction",
"interceptor",
"and",
"applies",
"it"
]
| [
"protected",
"object",
"advised",
"(",
"object",
"target",
",",
"reactive",
"transaction",
"manager",
"ptm",
",",
"transaction",
"attribute",
"source",
"tas",
")",
"{",
"transaction",
"interceptor",
"ti",
"=",
"new",
"transaction",
"interceptor",
"(",
")",
";",
"ti",
"set",
"transaction",
"manager",
"(",
"ptm",
")",
";",
"assert",
"that",
"(",
"ti",
"get",
"transaction",
"manager",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"ptm",
")",
";",
"ti",
"set",
"transaction",
"attribute",
"source",
"(",
"tas",
")",
";",
"assert",
"that",
"(",
"ti",
"get",
"transaction",
"attribute",
"source",
"(",
")",
")",
"is",
"equal",
"to",
"(",
"tas",
")",
";",
"proxy",
"factory",
"pf",
"=",
"new",
"proxy",
"factory",
"(",
"target",
")",
";",
"pf",
"add",
"advice",
"(",
"0",
",",
"ti",
")",
";",
"return",
"pf",
"get",
"proxy",
"(",
")",
";",
"}"
]
|
[
"if",
"the",
"file",
"is",
"within",
"an",
"encryption",
"zone",
",",
"select",
"the",
"appropriate",
"crypto",
"protocol",
"version",
"from",
"the",
"list",
"provided",
"by",
"the",
"client",
"since",
"the",
"client",
"may",
"be",
"newer",
",",
"we",
"need",
"to",
"handle",
"unknown",
"versions"
]
| [
"crypto",
"protocol",
"version",
"choose",
"protocol",
"version",
"(",
"encryption",
"zone",
"zone",
",",
"crypto",
"protocol",
"version",
"[",
"]",
"supported",
"versions",
")",
"throws",
"unknown",
"crypto",
"protocol",
"version",
"exception",
",",
"unresolved",
"link",
"exception",
",",
"snapshot",
"access",
"control",
"exception",
"{",
"preconditions",
"check",
"not",
"null",
"(",
"zone",
")",
";",
"preconditions",
"check",
"not",
"null",
"(",
"supported",
"versions",
")",
";",
"/",
"/",
"right",
"now",
",",
"we",
"only",
"support",
"a",
"single",
"protocol",
"version",
",",
"/",
"/",
"so",
"simply",
"look",
"for",
"it",
"in",
"the",
"list",
"of",
"provided",
"options",
"final",
"crypto",
"protocol",
"version",
"required",
"=",
"zone",
"get",
"version",
"(",
")",
";",
"for",
"(",
"crypto",
"protocol",
"version",
"c",
":",
"supported",
"versions",
")",
"{",
"if",
"(",
"c",
"equals",
"(",
"crypto",
"protocol",
"version",
"unknown",
")",
")",
"{",
"log",
"debug",
"(",
"\"",
"ignoring",
"unknown",
"crypto",
"protocol",
"version",
"provided",
"by",
"\"",
"+",
"\"",
"client",
":",
"{",
"}",
"\"",
",",
"c",
"get",
"unknown",
"value",
"(",
")",
")",
";",
"continue",
";",
"}",
"if",
"(",
"c",
"equals",
"(",
"required",
")",
")",
"{",
"return",
"c",
";",
"}",
"}",
"throw",
"new",
"unknown",
"crypto",
"protocol",
"version",
"exception",
"(",
"\"",
"no",
"crypto",
"protocol",
"versions",
"provided",
"by",
"the",
"client",
"are",
"supported",
"\"",
"+",
"\"",
"client",
"provided",
":",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"supported",
"versions",
")",
"+",
"\"",
"name",
"node",
"supports",
":",
"\"",
"+",
"arrays",
"to",
"string",
"(",
"crypto",
"protocol",
"version",
"values",
"(",
")",
")",
")",
";",
"}"
]
|
[
"sets",
"the",
"blacklisted",
"tasktracker",
"'",
"s",
"name"
]
| [
"void",
"set",
"tracker",
"name",
"(",
"string",
"tracker",
"name",
")",
"{",
"this",
"tracker",
"name",
"=",
"tracker",
"name",
";",
"}"
]
|
[
"parses",
"an",
"object",
"from",
"a",
"response"
]
| [
"t",
"parse",
"(",
"uri",
"uri",
",",
"input",
"stream",
"input",
"stream",
")",
"throws",
"i",
"o",
"exception",
";"
]
|
[
"remove",
"(",
"null",
",",
"x",
")",
"throws",
"npe"
]
| [
"public",
"void",
"test",
"remove",
"2",
"null",
"pointer",
"exception",
"(",
")",
"{",
"concurrent",
"map",
"c",
"=",
"map",
"(",
")",
";",
"c",
"put",
"(",
"\"",
"sadsdf",
"\"",
",",
"\"",
"asdads",
"\"",
")",
";",
"try",
"{",
"c",
"remove",
"(",
"null",
",",
"\"",
"whatever",
"\"",
")",
";",
"should",
"throw",
"(",
")",
";",
"}",
"catch",
"(",
"null",
"pointer",
"exception",
"success",
")",
"{",
"}",
"}"
]
|
[
"set",
"whether",
"to",
"allow",
"circular",
"references",
"between",
"beans",
"-",
"and",
"automatically",
"try",
"to",
"resolve",
"them",
"default",
"is",
"\"",
"true",
"\"",
"turn",
"this",
"off",
"to",
"throw",
"an",
"exception",
"when",
"encountering",
"a",
"circular",
"reference",
",",
"disallowing",
"them",
"completely"
]
| [
"public",
"void",
"set",
"allow",
"circular",
"references",
"(",
"boolean",
"allow",
"circular",
"references",
")",
"{",
"this",
"allow",
"circular",
"references",
"=",
"allow",
"circular",
"references",
";",
"}"
]
|
[
"optional",
":",
"default",
"value",
"is",
"0l"
]
| [
"public",
"prop",
"groups",
"view",
"model",
"one",
"thing",
"(",
"long",
"one",
"thing",
")",
"{",
"assigned",
"attributes",
"epoxy",
"generated",
"model",
"set",
"(",
"10",
")",
";",
"assigned",
"attributes",
"epoxy",
"generated",
"model",
"clear",
"(",
"11",
")",
";",
"this",
"another",
"thing",
"char",
"sequence",
"=",
"null",
";",
"on",
"mutation",
"(",
")",
";",
"this",
"one",
"thing",
"long",
"=",
"one",
"thing",
";",
"return",
"this",
";",
"}"
]
|
[
"returns",
"a",
"new",
"builder",
"the",
"generated",
"builder",
"is",
"equivalent",
"to",
"the",
"builder",
"created",
"by",
"the",
"{",
"@",
"link",
"builder",
"}",
"constructor"
]
| [
"public",
"static",
"<",
"k",
",",
"v",
">",
"builder",
"<",
"k",
",",
"v",
">",
"builder",
"(",
")",
"{",
"return",
"new",
"builder",
"<",
">",
"(",
")",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"name",
"'"
]
| [
"public",
"void",
"name",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"name",
"}"
]
|
[
"gets",
"the",
"response",
"headers",
"of",
"the",
"previous",
"request"
]
| [
"public",
"map",
"<",
"string",
",",
"list",
"<",
"string",
">",
">",
"get",
"response",
"headers",
"(",
")",
"{",
"return",
"response",
"headers",
";",
"}"
]
|
[
"set",
"the",
"default",
"user",
"'",
"s",
"password",
"that",
"this",
"adapter",
"should",
"use",
"for",
"retrieving",
"connections",
"default",
"is",
"no",
"specific",
"password",
"note",
"that",
"an",
"explicitly",
"specified",
"username",
"will",
"always",
"override",
"any",
"usernamepassword",
"specified",
"at",
"the",
"data",
"source",
"level"
]
| [
"public",
"void",
"set",
"password",
"(",
"string",
"password",
")",
"{",
"this",
"password",
"=",
"password",
";",
"}"
]
|
[
"an",
"expectation",
"for",
"checking",
"that",
"there",
"is",
"at",
"least",
"one",
"element",
"present",
"on",
"a",
"web",
"page"
]
| [
"public",
"static",
"expected",
"condition",
"<",
"list",
"<",
"web",
"element",
">",
">",
"presence",
"of",
"all",
"elements",
"located",
"by",
"(",
"final",
"by",
"locator",
")",
"{",
"return",
"new",
"expected",
"condition",
"<",
"list",
"<",
"web",
"element",
">",
">",
"(",
")",
"{",
"@",
"override",
"public",
"list",
"<",
"web",
"element",
">",
"apply",
"(",
"web",
"driver",
"driver",
")",
"{",
"list",
"<",
"web",
"element",
">",
"elements",
"=",
"driver",
"find",
"elements",
"(",
"locator",
")",
";",
"return",
"elements",
"size",
"(",
")",
">",
"0",
"?",
"elements",
":",
"null",
";",
"}",
"@",
"override",
"public",
"string",
"to",
"string",
"(",
")",
"{",
"return",
"\"",
"presence",
"of",
"any",
"elements",
"located",
"by",
"\"",
"+",
"locator",
";",
"}",
"}",
";",
"}"
]
|
[
"f",
"#",
"differs",
"from",
"other",
"languages",
"in",
"that",
"enums",
"are",
"not",
"true",
"objects",
";",
"enums",
"are",
"compiled",
"to",
"integral",
"types",
"so",
",",
"in",
"f",
"#",
",",
"an",
"enum",
"is",
"considers",
"more",
"like",
"a",
"user",
"-",
"defined",
"primitive",
"when",
"working",
"with",
"enums",
",",
"we",
"can",
"'",
"t",
"always",
"assume",
"a",
"ref",
"model",
"is",
"a",
"nullable",
"type",
"(",
"where",
"default",
"(",
"your",
"type",
")",
"=",
"=",
"null",
")",
",",
"so",
"this",
"post",
"processing",
"runs",
"through",
"all",
"models",
"to",
"find",
"ref",
"model",
"'",
"d",
"enums",
"then",
",",
"it",
"runs",
"through",
"all",
"vars",
"and",
"modifies",
"those",
"vars",
"referencing",
"ref",
"model",
"'",
"d",
"enums",
"to",
"work",
"the",
"same",
"as",
"inlined",
"enums",
"rather",
"than",
"as",
"objects"
]
| [
"private",
"void",
"post",
"process",
"enum",
"refs",
"(",
"final",
"map",
"<",
"string",
",",
"object",
">",
"models",
")",
"{",
"map",
"<",
"string",
",",
"codegen",
"model",
">",
"enum",
"refs",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"codegen",
"model",
">",
"(",
")",
";",
"for",
"(",
"map",
"entry",
"<",
"string",
",",
"object",
">",
"entry",
":",
"models",
"entry",
"set",
"(",
")",
")",
"{",
"codegen",
"model",
"model",
"=",
"model",
"utils",
"get",
"model",
"by",
"name",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"models",
")",
";",
"if",
"(",
"model",
"is",
"enum",
")",
"{",
"enum",
"refs",
"put",
"(",
"entry",
"get",
"key",
"(",
")",
",",
"model",
")",
";",
"}",
"}",
"for",
"(",
"map",
"entry",
"<",
"string",
",",
"object",
">",
"entry",
":",
"models",
"entry",
"set",
"(",
")",
")",
"{",
"string",
"open",
"a",
"p",
"i",
"name",
"=",
"entry",
"get",
"key",
"(",
")",
";",
"codegen",
"model",
"model",
"=",
"model",
"utils",
"get",
"model",
"by",
"name",
"(",
"open",
"a",
"p",
"i",
"name",
",",
"models",
")",
";",
"if",
"(",
"model",
"!",
"=",
"null",
")",
"{",
"for",
"(",
"codegen",
"property",
"var",
":",
"model",
"all",
"vars",
")",
"{",
"if",
"(",
"enum",
"refs",
"contains",
"key",
"(",
"var",
"data",
"type",
")",
")",
"{",
"/",
"/",
"handle",
"any",
"enum",
"properties",
"referred",
"to",
"by",
"$",
"ref",
"/",
"/",
"this",
"is",
"different",
"in",
"f",
"#",
"than",
"most",
"other",
"generators",
",",
"because",
"enums",
"in",
"c",
"#",
"are",
"compiled",
"to",
"integral",
"types",
",",
"/",
"/",
"while",
"enums",
"in",
"many",
"other",
"languages",
"are",
"true",
"objects",
"codegen",
"model",
"ref",
"model",
"=",
"enum",
"refs",
"get",
"(",
"var",
"data",
"type",
")",
";",
"var",
"allowable",
"values",
"=",
"ref",
"model",
"allowable",
"values",
";",
"var",
"is",
"enum",
"=",
"true",
";",
"/",
"/",
"we",
"do",
"these",
"after",
"update",
"codegen",
"property",
"enum",
"to",
"avoid",
"generalities",
"that",
"don",
"'",
"t",
"mesh",
"with",
"c",
"#",
"var",
"is",
"primitive",
"type",
"=",
"true",
";",
"}",
"}",
"/",
"/",
"we",
"'",
"re",
"looping",
"all",
"models",
"here",
"if",
"(",
"model",
"is",
"enum",
")",
"{",
"/",
"/",
"we",
"now",
"need",
"to",
"make",
"allowable",
"values",
"enum",
"vars",
"look",
"like",
"the",
"context",
"of",
"codegen",
"property",
"boolean",
"is",
"string",
"=",
"false",
";",
"boolean",
"is",
"integer",
"=",
"false",
";",
"boolean",
"is",
"long",
"=",
"false",
";",
"boolean",
"is",
"byte",
"=",
"false",
";",
"if",
"(",
"model",
"data",
"type",
"starts",
"with",
"(",
"\"",
"byte",
"\"",
")",
")",
"{",
"/",
"/",
"f",
"#",
"actually",
"supports",
"byte",
"and",
"short",
"enums",
",",
"swagger",
"spec",
"only",
"supports",
"byte",
"is",
"byte",
"=",
"true",
";",
"model",
"vendor",
"extensions",
"put",
"(",
"\"",
"x",
"-",
"enum",
"-",
"byte",
"\"",
",",
"true",
")",
";",
"}",
"else",
"if",
"(",
"model",
"data",
"type",
"starts",
"with",
"(",
"\"",
"int",
"3",
"2",
"\"",
")",
")",
"{",
"is",
"integer",
"=",
"true",
";",
"model",
"vendor",
"extensions",
"put",
"(",
"\"",
"x",
"-",
"enum",
"-",
"integer",
"\"",
",",
"true",
")",
";",
"}",
"else",
"if",
"(",
"model",
"data",
"type",
"starts",
"with",
"(",
"\"",
"int",
"6",
"4",
"\"",
")",
")",
"{",
"is",
"long",
"=",
"true",
";",
"model",
"vendor",
"extensions",
"put",
"(",
"\"",
"x",
"-",
"enum",
"-",
"long",
"\"",
",",
"true",
")",
";",
"}",
"else",
"{",
"/",
"/",
"f",
"#",
"doesn",
"'",
"t",
"support",
"non",
"-",
"integral",
"enums",
",",
"so",
"we",
"need",
"to",
"treat",
"everything",
"else",
"as",
"strings",
"(",
"e",
"g",
"to",
"not",
"lose",
"precision",
"or",
"data",
"integrity",
")",
"is",
"string",
"=",
"true",
";",
"model",
"vendor",
"extensions",
"put",
"(",
"\"",
"x",
"-",
"enum",
"-",
"string",
"\"",
",",
"true",
")",
";",
"}",
"/",
"/",
"since",
"we",
"iterate",
"enum",
"vars",
"for",
"modelnner",
"enum",
"and",
"enum",
"class",
"templates",
",",
"and",
"codegen",
"model",
"is",
"missing",
"some",
"of",
"codegen",
"property",
"'",
"s",
"properties",
",",
"/",
"/",
"we",
"can",
"take",
"advantage",
"of",
"mustache",
"'",
"s",
"contextual",
"lookup",
"to",
"add",
"the",
"same",
"\"",
"properties",
"\"",
"to",
"the",
"model",
"'",
"s",
"enum",
"vars",
"scope",
"rather",
"than",
"codegen",
"property",
"'",
"s",
"scope",
"list",
"<",
"map",
"<",
"string",
",",
"string",
">",
">",
"enum",
"vars",
"=",
"(",
"array",
"list",
"<",
"map",
"<",
"string",
",",
"string",
">",
">",
")",
"model",
"allowable",
"values",
"get",
"(",
"\"",
"enum",
"vars",
"\"",
")",
";",
"list",
"<",
"map",
"<",
"string",
",",
"object",
">",
">",
"new",
"enum",
"vars",
"=",
"new",
"array",
"list",
"<",
"map",
"<",
"string",
",",
"object",
">",
">",
"(",
")",
";",
"for",
"(",
"map",
"<",
"string",
",",
"string",
">",
"enum",
"var",
":",
"enum",
"vars",
")",
"{",
"map",
"<",
"string",
",",
"object",
">",
"mixed",
"vars",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"object",
">",
"(",
")",
";",
"mixed",
"vars",
"put",
"all",
"(",
"enum",
"var",
")",
";",
"mixed",
"vars",
"put",
"(",
"\"",
"is",
"string",
"\"",
",",
"is",
"string",
")",
";",
"mixed",
"vars",
"put",
"(",
"\"",
"is",
"long",
"\"",
",",
"is",
"long",
")",
";",
"mixed",
"vars",
"put",
"(",
"\"",
"is",
"integer",
"\"",
",",
"is",
"integer",
")",
";",
"mixed",
"vars",
"put",
"(",
"\"",
"is",
"byte",
"\"",
",",
"is",
"byte",
")",
";",
"new",
"enum",
"vars",
"add",
"(",
"mixed",
"vars",
")",
";",
"}",
"if",
"(",
"!",
"new",
"enum",
"vars",
"is",
"empty",
"(",
")",
")",
"{",
"model",
"allowable",
"values",
"put",
"(",
"\"",
"enum",
"vars",
"\"",
",",
"new",
"enum",
"vars",
")",
";",
"}",
"}",
"}",
"else",
"{",
"logger",
"warn",
"(",
"\"",
"expected",
"to",
"retrieve",
"model",
"%",
"s",
"by",
"name",
",",
"but",
"no",
"model",
"was",
"found",
"check",
"your",
"-",
"dmodels",
"inclusions",
"\"",
",",
"open",
"a",
"p",
"i",
"name",
")",
";",
"}",
"}",
"}"
]
|
[
"retrieves",
"a",
"specified",
"boolean",
"flag",
"from",
"the",
"given",
"map"
]
| [
"private",
"boolean",
"retrieve",
"boolean",
"(",
"map",
"args",
",",
"string",
"name",
",",
"boolean",
"default",
"value",
")",
"{",
"if",
"(",
"args",
"=",
"=",
"null",
")",
"{",
"return",
"default",
"value",
";",
"}",
"object",
"arg",
"=",
"args",
"get",
"(",
"name",
")",
";",
"return",
"arg",
"=",
"=",
"null",
"?",
"default",
"value",
":",
"(",
"(",
"boolean",
")",
"arg",
")",
"boolean",
"value",
"(",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"<",
"t",
">",
"list",
"<",
"future",
"<",
"t",
">",
">",
"invoke",
"all",
"(",
"collection",
"<",
"?",
"extends",
"callable",
"<",
"t",
">",
">",
"tasks",
",",
"long",
"timeout",
",",
"time",
"unit",
"unit",
")",
"throws",
"interrupted",
"exception",
"{",
"submitted",
"mark",
"(",
"tasks",
"size",
"(",
")",
")",
";",
"collection",
"<",
"?",
"extends",
"callable",
"<",
"t",
">",
">",
"instrumented",
"=",
"instrument",
"(",
"tasks",
")",
";",
"return",
"delegate",
"invoke",
"all",
"(",
"instrumented",
",",
"timeout",
",",
"unit",
")",
";",
"}"
]
|
[
"look",
"for",
"new",
"sources",
",",
"metadata",
",",
"manifest",
"file",
"if",
"files",
"had",
"errors",
"last",
"time",
",",
"haven",
"'",
"t",
"changed",
",",
"and",
"no",
"new",
"requirements",
"are",
"available",
",",
"remove",
"them"
]
| [
"void",
"update",
"from",
"filesystem",
"(",
"print",
"writer",
"writer",
")",
"throws",
"i",
"o",
"exception",
",",
"o",
"s",
"gi",
"exception",
"{",
"/",
"/",
"look",
"for",
"new",
"source",
"files",
"new",
"sources",
"clear",
"(",
")",
";",
"old",
"binaries",
"clear",
"(",
")",
";",
"visit",
"discrepancies",
"(",
"(",
"source",
"file",
",",
"class",
"files",
")",
"-",
">",
"{",
"/",
"/",
"source",
"file",
"is",
"either",
"newer",
"than",
"its",
"corresponding",
"class",
"files",
",",
"/",
"/",
"or",
"there",
"are",
"no",
"corresponding",
"class",
"files",
"(",
"meaning",
"it",
"'",
"s",
"new",
")",
",",
"/",
"/",
"or",
"source",
"file",
"=",
"null",
"and",
"class",
"files",
"had",
"no",
"corresponding",
"source",
"if",
"(",
"source",
"file",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"these",
"will",
"be",
"(",
"re",
")",
"compiled",
"new",
"sources",
"add",
"(",
"source",
"file",
")",
";",
"}",
"if",
"(",
"class",
"files",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"these",
"will",
"be",
"deleted",
"old",
"binaries",
"add",
"all",
"(",
"class",
"files",
")",
";",
"}",
"}",
")",
";",
"/",
"/",
"we",
"don",
"'",
"t",
"want",
"to",
"rebuild",
"source",
"files",
"that",
"had",
"errors",
"last",
"time",
"and",
"haven",
"'",
"t",
"changed",
",",
"/",
"/",
"so",
"remove",
"them",
"from",
"new",
"sources",
"also",
"remove",
"old",
"error",
"messages",
"iterator",
"<",
"resource",
"file",
">",
"new",
"source",
"iterator",
"=",
"new",
"sources",
"iterator",
"(",
")",
";",
"while",
"(",
"new",
"source",
"iterator",
"has",
"next",
"(",
")",
")",
"{",
"resource",
"file",
"new",
"source",
"file",
"=",
"new",
"source",
"iterator",
"next",
"(",
")",
";",
"if",
"(",
"still",
"has",
"errors",
"(",
"new",
"source",
"file",
")",
")",
"{",
"new",
"source",
"iterator",
"remove",
"(",
")",
";",
"}",
"else",
"{",
"/",
"/",
"any",
"errors",
"are",
"old",
",",
"so",
"remove",
"them",
"build",
"errors",
"remove",
"(",
"new",
"source",
"file",
")",
";",
"}",
"}",
"}"
]
|
[
"creates",
"an",
"{",
"@",
"code",
"atomic",
"reference",
"array",
"}",
"instance",
"of",
"given",
"length"
]
| [
"public",
"static",
"<",
"e",
">",
"atomic",
"reference",
"array",
"<",
"e",
">",
"new",
"reference",
"array",
"(",
"int",
"length",
")",
"{",
"return",
"new",
"atomic",
"reference",
"array",
"<",
"e",
">",
"(",
"length",
")",
";",
"}"
]
|
[
"get",
"the",
"actual",
"location",
"within",
"the",
"associated",
"{",
"@",
"link",
"#",
"get",
"resource",
"(",
")",
"resource",
"}",
"(",
"may",
"be",
"{",
"@",
"code",
"null",
"}",
")",
"see",
"the",
"{",
"@",
"link",
"location",
"class",
"level",
"javadoc",
"for",
"this",
"class",
"}",
"for",
"examples",
"of",
"what",
"the",
"actual",
"type",
"of",
"the",
"returned",
"object",
"may",
"be"
]
| [
"public",
"object",
"get",
"source",
"(",
")",
"{",
"return",
"this",
"source",
";",
"}"
]
|
[
"make",
"an",
"assertion",
"about",
"the",
"length",
"of",
"a",
"file"
]
| [
"public",
"static",
"void",
"assert",
"file",
"has",
"length",
"(",
"file",
"system",
"fs",
",",
"path",
"path",
",",
"int",
"expected",
")",
"throws",
"i",
"o",
"exception",
"{",
"file",
"status",
"status",
"=",
"fs",
"get",
"file",
"status",
"(",
"path",
")",
";",
"assert",
"equals",
"(",
"\"",
"wrong",
"file",
"length",
"of",
"file",
"\"",
"+",
"path",
"+",
"\"",
"status",
":",
"\"",
"+",
"status",
",",
"expected",
",",
"status",
"get",
"len",
"(",
")",
")",
";",
"}"
]
|
[
"return",
"the",
"response",
"body",
"as",
"a",
"byte",
"array"
]
| [
"public",
"byte",
"[",
"]",
"get",
"response",
"body",
"as",
"byte",
"array",
"(",
")",
"{",
"return",
"this",
"response",
"body",
";",
"}"
]
|
[
"adds",
"a",
"new",
"item",
"to",
"the",
"<",
"code",
">",
"prefix",
"wrapped",
"array",
"<",
"code",
">",
"list"
]
| [
"public",
"xml",
"item",
"add",
"prefix",
"wrapped",
"array",
"item",
"(",
"integer",
"prefix",
"wrapped",
"array",
"item",
")",
"{",
"this",
"prefix",
"wrapped",
"array",
"add",
"(",
"prefix",
"wrapped",
"array",
"item",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"returns",
"a",
"hash",
"function",
"implementing",
"the",
"message",
"authentication",
"code",
"(",
"mac",
")",
"algorithm",
",",
"using",
"the",
"sha",
"-",
"1",
"(",
"160",
"hash",
"bits",
")",
"hash",
"function",
"and",
"the",
"given",
"secret",
"key"
]
| [
"public",
"static",
"hash",
"function",
"hmac",
"sha",
"1",
"(",
"key",
"key",
")",
"{",
"return",
"new",
"mac",
"hash",
"function",
"(",
"\"",
"hmac",
"s",
"h",
"a",
"1",
"\"",
",",
"key",
",",
"hmac",
"to",
"string",
"(",
"\"",
"hmac",
"sha",
"1",
"\"",
",",
"key",
")",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"field",
"name",
"is",
"set",
"(",
"has",
"been",
"assigned",
"a",
"value",
")",
"and",
"false",
"otherwise"
]
| [
"public",
"boolean",
"is",
"set",
"name",
"(",
")",
"{",
"return",
"this",
"name",
"!",
"=",
"null",
";",
"}"
]
|
[
"helper",
"method",
"to",
"first",
"start",
"all",
"threads",
"and",
"then",
"wait",
"for",
"their",
"completion"
]
| [
"private",
"void",
"checked",
"thread",
"simple",
"test",
"(",
"checked",
"thread",
"[",
"]",
"threads",
")",
"throws",
"exception",
"{",
"/",
"/",
"start",
"all",
"threads",
"for",
"(",
"checked",
"thread",
"t",
":",
"threads",
")",
"{",
"t",
"start",
"(",
")",
";",
"}",
"/",
"/",
"wait",
"for",
"thread",
"completion",
"and",
"check",
"exceptions",
"for",
"(",
"checked",
"thread",
"t",
":",
"threads",
")",
"{",
"t",
"sync",
"(",
")",
";",
"}",
"}"
]
|
[
"moves",
"the",
"checkpoint",
"to",
"the",
"last",
"consecutively",
"processed",
"sequence",
"number",
"this",
"method",
"assumes",
"that",
"the",
"sequence",
"number",
"following",
"the",
"current",
"checkpoint",
"is",
"processed"
]
| [
"private",
"void",
"update",
"checkpoint",
"(",
"atomic",
"long",
"check",
"point",
",",
"long",
"object",
"hash",
"map",
"<",
"counted",
"bit",
"set",
">",
"bit",
"set",
"map",
")",
"{",
"assert",
"thread",
"holds",
"lock",
"(",
"this",
")",
";",
"assert",
"get",
"bit",
"set",
"for",
"seq",
"no",
"(",
"bit",
"set",
"map",
",",
"check",
"point",
"get",
"(",
")",
"+",
"1",
")",
"get",
"(",
"seq",
"no",
"to",
"bit",
"set",
"offset",
"(",
"check",
"point",
"get",
"(",
")",
"+",
"1",
")",
")",
":",
"\"",
"update",
"checkpoint",
"is",
"called",
"but",
"the",
"bit",
"following",
"the",
"checkpoint",
"is",
"not",
"set",
"\"",
";",
"try",
"{",
"/",
"/",
"keep",
"it",
"simple",
"for",
"now",
",",
"get",
"the",
"checkpoint",
"one",
"by",
"one",
";",
"in",
"the",
"future",
"we",
"can",
"optimize",
"and",
"read",
"words",
"long",
"bit",
"set",
"key",
"=",
"get",
"bit",
"set",
"key",
"(",
"check",
"point",
"get",
"(",
")",
")",
";",
"counted",
"bit",
"set",
"current",
"=",
"bit",
"set",
"map",
"get",
"(",
"bit",
"set",
"key",
")",
";",
"if",
"(",
"current",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"the",
"bit",
"set",
"corresponding",
"to",
"the",
"checkpoint",
"has",
"already",
"been",
"removed",
",",
"set",
"ourselves",
"up",
"for",
"the",
"next",
"bit",
"set",
"assert",
"check",
"point",
"get",
"(",
")",
"%",
"bit",
"set",
"size",
"=",
"=",
"bit",
"set",
"size",
"-",
"1",
";",
"current",
"=",
"bit",
"set",
"map",
"get",
"(",
"+",
"+",
"bit",
"set",
"key",
")",
";",
"}",
"do",
"{",
"check",
"point",
"increment",
"and",
"get",
"(",
")",
";",
"/",
"*",
"*",
"the",
"checkpoint",
"always",
"falls",
"in",
"the",
"current",
"bit",
"set",
"or",
"we",
"have",
"already",
"cleaned",
"it",
";",
"if",
"it",
"falls",
"on",
"the",
"last",
"bit",
"of",
"the",
"*",
"current",
"bit",
"set",
",",
"we",
"can",
"clean",
"it",
"*",
"/",
"if",
"(",
"check",
"point",
"get",
"(",
")",
"=",
"=",
"last",
"seq",
"no",
"in",
"bit",
"set",
"(",
"bit",
"set",
"key",
")",
")",
"{",
"assert",
"current",
"!",
"=",
"null",
";",
"final",
"counted",
"bit",
"set",
"removed",
"=",
"bit",
"set",
"map",
"remove",
"(",
"bit",
"set",
"key",
")",
";",
"assert",
"removed",
"=",
"=",
"current",
";",
"current",
"=",
"bit",
"set",
"map",
"get",
"(",
"+",
"+",
"bit",
"set",
"key",
")",
";",
"}",
"}",
"while",
"(",
"current",
"!",
"=",
"null",
"&",
"&",
"current",
"get",
"(",
"seq",
"no",
"to",
"bit",
"set",
"offset",
"(",
"check",
"point",
"get",
"(",
")",
"+",
"1",
")",
")",
")",
";",
"}",
"finally",
"{",
"/",
"/",
"notifies",
"waiters",
"in",
"wait",
"for",
"processed",
"ops",
"to",
"complete",
"this",
"notify",
"all",
"(",
")",
";",
"}",
"}"
]
|
[
"gson",
"should",
"be",
"able",
"to",
"deserialize",
"a",
"stream",
"with",
"non",
"-",
"exectuable",
"token",
"even",
"if",
"it",
"is",
"created",
"without",
"{",
"@",
"link",
"gson",
"builder",
"#",
"generate",
"non",
"executable",
"json",
"(",
")",
"}"
]
| [
"public",
"void",
"test",
"json",
"with",
"non",
"exectuable",
"token",
"with",
"regular",
"gson",
"deserialization",
"(",
")",
"{",
"gson",
"gson",
"=",
"gson",
"builder",
"create",
"(",
")",
";",
"string",
"json",
"=",
"json",
"non",
"executable",
"prefix",
"+",
"\"",
"{",
"string",
"value",
":",
"'",
")",
"]",
"}",
"\\",
"\\",
"u",
"0",
"0",
"2",
"7",
"\\",
"\\",
"n",
"'",
"}"
]
|
[
"updates",
"the",
"item",
"at",
"position",
"the",
"{",
"@",
"link",
"recycler",
"view",
"}",
"gets",
"notified",
"immediately",
"about",
"the",
"item",
"being",
"updated",
"if",
"the",
"item",
"'",
"s",
"position",
"falls",
"within",
"the",
"currently",
"visible",
"range",
",",
"the",
"layout",
"is",
"immediately",
"computed",
"on",
"the",
"ui",
"thread"
]
| [
"public",
"final",
"void",
"update",
"item",
"at",
"(",
"int",
"position",
",",
"render",
"info",
"render",
"info",
")",
"{",
"thread",
"utils",
"assert",
"main",
"thread",
"(",
")",
";",
"if",
"(",
"sections",
"debug",
"enabled",
")",
"{",
"log",
"d",
"(",
"sections",
"debug",
"tag",
",",
"\"",
"(",
"\"",
"+",
"hash",
"code",
"(",
")",
"+",
"\"",
")",
"update",
"item",
"at",
"\"",
"+",
"position",
"+",
"\"",
",",
"name",
":",
"\"",
"+",
"render",
"info",
"get",
"name",
"(",
")",
")",
";",
"}",
"final",
"component",
"tree",
"holder",
"holder",
";",
"final",
"boolean",
"render",
"info",
"was",
"view",
";",
"synchronized",
"(",
"this",
")",
"{",
"holder",
"=",
"m",
"component",
"tree",
"holders",
"get",
"(",
"position",
")",
";",
"render",
"info",
"was",
"view",
"=",
"holder",
"get",
"render",
"info",
"(",
")",
"renders",
"view",
"(",
")",
";",
"assert",
"not",
"null",
"render",
"info",
"(",
"render",
"info",
")",
";",
"m",
"render",
"info",
"view",
"creator",
"controller",
"maybe",
"track",
"view",
"creator",
"(",
"render",
"info",
")",
";",
"update",
"holder",
"(",
"holder",
",",
"render",
"info",
")",
";",
"}",
"/",
"/",
"if",
"this",
"item",
"is",
"rendered",
"with",
"a",
"view",
"(",
"or",
"was",
"rendered",
"with",
"a",
"view",
"before",
"now",
")",
"we",
"need",
"to",
"/",
"/",
"notify",
"the",
"recycler",
"view",
"'",
"s",
"adapter",
"that",
"something",
"changed",
"if",
"(",
"render",
"info",
"was",
"view",
"|",
"|",
"render",
"info",
"renders",
"view",
"(",
")",
")",
"{",
"m",
"internal",
"adapter",
"notify",
"item",
"changed",
"(",
"position",
")",
";",
"}",
"m",
"viewport",
"manager",
"set",
"should",
"update",
"(",
"m",
"viewport",
"manager",
"update",
"affects",
"visible",
"range",
"(",
"position",
",",
"1",
")",
")",
";",
"}"
]
|
[
"{",
"@",
"inherit",
"doc",
"}"
]
| [
"public",
"int",
"code",
"size",
"(",
")",
"{",
"return",
"2",
";",
"}"
]
|
[
"creates",
"ant",
"{",
"@",
"link",
"file",
"set",
"}",
"with",
"the",
"base",
"dir",
"and",
"include",
"pattern",
"the",
"difference",
"with",
"this",
"and",
"using",
"{",
"@",
"link",
"file",
"set",
"#",
"set",
"includes",
"(",
"string",
")",
"}",
"is",
"that",
"this",
"method",
"doesn",
"'",
"t",
"treat",
"whitespace",
"as",
"a",
"pattern",
"separator",
",",
"which",
"makes",
"it",
"impossible",
"to",
"use",
"space",
"in",
"the",
"file",
"path"
]
| [
"public",
"static",
"file",
"set",
"create",
"file",
"set",
"(",
"@",
"non",
"null",
"file",
"base",
"dir",
",",
"@",
"non",
"null",
"string",
"includes",
",",
"@",
"check",
"for",
"null",
"string",
"excludes",
")",
"{",
"file",
"set",
"fs",
"=",
"new",
"file",
"set",
"(",
")",
";",
"fs",
"set",
"dir",
"(",
"base",
"dir",
")",
";",
"fs",
"set",
"project",
"(",
"new",
"project",
"(",
")",
")",
";",
"string",
"tokenizer",
"tokens",
";",
"tokens",
"=",
"new",
"string",
"tokenizer",
"(",
"includes",
",",
"\"",
",",
"\"",
")",
";",
"while",
"(",
"tokens",
"has",
"more",
"tokens",
"(",
")",
")",
"{",
"string",
"token",
"=",
"tokens",
"next",
"token",
"(",
")",
"trim",
"(",
")",
";",
"fs",
"create",
"include",
"(",
")",
"set",
"name",
"(",
"token",
")",
";",
"}",
"if",
"(",
"excludes",
"!",
"=",
"null",
")",
"{",
"tokens",
"=",
"new",
"string",
"tokenizer",
"(",
"excludes",
",",
"\"",
",",
"\"",
")",
";",
"while",
"(",
"tokens",
"has",
"more",
"tokens",
"(",
")",
")",
"{",
"string",
"token",
"=",
"tokens",
"next",
"token",
"(",
")",
"trim",
"(",
")",
";",
"fs",
"create",
"exclude",
"(",
")",
"set",
"name",
"(",
"token",
")",
";",
"}",
"}",
"return",
"fs",
";",
"}"
]
|
[
"clears",
"up",
"internal",
"state",
"of",
"specific",
"inline",
"mock",
"this",
"method",
"is",
"a",
"single",
"-",
"mock",
"variant",
"of",
"{",
"@",
"link",
"#",
"clear",
"inline",
"mocks",
"(",
")",
"}",
"please",
"read",
"javadoc",
"for",
"{",
"@",
"link",
"#",
"clear",
"inline",
"mocks",
"(",
")",
"}"
]
| [
"void",
"clear",
"inline",
"mock",
"(",
"object",
"mock",
")",
";"
]
|
[
"added",
"to",
"check",
"xss",
"invalid",
"tokens"
]
| [
"public",
"void",
"test",
"do",
"post",
"invalid",
"connection",
"name",
"(",
")",
"throws",
"i",
"o",
"exception",
",",
"servlet",
"exception",
"{",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"connection",
"name",
"\"",
")",
")",
"then",
"return",
"(",
"\"",
"<",
"img",
">",
"<",
"/",
"img",
">",
"\"",
")",
";",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"database",
"type",
"\"",
")",
")",
"then",
"return",
"(",
"my",
"s",
"q",
"l",
"database",
"service",
"db",
"name",
")",
";",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"database",
"server",
"\"",
")",
")",
"then",
"return",
"(",
"test",
"db",
"config",
"get",
"database",
"host",
"(",
")",
")",
";",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"database",
"port",
"\"",
")",
")",
"then",
"return",
"(",
"\"",
"\"",
"+",
"test",
"db",
"config",
"get",
"database",
"port",
"(",
")",
")",
";",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"database",
"user",
"\"",
")",
")",
"then",
"return",
"(",
"test",
"db",
"config",
"get",
"database",
"user",
"(",
")",
")",
";",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"database",
"password",
"\"",
")",
")",
"then",
"return",
"(",
"test",
"db",
"config",
"get",
"database",
"password",
"(",
")",
")",
";",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"initial",
"database",
"\"",
")",
")",
"then",
"return",
"(",
"test",
"db",
"config",
"get",
"database",
"name",
"(",
")",
")",
";",
"when",
"(",
"request",
"get",
"parameter",
"(",
"\"",
"csrf",
"token",
"\"",
")",
")",
"then",
"return",
"(",
"command",
"csrf",
"factory",
"get",
"fresh",
"token",
"(",
")",
")",
";",
"string",
"writer",
"sw",
"=",
"new",
"string",
"writer",
"(",
")",
";",
"print",
"writer",
"pw",
"=",
"new",
"print",
"writer",
"(",
"sw",
")",
";",
"when",
"(",
"response",
"get",
"writer",
"(",
")",
")",
"then",
"return",
"(",
"pw",
")",
";",
"sut",
"do",
"post",
"(",
"request",
",",
"response",
")",
";",
"verify",
"(",
"response",
",",
"times",
"(",
"1",
")",
")",
"send",
"error",
"(",
"http",
"status",
"sc",
"bad",
"request",
",",
"\"",
"connection",
"name",
"is",
"invalid",
"expecting",
"[",
"a",
"-",
"z",
"a",
"-",
"z0",
"-",
"9",
"-",
"]",
"\"",
")",
";",
"}"
]
|
[
"maintain",
"a",
"changelog",
"for",
"any",
"changes",
"made",
"to",
"the",
"store",
"use",
"the",
"provided",
"config",
"to",
"set",
"the",
"config",
"of",
"the",
"changelog",
"topic"
]
| [
"store",
"builder",
"<",
"t",
">",
"with",
"logging",
"enabled",
"(",
"final",
"map",
"<",
"string",
",",
"string",
">",
"config",
")",
";"
]
|
[
"configure",
"the",
"{",
"@",
"link",
"bind",
"markers",
"factory",
"bind",
"markers",
"}",
"to",
"be",
"used"
]
| [
"builder",
"bind",
"markers",
"(",
"bind",
"markers",
"factory",
"bind",
"markers",
")",
";"
]
|
[
"return",
"the",
"underlying",
"native",
"cache",
"provider"
]
| [
"object",
"get",
"native",
"cache",
"(",
")",
";"
]
|
[
"return",
"method",
"model",
"for",
"the",
"given",
"method",
"on",
"consumer",
"side"
]
| [
"public",
"consumer",
"method",
"model",
"get",
"method",
"model",
"(",
"method",
"method",
")",
"{",
"return",
"method",
"models",
"get",
"(",
"method",
")",
";",
"}"
]
|
[
"only",
"kept",
"so",
"that",
"we",
"can",
"avoid",
"showing",
"the",
"megaphone",
"for",
"the",
"new",
"link",
"previews",
"setting",
"(",
"{",
"@",
"link",
"settings",
"values",
"#",
"is",
"link",
"previews",
"enabled",
"(",
")",
"}",
")",
"when",
"users",
"upgrade",
"this",
"can",
"be",
"removed",
"after",
"we",
"stop",
"showing",
"the",
"link",
"previews",
"megaphone"
]
| [
"public",
"static",
"boolean",
"were",
"link",
"previews",
"enabled",
"(",
"context",
"context",
")",
"{",
"return",
"get",
"boolean",
"preference",
"(",
"context",
",",
"link",
"previews",
",",
"true",
")",
";",
"}"
]
|
[
"when",
"adding",
"a",
"new",
"element",
",",
"and",
"the",
"array",
"size",
"exceeds",
"the",
"m",
"max",
"capccity",
",",
"we",
"remove",
"the",
"eldest",
"element",
"and",
"only",
"then",
"add",
"the",
"new",
"element"
]
| [
"public",
"void",
"add",
"pair",
"(",
"e",
"element",
",",
"integer",
"second",
")",
"{",
"if",
"(",
"m",
"first",
"list",
"size",
"(",
")",
"=",
"=",
"m",
"max",
"capacity",
")",
"{",
"m",
"first",
"list",
"remove",
"(",
"0",
")",
";",
"m",
"second",
"list",
"remove",
"(",
"0",
")",
";",
"}",
"m",
"first",
"list",
"add",
"(",
"element",
")",
";",
"m",
"second",
"list",
"add",
"(",
"second",
")",
";",
"}"
]
|
[
"get",
"all",
"the",
"anomaly",
"records",
"associated",
"with",
"this",
"bucket",
"the",
"records",
"are",
"not",
"part",
"of",
"the",
"bucket",
"document",
"they",
"will",
"only",
"be",
"present",
"when",
"the",
"bucket",
"was",
"retrieved",
"and",
"expanded",
"to",
"contain",
"the",
"associated",
"records"
]
| [
"public",
"list",
"<",
"anomaly",
"record",
">",
"get",
"records",
"(",
")",
"{",
"return",
"records",
";",
"}"
]
|
[
"post",
"pet",
"{",
"pet",
"id",
"}",
"upload",
"image",
":",
"uploads",
"an",
"image"
]
| [
"default",
"mono",
"<",
"response",
"entity",
"<",
"model",
"api",
"response",
">",
">",
"upload",
"file",
"(",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"id",
"of",
"pet",
"to",
"update",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"path",
"variable",
"(",
"\"",
"pet",
"id",
"\"",
")",
"long",
"pet",
"id",
",",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"additional",
"data",
"to",
"pass",
"to",
"server",
"\"",
")",
"@",
"valid",
"@",
"request",
"part",
"(",
"value",
"=",
"\"",
"additional",
"metadata",
"\"",
",",
"required",
"=",
"false",
")",
"string",
"additional",
"metadata",
",",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"file",
"to",
"upload",
"\"",
")",
"@",
"valid",
"@",
"request",
"part",
"(",
"value",
"=",
"\"",
"file",
"\"",
",",
"required",
"=",
"false",
")",
"flux",
"<",
"part",
">",
"file",
",",
"@",
"api",
"ignore",
"final",
"server",
"web",
"exchange",
"exchange",
")",
"{",
"return",
"get",
"delegate",
"(",
")",
"upload",
"file",
"(",
"pet",
"id",
",",
"additional",
"metadata",
",",
"file",
",",
"exchange",
")",
";",
"}"
]
|
[
"sets",
"the",
"manifest",
"parser",
"to",
"parse",
"loaded",
"manifest",
"data",
"when",
"loading",
"a",
"manifest",
"uri"
]
| [
"public",
"factory",
"set",
"manifest",
"parser",
"(",
"@",
"nullable",
"parsing",
"loadable",
"parser",
"<",
"?",
"extends",
"ss",
"manifest",
">",
"manifest",
"parser",
")",
"{",
"this",
"manifest",
"parser",
"=",
"manifest",
"parser",
";",
"return",
"this",
";",
"}"
]
|
[
"tests",
"the",
"case",
"when",
"parent",
"policy",
"creates",
"its",
"own",
"{",
"@",
"link",
"client",
"stream",
"tracer",
"factory",
"}",
",",
"orca",
"reports",
"are",
"only",
"forwarded",
"to",
"the",
"parent",
"'",
"s",
"listener"
]
| [
"public",
"void",
"only",
"parent",
"policy",
"receives",
"reports",
"if",
"creates",
"own",
"tracer",
"(",
")",
"{",
"client",
"stream",
"tracer",
"factory",
"parent",
"factory",
"=",
"orca",
"per",
"request",
"util",
"get",
"instance",
"(",
")",
"new",
"orca",
"client",
"stream",
"tracer",
"factory",
"(",
"orca",
"listener",
"1",
")",
";",
"client",
"stream",
"tracer",
"factory",
"child",
"factory",
"=",
"mock",
"(",
"client",
"stream",
"tracer",
"factory",
"class",
",",
"delegates",
"to",
"(",
"orca",
"per",
"request",
"util",
"get",
"instance",
"(",
")",
"new",
"orca",
"client",
"stream",
"tracer",
"factory",
"(",
"parent",
"factory",
",",
"orca",
"listener",
"2",
")",
")",
")",
";",
"client",
"stream",
"tracer",
"parent",
"tracer",
"=",
"parent",
"factory",
"new",
"client",
"stream",
"tracer",
"(",
"stream",
"info",
",",
"new",
"metadata",
"(",
")",
")",
";",
"metadata",
"trailer",
"=",
"new",
"metadata",
"(",
")",
";",
"trailer",
"put",
"(",
"orca",
"reporting",
"tracer",
"factory",
"orca",
"endpoint",
"load",
"metrics",
"key",
",",
"orca",
"load",
"report",
"get",
"default",
"instance",
"(",
")",
")",
";",
"parent",
"tracer",
"inbound",
"trailers",
"(",
"trailer",
")",
";",
"verify",
"(",
"orca",
"listener",
"1",
")",
"on",
"load",
"report",
"(",
"eq",
"(",
"orca",
"load",
"report",
"get",
"default",
"instance",
"(",
")",
")",
")",
";",
"verify",
"no",
"interactions",
"(",
"child",
"factory",
")",
";",
"verify",
"no",
"interactions",
"(",
"orca",
"listener",
"2",
")",
";",
"}"
]
|
[
"find",
"equal",
"segments",
"2",
"in",
"segments",
"1"
]
| [
"public",
"static",
"int",
"find",
"(",
"memory",
"segment",
"[",
"]",
"segments",
"1",
",",
"int",
"offset",
"1",
",",
"int",
"num",
"bytes",
"1",
",",
"memory",
"segment",
"[",
"]",
"segments",
"2",
",",
"int",
"offset",
"2",
",",
"int",
"num",
"bytes",
"2",
")",
"{",
"if",
"(",
"num",
"bytes",
"2",
"=",
"=",
"0",
")",
"{",
"/",
"/",
"quick",
"way",
"1",
"return",
"offset",
"1",
";",
"}",
"if",
"(",
"in",
"first",
"segment",
"(",
"segments",
"1",
",",
"offset",
"1",
",",
"num",
"bytes",
"1",
")",
"&",
"&",
"in",
"first",
"segment",
"(",
"segments",
"2",
",",
"offset",
"2",
",",
"num",
"bytes",
"2",
")",
")",
"{",
"byte",
"first",
"=",
"segments",
"2",
"[",
"0",
"]",
"get",
"(",
"offset",
"2",
")",
";",
"int",
"end",
"=",
"num",
"bytes",
"1",
"-",
"num",
"bytes",
"2",
"+",
"offset",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"offset",
"1",
";",
"i",
"<",
"=",
"end",
";",
"i",
"+",
"+",
")",
"{",
"/",
"/",
"quick",
"way",
"2",
":",
"equal",
"first",
"byte",
"if",
"(",
"segments",
"1",
"[",
"0",
"]",
"get",
"(",
"i",
")",
"=",
"=",
"first",
"&",
"&",
"segments",
"1",
"[",
"0",
"]",
"equal",
"to",
"(",
"segments",
"2",
"[",
"0",
"]",
",",
"i",
",",
"offset",
"2",
",",
"num",
"bytes",
"2",
")",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"find",
"in",
"multi",
"segments",
"(",
"segments",
"1",
",",
"offset",
"1",
",",
"num",
"bytes",
"1",
",",
"segments",
"2",
",",
"offset",
"2",
",",
"num",
"bytes",
"2",
")",
";",
"}",
"}"
]
|
[
"return",
"whether",
"the",
"given",
"bean",
"class",
"declares",
"or",
"inherits",
"any",
"non",
"-",
"void",
"returning",
"bean",
"property",
"or",
"indexed",
"property",
"setter",
"methods"
]
| [
"private",
"boolean",
"supports",
"(",
"class",
"<",
"?",
">",
"bean",
"class",
")",
"{",
"for",
"(",
"method",
"method",
":",
"bean",
"class",
"get",
"methods",
"(",
")",
")",
"{",
"if",
"(",
"extended",
"bean",
"info",
"is",
"candidate",
"write",
"method",
"(",
"method",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
]
|
[
"reads",
"from",
"the",
"given",
"input",
"using",
"the",
"given",
"{",
"@",
"link",
"extractor",
"}",
",",
"until",
"it",
"can",
"produce",
"the",
"{",
"@",
"link",
"seek",
"map",
"}",
"and",
"all",
"of",
"the",
"track",
"formats",
"have",
"been",
"identified",
",",
"or",
"until",
"the",
"extractor",
"encounters",
"eof"
]
| [
"public",
"static",
"seek",
"map",
"extract",
"seek",
"map",
"(",
"extractor",
"extractor",
",",
"fake",
"extractor",
"output",
"output",
",",
"data",
"source",
"data",
"source",
",",
"uri",
"uri",
")",
"throws",
"i",
"o",
"exception",
"{",
"extractor",
"input",
"input",
"=",
"get",
"extractor",
"input",
"from",
"position",
"(",
"data",
"source",
",",
"/",
"*",
"position",
"=",
"*",
"/",
"0",
",",
"uri",
")",
";",
"extractor",
"init",
"(",
"output",
")",
";",
"position",
"holder",
"position",
"holder",
"=",
"new",
"position",
"holder",
"(",
")",
";",
"int",
"read",
"result",
"=",
"extractor",
"result",
"continue",
";",
"while",
"(",
"true",
")",
"{",
"try",
"{",
"/",
"/",
"keep",
"reading",
"until",
"we",
"get",
"the",
"seek",
"map",
"and",
"the",
"track",
"information",
"while",
"(",
"read",
"result",
"=",
"=",
"extractor",
"result",
"continue",
"&",
"&",
"(",
"output",
"seek",
"map",
"=",
"=",
"null",
"|",
"|",
"!",
"output",
"tracks",
"ended",
")",
")",
"{",
"read",
"result",
"=",
"extractor",
"read",
"(",
"input",
",",
"position",
"holder",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"output",
"track",
"outputs",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"int",
"track",
"id",
"=",
"output",
"track",
"outputs",
"key",
"at",
"(",
"i",
")",
";",
"while",
"(",
"read",
"result",
"=",
"=",
"extractor",
"result",
"continue",
"&",
"&",
"output",
"track",
"outputs",
"get",
"(",
"track",
"id",
")",
"last",
"format",
"=",
"=",
"null",
")",
"{",
"read",
"result",
"=",
"extractor",
"read",
"(",
"input",
",",
"position",
"holder",
")",
";",
"}",
"}",
"}",
"finally",
"{",
"util",
"close",
"quietly",
"(",
"data",
"source",
")",
";",
"}",
"if",
"(",
"read",
"result",
"=",
"=",
"extractor",
"result",
"seek",
")",
"{",
"input",
"=",
"get",
"extractor",
"input",
"from",
"position",
"(",
"data",
"source",
",",
"position",
"holder",
"position",
",",
"uri",
")",
";",
"read",
"result",
"=",
"extractor",
"result",
"continue",
";",
"}",
"else",
"if",
"(",
"read",
"result",
"=",
"=",
"extractor",
"result",
"end",
"of",
"input",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"eof",
"encountered",
"without",
"seekmap",
"\"",
")",
";",
"}",
"if",
"(",
"output",
"seek",
"map",
"!",
"=",
"null",
")",
"{",
"return",
"output",
"seek",
"map",
";",
"}",
"}",
"}"
]
|
[
"sets",
"the",
"coordinator",
"for",
"the",
"two",
"decompiler",
"panels",
"within",
"this",
"code",
"comparison",
"panel",
"it",
"coordinates",
"their",
"scrolling",
"and",
"location",
"synchronization"
]
| [
"public",
"void",
"set",
"field",
"panel",
"coordinator",
"(",
"dual",
"decompiler",
"field",
"panel",
"coordinator",
"field",
"panel",
"coordinator",
")",
"{",
"if",
"(",
"this",
"dual",
"decompiler",
"coordinator",
"=",
"=",
"field",
"panel",
"coordinator",
")",
"{",
"return",
";",
"}",
"if",
"(",
"this",
"dual",
"decompiler",
"coordinator",
"!",
"=",
"null",
")",
"{",
"this",
"dual",
"decompiler",
"coordinator",
"dispose",
"(",
")",
";",
"c",
"panels",
"[",
"left",
"]",
"set",
"program",
"location",
"listener",
"(",
"null",
")",
";",
"c",
"panels",
"[",
"right",
"]",
"set",
"program",
"location",
"listener",
"(",
"null",
")",
";",
"}",
"this",
"dual",
"decompiler",
"coordinator",
"=",
"field",
"panel",
"coordinator",
";",
"if",
"(",
"field",
"panel",
"coordinator",
"!",
"=",
"null",
")",
"{",
"c",
"panels",
"[",
"left",
"]",
"set",
"program",
"location",
"listener",
"(",
"left",
"decompiler",
"location",
"listener",
")",
";",
"c",
"panels",
"[",
"right",
"]",
"set",
"program",
"location",
"listener",
"(",
"right",
"decompiler",
"location",
"listener",
")",
";",
"c",
"display",
"panel",
"focused",
"decompiler",
"panel",
"=",
"get",
"focused",
"decompiler",
"panel",
"(",
")",
";",
"program",
"location",
"program",
"location",
"=",
"focused",
"decompiler",
"panel",
"get",
"decompiler",
"panel",
"(",
")",
"get",
"current",
"location",
"(",
")",
";",
"if",
"(",
"program",
"location",
"!",
"=",
"null",
")",
"{",
"focused",
"decompiler",
"panel",
"location",
"changed",
"(",
"program",
"location",
")",
";",
"}",
"}",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.