docstring_tokens
list | code_tokens
list |
---|---|
[
"template",
"method",
"to",
"allow",
"for",
"additional",
"checks",
"by",
"subclassed",
"methods",
"without",
"needing",
"to",
"call",
"super",
"is",
"satisfied",
"by",
"(",
")"
] | [
"protected",
"abstract",
"boolean",
"is",
"satisfied",
"by",
"internal",
"(",
"assertion",
"assertion",
")",
";"
] |
[
"returns",
"an",
"immutable",
"multimap",
"containing",
"the",
"given",
"entries",
",",
"in",
"order"
] | [
"public",
"static",
"<",
"k",
",",
"v",
">",
"immutable",
"list",
"multimap",
"<",
"k",
",",
"v",
">",
"of",
"(",
"k",
"k",
"1",
",",
"v",
"v",
"1",
",",
"k",
"k",
"2",
",",
"v",
"v",
"2",
",",
"k",
"k",
"3",
",",
"v",
"v",
"3",
",",
"k",
"k",
"4",
",",
"v",
"v",
"4",
",",
"k",
"k",
"5",
",",
"v",
"v",
"5",
")",
"{",
"immutable",
"list",
"multimap",
"builder",
"<",
"k",
",",
"v",
">",
"builder",
"=",
"immutable",
"list",
"multimap",
"builder",
"(",
")",
";",
"builder",
"put",
"(",
"k",
"1",
",",
"v",
"1",
")",
";",
"builder",
"put",
"(",
"k",
"2",
",",
"v",
"2",
")",
";",
"builder",
"put",
"(",
"k",
"3",
",",
"v",
"3",
")",
";",
"builder",
"put",
"(",
"k",
"4",
",",
"v",
"4",
")",
";",
"builder",
"put",
"(",
"k",
"5",
",",
"v",
"5",
")",
";",
"return",
"builder",
"build",
"(",
")",
";",
"}",
"/",
"/",
"looking",
"for",
"of",
"(",
")",
"with",
">",
"5",
"entries",
"?",
"use",
"the",
"builder",
"instead"
] |
[
"signals",
"to",
"perform",
"an",
"update",
"see",
"the",
"class",
"header",
"for",
"the",
"usage",
"of",
"the",
"various",
"update",
"methods"
] | [
"protected",
"synchronized",
"void",
"update",
"(",
")",
"{",
"if",
"(",
"disposed",
")",
"{",
"return",
";",
"}",
"request",
"time",
"=",
"system",
"current",
"time",
"millis",
"(",
")",
";",
"swing",
"run",
"later",
"(",
"this",
":",
":",
"check",
"for",
"work",
")",
";",
"}"
] |
[
"return",
"the",
"annotations",
"associated",
"with",
"the",
"specific",
"methodconstructor",
"parameter"
] | [
"public",
"annotation",
"[",
"]",
"get",
"parameter",
"annotations",
"(",
")",
"{",
"annotation",
"[",
"]",
"param",
"anns",
"=",
"this",
"parameter",
"annotations",
";",
"if",
"(",
"param",
"anns",
"=",
"=",
"null",
")",
"{",
"annotation",
"[",
"]",
"[",
"]",
"annotation",
"array",
"=",
"this",
"executable",
"get",
"parameter",
"annotations",
"(",
")",
";",
"int",
"index",
"=",
"this",
"parameter",
"index",
";",
"if",
"(",
"this",
"executable",
"instanceof",
"constructor",
"&",
"&",
"class",
"utils",
"is",
"inner",
"class",
"(",
"this",
"executable",
"get",
"declaring",
"class",
"(",
")",
")",
"&",
"&",
"annotation",
"array",
"length",
"=",
"=",
"this",
"executable",
"get",
"parameter",
"count",
"(",
")",
"-",
"1",
")",
"{",
"/",
"/",
"bug",
"in",
"javac",
"in",
"jdk",
"<",
"9",
":",
"annotation",
"array",
"excludes",
"enclosing",
"instance",
"parameter",
"/",
"/",
"for",
"inner",
"classes",
",",
"so",
"access",
"it",
"with",
"the",
"actual",
"parameter",
"index",
"lowered",
"by",
"1",
"index",
"=",
"this",
"parameter",
"index",
"-",
"1",
";",
"}",
"param",
"anns",
"=",
"(",
"index",
">",
"=",
"0",
"&",
"&",
"index",
"<",
"annotation",
"array",
"length",
"?",
"adapt",
"annotation",
"array",
"(",
"annotation",
"array",
"[",
"index",
"]",
")",
":",
"empty",
"annotation",
"array",
")",
";",
"this",
"parameter",
"annotations",
"=",
"param",
"anns",
";",
"}",
"return",
"param",
"anns",
";",
"}"
] |
[
"return",
"the",
"name",
"of",
"this",
"analyzer",
"type"
] | [
"public",
"string",
"get",
"name",
"(",
")",
"{",
"return",
"name",
";",
"}"
] |
[
"removes",
"this",
"leaf",
"and",
"all",
"associated",
"chained",
"buffers"
] | [
"public",
"long",
"key",
"node",
"remove",
"leaf",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"remove",
"all",
"chained",
"buffers",
"associated",
"with",
"this",
"leaf",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"key",
"count",
";",
"+",
"+",
"index",
")",
"{",
"if",
"(",
"has",
"indirect",
"storage",
"(",
"index",
")",
")",
"{",
"remove",
"chained",
"buffer",
"(",
"buffer",
"get",
"int",
"(",
"get",
"record",
"data",
"offset",
"(",
"index",
")",
")",
")",
";",
"}",
"}",
"return",
"super",
"remove",
"leaf",
"(",
")",
";",
"}"
] |
[
"create",
"an",
"instance",
"using",
"{",
"@",
"code",
"serializer",
"}",
"for",
"conversion"
] | [
"public",
"static",
"simple",
"xml",
"converter",
"factory",
"create",
"(",
"serializer",
"serializer",
")",
"{",
"return",
"new",
"simple",
"xml",
"converter",
"factory",
"(",
"serializer",
",",
"true",
")",
";",
"}"
] |
[
"commit",
"the",
"length",
"and",
"offset",
"of",
"a",
"fsimage",
"section",
"to",
"the",
"summary",
"index",
",",
"including",
"the",
"sub",
"section",
",",
"which",
"will",
"be",
"committed",
"before",
"the",
"section",
"is",
"committed"
] | [
"public",
"void",
"commit",
"section",
"and",
"sub",
"section",
"(",
"file",
"summary",
"builder",
"summary",
",",
"section",
"name",
"name",
",",
"section",
"name",
"sub",
"section",
"name",
")",
"throws",
"i",
"o",
"exception",
"{",
"commit",
"sub",
"section",
"(",
"summary",
",",
"sub",
"section",
"name",
")",
";",
"commit",
"section",
"(",
"summary",
",",
"name",
")",
";",
"}"
] |
[
"return",
"a",
"builder",
"for",
"a",
"{",
"@",
"code",
"handler",
"type",
"predicate",
"}"
] | [
"public",
"static",
"builder",
"builder",
"(",
")",
"{",
"return",
"new",
"builder",
"(",
")",
";",
"}"
] |
[
"check",
"that",
"the",
"cache",
"of",
"the",
"state",
"store",
"information",
"is",
"available"
] | [
"private",
"void",
"check",
"cache",
"available",
"(",
")",
"throws",
"state",
"store",
"unavailable",
"exception",
"{",
"if",
"(",
"!",
"this",
"initialized",
")",
"{",
"throw",
"new",
"state",
"store",
"unavailable",
"exception",
"(",
"\"",
"cached",
"state",
"store",
"not",
"initialized",
",",
"\"",
"+",
"get",
"record",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
"+",
"\"",
"records",
"not",
"valid",
"\"",
")",
";",
"}",
"}"
] |
[
"model",
"tests",
"for",
"outer",
"enum"
] | [
"public",
"void",
"test",
"outer",
"enum",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"outer",
"enum",
"}"
] |
[
"throws",
"the",
"given",
"{",
"@",
"code",
"throwable",
"}",
"in",
"scenarios",
"where",
"the",
"signatures",
"do",
"not",
"allow",
"you",
"to",
"throw",
"an",
"arbitrary",
"throwable",
"errors",
"and",
"runtime",
"exceptions",
"are",
"thrown",
"directly",
",",
"other",
"exceptions",
"are",
"packed",
"into",
"a",
"parent",
"runtime",
"exception"
] | [
"public",
"static",
"void",
"rethrow",
"(",
"throwable",
"t",
",",
"string",
"parent",
"message",
")",
"{",
"if",
"(",
"t",
"instanceof",
"error",
")",
"{",
"throw",
"(",
"error",
")",
"t",
";",
"}",
"else",
"if",
"(",
"t",
"instanceof",
"runtime",
"exception",
")",
"{",
"throw",
"(",
"runtime",
"exception",
")",
"t",
";",
"}",
"else",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"parent",
"message",
",",
"t",
")",
";",
"}",
"}"
] |
[
"a",
"helper",
"method",
"to",
"send",
"an",
"exception",
"and",
"handle",
"and",
"log",
"a",
"subsequent",
"exception"
] | [
"static",
"void",
"send",
"error",
"response",
"(",
"transport",
"channel",
"channel",
",",
"string",
"action",
"name",
",",
"transport",
"request",
"request",
",",
"exception",
"e",
")",
"{",
"try",
"{",
"channel",
"send",
"response",
"(",
"e",
")",
";",
"}",
"catch",
"(",
"exception",
"send",
"exception",
")",
"{",
"send",
"exception",
"add",
"suppressed",
"(",
"e",
")",
";",
"logger",
"warn",
"(",
"(",
")",
"-",
">",
"new",
"parameterized",
"message",
"(",
"\"",
"failed",
"to",
"send",
"error",
"response",
"for",
"action",
"[",
"{",
"}",
"]",
"and",
"request",
"[",
"{",
"}",
"]",
"\"",
",",
"action",
"name",
",",
"request",
")",
",",
"send",
"exception",
")",
";",
"}",
"}"
] |
[
"finishes",
"up",
"annotation",
"processing",
"this",
"closes",
"off",
"any",
"open",
"annotations",
"and",
"removes",
"annotations",
"that",
"don",
"'",
"t",
"refer",
"to",
"written",
"data"
] | [
"public",
"void",
"finish",
"annotating",
"(",
")",
"{",
"/",
"/",
"close",
"off",
"the",
"final",
"annotation",
",",
"if",
"any",
"end",
"annotation",
"(",
")",
";",
"/",
"/",
"remove",
"annotations",
"that",
"refer",
"to",
"unwritten",
"data",
"if",
"(",
"annotations",
"!",
"=",
"null",
")",
"{",
"int",
"asz",
"=",
"annotations",
"size",
"(",
")",
";",
"while",
"(",
"asz",
">",
"0",
")",
"{",
"annotation",
"last",
"=",
"annotations",
"get",
"(",
"asz",
"-",
"1",
")",
";",
"if",
"(",
"last",
"get",
"start",
"(",
")",
">",
"cursor",
")",
"{",
"annotations",
"remove",
"(",
"asz",
"-",
"1",
")",
";",
"asz",
"-",
"-",
";",
"}",
"else",
"if",
"(",
"last",
"get",
"end",
"(",
")",
">",
"cursor",
")",
"{",
"last",
"set",
"end",
"(",
"cursor",
")",
";",
"break",
";",
"}",
"else",
"{",
"break",
";",
"}",
"}",
"}",
"}"
] |
[
"verify",
"that",
"the",
"server",
"is",
"sending",
"the",
"proper",
"zxid",
"see",
"zookeeper",
"-",
"1412"
] | [
"public",
"void",
"test",
"follower",
"sends",
"last",
"zxid",
"(",
")",
"throws",
"exception",
"{",
"quorum",
"util",
"qu",
"=",
"new",
"quorum",
"util",
"(",
"1",
")",
";",
"qu",
"start",
"all",
"(",
")",
";",
"int",
"index",
"=",
"1",
";",
"while",
"(",
"qu",
"get",
"peer",
"(",
"index",
")",
"peer",
"follower",
"=",
"=",
"null",
")",
"{",
"index",
"+",
"+",
";",
"}",
"log",
"info",
"(",
"\"",
"connecting",
"to",
"follower",
":",
"{",
"}",
"\"",
",",
"index",
")",
";",
"testable",
"zoo",
"keeper",
"zk",
"=",
"create",
"testable",
"client",
"(",
"\"",
"localhost",
":",
"\"",
"+",
"qu",
"get",
"peer",
"(",
"index",
")",
"peer",
"get",
"client",
"port",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"0l",
",",
"zk",
"testable",
"last",
"zxid",
"(",
")",
")",
";",
"zk",
"exists",
"(",
"\"",
"/",
"\"",
",",
"false",
")",
";",
"long",
"lzxid",
"=",
"zk",
"testable",
"last",
"zxid",
"(",
")",
";",
"assert",
"true",
"(",
"lzxid",
">",
"0",
",",
"\"",
"lzxid",
":",
"\"",
"+",
"lzxid",
"+",
"\"",
">",
"0",
"\"",
")",
";",
"zk",
"close",
"(",
")",
";",
"qu",
"shutdown",
"all",
"(",
")",
";",
"}"
] |
[
"decode",
"the",
"data",
"within",
"the",
"viewfinder",
"rectangle",
",",
"and",
"time",
"how",
"long",
"it",
"took",
"for",
"efficiency",
",",
"reuse",
"the",
"same",
"reader",
"objects",
"from",
"one",
"decode",
"to",
"the",
"next"
] | [
"private",
"void",
"decode",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"result",
"raw",
"result",
"=",
"null",
";",
"planar",
"y",
"u",
"v",
"luminance",
"source",
"source",
"=",
"activity",
"get",
"camera",
"manager",
"(",
")",
"build",
"luminance",
"source",
"(",
"data",
",",
"width",
",",
"height",
")",
";",
"if",
"(",
"source",
"!",
"=",
"null",
")",
"{",
"binary",
"bitmap",
"bitmap",
"=",
"new",
"binary",
"bitmap",
"(",
"new",
"hybrid",
"binarizer",
"(",
"source",
")",
")",
";",
"try",
"{",
"raw",
"result",
"=",
"multi",
"format",
"reader",
"decode",
"with",
"state",
"(",
"bitmap",
")",
";",
"}",
"catch",
"(",
"reader",
"exception",
"re",
")",
"{",
"/",
"/",
"continue",
"}",
"finally",
"{",
"multi",
"format",
"reader",
"reset",
"(",
")",
";",
"}",
"}",
"handler",
"handler",
"=",
"activity",
"get",
"handler",
"(",
")",
";",
"if",
"(",
"raw",
"result",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"don",
"'",
"t",
"log",
"the",
"barcode",
"contents",
"for",
"security",
"if",
"(",
"handler",
"!",
"=",
"null",
")",
"{",
"message",
"message",
"=",
"message",
"obtain",
"(",
"handler",
",",
"r",
"id",
"decode",
"succeeded",
",",
"raw",
"result",
")",
";",
"bundle",
"bundle",
"=",
"new",
"bundle",
"(",
")",
";",
"bundle",
"thumbnail",
"(",
"source",
",",
"bundle",
")",
";",
"message",
"set",
"data",
"(",
"bundle",
")",
";",
"message",
"send",
"to",
"target",
"(",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"handler",
"!",
"=",
"null",
")",
"{",
"message",
"message",
"=",
"message",
"obtain",
"(",
"handler",
",",
"r",
"id",
"decode",
"failed",
")",
";",
"message",
"send",
"to",
"target",
"(",
")",
";",
"}",
"}",
"}"
] |
[
"the",
"shard",
"routing",
"entry",
"for",
"the",
"failed",
"shard"
] | [
"public",
"shard",
"routing",
"get",
"routing",
"entry",
"(",
")",
"{",
"return",
"routing",
"entry",
";",
"}"
] |
[
"test",
"refresh",
"user",
"to",
"groups",
"mappings",
"action"
] | [
"private",
"void",
"test",
"group",
"mapping",
"refresh",
"internal",
"(",
"string",
"default",
"fs",
")",
"throws",
"exception",
"{",
"groups",
"groups",
"=",
"groups",
"get",
"user",
"to",
"groups",
"mapping",
"service",
"(",
"conf",
")",
";",
"string",
"user",
"=",
"\"",
"test",
"user",
"1",
"2",
"3",
"\"",
";",
"log",
"info",
"(",
"\"",
"first",
"attempt",
":",
"\"",
")",
";",
"list",
"<",
"string",
">",
"g",
"1",
"=",
"groups",
"get",
"groups",
"(",
"user",
")",
";",
"log",
"info",
"(",
"\"",
"group",
"1",
":",
"{",
"}",
"\"",
",",
"g",
"1",
")",
";",
"log",
"info",
"(",
"\"",
"second",
"attempt",
",",
"should",
"be",
"the",
"same",
":",
"\"",
")",
";",
"list",
"<",
"string",
">",
"g",
"2",
"=",
"groups",
"get",
"groups",
"(",
"user",
")",
";",
"log",
"info",
"(",
"\"",
"group",
"2",
":",
"{",
"}",
"\"",
",",
"g",
"2",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"g",
"2",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"assert",
"equals",
"(",
"\"",
"should",
"be",
"same",
"group",
"\"",
",",
"g",
"1",
"get",
"(",
"i",
")",
",",
"g",
"2",
"get",
"(",
"i",
")",
")",
";",
"}",
"/",
"/",
"set",
"fs",
"default",
"f",
"s",
"point",
"to",
"router",
"(",
"s",
")",
"conf",
"set",
"(",
"d",
"f",
"s",
"config",
"keys",
"fs",
"default",
"name",
"key",
",",
"default",
"fs",
")",
";",
"/",
"/",
"test",
"refresh",
"command",
"d",
"f",
"s",
"admin",
"admin",
"=",
"new",
"d",
"f",
"s",
"admin",
"(",
"conf",
")",
";",
"string",
"[",
"]",
"args",
"=",
"new",
"string",
"[",
"]",
"{",
"\"",
"-",
"refresh",
"user",
"to",
"groups",
"mappings",
"\"",
"}",
";",
"admin",
"run",
"(",
"args",
")",
";",
"log",
"info",
"(",
"\"",
"third",
"attempt",
"(",
"after",
"refresh",
"command",
")",
",",
"should",
"be",
"different",
":",
"\"",
")",
";",
"list",
"<",
"string",
">",
"g",
"3",
"=",
"groups",
"get",
"groups",
"(",
"user",
")",
";",
"log",
"info",
"(",
"\"",
"group",
"3",
":",
"{",
"}",
"\"",
",",
"g",
"3",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"g",
"3",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"assert",
"not",
"equals",
"(",
"\"",
"should",
"be",
"different",
"group",
":",
"\"",
"+",
"g",
"1",
"get",
"(",
"i",
")",
"+",
"\"",
"and",
"\"",
"+",
"g",
"3",
"get",
"(",
"i",
")",
",",
"g",
"1",
"get",
"(",
"i",
")",
",",
"g",
"3",
"get",
"(",
"i",
")",
")",
";",
"}",
"/",
"/",
"test",
"timeout",
"log",
"info",
"(",
"\"",
"fourth",
"attempt",
"(",
"after",
"timeout",
")",
",",
"should",
"be",
"different",
":",
"\"",
")",
";",
"generic",
"test",
"utils",
"wait",
"for",
"(",
"(",
")",
"-",
">",
"{",
"list",
"<",
"string",
">",
"g",
"4",
";",
"try",
"{",
"g",
"4",
"=",
"groups",
"get",
"groups",
"(",
"user",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"log",
"debug",
"(",
"\"",
"failed",
"to",
"get",
"groups",
"for",
"user",
":",
"{",
"}",
"\"",
",",
"user",
")",
";",
"return",
"false",
";",
"}",
"log",
"info",
"(",
"\"",
"group",
"4",
":",
"{",
"}",
"\"",
",",
"g",
"4",
")",
";",
"/",
"/",
"if",
"g",
"4",
"is",
"the",
"same",
"as",
"g",
"3",
",",
"wait",
"and",
"retry",
"return",
"!",
"g",
"3",
"equals",
"(",
"g",
"4",
")",
";",
"}",
",",
"50",
",",
"math",
"to",
"int",
"exact",
"(",
"time",
"unit",
"seconds",
"to",
"millis",
"(",
"group",
"refresh",
"timeout",
"sec",
"*",
"30",
")",
")",
")",
";",
"}"
] |
[
"uploads",
"an",
"image",
"(",
"required",
")"
] | [
"public",
"model",
"api",
"response",
"upload",
"file",
"with",
"required",
"file",
"(",
"long",
"pet",
"id",
",",
"file",
"required",
"file",
",",
"string",
"additional",
"metadata",
")",
"throws",
"api",
"exception",
"{",
"object",
"local",
"var",
"post",
"body",
"=",
"null",
";",
"/",
"/",
"verify",
"the",
"required",
"parameter",
"'",
"pet",
"id",
"'",
"is",
"set",
"if",
"(",
"pet",
"id",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"api",
"exception",
"(",
"400",
",",
"\"",
"missing",
"the",
"required",
"parameter",
"'",
"pet",
"id",
"'",
"when",
"calling",
"upload",
"file",
"with",
"required",
"file",
"\"",
")",
";",
"}",
"/",
"/",
"verify",
"the",
"required",
"parameter",
"'",
"required",
"file",
"'",
"is",
"set",
"if",
"(",
"required",
"file",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"api",
"exception",
"(",
"400",
",",
"\"",
"missing",
"the",
"required",
"parameter",
"'",
"required",
"file",
"'",
"when",
"calling",
"upload",
"file",
"with",
"required",
"file",
"\"",
")",
";",
"}",
"/",
"/",
"create",
"path",
"and",
"map",
"variables",
"string",
"local",
"var",
"path",
"=",
"\"",
"/",
"fake",
"/",
"{",
"pet",
"id",
"}",
"/",
"upload",
"image",
"with",
"required",
"file",
"\"",
"replace",
"all",
"(",
"\"",
"\\",
"\\",
"{",
"format",
"\\",
"\\",
"}",
"\"",
",",
"\"",
"json",
"\"",
")",
"replace",
"all",
"(",
"\"",
"\\",
"\\",
"{",
"\"",
"+",
"\"",
"pet",
"id",
"\"",
"+",
"\"",
"\\",
"\\",
"}",
"\"",
",",
"api",
"client",
"escape",
"string",
"(",
"pet",
"id",
"to",
"string",
"(",
")",
")",
")",
";",
"/",
"/",
"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",
">",
"(",
")",
";",
"if",
"(",
"additional",
"metadata",
"!",
"=",
"null",
")",
"local",
"var",
"form",
"params",
"put",
"(",
"\"",
"additional",
"metadata",
"\"",
",",
"additional",
"metadata",
")",
";",
"if",
"(",
"required",
"file",
"!",
"=",
"null",
")",
"local",
"var",
"form",
"params",
"put",
"(",
"\"",
"required",
"file",
"\"",
",",
"required",
"file",
")",
";",
"final",
"string",
"[",
"]",
"local",
"var",
"accepts",
"=",
"{",
"\"",
"application",
"/",
"json",
"\"",
"}",
";",
"final",
"string",
"local",
"var",
"accept",
"=",
"api",
"client",
"select",
"header",
"accept",
"(",
"local",
"var",
"accepts",
")",
";",
"final",
"string",
"[",
"]",
"local",
"var",
"content",
"types",
"=",
"{",
"\"",
"multipart",
"/",
"form",
"-",
"data",
"\"",
"}",
";",
"final",
"string",
"local",
"var",
"content",
"type",
"=",
"api",
"client",
"select",
"header",
"content",
"type",
"(",
"local",
"var",
"content",
"types",
")",
";",
"string",
"[",
"]",
"local",
"var",
"auth",
"names",
"=",
"new",
"string",
"[",
"]",
"{",
"\"",
"petstore",
"auth",
"\"",
"}",
";",
"generic",
"type",
"<",
"model",
"api",
"response",
">",
"local",
"var",
"return",
"type",
"=",
"new",
"generic",
"type",
"<",
"model",
"api",
"response",
">",
"(",
")",
"{",
"}",
";",
"return",
"api",
"client",
"invoke",
"a",
"p",
"i",
"(",
"local",
"var",
"path",
",",
"\"",
"post",
"\"",
",",
"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",
",",
"local",
"var",
"return",
"type",
")",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"color",
"'"
] | [
"public",
"void",
"color",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"color",
"}"
] |
[
"get",
"my",
"boolean"
] | [
"public",
"boolean",
"get",
"my",
"boolean",
"(",
")",
"{",
"return",
"my",
"boolean",
";",
"}"
] |
[
"returns",
"true",
"if",
"this",
"is",
"a",
"processor",
"state",
"register"
] | [
"public",
"boolean",
"is",
"processor",
"context",
"(",
")",
"{",
"return",
"(",
"type",
"flags",
"&",
"type",
"context",
")",
"!",
"=",
"0",
";",
"}"
] |
[
"source",
"line",
"and",
"column",
"info",
"<",
"code",
">",
"optional",
"aapt",
"pb",
"source",
"position",
"source",
"=",
"3",
";",
"<",
"code",
">"
] | [
"public",
"boolean",
"has",
"source",
"(",
")",
"{",
"return",
"(",
"(",
"bit",
"field",
"0",
"&",
"0x",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"4",
")",
"=",
"=",
"0x",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"4",
")",
";",
"}"
] |
[
"returns",
"the",
"action"
] | [
"public",
"action",
"analysis",
"metadata",
"get",
"action",
"metadata",
"(",
")",
"{",
"return",
"spawn",
"get",
"resource",
"owner",
"(",
")",
";",
"}"
] |
[
"ensures",
"that",
"the",
"given",
"object",
"reference",
"is",
"not",
"null",
"upon",
"violation",
",",
"a",
"{",
"@",
"code",
"null",
"pointer",
"exception",
"}",
"with",
"the",
"given",
"message",
"is",
"thrown",
"the",
"error",
"message",
"is",
"constructed",
"from",
"a",
"template",
"and",
"an",
"arguments",
"array",
",",
"after",
"a",
"similar",
"fashion",
"as",
"{",
"@",
"link",
"string",
"#",
"format",
"(",
"string",
",",
"object",
")",
"}",
",",
"but",
"supporting",
"only",
"{",
"@",
"code",
"%",
"s",
"}",
"as",
"a",
"placeholder"
] | [
"public",
"static",
"<",
"t",
">",
"t",
"check",
"not",
"null",
"(",
"t",
"reference",
",",
"@",
"nullable",
"string",
"error",
"message",
"template",
",",
"@",
"nullable",
"object",
"error",
"message",
"args",
")",
"{",
"if",
"(",
"reference",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"null",
"pointer",
"exception",
"(",
"format",
"(",
"error",
"message",
"template",
",",
"error",
"message",
"args",
")",
")",
";",
"}",
"return",
"reference",
";",
"}",
"/",
"/",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"/",
"/",
"boolean",
"condition",
"checking",
"(",
"argument",
")",
"/",
"/",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
] |
[
"create",
"or",
"reuse",
"a",
"bt",
"indexed",
"mesh",
"instance",
"based",
"on",
"the",
"specified",
"{",
"@",
"link",
"mesh",
"part",
"}",
"use",
"{",
"@",
"link",
"#",
"release",
"(",
")",
"}",
"to",
"release",
"the",
"mesh",
"when",
"it",
"'",
"s",
"no",
"longer",
"needed"
] | [
"public",
"static",
"bt",
"indexed",
"mesh",
"obtain",
"(",
"final",
"mesh",
"part",
"mesh",
"part",
")",
"{",
"if",
"(",
"mesh",
"part",
"=",
"=",
"null",
")",
"throw",
"new",
"gdx",
"runtime",
"exception",
"(",
"\"",
"mesh",
"part",
"cannot",
"be",
"null",
"\"",
")",
";",
"bt",
"indexed",
"mesh",
"result",
"=",
"get",
"instance",
"(",
"mesh",
"part",
")",
";",
"if",
"(",
"result",
"=",
"=",
"null",
")",
"{",
"result",
"=",
"new",
"bt",
"indexed",
"mesh",
"(",
"mesh",
"part",
")",
";",
"instances",
"add",
"(",
"result",
")",
";",
"}",
"result",
"obtain",
"(",
")",
";",
"return",
"result",
";",
"}"
] |
[
"alias",
"for",
"{",
"@",
"link",
"#",
"contains",
"char",
"sequence",
"(",
"char",
"sequence",
")",
"}",
"for",
"better",
"discoverability"
] | [
"public",
"static",
"matcher",
"<",
"char",
"sequence",
">",
"contains",
"string",
"(",
"char",
"sequence",
"substring",
")",
"{",
"return",
"new",
"char",
"sequence",
"contains",
"(",
"substring",
")",
";",
"}"
] |
[
"returns",
"the",
"media",
"types",
"that",
"can",
"be",
"produced",
"the",
"resulting",
"media",
"types",
"are",
":",
"the",
"producible",
"media",
"types",
"specified",
"in",
"the",
"request",
"mappings",
",",
"or",
"media",
"types",
"of",
"configured",
"converters",
"that",
"can",
"write",
"the",
"specific",
"return",
"value",
",",
"or",
"{",
"@",
"link",
"media",
"type",
"#",
"all",
"}"
] | [
"protected",
"list",
"<",
"media",
"type",
">",
"get",
"producible",
"media",
"types",
"(",
"http",
"servlet",
"request",
"request",
",",
"class",
"<",
"?",
">",
"value",
"class",
",",
"@",
"nullable",
"type",
"target",
"type",
")",
"{",
"set",
"<",
"media",
"type",
">",
"media",
"types",
"=",
"(",
"set",
"<",
"media",
"type",
">",
")",
"request",
"get",
"attribute",
"(",
"handler",
"mapping",
"producible",
"media",
"types",
"attribute",
")",
";",
"if",
"(",
"!",
"collection",
"utils",
"is",
"empty",
"(",
"media",
"types",
")",
")",
"{",
"return",
"new",
"array",
"list",
"<",
">",
"(",
"media",
"types",
")",
";",
"}",
"else",
"if",
"(",
"!",
"this",
"all",
"supported",
"media",
"types",
"is",
"empty",
"(",
")",
")",
"{",
"list",
"<",
"media",
"type",
">",
"result",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"http",
"message",
"converter",
"<",
"?",
">",
"converter",
":",
"this",
"message",
"converters",
")",
"{",
"if",
"(",
"converter",
"instanceof",
"generic",
"http",
"message",
"converter",
"&",
"&",
"target",
"type",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"(",
"(",
"generic",
"http",
"message",
"converter",
"<",
"?",
">",
")",
"converter",
")",
"can",
"write",
"(",
"target",
"type",
",",
"value",
"class",
",",
"null",
")",
")",
"{",
"result",
"add",
"all",
"(",
"converter",
"get",
"supported",
"media",
"types",
"(",
")",
")",
";",
"}",
"}",
"else",
"if",
"(",
"converter",
"can",
"write",
"(",
"value",
"class",
",",
"null",
")",
")",
"{",
"result",
"add",
"all",
"(",
"converter",
"get",
"supported",
"media",
"types",
"(",
")",
")",
";",
"}",
"}",
"return",
"result",
";",
"}",
"else",
"{",
"return",
"collections",
"singleton",
"list",
"(",
"media",
"type",
"all",
")",
";",
"}",
"}"
] |
[
"remove",
"all",
"sensors",
"and",
"metrics",
"associated",
"with",
"this",
"group"
] | [
"public",
"synchronized",
"void",
"close",
"(",
")",
"{",
"for",
"(",
"string",
"sensor",
"name",
":",
"sensor",
"names",
")",
"{",
"metrics",
"remove",
"sensor",
"(",
"sensor",
"name",
")",
";",
"}",
"sensor",
"names",
"clear",
"(",
")",
";",
"for",
"(",
"metric",
"name",
"metric",
"name",
":",
"new",
"hash",
"set",
"<",
">",
"(",
"metrics",
"metrics",
"(",
")",
"key",
"set",
"(",
")",
")",
")",
"{",
"if",
"(",
"group",
"id",
"includes",
"(",
"metric",
"name",
")",
")",
"{",
"metrics",
"remove",
"metric",
"(",
"metric",
"name",
")",
";",
"}",
"}",
"}"
] |
[
"check",
"that",
"a",
"transaction",
"is",
"created",
"and",
"committed"
] | [
"public",
"void",
"transaction",
"should",
"succeed",
"with",
"not",
"new",
"(",
")",
"throws",
"exception",
"{",
"transaction",
"attribute",
"txatt",
"=",
"new",
"default",
"transaction",
"attribute",
"(",
")",
";",
"map",
"transaction",
"attribute",
"source",
"tas",
"=",
"new",
"map",
"transaction",
"attribute",
"source",
"(",
")",
";",
"tas",
"register",
"(",
"get",
"name",
"method",
",",
"txatt",
")",
";",
"reactive",
"transaction",
"status",
"=",
"mock",
"(",
"reactive",
"transaction",
"class",
")",
";",
"reactive",
"transaction",
"manager",
"rtm",
"=",
"mock",
"(",
"reactive",
"transaction",
"manager",
"class",
")",
";",
"/",
"/",
"expect",
"a",
"transaction",
"given",
"(",
"rtm",
"get",
"reactive",
"transaction",
"(",
"txatt",
")",
")",
"will",
"return",
"(",
"mono",
"just",
"(",
"status",
")",
")",
";",
"given",
"(",
"rtm",
"commit",
"(",
"status",
")",
")",
"will",
"return",
"(",
"mono",
"empty",
"(",
")",
")",
";",
"default",
"test",
"bean",
"tb",
"=",
"new",
"default",
"test",
"bean",
"(",
")",
";",
"test",
"bean",
"itb",
"=",
"(",
"test",
"bean",
")",
"advised",
"(",
"tb",
",",
"rtm",
",",
"tas",
")",
";",
"itb",
"get",
"name",
"(",
")",
"as",
"(",
"step",
"verifier",
":",
":",
"create",
")",
"verify",
"complete",
"(",
")",
";",
"verify",
"(",
"rtm",
")",
"commit",
"(",
"status",
")",
";",
"}"
] |
[
",",
"copy",
"from",
"jodd",
","
] | [
"public",
"static",
"boolean",
"is",
"leap",
"year",
"(",
"int",
"y",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"if",
"(",
"(",
"(",
"y",
"%",
"4",
")",
"=",
"=",
"0",
")",
"&",
"&",
"/",
"/",
"must",
"be",
"divisible",
"by",
"4",
"(",
"(",
"y",
"<",
"1582",
")",
"|",
"|",
"/",
"/",
"and",
"either",
"before",
"reform",
"year",
"(",
"(",
"y",
"%",
"100",
")",
"!",
"=",
"0",
")",
"|",
"|",
"/",
"/",
"or",
"not",
"a",
"century",
"(",
"(",
"y",
"%",
"400",
")",
"=",
"=",
"0",
")",
")",
")",
"{",
"/",
"/",
"or",
"a",
"multiple",
"of",
"400",
"result",
"=",
"true",
";",
"/",
"/",
"for",
"leap",
"year",
"}",
"return",
"result",
";",
"}"
] |
[
"returns",
"an",
"enumeration",
"of",
"the",
"descendants",
"of",
"gp",
"that",
"are",
"currently",
"expanded",
"if",
"path",
"is",
"not",
"currently",
"expanded",
",",
"this",
"will",
"return",
"null",
"if",
"you",
"expandcollapse",
"nodes",
"while",
"iterating",
"over",
"the",
"returned",
"enumeration",
"this",
"may",
"not",
"return",
"all",
"the",
"expanded",
"paths",
",",
"or",
"may",
"return",
"paths",
"that",
"are",
"no",
"longer",
"expanded"
] | [
"enumeration",
"<",
"tree",
"path",
">",
"get",
"expanded",
"descendants",
"(",
"group",
"path",
"gp",
")",
"{",
"tree",
"path",
"path",
"=",
"get",
"tree",
"path",
"from",
"group",
"(",
"gp",
")",
";",
"if",
"(",
"path",
"!",
"=",
"null",
")",
"{",
"return",
"get",
"expanded",
"descendants",
"(",
"path",
")",
";",
"}",
"return",
"null",
";",
"}"
] |
[
"return",
"the",
"position",
"from",
"which",
"this",
"buffer",
"will",
"read"
] | [
"int",
"read",
"position",
"(",
")",
";"
] |
[
"set",
"the",
"index",
"name",
"to",
"simulate",
"template",
"matching",
"against",
"the",
"index",
"templates",
"in",
"the",
"system"
] | [
"public",
"simulate",
"index",
"template",
"request",
"index",
"name",
"(",
"string",
"index",
"name",
")",
"{",
"if",
"(",
"strings",
"is",
"null",
"or",
"empty",
"(",
"index",
"name",
")",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"index",
"name",
"cannot",
"be",
"null",
"or",
"empty",
"\"",
")",
";",
"}",
"this",
"index",
"name",
"=",
"index",
"name",
";",
"return",
"this",
";",
"}"
] |
[
"test",
"simplest",
"case",
"of",
"recursion"
] | [
"public",
"void",
"recursive",
"resolve",
"simple",
"(",
")",
"{",
"json",
"adapter",
"<",
"foo",
"1",
">",
"adapter",
"=",
"new",
"moshi",
"builder",
"(",
")",
"build",
"(",
")",
"adapter",
"(",
"foo",
"1",
"class",
")",
";",
"assert",
"not",
"null",
"(",
"adapter",
")",
";",
"}"
] |
[
"adds",
"extra",
"bytes",
"if",
"necessary",
"(",
"with",
"value",
"{",
"@",
"code",
"0",
"}",
")",
"to",
"force",
"alignment",
"of",
"the",
"output",
"cursor",
"as",
"given"
] | [
"public",
"void",
"align",
"to",
"(",
"int",
"alignment",
")",
";"
] |
[
"similar",
"to",
"{",
"@",
"link",
"#",
"encode",
"bytes",
"(",
"byte",
"[",
"]",
",",
"int",
",",
"int",
",",
"int",
")",
"}",
"but",
"returns",
"a",
"byte",
"array",
"instead",
"of",
"instantiating",
"a",
"string",
"this",
"is",
"more",
"efficient",
"if",
"you",
"'",
"re",
"working",
"with",
"io",
"streams",
"and",
"have",
"large",
"data",
"sets",
"to",
"encode"
] | [
"public",
"static",
"byte",
"[",
"]",
"encode",
"bytes",
"to",
"bytes",
"(",
"byte",
"[",
"]",
"source",
",",
"int",
"off",
",",
"int",
"len",
",",
"int",
"options",
")",
"throws",
"java",
"io",
"i",
"o",
"exception",
"{",
"if",
"(",
"source",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"null",
"pointer",
"exception",
"(",
"\"",
"cannot",
"serialize",
"a",
"null",
"array",
"\"",
")",
";",
"}",
"/",
"/",
"end",
"if",
":",
"null",
"if",
"(",
"off",
"<",
"0",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"cannot",
"have",
"negative",
"offset",
":",
"\"",
"+",
"off",
")",
";",
"}",
"/",
"/",
"end",
"if",
":",
"off",
"<",
"0",
"if",
"(",
"len",
"<",
"0",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"cannot",
"have",
"length",
"offset",
":",
"\"",
"+",
"len",
")",
";",
"}",
"/",
"/",
"end",
"if",
":",
"len",
"<",
"0",
"if",
"(",
"off",
"+",
"len",
">",
"source",
"length",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"string",
"format",
"(",
"\"",
"cannot",
"have",
"offset",
"of",
"%",
"d",
"and",
"length",
"of",
"%",
"d",
"with",
"array",
"of",
"length",
"%",
"d",
"\"",
",",
"off",
",",
"len",
",",
"source",
"length",
")",
")",
";",
"}",
"/",
"/",
"end",
"if",
":",
"off",
"<",
"0",
"/",
"/",
"compress",
"?",
"if",
"(",
"(",
"options",
"&",
"gzip",
")",
"!",
"=",
"0",
")",
"{",
"java",
"io",
"byte",
"array",
"output",
"stream",
"baos",
"=",
"null",
";",
"java",
"util",
"zip",
"g",
"z",
"i",
"p",
"output",
"stream",
"gzos",
"=",
"null",
";",
"base",
"6",
"4",
"output",
"stream",
"b",
"6",
"4os",
"=",
"null",
";",
"try",
"{",
"/",
"/",
"g",
"zip",
"-",
">",
"base",
"6",
"4",
"-",
">",
"byte",
"array",
"baos",
"=",
"new",
"java",
"io",
"byte",
"array",
"output",
"stream",
"(",
")",
";",
"b",
"6",
"4os",
"=",
"new",
"base",
"6",
"4",
"output",
"stream",
"(",
"baos",
",",
"encode",
"|",
"options",
")",
";",
"gzos",
"=",
"new",
"java",
"util",
"zip",
"g",
"z",
"i",
"p",
"output",
"stream",
"(",
"b",
"6",
"4os",
")",
";",
"gzos",
"write",
"(",
"source",
",",
"off",
",",
"len",
")",
";",
"gzos",
"close",
"(",
")",
";",
"}",
"/",
"/",
"end",
"try",
"catch",
"(",
"java",
"io",
"i",
"o",
"exception",
"e",
")",
"{",
"/",
"/",
"catch",
"it",
"and",
"then",
"throw",
"it",
"immediately",
"so",
"that",
"/",
"/",
"the",
"finally",
"{",
"}",
"block",
"is",
"called",
"for",
"cleanup",
"throw",
"e",
";",
"}",
"/",
"/",
"end",
"catch",
"finally",
"{",
"try",
"{",
"gzos",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"}",
"try",
"{",
"b",
"6",
"4os",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"}",
"try",
"{",
"baos",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"}",
"}",
"/",
"/",
"end",
"finally",
"return",
"baos",
"to",
"byte",
"array",
"(",
")",
";",
"}",
"/",
"/",
"end",
"if",
":",
"compress",
"/",
"/",
"else",
",",
"don",
"'",
"t",
"compress",
"better",
"not",
"to",
"use",
"streams",
"at",
"all",
"then",
"else",
"{",
"boolean",
"break",
"lines",
"=",
"(",
"options",
"&",
"do",
"break",
"lines",
")",
">",
"0",
";",
"/",
"/",
"int",
"len",
"4",
"3",
"=",
"len",
"*",
"4",
"/",
"3",
";",
"/",
"/",
"byte",
"[",
"]",
"out",
"buff",
"=",
"new",
"byte",
"[",
"(",
"len",
"4",
"3",
")",
"/",
"/",
"main",
"4",
":",
"3",
"/",
"/",
"+",
"(",
"(",
"len",
"%",
"3",
")",
">",
"0",
"?",
"4",
":",
"0",
")",
"/",
"/",
"account",
"for",
"padding",
"/",
"/",
"+",
"(",
"break",
"lines",
"?",
"(",
"len",
"4",
"3",
"/",
"max",
"line",
"length",
")",
":",
"0",
")",
"]",
";",
"/",
"/",
"new",
"lines",
"/",
"/",
"try",
"to",
"determine",
"more",
"precisely",
"how",
"big",
"the",
"array",
"needs",
"to",
"be",
"/",
"/",
"if",
"we",
"get",
"it",
"right",
",",
"we",
"don",
"'",
"t",
"have",
"to",
"do",
"an",
"array",
"copy",
",",
"and",
"/",
"/",
"we",
"save",
"a",
"bunch",
"of",
"memory",
"int",
"enc",
"len",
"=",
"(",
"len",
"/",
"3",
")",
"*",
"4",
"+",
"(",
"len",
"%",
"3",
">",
"0",
"?",
"4",
":",
"0",
")",
";",
"/",
"/",
"bytes",
"needed",
"for",
"actual",
"encoding",
"if",
"(",
"break",
"lines",
")",
"{",
"enc",
"len",
"+",
"=",
"enc",
"len",
"/",
"max",
"line",
"length",
";",
"/",
"/",
"plus",
"extra",
"newline",
"characters",
"}",
"byte",
"[",
"]",
"out",
"buff",
"=",
"new",
"byte",
"[",
"enc",
"len",
"]",
";",
"int",
"d",
"=",
"0",
";",
"int",
"e",
"=",
"0",
";",
"int",
"len",
"2",
"=",
"len",
"-",
"2",
";",
"int",
"line",
"length",
"=",
"0",
";",
"for",
"(",
";",
"d",
"<",
"len",
"2",
";",
"d",
"+",
"=",
"3",
",",
"e",
"+",
"=",
"4",
")",
"{",
"encode",
"3to",
"4",
"(",
"source",
",",
"d",
"+",
"off",
",",
"3",
",",
"out",
"buff",
",",
"e",
",",
"options",
")",
";",
"line",
"length",
"+",
"=",
"4",
";",
"if",
"(",
"break",
"lines",
"&",
"&",
"line",
"length",
">",
"=",
"max",
"line",
"length",
")",
"{",
"out",
"buff",
"[",
"e",
"+",
"4",
"]",
"=",
"new",
"line",
";",
"e",
"+",
"+",
";",
"line",
"length",
"=",
"0",
";",
"}",
"/",
"/",
"end",
"if",
":",
"end",
"of",
"line",
"}",
"/",
"/",
"en",
"dfor",
":",
"each",
"piece",
"of",
"array",
"if",
"(",
"d",
"<",
"len",
")",
"{",
"encode",
"3to",
"4",
"(",
"source",
",",
"d",
"+",
"off",
",",
"len",
"-",
"d",
",",
"out",
"buff",
",",
"e",
",",
"options",
")",
";",
"e",
"+",
"=",
"4",
";",
"}",
"/",
"/",
"end",
"if",
":",
"some",
"padding",
"needed",
"/",
"/",
"only",
"resize",
"array",
"if",
"we",
"didn",
"'",
"t",
"guess",
"it",
"right",
"if",
"(",
"e",
"<",
"out",
"buff",
"length",
"-",
"1",
")",
"{",
"byte",
"[",
"]",
"final",
"out",
"=",
"new",
"byte",
"[",
"e",
"]",
";",
"system",
"arraycopy",
"(",
"out",
"buff",
",",
"0",
",",
"final",
"out",
",",
"0",
",",
"e",
")",
";",
"/",
"/",
"system",
"err",
"println",
"(",
"\"",
"having",
"to",
"resize",
"array",
"from",
"\"",
"+",
"out",
"buff",
"length",
"+",
"\"",
"to",
"\"",
"+",
"e",
")",
";",
"return",
"final",
"out",
";",
"}",
"else",
"{",
"/",
"/",
"system",
"err",
"println",
"(",
"\"",
"no",
"need",
"to",
"resize",
"array",
"\"",
")",
";",
"return",
"out",
"buff",
";",
"}",
"}",
"/",
"/",
"end",
"else",
":",
"don",
"'",
"t",
"compress",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"given",
"the",
"raw",
"ast",
"of",
"a",
"grammar",
",",
"create",
"a",
"grammar",
"object",
"associated",
"with",
"the",
"ast",
"once",
"we",
"have",
"the",
"grammar",
"object",
",",
"ensure",
"that",
"all",
"nodes",
"in",
"tree",
"referred",
"to",
"this",
"grammar",
"later",
",",
"we",
"will",
"use",
"it",
"for",
"error",
"handling",
"and",
"generally",
"knowing",
"from",
"where",
"a",
"rule",
"comes",
"from"
] | [
"public",
"grammar",
"create",
"grammar",
"(",
"grammar",
"root",
"a",
"s",
"t",
"ast",
")",
"{",
"final",
"grammar",
"g",
";",
"if",
"(",
"ast",
"grammar",
"type",
"=",
"=",
"a",
"n",
"t",
"l",
"r",
"parser",
"lexer",
")",
"g",
"=",
"new",
"lexer",
"grammar",
"(",
"this",
",",
"ast",
")",
";",
"else",
"g",
"=",
"new",
"grammar",
"(",
"this",
",",
"ast",
")",
";",
"/",
"/",
"ensure",
"each",
"node",
"has",
"pointer",
"to",
"surrounding",
"grammar",
"grammar",
"transform",
"pipeline",
"set",
"grammar",
"ptr",
"(",
"g",
",",
"ast",
")",
";",
"return",
"g",
";",
"}"
] |
[
"test",
"the",
"property",
"'",
"prefix",
"namespace",
"integer",
"'"
] | [
"public",
"void",
"prefix",
"namespace",
"integer",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"prefix",
"namespace",
"integer",
"}"
] |
[
"get",
"the",
"resource",
"utilization",
"of",
"the",
"node"
] | [
"public",
"resource",
"utilization",
"get",
"utilization",
"(",
")",
"{",
"return",
"this",
"node",
"utilization",
";",
"}"
] |
[
"creates",
"a",
"compressed",
"url",
"style",
"representation",
"of",
"an",
"inet",
"6",
"address",
"this",
"method",
"copies",
"and",
"adopts",
"code",
"from",
"google",
"'",
"s",
"guava",
"library",
"we",
"re",
"-",
"implement",
"this",
"here",
"in",
"order",
"to",
"reduce",
"dependency",
"on",
"guava",
"the",
"guava",
"library",
"has",
"frequently",
"caused",
"dependency",
"conflicts",
"in",
"the",
"past"
] | [
"private",
"static",
"string",
"get",
"i",
"pv",
"6",
"url",
"representation",
"(",
"inet",
"6",
"address",
"address",
")",
"{",
"return",
"get",
"i",
"pv",
"6",
"url",
"representation",
"(",
"address",
"get",
"address",
"(",
")",
")",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"get",
"date",
"time"
] | [
"public",
"offset",
"date",
"time",
"get",
"date",
"time",
"(",
")",
"{",
"return",
"date",
"time",
";",
"}"
] |
[
"add",
"this",
"constraint",
"setting",
"to",
"the",
"given",
"fingerprint"
] | [
"public",
"void",
"add",
"to",
"(",
"fingerprint",
"fp",
")",
"{",
"fp",
"add",
"string",
"(",
"label",
"get",
"canonical",
"form",
"(",
")",
")",
";",
"}"
] |
[
"sets",
"the",
"color",
"for",
"the",
"following",
"drawing",
"operations"
] | [
"public",
"void",
"set",
"color",
"(",
"float",
"r",
",",
"float",
"g",
",",
"float",
"b",
",",
"float",
"a",
")",
"{",
"color",
"=",
"color",
"rgba",
"8",
"8",
"8",
"8",
"(",
"r",
",",
"g",
",",
"b",
",",
"a",
")",
";",
"}"
] |
[
"add",
"all",
"contents",
"of",
"the",
"given",
"file",
"to",
"the",
"archive"
] | [
"private",
"static",
"void",
"add",
"file",
"to",
"tar",
"gz",
"recursively",
"(",
"tar",
"archive",
"output",
"stream",
"t",
"out",
",",
"file",
"file",
",",
"string",
"prefix",
",",
"configuration",
"conf",
")",
"throws",
"i",
"o",
"exception",
"{",
"string",
"entry",
"name",
"=",
"prefix",
"+",
"file",
"get",
"name",
"(",
")",
";",
"tar",
"archive",
"entry",
"tar",
"entry",
"=",
"new",
"tar",
"archive",
"entry",
"(",
"file",
",",
"entry",
"name",
")",
";",
"t",
"out",
"put",
"archive",
"entry",
"(",
"tar",
"entry",
")",
";",
"log",
"debug",
"(",
"\"",
"adding",
"entry",
"{",
"}",
"to",
"alias",
"map",
"archive",
"\"",
",",
"entry",
"name",
")",
";",
"if",
"(",
"file",
"is",
"file",
"(",
")",
")",
"{",
"try",
"(",
"file",
"input",
"stream",
"in",
"=",
"new",
"file",
"input",
"stream",
"(",
"file",
")",
")",
"{",
"i",
"o",
"utils",
"copy",
"bytes",
"(",
"in",
",",
"t",
"out",
",",
"conf",
",",
"false",
")",
";",
"}",
"t",
"out",
"close",
"archive",
"entry",
"(",
")",
";",
"}",
"else",
"{",
"t",
"out",
"close",
"archive",
"entry",
"(",
")",
";",
"file",
"[",
"]",
"children",
"=",
"file",
"list",
"files",
"(",
")",
";",
"if",
"(",
"children",
"!",
"=",
"null",
")",
"{",
"for",
"(",
"file",
"child",
":",
"children",
")",
"{",
"/",
"/",
"skip",
"the",
"lock",
"file",
"if",
"(",
"!",
"child",
"get",
"name",
"(",
")",
"equals",
"(",
"\"",
"lock",
"\"",
")",
")",
"{",
"add",
"file",
"to",
"tar",
"gz",
"recursively",
"(",
"t",
"out",
",",
"child",
",",
"entry",
"name",
"+",
"\"",
"/",
"\"",
",",
"conf",
")",
";",
"}",
"}",
"}",
"}",
"}"
] |
[
"writes",
"two",
"code",
"units"
] | [
"public",
"void",
"write",
"(",
"short",
"u",
"0",
",",
"short",
"u",
"1",
")",
"{",
"write",
"(",
"u",
"0",
")",
";",
"write",
"(",
"u",
"1",
")",
";",
"}"
] |
[
"creates",
"a",
"table",
"from",
"given",
"values",
"examples",
":",
"you",
"can",
"use",
"a",
"{",
"@",
"code",
"row",
"(",
")",
"}",
"expression",
"to",
"create",
"a",
"composite",
"rows",
":",
"{",
"@",
"code",
"t",
"env",
"from",
"values",
"(",
"row",
"(",
"1",
",",
"\"",
"abc",
"\"",
")",
",",
"row",
"(",
"2l",
",",
"\"",
"abcde",
"\"",
")",
")",
"}",
"will",
"produce",
"a",
"table",
"with",
"a",
"schema",
"as",
"follows",
":",
"{",
"@",
"code",
"root",
"|",
"-",
"-",
"f",
"0",
":",
"bigint",
"not",
"null",
"original",
"types",
"int",
"and",
"bigint",
"are",
"generalized",
"to",
"bigint",
"|",
"-",
"-",
"f",
"1",
":",
"varchar",
"(",
"5",
")",
"not",
"null",
"original",
"types",
"char",
"(",
"3",
")",
"and",
"char",
"(",
"5",
")",
"are",
"generalized",
"to",
"varchar",
"(",
"5",
")",
"it",
"uses",
"varchar",
"instead",
"of",
"char",
"so",
"that",
"no",
"padding",
"is",
"applied",
"}",
"the",
"method",
"will",
"derive",
"the",
"types",
"automatically",
"from",
"the",
"input",
"expressions",
"if",
"types",
"at",
"a",
"certain",
"position",
"differ",
",",
"the",
"method",
"will",
"try",
"to",
"find",
"a",
"common",
"super",
"type",
"for",
"all",
"types",
"if",
"a",
"common",
"super",
"type",
"does",
"not",
"exist",
",",
"an",
"exception",
"will",
"be",
"thrown",
"if",
"you",
"want",
"to",
"specify",
"the",
"requested",
"type",
"explicitly",
"see",
"{",
"@",
"link",
"#",
"from",
"values",
"(",
"abstract",
"data",
"type",
",",
"object",
")",
"}",
"it",
"is",
"also",
"possible",
"to",
"use",
"{",
"@",
"link",
"org",
"apache",
"flink",
"types",
"row",
"}",
"object",
"instead",
"of",
"{",
"@",
"code",
"row",
"}",
"expressions",
"r",
"o",
"ws",
"that",
"are",
"a",
"result",
"of",
"e",
"g",
"a",
"function",
"call",
"are",
"not",
"flattened",
"{",
"@",
"code",
"public",
"class",
"row",
"function",
"extends",
"scalar",
"function",
"{",
"{",
"@",
"literal",
"@",
"}",
"data",
"type",
"hint",
"(",
"\"",
"row",
"<",
"f",
"0",
"bigint",
",",
"f",
"1",
"varchar",
"(",
"5",
")",
">",
"\"",
")",
"row",
"eval",
"(",
")",
";",
"}",
"t",
"env",
"from",
"values",
"(",
"call",
"(",
"new",
"row",
"function",
"(",
")",
")",
",",
"call",
"(",
"new",
"row",
"function",
"(",
")",
")",
")",
"}",
"will",
"produce",
"a",
"table",
"with",
"a",
"schema",
"as",
"follows",
":",
"{",
"@",
"code",
"root",
"|",
"-",
"-",
"f",
"0",
":",
"row",
"<",
"`",
"f",
"0",
"`",
"bigint",
",",
"`",
"f",
"1",
"`",
"varchar",
"(",
"5",
")",
">",
"}",
"the",
"row",
"constructor",
"can",
"be",
"dropped",
"to",
"create",
"a",
"table",
"with",
"a",
"single",
"column",
":",
"r",
"o",
"ws",
"that",
"are",
"a",
"result",
"of",
"e",
"g",
"a",
"function",
"call",
"are",
"not",
"flattened",
"{",
"@",
"code",
"t",
"env",
"from",
"values",
"(",
"1",
",",
"2l",
",",
"3",
")",
"}",
"will",
"produce",
"a",
"table",
"with",
"a",
"schema",
"as",
"follows",
":",
"{",
"@",
"code",
"root",
"|",
"-",
"-",
"f",
"0",
":",
"bigint",
"not",
"null",
"}"
] | [
"default",
"table",
"from",
"values",
"(",
"object",
"values",
")",
"{",
"/",
"/",
"it",
"is",
"necessary",
"here",
"to",
"implement",
"table",
"environment",
"#",
"from",
"values",
"(",
"object",
")",
"for",
"/",
"/",
"batch",
"table",
"env",
"impl",
"/",
"/",
"in",
"scala",
"varargs",
"are",
"translated",
"to",
"seq",
"due",
"to",
"the",
"type",
"erasure",
"seq",
"<",
"expression",
">",
"and",
"/",
"/",
"seq",
"<",
"object",
">",
"/",
"/",
"are",
"the",
"same",
"it",
"is",
"not",
"a",
"problem",
"in",
"java",
"as",
"varargs",
"in",
"java",
"are",
"translated",
"to",
"an",
"array",
"return",
"from",
"values",
"(",
"arrays",
"as",
"list",
"(",
"values",
")",
")",
";",
"}"
] |
[
"for",
"this",
"test",
",",
"the",
"body",
"for",
"this",
"request",
"much",
"reference",
"a",
"schema",
"named",
"&",
"#",
"x",
"6",
"0",
";",
"file",
"&",
"#",
"x",
"6",
"0",
";"
] | [
"call",
"<",
"void",
">",
"test",
"body",
"with",
"file",
"schema",
"(",
"@",
"retrofit",
"2",
"http",
"body",
"file",
"schema",
"test",
"class",
"body",
")",
";"
] |
[
"returns",
"the",
"response",
"headers",
"associated",
"with",
"the",
"last",
"{",
"@",
"link",
"data",
"source",
"#",
"open",
"}",
"call",
"must",
"only",
"be",
"called",
"after",
"the",
"load",
"completed",
",",
"failed",
",",
"or",
"was",
"canceled"
] | [
"public",
"final",
"map",
"<",
"string",
",",
"list",
"<",
"string",
">",
">",
"get",
"response",
"headers",
"(",
")",
"{",
"return",
"data",
"source",
"get",
"last",
"response",
"headers",
"(",
")",
";",
"}"
] |
[
"this",
"method",
"allows",
"the",
"task",
"to",
"provide",
"the",
"default",
"fallback",
"authentication",
"object",
"to",
"be",
"used",
"when",
"{",
"@",
"link",
"queue",
"item",
"authenticator",
"}",
"fails",
"to",
"authenticate",
"the",
"build",
"when",
"the",
"task",
"execution",
"touches",
"other",
"objects",
"inside",
"jenkins",
",",
"the",
"access",
"control",
"is",
"performed",
"based",
"on",
"whether",
"this",
"{",
"@",
"link",
"authentication",
"}",
"is",
"allowed",
"to",
"use",
"them"
] | [
"default",
"@",
"non",
"null",
"authentication",
"get",
"default",
"authentication",
"2",
"(",
")",
"{",
"if",
"(",
"util",
"is",
"overridden",
"(",
"queue",
"task",
"class",
",",
"get",
"class",
"(",
")",
",",
"\"",
"get",
"default",
"authentication",
"\"",
")",
")",
"{",
"return",
"get",
"default",
"authentication",
"(",
")",
"to",
"spring",
"(",
")",
";",
"}",
"else",
"{",
"return",
"acl",
"system2",
";",
"}",
"}"
] |
[
"removes",
"and",
"returns",
"the",
"item",
"at",
"the",
"specified",
"index"
] | [
"public",
"long",
"remove",
"index",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"0",
")",
"throw",
"new",
"index",
"out",
"of",
"bounds",
"exception",
"(",
"\"",
"index",
"can",
"'",
"t",
"be",
"<",
"0",
":",
"\"",
"+",
"index",
")",
";",
"if",
"(",
"index",
">",
"=",
"size",
")",
"throw",
"new",
"index",
"out",
"of",
"bounds",
"exception",
"(",
"\"",
"index",
"can",
"'",
"t",
"be",
">",
"=",
"size",
":",
"\"",
"+",
"index",
"+",
"\"",
">",
"=",
"\"",
"+",
"size",
")",
";",
"long",
"[",
"]",
"values",
"=",
"this",
"values",
";",
"int",
"head",
"=",
"this",
"head",
",",
"tail",
"=",
"this",
"tail",
";",
"index",
"+",
"=",
"head",
";",
"long",
"value",
";",
"if",
"(",
"head",
"<",
"tail",
")",
"{",
"/",
"/",
"index",
"is",
"between",
"head",
"and",
"tail",
"value",
"=",
"values",
"[",
"index",
"]",
";",
"system",
"arraycopy",
"(",
"values",
",",
"index",
"+",
"1",
",",
"values",
",",
"index",
",",
"tail",
"-",
"index",
")",
";",
"this",
"tail",
"-",
"-",
";",
"}",
"else",
"if",
"(",
"index",
">",
"=",
"values",
"length",
")",
"{",
"/",
"/",
"index",
"is",
"between",
"0",
"and",
"tail",
"index",
"-",
"=",
"values",
"length",
";",
"value",
"=",
"values",
"[",
"index",
"]",
";",
"system",
"arraycopy",
"(",
"values",
",",
"index",
"+",
"1",
",",
"values",
",",
"index",
",",
"tail",
"-",
"index",
")",
";",
"this",
"tail",
"-",
"-",
";",
"}",
"else",
"{",
"/",
"/",
"index",
"is",
"between",
"head",
"and",
"values",
"length",
"value",
"=",
"values",
"[",
"index",
"]",
";",
"system",
"arraycopy",
"(",
"values",
",",
"head",
",",
"values",
",",
"head",
"+",
"1",
",",
"index",
"-",
"head",
")",
";",
"this",
"head",
"+",
"+",
";",
"if",
"(",
"this",
"head",
"=",
"=",
"values",
"length",
")",
"{",
"this",
"head",
"=",
"0",
";",
"}",
"}",
"size",
"-",
"-",
";",
"return",
"value",
";",
"}"
] |
[
"return",
"true",
"if",
"the",
"field",
"includes",
"the",
"{",
"@",
"code",
"transient",
"}",
"modifier"
] | [
"public",
"boolean",
"is",
"transient",
"(",
")",
"{",
"return",
"modifier",
"is",
"transient",
"(",
"field",
"get",
"modifiers",
"(",
")",
")",
";",
"}"
] |
[
"get",
"petfind",
"by",
"tags"
] | [
"public",
"set",
"<",
"pet",
">",
"execute",
"as",
"(",
"function",
"<",
"response",
",",
"response",
">",
"handler",
")",
"{",
"type",
"type",
"=",
"new",
"type",
"token",
"<",
"set",
"<",
"pet",
">",
">",
"(",
")",
"{",
"}",
"get",
"type",
"(",
")",
";",
"return",
"execute",
"(",
"handler",
")",
"as",
"(",
"type",
")",
";",
"}"
] |
[
"push",
"all",
"elements",
"of",
"a",
"list",
"to",
"a",
"queue",
",",
"such",
"that",
"the",
"first",
"entry",
"on",
"the",
"list",
"becomes",
"the",
"head",
"of",
"the",
"queue"
] | [
"private",
"<",
"t",
">",
"void",
"push",
"all",
"(",
"deque",
"<",
"t",
">",
"queue",
",",
"list",
"<",
"t",
">",
"entries",
")",
"{",
"list",
"<",
"t",
">",
"reversed",
"=",
"lists",
"reverse",
"(",
"entries",
")",
";",
"for",
"(",
"t",
"t",
":",
"reversed",
")",
"{",
"queue",
"push",
"(",
"t",
")",
";",
"}",
"}"
] |
[
"test",
"the",
"property",
"'",
"name",
"'"
] | [
"public",
"void",
"name",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"name",
"}"
] |
[
"todo",
"-",
"use",
"json",
"identity",
"info",
"on",
"recon",
"-",
"implement",
"custom",
"resolver",
"to",
"tie",
"it",
"to",
"a",
"pool",
"-",
"figure",
"it",
"all",
"out"
] | [
"public",
"string",
"get",
"recon",
"id",
"string",
"(",
")",
"{",
"if",
"(",
"recon",
"!",
"=",
"null",
")",
"{",
"return",
"long",
"to",
"string",
"(",
"recon",
"id",
")",
";",
"}",
"return",
"null",
";",
"}"
] |
[
"check",
"that",
"the",
"given",
"bytes",
"reference",
"is",
"neither",
"<",
"code",
">",
"null",
"<",
"code",
">",
"nor",
"of",
"length",
"0",
"note",
":",
"will",
"return",
"<",
"code",
">",
"true",
"<",
"code",
">",
"for",
"a",
"bytes",
"reference",
"that",
"purely",
"consists",
"of",
"whitespace"
] | [
"public",
"static",
"boolean",
"has",
"length",
"(",
"bytes",
"reference",
"bytes",
"reference",
")",
"{",
"return",
"(",
"bytes",
"reference",
"!",
"=",
"null",
"&",
"&",
"bytes",
"reference",
"length",
"(",
")",
">",
"0",
")",
";",
"}"
] |
[
"get",
"array",
"item"
] | [
"public",
"list",
"<",
"integer",
">",
"get",
"array",
"item",
"(",
")",
"{",
"return",
"array",
"item",
";",
"}"
] |
[
"looks",
"for",
"the",
"target",
"sub",
"array",
"in",
"the",
"buffer",
"scanning",
"backwards",
"starting",
"at",
"offset",
"returns",
"the",
"index",
"where",
"the",
"target",
"is",
"found",
"or",
"-",
"1",
"if",
"not",
"found"
] | [
"private",
"int",
"scan",
"backwards",
"(",
"byte",
"[",
"]",
"target",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
")",
"{",
"int",
"start",
"=",
"math",
"min",
"(",
"offset",
",",
"buffer",
"length",
"-",
"target",
"length",
")",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
">",
"=",
"0",
";",
"i",
"-",
"-",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"target",
"length",
";",
"j",
"+",
"+",
")",
"{",
"if",
"(",
"buffer",
"[",
"i",
"+",
"j",
"]",
"!",
"=",
"target",
"[",
"j",
"]",
")",
"{",
"break",
";",
"}",
"else",
"if",
"(",
"j",
"=",
"=",
"target",
"length",
"-",
"1",
")",
"{",
"return",
"i",
";",
"}",
"}",
"}",
"return",
"-",
"1",
";",
"}"
] |
[
"compare",
"a",
"unit",
"to",
"another",
"unit",
"<",
"br",
">",
"examples",
":",
"<",
"br",
">",
"1",
"'",
"m",
"'",
"(",
"milli",
")",
"is",
"smaller",
"than",
"'",
"k",
"'",
"(",
"kilo",
")",
",",
"so",
"compare",
"units",
"(",
"\"",
"m",
"\"",
",",
"\"",
"k",
"\"",
")",
"will",
"return",
"-",
"1",
"<",
"br",
">",
"2",
"'",
"m",
"'",
"(",
"mega",
")",
"is",
"greater",
"than",
"'",
"k",
"'",
"(",
"kilo",
")",
",",
"so",
"compare",
"units",
"(",
"\"",
"m",
"\"",
",",
"\"",
"k",
"\"",
")",
"will",
"return",
"1"
] | [
"public",
"static",
"int",
"compare",
"units",
"(",
"string",
"unit",
"a",
",",
"string",
"unit",
"b",
")",
"{",
"check",
"unit",
"argument",
"(",
"unit",
"a",
")",
";",
"check",
"unit",
"argument",
"(",
"unit",
"b",
")",
";",
"int",
"unit",
"a",
"pos",
"=",
"sorted",
"units",
"index",
"of",
"(",
"unit",
"a",
")",
";",
"int",
"unit",
"b",
"pos",
"=",
"sorted",
"units",
"index",
"of",
"(",
"unit",
"b",
")",
";",
"return",
"integer",
"compare",
"(",
"unit",
"a",
"pos",
",",
"unit",
"b",
"pos",
")",
";",
"}"
] |
[
"deletes",
"all",
"records",
"with",
"details",
"given",
"if",
"they",
"match",
"a",
"set",
"of",
"conditions",
"supplied",
"this",
"method",
"constructs",
"a",
"single",
"sql",
"delete",
"statement",
"and",
"sends",
"it",
"to",
"the",
"database",
"lite",
"pal",
"delete",
"all",
"(",
"&",
"quot",
";",
"person",
"&",
"quot",
";",
",",
"&",
"quot",
";",
"name",
"=",
"?",
"and",
"age",
"=",
"?",
"&",
"quot",
";",
",",
"&",
"quot",
";",
"tom",
"&",
"quot",
";",
",",
"&",
"quot",
";",
"14",
"&",
"quot",
";",
")",
";",
"this",
"means",
"that",
"all",
"the",
"records",
"which",
"name",
"is",
"tom",
"and",
"age",
"is",
"14",
"will",
"be",
"removed",
"<",
"br",
">",
"note",
"that",
"this",
"method",
"won",
"'",
"t",
"delete",
"the",
"referenced",
"data",
"in",
"other",
"tables",
"you",
"should",
"remove",
"those",
"values",
"by",
"your",
"own"
] | [
"public",
"static",
"int",
"delete",
"all",
"(",
"string",
"table",
"name",
",",
"string",
"conditions",
")",
"{",
"return",
"operator",
"delete",
"all",
"(",
"table",
"name",
",",
"conditions",
")",
";",
"}"
] |
[
"sets",
"a",
"new",
"drawable",
"to",
"be",
"the",
"delegate",
",",
"and",
"returns",
"the",
"old",
"one",
"(",
"or",
"null",
")",
"this",
"method",
"will",
"cause",
"the",
"drawable",
"to",
"be",
"invalidated"
] | [
"public",
"@",
"nullable",
"drawable",
"set",
"current",
"(",
"@",
"nullable",
"drawable",
"new",
"delegate",
")",
"{",
"drawable",
"previous",
"delegate",
"=",
"set",
"current",
"without",
"invalidate",
"(",
"new",
"delegate",
")",
";",
"invalidate",
"self",
"(",
")",
";",
"return",
"previous",
"delegate",
";",
"}"
] |
[
"for",
"each",
"matched",
"format",
",",
"calculate",
"a",
"weight",
"that",
"can",
"be",
"used",
"to",
"decide",
"which",
"match",
"is",
"best",
"the",
"weight",
"for",
"each",
"matched",
"format",
"is",
"the",
"sum",
"of",
"the",
"weights",
"for",
"all",
"matches",
"that",
"have",
"that",
"format"
] | [
"private",
"double",
"[",
"]",
"calculate",
"match",
"weights",
"(",
")",
"{",
"int",
"remaining",
"matches",
"=",
"matches",
"size",
"(",
")",
";",
"double",
"[",
"]",
"weights",
"=",
"new",
"double",
"[",
"matched",
"formats",
"size",
"(",
")",
"]",
";",
"for",
"(",
"timestamp",
"match",
"match",
":",
"matches",
")",
"{",
"for",
"(",
"int",
"matched",
"format",
"index",
"=",
"0",
";",
"matched",
"format",
"index",
"<",
"matched",
"formats",
"size",
"(",
")",
";",
"+",
"+",
"matched",
"format",
"index",
")",
"{",
"if",
"(",
"matched",
"formats",
"get",
"(",
"matched",
"format",
"index",
")",
"can",
"merge",
"with",
"(",
"match",
"timestamp",
"format",
")",
")",
"{",
"weights",
"[",
"matched",
"format",
"index",
"]",
"+",
"=",
"weight",
"for",
"match",
"(",
"match",
"preface",
")",
";",
"break",
";",
"}",
"+",
"+",
"matched",
"format",
"index",
";",
"}",
"/",
"/",
"the",
"highest",
"possible",
"weight",
"is",
"1",
",",
"so",
"if",
"the",
"difference",
"between",
"the",
"two",
"highest",
"weights",
"/",
"/",
"is",
"less",
"than",
"the",
"number",
"of",
"lines",
"remaining",
"then",
"the",
"leader",
"cannot",
"possibly",
"be",
"overtaken",
"if",
"(",
"find",
"difference",
"between",
"two",
"highest",
"weights",
"(",
"weights",
")",
">",
"-",
"-",
"remaining",
"matches",
")",
"{",
"break",
";",
"}",
"}",
"return",
"weights",
";",
"}"
] |
[
"static",
"factory",
"method",
":",
"to",
"be",
"used",
"when",
"a",
"new",
"execution",
"is",
"created",
"for",
"the",
"very",
"first",
"time",
"calling",
"this",
"will",
"make",
"sure",
"no",
"extra",
"db",
"fetches",
"are",
"needed",
"later",
"on",
",",
"as",
"all",
"collections",
"will",
"be",
"populated",
"with",
"empty",
"collections",
"if",
"they",
"would",
"be",
"null",
",",
"it",
"would",
"trigger",
"a",
"database",
"fetch",
"for",
"those",
"relationship",
"entities"
] | [
"public",
"static",
"execution",
"entity",
"impl",
"create",
"with",
"empty",
"relationship",
"collections",
"(",
")",
"{",
"execution",
"entity",
"impl",
"execution",
"=",
"new",
"execution",
"entity",
"impl",
"(",
")",
";",
"execution",
"executions",
"=",
"new",
"array",
"list",
"<",
"execution",
"entity",
"impl",
">",
"(",
"1",
")",
";",
"execution",
"tasks",
"=",
"new",
"array",
"list",
"<",
"task",
"entity",
">",
"(",
"1",
")",
";",
"execution",
"variable",
"instances",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"variable",
"instance",
"entity",
">",
"(",
"1",
")",
";",
"execution",
"jobs",
"=",
"new",
"array",
"list",
"<",
"job",
"entity",
">",
"(",
"1",
")",
";",
"execution",
"timer",
"jobs",
"=",
"new",
"array",
"list",
"<",
"timer",
"job",
"entity",
">",
"(",
"1",
")",
";",
"execution",
"event",
"subscriptions",
"=",
"new",
"array",
"list",
"<",
"event",
"subscription",
"entity",
">",
"(",
"1",
")",
";",
"execution",
"identity",
"links",
"=",
"new",
"array",
"list",
"<",
"identity",
"link",
"entity",
">",
"(",
"1",
")",
";",
"return",
"execution",
";",
"}"
] |
[
"gets",
"the",
"column",
"cardinality",
"for",
"all",
"of",
"the",
"given",
"range",
"values",
"may",
"reach",
"out",
"to",
"the",
"metrics",
"table",
"in",
"accumulo",
"to",
"retrieve",
"new",
"cache",
"elements"
] | [
"public",
"long",
"get",
"column",
"cardinality",
"(",
"string",
"schema",
",",
"string",
"table",
",",
"authorizations",
"auths",
",",
"string",
"family",
",",
"string",
"qualifier",
",",
"collection",
"<",
"range",
">",
"col",
"values",
")",
"throws",
"execution",
"exception",
"{",
"log",
"debug",
"(",
"\"",
"getting",
"cardinality",
"for",
"%",
"s",
":",
"%",
"s",
"\"",
",",
"family",
",",
"qualifier",
")",
";",
"/",
"/",
"collect",
"all",
"exact",
"accumulo",
"ranges",
",",
"i",
"e",
"single",
"value",
"entries",
"vs",
"a",
"full",
"scan",
"collection",
"<",
"cache",
"key",
">",
"exact",
"ranges",
"=",
"col",
"values",
"stream",
"(",
")",
"filter",
"(",
"column",
"cardinality",
"cache",
":",
":",
"is",
"exact",
")",
"map",
"(",
"range",
"-",
">",
"new",
"cache",
"key",
"(",
"schema",
",",
"table",
",",
"family",
",",
"qualifier",
",",
"range",
",",
"auths",
")",
")",
"collect",
"(",
"collectors",
"to",
"list",
"(",
")",
")",
";",
"log",
"debug",
"(",
"\"",
"column",
"values",
"contain",
"%",
"s",
"exact",
"ranges",
"of",
"%",
"s",
"\"",
",",
"exact",
"ranges",
"size",
"(",
")",
",",
"col",
"values",
"size",
"(",
")",
")",
";",
"/",
"/",
"sum",
"the",
"cardinalities",
"for",
"the",
"exact",
"-",
"value",
"ranges",
"/",
"/",
"this",
"is",
"where",
"the",
"reach",
"-",
"out",
"to",
"accumulo",
"occurs",
"for",
"all",
"ranges",
"that",
"have",
"not",
"/",
"/",
"previously",
"been",
"fetched",
"long",
"sum",
"=",
"cache",
"get",
"all",
"(",
"exact",
"ranges",
")",
"values",
"(",
")",
"stream",
"(",
")",
"map",
"to",
"long",
"(",
"long",
":",
":",
"long",
"value",
")",
"sum",
"(",
")",
";",
"/",
"/",
"if",
"these",
"collection",
"sizes",
"are",
"not",
"equal",
",",
"/",
"/",
"then",
"there",
"is",
"at",
"least",
"one",
"non",
"-",
"exact",
"range",
"if",
"(",
"exact",
"ranges",
"size",
"(",
")",
"!",
"=",
"col",
"values",
"size",
"(",
")",
")",
"{",
"/",
"/",
"for",
"each",
"range",
"in",
"the",
"column",
"value",
"for",
"(",
"range",
"range",
":",
"col",
"values",
")",
"{",
"/",
"/",
"if",
"this",
"range",
"is",
"not",
"exact",
"if",
"(",
"!",
"is",
"exact",
"(",
"range",
")",
")",
"{",
"/",
"/",
"then",
"get",
"the",
"value",
"for",
"this",
"range",
"using",
"the",
"single",
"-",
"value",
"cache",
"lookup",
"sum",
"+",
"=",
"cache",
"get",
"(",
"new",
"cache",
"key",
"(",
"schema",
",",
"table",
",",
"family",
",",
"qualifier",
",",
"range",
",",
"auths",
")",
")",
";",
"}",
"}",
"}",
"return",
"sum",
";",
"}"
] |
[
"determines",
"the",
"actual",
"strictness",
"in",
"the",
"following",
"importance",
"order",
":",
"1st",
"-",
"strictness",
"configured",
"when",
"declaring",
"stubbing",
";",
"2nd",
"-",
"strictness",
"configured",
"at",
"mock",
"level",
";",
"3rd",
"-",
"strictness",
"configured",
"at",
"test",
"level",
"(",
"rule",
",",
"mockito",
"session",
")"
] | [
"public",
"static",
"strictness",
"determine",
"strictness",
"(",
"stubbing",
"stubbing",
",",
"mock",
"creation",
"settings",
"mock",
"settings",
",",
"strictness",
"test",
"level",
"strictness",
")",
"{",
"if",
"(",
"stubbing",
"!",
"=",
"null",
"&",
"&",
"stubbing",
"get",
"strictness",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"stubbing",
"get",
"strictness",
"(",
")",
";",
"}",
"if",
"(",
"mock",
"settings",
"is",
"lenient",
"(",
")",
")",
"{",
"return",
"strictness",
"lenient",
";",
"}",
"return",
"test",
"level",
"strictness",
";",
"}"
] |
[
"returns",
"true",
"if",
"this",
"node",
"has",
"no",
"children"
] | [
"public",
"boolean",
"is",
"leaf",
"(",
")",
"{",
"return",
"true",
";",
"}"
] |
[
"returns",
"the",
"canonical",
"path",
"for",
"this",
"path",
",",
"by",
"repeatedly",
"replacing",
"symbolic",
"links",
"with",
"their",
"referents",
"analogous",
"to",
"realpath",
"(",
"3",
")"
] | [
"public",
"path",
"resolve",
"symbolic",
"links",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"file",
"system",
"resolve",
"symbolic",
"links",
"(",
"this",
")",
";",
"}"
] |
[
"creates",
"a",
"user",
"by",
"the",
"given",
"name"
] | [
"public",
"user",
"create",
"user",
"(",
"string",
"name",
")",
"{",
"user",
"user",
"=",
"users",
"by",
"name",
"get",
"(",
"name",
")",
";",
"if",
"(",
"user",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"likely",
"a",
"programming",
"error",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"attempted",
"to",
"create",
"the",
"same",
"user",
"more",
"than",
"once",
"\"",
")",
";",
"}",
"user",
"=",
"new",
"user",
"(",
"name",
",",
"user",
"write",
")",
";",
"users",
"by",
"name",
"put",
"(",
"name",
",",
"user",
")",
";",
"return",
"user",
";",
"}"
] |
[
"write",
"to",
"the",
"output",
"this",
"error"
] | [
"public",
"static",
"model",
"and",
"view",
"write",
"error",
"(",
"final",
"http",
"servlet",
"response",
"response",
",",
"final",
"string",
"error",
")",
"{",
"val",
"model",
"=",
"collection",
"utils",
"wrap",
"(",
"o",
"auth",
"2",
"0",
"constants",
"error",
",",
"error",
")",
";",
"val",
"mv",
"=",
"new",
"model",
"and",
"view",
"(",
"new",
"mapping",
"jackson",
"2",
"json",
"view",
"(",
"mapper",
")",
",",
"(",
"map",
")",
"model",
")",
";",
"mv",
"set",
"status",
"(",
"http",
"status",
"bad",
"request",
")",
";",
"response",
"set",
"status",
"(",
"http",
"status",
"bad",
"request",
"value",
"(",
")",
")",
";",
"return",
"mv",
";",
"}"
] |
[
"it",
"is",
"possible",
"to",
"delete",
"directories",
"without",
"the",
"proper",
"encryption",
"key",
"and",
"the",
"hierarchy",
"above",
"it"
] | [
"public",
"void",
"test",
"delete",
"encrypted",
"object",
"with",
"different",
"key",
"(",
")",
"throws",
"exception",
"{",
"/",
"/",
"require",
"unguarded",
"filesystem",
"(",
")",
";",
"path",
"path",
"a",
"b",
"c",
"=",
"path",
"(",
"\"",
"test",
"delete",
"encrypted",
"object",
"with",
"different",
"key",
"/",
"a",
"/",
"b",
"/",
"c",
"/",
"\"",
")",
";",
"path",
"path",
"a",
"b",
"=",
"path",
"a",
"b",
"c",
"get",
"parent",
"(",
")",
";",
"path",
"path",
"a",
"=",
"path",
"a",
"b",
"get",
"parent",
"(",
")",
";",
"assert",
"true",
"(",
"get",
"file",
"system",
"(",
")",
"mkdirs",
"(",
"path",
"a",
"b",
"c",
")",
")",
";",
"path",
"file",
"to",
"delete",
"=",
"new",
"path",
"(",
"path",
"a",
"b",
"c",
",",
"\"",
"filetobedeleted",
"txt",
"\"",
")",
";",
"write",
"then",
"read",
"file",
"(",
"file",
"to",
"delete",
",",
"test",
"file",
"len",
")",
";",
"fs",
"key",
"b",
"=",
"create",
"new",
"file",
"system",
"with",
"s",
"s",
"e",
"c",
"key",
"(",
"key",
"4",
")",
";",
"if",
"(",
"status",
"probes",
"check",
"s",
"3",
"(",
"fs",
"key",
"b",
",",
"file",
"to",
"delete",
")",
")",
"{",
"intercept",
"(",
"access",
"denied",
"exception",
"class",
",",
"service",
"amazon",
"s3",
"status",
"code",
"403",
",",
"(",
")",
"-",
">",
"fs",
"key",
"b",
"delete",
"(",
"file",
"to",
"delete",
",",
"false",
")",
")",
";",
"}",
"else",
"{",
"fs",
"key",
"b",
"delete",
"(",
"file",
"to",
"delete",
",",
"false",
")",
";",
"}",
"/",
"/",
"this",
"is",
"possible",
"fs",
"key",
"b",
"delete",
"(",
"path",
"a",
"b",
"c",
",",
"true",
")",
";",
"fs",
"key",
"b",
"delete",
"(",
"path",
"a",
"b",
",",
"true",
")",
";",
"fs",
"key",
"b",
"delete",
"(",
"path",
"a",
",",
"true",
")",
";",
"assert",
"path",
"does",
"not",
"exist",
"(",
"\"",
"expected",
"recursive",
"delete",
"\"",
",",
"file",
"to",
"delete",
")",
";",
"}"
] |
[
"method",
"used",
"to",
"determine",
"whether",
"the",
"{",
"@",
"link",
"node",
"health",
"script",
"runner",
"}",
"should",
"be",
"started",
"or",
"not",
"returns",
"true",
"if",
"following",
"conditions",
"are",
"met",
":",
"path",
"to",
"node",
"health",
"check",
"script",
"is",
"not",
"empty",
"node",
"health",
"check",
"script",
"file",
"exists"
] | [
"static",
"boolean",
"should",
"run",
"(",
"string",
"script",
",",
"string",
"health",
"script",
")",
"{",
"if",
"(",
"health",
"script",
"=",
"=",
"null",
"|",
"|",
"health",
"script",
"trim",
"(",
")",
"is",
"empty",
"(",
")",
")",
"{",
"log",
"info",
"(",
"\"",
"missing",
"location",
"for",
"the",
"node",
"health",
"check",
"script",
"\\",
"\"",
"{",
"}",
"\\",
"\"",
"\"",
",",
"script",
")",
";",
"return",
"false",
";",
"}",
"file",
"f",
"=",
"new",
"file",
"(",
"health",
"script",
")",
";",
"if",
"(",
"!",
"f",
"exists",
"(",
")",
")",
"{",
"log",
"warn",
"(",
"\"",
"file",
"{",
"}",
"for",
"script",
"\\",
"\"",
"{",
"}",
"\\",
"\"",
"does",
"not",
"exist",
"\"",
",",
"health",
"script",
",",
"script",
")",
";",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"file",
"util",
"can",
"execute",
"(",
"f",
")",
")",
"{",
"log",
"warn",
"(",
"\"",
"file",
"{",
"}",
"for",
"script",
"\\",
"\"",
"{",
"}",
"\\",
"\"",
"can",
"not",
"be",
"executed",
"\"",
",",
"health",
"script",
",",
"script",
")",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}"
] |
[
"getter",
"for",
"i"
] | [
"public",
"integer",
"get",
"i",
"(",
")",
"{",
"return",
"i",
";",
"}"
] |
[
"send",
"out",
"notification",
"this",
"item",
"has",
"just",
"been",
"created"
] | [
"void",
"fire",
"item",
"created",
"(",
")",
"{",
"file",
"system",
"get",
"listener",
"(",
")",
"item",
"created",
"(",
"get",
"parent",
"path",
"(",
")",
",",
"get",
"name",
"(",
")",
")",
";",
"}"
] |
[
"container",
"start",
"events",
"after",
"application",
"running"
] | [
"public",
"void",
"test",
"application",
"init",
"2",
"(",
")",
"{",
"wrapped",
"application",
"wa",
"=",
"null",
";",
"try",
"{",
"wa",
"=",
"new",
"wrapped",
"application",
"(",
"2",
",",
"314159265358979l",
",",
"\"",
"yak",
"\"",
",",
"3",
")",
";",
"wa",
"init",
"application",
"(",
")",
";",
"wa",
"init",
"container",
"(",
"0",
")",
";",
"assert",
"equals",
"(",
"application",
"state",
"initing",
",",
"wa",
"app",
"get",
"application",
"state",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"1",
",",
"wa",
"app",
"get",
"containers",
"(",
")",
"size",
"(",
")",
")",
";",
"wa",
"application",
"inited",
"(",
")",
";",
"assert",
"equals",
"(",
"application",
"state",
"running",
",",
"wa",
"app",
"get",
"application",
"state",
"(",
")",
")",
";",
"verify",
"(",
"wa",
"container",
"bus",
")",
"handle",
"(",
"arg",
"that",
"(",
"new",
"container",
"init",
"matcher",
"(",
"wa",
"containers",
"get",
"(",
"0",
")",
"get",
"container",
"id",
"(",
")",
")",
")",
")",
";",
"wa",
"init",
"container",
"(",
"1",
")",
";",
"wa",
"init",
"container",
"(",
"2",
")",
";",
"assert",
"equals",
"(",
"application",
"state",
"running",
",",
"wa",
"app",
"get",
"application",
"state",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"3",
",",
"wa",
"app",
"get",
"containers",
"(",
")",
"size",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"wa",
"containers",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"verify",
"(",
"wa",
"container",
"bus",
")",
"handle",
"(",
"arg",
"that",
"(",
"new",
"container",
"init",
"matcher",
"(",
"wa",
"containers",
"get",
"(",
"i",
")",
"get",
"container",
"id",
"(",
")",
")",
")",
")",
";",
"}",
"}",
"finally",
"{",
"if",
"(",
"wa",
"!",
"=",
"null",
")",
"wa",
"finished",
"(",
")",
";",
"}",
"}"
] |
[
"return",
"a",
"{",
"@",
"link",
"file",
"cache",
"entry",
"}",
"with",
"information",
"about",
"the",
"requested",
"file",
"specified",
"by",
"the",
"fsrl",
",",
"forcing",
"a",
"readcache",
"add",
"of",
"the",
"file",
"is",
"it",
"is",
"missing",
"from",
"the",
"cache",
"never",
"returns",
"null",
",",
"instead",
"throws",
"i",
"o",
"exception"
] | [
"private",
"file",
"cache",
"entry",
"get",
"cache",
"file",
"(",
"fsrl",
"fsrl",
",",
"task",
"monitor",
"monitor",
")",
"throws",
"i",
"o",
"exception",
",",
"cancelled",
"exception",
"{",
"if",
"(",
"fsrl",
"get",
"path",
"(",
")",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"invalid",
"fsrl",
"specified",
":",
"\"",
"+",
"fsrl",
")",
";",
"}",
"string",
"md",
"5",
"=",
"fsrl",
"get",
"m",
"d",
"5",
"(",
")",
";",
"if",
"(",
"md",
"5",
"=",
"=",
"null",
"&",
"&",
"fsrl",
"get",
"nesting",
"depth",
"(",
")",
"=",
"=",
"1",
")",
"{",
"/",
"/",
"if",
"this",
"is",
"a",
"real",
"file",
"on",
"the",
"local",
"file",
"system",
",",
"and",
"the",
"fsrl",
"doesn",
"'",
"t",
"specify",
"/",
"/",
"its",
"md5",
",",
"try",
"to",
"fetch",
"the",
"md5",
"from",
"the",
"fingerprint",
"cache",
"based",
"on",
"its",
"/",
"/",
"size",
"and",
"lastmod",
"time",
",",
"which",
"will",
"help",
"us",
"locate",
"the",
"file",
"in",
"the",
"cache",
"file",
"f",
"=",
"local",
"f",
"s",
"get",
"local",
"file",
"(",
"fsrl",
")",
";",
"if",
"(",
"f",
"is",
"file",
"(",
")",
")",
"{",
"md",
"5",
"=",
"file",
"fingerprint",
"cache",
"get",
"m",
"d",
"5",
"(",
"f",
"get",
"path",
"(",
")",
",",
"f",
"last",
"modified",
"(",
")",
",",
"f",
"length",
"(",
")",
")",
";",
"}",
"}",
"f",
"s",
"r",
"l",
"root",
"fs",
"root",
"=",
"fsrl",
"get",
"f",
"s",
"(",
")",
";",
"file",
"cache",
"entry",
"result",
"=",
"(",
"md",
"5",
"!",
"=",
"null",
")",
"?",
"file",
"cache",
"get",
"file",
"(",
"md",
"5",
")",
":",
"null",
";",
"if",
"(",
"result",
"=",
"=",
"null",
")",
"{",
"try",
"(",
"file",
"system",
"ref",
"ref",
"=",
"get",
"filesystem",
"(",
"fs",
"root",
",",
"monitor",
")",
")",
"{",
"g",
"file",
"system",
"fs",
"=",
"ref",
"get",
"filesystem",
"(",
")",
";",
"g",
"file",
"gfile",
"=",
"fs",
"lookup",
"(",
"fsrl",
"get",
"path",
"(",
")",
")",
";",
"if",
"(",
"gfile",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"file",
"[",
"\"",
"+",
"fsrl",
"+",
"\"",
"]",
"not",
"found",
"in",
"filesystem",
"[",
"\"",
"+",
"fs",
"get",
"f",
"s",
"r",
"l",
"(",
")",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"/",
"/",
"its",
"possible",
"the",
"filesystem",
"added",
"the",
"file",
"to",
"the",
"cache",
"when",
"it",
"was",
"mounted",
",",
"/",
"/",
"or",
"that",
"we",
"now",
"have",
"a",
"better",
"fsrl",
"with",
"a",
"md5",
"value",
"that",
"we",
"can",
"use",
"to",
"/",
"/",
"search",
"the",
"file",
"cache",
"if",
"(",
"gfile",
"get",
"f",
"s",
"r",
"l",
"(",
")",
"get",
"m",
"d",
"5",
"(",
")",
"!",
"=",
"null",
")",
"{",
"result",
"=",
"file",
"cache",
"get",
"file",
"(",
"gfile",
"get",
"f",
"s",
"r",
"l",
"(",
")",
"get",
"m",
"d",
"5",
"(",
")",
")",
";",
"if",
"(",
"result",
"!",
"=",
"null",
")",
"{",
"return",
"result",
";",
"}",
"}",
"try",
"(",
"input",
"stream",
"data",
"stream",
"=",
"fs",
"get",
"input",
"stream",
"(",
"gfile",
",",
"monitor",
")",
")",
"{",
"if",
"(",
"data",
"stream",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"unable",
"to",
"get",
"datastream",
"for",
"\"",
"+",
"fsrl",
")",
";",
"}",
"monitor",
"set",
"message",
"(",
"\"",
"caching",
"\"",
"+",
"gfile",
"get",
"name",
"(",
")",
")",
";",
"monitor",
"initialize",
"(",
"gfile",
"get",
"length",
"(",
")",
")",
";",
"result",
"=",
"file",
"cache",
"add",
"stream",
"(",
"data",
"stream",
",",
"monitor",
")",
";",
"if",
"(",
"md",
"5",
"!",
"=",
"null",
"&",
"&",
"!",
"md",
"5",
"equals",
"(",
"result",
"md",
"5",
")",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"error",
"reading",
"file",
",",
"md5",
"has",
"changed",
":",
"\"",
"+",
"fsrl",
"+",
"\"",
",",
"md",
"5",
"now",
"\"",
"+",
"result",
"md",
"5",
")",
";",
"}",
"}",
"if",
"(",
"fsrl",
"get",
"nesting",
"depth",
"(",
")",
"=",
"=",
"1",
")",
"{",
"/",
"/",
"if",
"this",
"is",
"a",
"real",
"file",
"on",
"the",
"local",
"filesystem",
",",
"now",
"that",
"we",
"have",
"its",
"/",
"/",
"md5",
",",
"save",
"it",
"in",
"the",
"fingerprint",
"cache",
"so",
"it",
"can",
"be",
"found",
"later",
"file",
"f",
"=",
"local",
"f",
"s",
"get",
"local",
"file",
"(",
"fsrl",
")",
";",
"if",
"(",
"f",
"is",
"file",
"(",
")",
")",
"{",
"file",
"fingerprint",
"cache",
"add",
"(",
"f",
"get",
"path",
"(",
")",
",",
"result",
"md",
"5",
",",
"f",
"last",
"modified",
"(",
")",
",",
"f",
"length",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"return",
"result",
";",
"}"
] |
[
"if",
"true",
",",
"this",
"component",
"tree",
"will",
"only",
"preallocate",
"mount",
"specs",
"that",
"are",
"enabled",
"for",
"preallocation",
"with",
"{",
"@",
"link",
"mount",
"spec",
"#",
"can",
"preallocate",
"(",
")",
"}",
"if",
"false",
",",
"it",
"preallocates",
"all",
"mount",
"content"
] | [
"public",
"builder",
"should",
"preallocate",
"mount",
"content",
"per",
"mount",
"spec",
"(",
"boolean",
"preallocate",
"per",
"mount",
"spec",
")",
"{",
"should",
"preallocate",
"per",
"mount",
"spec",
"=",
"preallocate",
"per",
"mount",
"spec",
";",
"return",
"this",
";",
"}"
] |
[
"gets",
"the",
"dex",
"file",
"magic",
"number",
"corresponding",
"to",
"this",
"instance"
] | [
"public",
"string",
"get",
"magic",
"(",
")",
"{",
"return",
"dex",
"format",
"api",
"to",
"magic",
"(",
"target",
"api",
"level",
")",
";",
"}"
] |
[
"customize",
"response",
"specification"
] | [
"public",
"upload",
"file",
"with",
"required",
"file",
"oper",
"resp",
"spec",
"(",
"consumer",
"<",
"response",
"spec",
"builder",
">",
"resp",
"spec",
"customizer",
")",
"{",
"resp",
"spec",
"customizer",
"accept",
"(",
"resp",
"spec",
")",
";",
"return",
"this",
";",
"}"
] |
[
"the",
"strength",
"of",
"the",
"value",
"type",
"in",
"each",
"entry"
] | [
"strength",
"value",
"strength",
"(",
")",
";"
] |
[
"records",
"that",
"the",
"given",
"interface",
"extends",
"the",
"given",
"interfaces",
"this",
"information",
"is",
"useful",
"reference",
"to",
"double",
"-",
"check",
"{",
"@",
"link",
"#",
"missing",
"implemented",
"interface",
"}",
"s",
"without",
"reading",
"and",
"parsing",
"class",
"files",
",",
"specifically",
"if",
"default",
"methods",
"are",
"defined",
"in",
"interfaces",
"that",
"a",
"missing",
"interface",
"transitively",
"extends"
] | [
"default",
"void",
"record",
"extended",
"interfaces",
"(",
"string",
"origin",
",",
"string",
"targets",
")",
"{",
"}"
] |
[
"get",
"the",
"api",
"cilent"
] | [
"public",
"api",
"client",
"get",
"api",
"client",
"(",
")",
"{",
"return",
"api",
"client",
";",
"}"
] |
[
"set",
"the",
"additional",
"(",
"undeclared",
")",
"property",
"with",
"the",
"specified",
"name",
"and",
"value",
"if",
"the",
"property",
"does",
"not",
"already",
"exist",
",",
"create",
"it",
"otherwise",
"replace",
"it"
] | [
"public",
"zebra",
"put",
"additional",
"property",
"(",
"string",
"key",
",",
"object",
"value",
")",
"{",
"if",
"(",
"this",
"additional",
"properties",
"=",
"=",
"null",
")",
"{",
"this",
"additional",
"properties",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"object",
">",
"(",
")",
";",
"}",
"this",
"additional",
"properties",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] |
[
"get",
"history",
"{",
"@",
"link",
"resource",
"skyline",
"}",
"from",
"{",
"@",
"link",
"skyline",
"store",
"}",
"this",
"function",
"supports",
"the",
"following",
"special",
"wildcard",
"operations",
"regarding",
"{",
"@",
"link",
"recurrence",
"id",
"}",
":",
"if",
"the",
"{",
"@",
"code",
"pipeline",
"id",
"}",
"is",
"\"",
"\"",
",",
"it",
"will",
"return",
"all",
"entries",
"in",
"the",
"store",
";",
"else",
",",
"if",
"the",
"{",
"@",
"code",
"run",
"id",
"}",
"is",
"\"",
"\"",
",",
"it",
"will",
"return",
"all",
"{",
"@",
"link",
"resource",
"skyline",
"}",
"s",
"belonging",
"to",
"the",
"{",
"@",
"code",
"pipeline",
"id",
"}",
";",
"else",
",",
"it",
"will",
"return",
"all",
"{",
"@",
"link",
"resource",
"skyline",
"}",
"s",
"belonging",
"to",
"the",
"{",
"{",
"@",
"code",
"pipeline",
"id",
"}",
",",
"{",
"@",
"code",
"run",
"id",
"}",
"}",
"if",
"the",
"{",
"@",
"link",
"recurrence",
"id",
"}",
"does",
"not",
"exist",
",",
"it",
"will",
"not",
"do",
"anything"
] | [
"public",
"string",
"get",
"history",
"resource",
"skyline",
"(",
"@",
"path",
"param",
"(",
"\"",
"pipeline",
"id",
"\"",
")",
"string",
"pipeline",
"id",
",",
"@",
"path",
"param",
"(",
"\"",
"run",
"id",
"\"",
")",
"string",
"run",
"id",
")",
"throws",
"skyline",
"store",
"exception",
"{",
"recurrence",
"id",
"recurrence",
"id",
"=",
"new",
"recurrence",
"id",
"(",
"pipeline",
"id",
",",
"run",
"id",
")",
";",
"map",
"<",
"recurrence",
"id",
",",
"list",
"<",
"resource",
"skyline",
">",
">",
"job",
"history",
"=",
"skyline",
"store",
"get",
"history",
"(",
"recurrence",
"id",
")",
";",
"final",
"string",
"skyline",
"=",
"gson",
"to",
"json",
"(",
"job",
"history",
",",
"skyline",
"store",
"type",
")",
";",
"logger",
"debug",
"(",
"\"",
"query",
"the",
"skyline",
"store",
"for",
"recurrence",
"id",
":",
"{",
"}",
"\"",
"+",
"recurrence",
"id",
")",
";",
"return",
"skyline",
";",
"}"
] |
[
"test",
"pattern",
"analyzer",
"when",
"it",
"is",
"configured",
"with",
"a",
"non",
"-",
"word",
"pattern"
] | [
"public",
"void",
"test",
"non",
"word",
"pattern",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"split",
"on",
"non",
"-",
"letter",
"pattern",
",",
"do",
"not",
"lowercase",
",",
"no",
"stopwords",
"pattern",
"analyzer",
"a",
"=",
"new",
"pattern",
"analyzer",
"(",
"pattern",
"compile",
"(",
"\"",
"\\",
"\\",
"w",
"+",
"\"",
")",
",",
"false",
",",
"null",
")",
";",
"assert",
"analyzes",
"to",
"(",
"a",
",",
"\"",
"the",
"quick",
"brown",
"fox",
",",
"the",
"abcd",
"1",
"2",
"3",
"4",
"(",
"56",
"78",
")",
"dc",
"\"",
",",
"new",
"string",
"[",
"]",
"{",
"\"",
"the",
"\"",
",",
"\"",
"quick",
"\"",
",",
"\"",
"brown",
"\"",
",",
"\"",
"fox",
"\"",
",",
"\"",
"the",
"\"",
",",
"\"",
"abcd",
"1",
"2",
"3",
"4",
"\"",
",",
"\"",
"56",
"\"",
",",
"\"",
"78",
"\"",
",",
"\"",
"dc",
"\"",
"}",
")",
";",
"/",
"/",
"split",
"on",
"non",
"-",
"letter",
"pattern",
",",
"lowercase",
",",
"english",
"stopwords",
"pattern",
"analyzer",
"b",
"=",
"new",
"pattern",
"analyzer",
"(",
"pattern",
"compile",
"(",
"\"",
"\\",
"\\",
"w",
"+",
"\"",
")",
",",
"true",
",",
"english",
"analyzer",
"english",
"stop",
"words",
"set",
")",
";",
"assert",
"analyzes",
"to",
"(",
"b",
",",
"\"",
"the",
"quick",
"brown",
"fox",
",",
"the",
"abcd",
"1",
"2",
"3",
"4",
"(",
"56",
"78",
")",
"dc",
"\"",
",",
"new",
"string",
"[",
"]",
"{",
"\"",
"quick",
"\"",
",",
"\"",
"brown",
"\"",
",",
"\"",
"fox",
"\"",
",",
"\"",
"abcd",
"1",
"2",
"3",
"4",
"\"",
",",
"\"",
"56",
"\"",
",",
"\"",
"78",
"\"",
",",
"\"",
"dc",
"\"",
"}",
")",
";",
"}"
] |
[
"creates",
"a",
"new",
"single",
"-",
"byte",
"big",
"-",
"endian",
"buffer",
"that",
"holds",
"the",
"specified",
"boolean",
"value"
] | [
"public",
"static",
"byte",
"buf",
"copy",
"boolean",
"(",
"boolean",
"value",
")",
"{",
"byte",
"buf",
"buf",
"=",
"buffer",
"(",
"1",
")",
";",
"buf",
"write",
"boolean",
"(",
"value",
")",
";",
"return",
"buf",
";",
"}"
] |
[
"determine",
"whether",
"the",
"given",
"candidate",
"name",
"matches",
"the",
"bean",
"name",
"or",
"the",
"aliases",
"stored",
"in",
"this",
"bean",
"definition"
] | [
"protected",
"boolean",
"matches",
"bean",
"name",
"(",
"string",
"bean",
"name",
",",
"@",
"nullable",
"string",
"candidate",
"name",
")",
"{",
"return",
"(",
"candidate",
"name",
"!",
"=",
"null",
"&",
"&",
"(",
"candidate",
"name",
"equals",
"(",
"bean",
"name",
")",
"|",
"|",
"object",
"utils",
"contains",
"element",
"(",
"get",
"aliases",
"(",
"bean",
"name",
")",
",",
"candidate",
"name",
")",
")",
")",
";",
"}"
] |
[
"paints",
"figure",
"differently",
"depends",
"on",
"the",
"whether",
"the",
"figure",
"has",
"focus",
"or",
"is",
"selected"
] | [
"protected",
"void",
"paint",
"figure",
"(",
"graphics",
"graphics",
")",
"{",
"if",
"(",
"selected",
")",
"{",
"graphics",
"push",
"state",
"(",
")",
";",
"graphics",
"set",
"background",
"color",
"(",
"u",
"i",
"utils",
"get",
"color",
"registry",
"(",
")",
"get",
"(",
"e",
"r",
"d",
"u",
"i",
"constants",
"color",
"erd",
"attr",
"foreground",
")",
")",
";",
"graphics",
"fill",
"round",
"rectangle",
"(",
"get",
"selection",
"rectangle",
"(",
")",
",",
"3",
",",
"3",
")",
";",
"graphics",
"pop",
"state",
"(",
")",
";",
"graphics",
"set",
"foreground",
"color",
"(",
"u",
"i",
"utils",
"get",
"color",
"registry",
"(",
")",
"get",
"(",
"e",
"r",
"d",
"u",
"i",
"constants",
"color",
"erd",
"diagram",
"background",
")",
")",
";",
"}",
"super",
"paint",
"figure",
"(",
"graphics",
")",
";",
"}"
] |
[
"sets",
"the",
"fuzzy",
"rewrite",
"parameter",
"controlling",
"how",
"the",
"fuzzy",
"query",
"will",
"get",
"rewritten"
] | [
"public",
"match",
"query",
"builder",
"fuzzy",
"rewrite",
"(",
"string",
"fuzzy",
"rewrite",
")",
"{",
"this",
"fuzzy",
"rewrite",
"=",
"fuzzy",
"rewrite",
";",
"return",
"this",
";",
"}"
] |
[
"normalizes",
"key",
"-",
"value",
"properties",
"from",
"yaml",
"in",
"the",
"normalized",
"format",
"of",
"the",
"table",
"api"
] | [
"public",
"static",
"descriptor",
"properties",
"normalize",
"yaml",
"(",
"map",
"<",
"string",
",",
"object",
">",
"yaml",
"map",
")",
"{",
"final",
"map",
"<",
"string",
",",
"string",
">",
"normalized",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"yaml",
"map",
"for",
"each",
"(",
"(",
"k",
",",
"v",
")",
"-",
">",
"normalize",
"yaml",
"object",
"(",
"normalized",
",",
"k",
",",
"v",
")",
")",
";",
"final",
"descriptor",
"properties",
"properties",
"=",
"new",
"descriptor",
"properties",
"(",
"true",
")",
";",
"properties",
"put",
"properties",
"(",
"normalized",
")",
";",
"return",
"properties",
";",
"}"
] |
[
"implementing",
"classes",
"should",
"invoke",
"this",
"method",
"once",
"their",
"service",
"has",
"started",
"it",
"will",
"cause",
"the",
"service",
"to",
"transition",
"from",
"{",
"@",
"link",
"state",
"#",
"starting",
"}",
"to",
"{",
"@",
"link",
"state",
"#",
"running",
"}"
] | [
"protected",
"final",
"void",
"notify",
"started",
"(",
")",
"{",
"monitor",
"enter",
"(",
")",
";",
"try",
"{",
"/",
"/",
"we",
"have",
"to",
"examine",
"the",
"internal",
"state",
"of",
"the",
"snapshot",
"here",
"to",
"properly",
"handle",
"the",
"stop",
"/",
"/",
"while",
"starting",
"case",
"if",
"(",
"snapshot",
"state",
"!",
"=",
"starting",
")",
"{",
"illegal",
"state",
"exception",
"failure",
"=",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"cannot",
"notify",
"started",
"(",
")",
"when",
"the",
"service",
"is",
"\"",
"+",
"snapshot",
"state",
")",
";",
"notify",
"failed",
"(",
"failure",
")",
";",
"throw",
"failure",
";",
"}",
"if",
"(",
"snapshot",
"shutdown",
"when",
"startup",
"finishes",
")",
"{",
"snapshot",
"=",
"new",
"state",
"snapshot",
"(",
"stopping",
")",
";",
"/",
"/",
"we",
"don",
"'",
"t",
"call",
"listeners",
"here",
"because",
"we",
"already",
"did",
"that",
"when",
"we",
"set",
"the",
"/",
"/",
"shutdown",
"when",
"startup",
"finishes",
"flag",
"do",
"stop",
"(",
")",
";",
"}",
"else",
"{",
"snapshot",
"=",
"new",
"state",
"snapshot",
"(",
"running",
")",
";",
"enqueue",
"running",
"event",
"(",
")",
";",
"}",
"}",
"finally",
"{",
"monitor",
"leave",
"(",
")",
";",
"dispatch",
"listener",
"events",
"(",
")",
";",
"}",
"}"
] |
[
"stores",
"a",
"string",
"array",
"in",
"the",
"table",
"at",
"the",
"given",
"row",
"and",
"column",
"note",
"-",
"all",
"values",
"in",
"a",
"given",
"column",
"must",
"be",
"of",
"the",
"same",
"type"
] | [
"public",
"void",
"put",
"string",
"array",
"(",
"int",
"row",
",",
"int",
"col",
",",
"string",
"[",
"]",
"value",
")",
"{",
"if",
"(",
"col",
">",
"=",
"data",
"columns",
"length",
")",
"{",
"grow",
"table",
"(",
"col",
"+",
"1",
")",
";",
"}",
"string",
"array",
"array",
"saa",
"=",
"null",
";",
"if",
"(",
"data",
"columns",
"[",
"col",
"]",
"=",
"=",
"null",
")",
"{",
"saa",
"=",
"new",
"string",
"array",
"array",
"(",
")",
";",
"data",
"columns",
"[",
"col",
"]",
"=",
"saa",
";",
"}",
"else",
"{",
"saa",
"=",
"(",
"string",
"array",
"array",
")",
"data",
"columns",
"[",
"col",
"]",
";",
"}",
"saa",
"put",
"(",
"row",
",",
"value",
")",
";",
"}"
] |
[
"get",
"namespace",
"number"
] | [
"public",
"big",
"decimal",
"get",
"namespace",
"number",
"(",
")",
"{",
"return",
"namespace",
"number",
";",
"}"
] |
[
"returns",
"the",
"specific",
"hash"
] | [
"public",
"long",
"get",
"specific",
"hash",
"(",
")",
"{",
"return",
"record",
"get",
"long",
"value",
"(",
"specific",
"hash",
"col",
")",
";",
"}"
] |
[
"begin",
"a",
"load",
"with",
"glide",
"that",
"will",
"tied",
"to",
"the",
"give",
"{",
"@",
"link",
"androidx",
"fragment",
"app",
"fragment",
"activity",
"}",
"'",
"s",
"lifecycle",
"and",
"that",
"uses",
"the",
"given",
"{",
"@",
"link",
"androidx",
"fragment",
"app",
"fragment",
"activity",
"}",
"'",
"s",
"default",
"options"
] | [
"public",
"static",
"request",
"manager",
"with",
"(",
"@",
"non",
"null",
"fragment",
"activity",
"activity",
")",
"{",
"return",
"get",
"retriever",
"(",
"activity",
")",
"get",
"(",
"activity",
")",
";",
"}"
] |
[
"sets",
"the",
"non",
"-",
"null",
"authority"
] | [
"public",
"client",
"transport",
"options",
"set",
"authority",
"(",
"string",
"authority",
")",
"{",
"this",
"authority",
"=",
"preconditions",
"check",
"not",
"null",
"(",
"authority",
",",
"\"",
"authority",
"\"",
")",
";",
"return",
"this",
";",
"}"
] |
[
"get",
"the",
"fs",
"volume",
"on",
"the",
"given",
"base",
"path"
] | [
"public",
"static",
"fs",
"volume",
"impl",
"get",
"volume",
"(",
"data",
"node",
"dn",
",",
"file",
"base",
"path",
")",
"throws",
"i",
"o",
"exception",
"{",
"try",
"(",
"fs",
"dataset",
"spi",
"fs",
"volume",
"references",
"volumes",
"=",
"dn",
"get",
"f",
"s",
"dataset",
"(",
")",
"get",
"fs",
"volume",
"references",
"(",
")",
")",
"{",
"for",
"(",
"fs",
"volume",
"spi",
"vol",
":",
"volumes",
")",
"{",
"if",
"(",
"new",
"file",
"(",
"vol",
"get",
"base",
"u",
"r",
"i",
"(",
")",
")",
"equals",
"(",
"base",
"path",
")",
")",
"{",
"return",
"(",
"fs",
"volume",
"impl",
")",
"vol",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}"
] |
[
"checks",
"whether",
"the",
"document",
"contains",
"a",
"value",
"for",
"the",
"provided",
"path"
] | [
"public",
"boolean",
"has",
"field",
"(",
"string",
"path",
")",
"{",
"return",
"has",
"field",
"(",
"path",
",",
"false",
")",
";",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.