docstring_tokens
list | code_tokens
list |
---|---|
[
"test",
"the",
"property",
"'",
"prefix",
"string",
"'"
]
| [
"public",
"void",
"prefix",
"string",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"prefix",
"string",
"}"
]
|
[
"gets",
"http",
"servlet",
"request",
"geo",
"location"
]
| [
"public",
"static",
"geo",
"location",
"request",
"get",
"http",
"servlet",
"request",
"geo",
"location",
"from",
"request",
"context",
"(",
")",
"{",
"val",
"servlet",
"request",
"=",
"get",
"http",
"servlet",
"request",
"from",
"external",
"webflow",
"context",
"(",
")",
";",
"return",
"get",
"http",
"servlet",
"request",
"geo",
"location",
"(",
"servlet",
"request",
")",
";",
"}"
]
|
[
"determine",
"the",
"persistence",
"unit",
"info",
"to",
"use",
"for",
"the",
"entity",
"manager",
"factory",
"created",
"by",
"this",
"bean",
"the",
"default",
"implementation",
"reads",
"in",
"all",
"persistence",
"unit",
"infos",
"from",
"{",
"@",
"code",
"persistence",
"xml",
"}",
",",
"as",
"defined",
"in",
"the",
"jpa",
"specification",
"if",
"no",
"entity",
"manager",
"name",
"was",
"specified",
",",
"it",
"takes",
"the",
"first",
"info",
"in",
"the",
"array",
"as",
"returned",
"by",
"the",
"reader",
"otherwise",
",",
"it",
"checks",
"for",
"a",
"matching",
"name"
]
| [
"protected",
"persistence",
"unit",
"info",
"determine",
"persistence",
"unit",
"info",
"(",
"persistence",
"unit",
"manager",
"persistence",
"unit",
"manager",
")",
"{",
"if",
"(",
"get",
"persistence",
"unit",
"name",
"(",
")",
"!",
"=",
"null",
")",
"{",
"return",
"persistence",
"unit",
"manager",
"obtain",
"persistence",
"unit",
"info",
"(",
"get",
"persistence",
"unit",
"name",
"(",
")",
")",
";",
"}",
"else",
"{",
"return",
"persistence",
"unit",
"manager",
"obtain",
"default",
"persistence",
"unit",
"info",
"(",
")",
";",
"}",
"}"
]
|
[
"creates",
"a",
"human",
"-",
"friendly",
"representation",
"of",
"the",
"collector",
"name",
"internal",
"bucket",
"collectors",
"use",
"the",
"aggregation",
"name",
"in",
"their",
"to",
"string",
"(",
")",
"method",
",",
"which",
"makes",
"the",
"profiled",
"output",
"a",
"bit",
"nicer"
]
| [
"private",
"string",
"derive",
"collector",
"name",
"(",
"collector",
"c",
")",
"{",
"string",
"s",
"=",
"c",
"get",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
";",
"/",
"/",
"muti",
"collector",
"which",
"wraps",
"multiple",
"bucket",
"collectors",
"is",
"generated",
"/",
"/",
"via",
"an",
"anonymous",
"class",
",",
"so",
"this",
"corrects",
"the",
"lack",
"of",
"a",
"name",
"by",
"/",
"/",
"asking",
"the",
"enclosing",
"class",
"if",
"(",
"s",
"equals",
"(",
"\"",
"\"",
")",
")",
"{",
"s",
"=",
"c",
"get",
"class",
"(",
")",
"get",
"enclosing",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
";",
"}",
"/",
"/",
"aggregation",
"collector",
"to",
"string",
"(",
")",
"'",
"s",
"include",
"the",
"user",
"-",
"defined",
"agg",
"name",
"if",
"(",
"reason",
"equals",
"(",
"collector",
"result",
"reason",
"aggregation",
")",
"|",
"|",
"reason",
"equals",
"(",
"collector",
"result",
"reason",
"aggregation",
"global",
")",
")",
"{",
"s",
"+",
"=",
"\"",
":",
"[",
"\"",
"+",
"c",
"to",
"string",
"(",
")",
"+",
"\"",
"]",
"\"",
";",
"}",
"return",
"s",
";",
"}"
]
|
[
"enables",
"untrusted",
"alts",
"for",
"testing",
"if",
"this",
"function",
"is",
"called",
",",
"we",
"will",
"not",
"check",
"whether",
"alts",
"is",
"running",
"on",
"google",
"cloud",
"platform"
]
| [
"public",
"builder",
"enable",
"untrusted",
"alts",
"for",
"testing",
"(",
")",
"{",
"enable",
"untrusted",
"alts",
"=",
"true",
";",
"return",
"this",
";",
"}"
]
|
[
"returns",
"a",
"hash",
"function",
"implementing",
"the",
"message",
"authentication",
"code",
"(",
"mac",
")",
"algorithm",
",",
"using",
"the",
"sha",
"-",
"256",
"(",
"256",
"hash",
"bits",
")",
"hash",
"function",
"and",
"the",
"given",
"secret",
"key"
]
| [
"public",
"static",
"hash",
"function",
"hmac",
"sha",
"2",
"5",
"6",
"(",
"key",
"key",
")",
"{",
"return",
"new",
"mac",
"hash",
"function",
"(",
"\"",
"hmac",
"s",
"h",
"a",
"2",
"5",
"6",
"\"",
",",
"key",
",",
"hmac",
"to",
"string",
"(",
"\"",
"hmac",
"sha",
"2",
"5",
"6",
"\"",
",",
"key",
")",
")",
";",
"}"
]
|
[
"getter",
"for",
"the",
"input",
"source"
]
| [
"public",
"input",
"source",
"get",
"input",
"source",
"(",
")",
"{",
"return",
"m",
"input",
"source",
";",
"}"
]
|
[
"skip",
"reserved",
"from",
"byte",
"buffers"
]
| [
"public",
"void",
"skip",
"reserved",
"(",
"final",
"int",
"length",
")",
"{",
"byte",
"buf",
"skip",
"bytes",
"(",
"length",
")",
";",
"}"
]
|
[
"returns",
"an",
"unmodifiable",
"view",
"of",
"the",
"difference",
"of",
"two",
"multisets",
"in",
"the",
"returned",
"multiset",
",",
"the",
"count",
"of",
"each",
"element",
"is",
"the",
"result",
"of",
"the",
"zero",
"-",
"truncated",
"subtraction",
"of",
"its",
"count",
"in",
"the",
"second",
"multiset",
"from",
"its",
"count",
"in",
"the",
"first",
"multiset",
",",
"with",
"elements",
"that",
"would",
"have",
"a",
"count",
"of",
"0",
"not",
"included",
"the",
"iteration",
"order",
"of",
"the",
"returned",
"multiset",
"matches",
"that",
"of",
"the",
"element",
"set",
"of",
"{",
"@",
"code",
"multiset",
"1",
"}",
",",
"with",
"repeated",
"occurrences",
"of",
"the",
"same",
"element",
"appearing",
"consecutively",
"results",
"are",
"undefined",
"if",
"{",
"@",
"code",
"multiset",
"1",
"}",
"and",
"{",
"@",
"code",
"multiset",
"2",
"}",
"are",
"based",
"on",
"different",
"equivalence",
"relations",
"(",
"as",
"{",
"@",
"code",
"hash",
"multiset",
"}",
"and",
"{",
"@",
"code",
"tree",
"multiset",
"}",
"are",
")"
]
| [
"public",
"static",
"<",
"e",
">",
"multiset",
"<",
"e",
">",
"difference",
"(",
"final",
"multiset",
"<",
"e",
">",
"multiset",
"1",
",",
"final",
"multiset",
"<",
"?",
">",
"multiset",
"2",
")",
"{",
"check",
"not",
"null",
"(",
"multiset",
"1",
")",
";",
"check",
"not",
"null",
"(",
"multiset",
"2",
")",
";",
"/",
"/",
"todo",
"(",
"lowasser",
")",
":",
"consider",
"making",
"the",
"entries",
"live",
"views",
"return",
"new",
"view",
"multiset",
"<",
"e",
">",
"(",
")",
"{",
"@",
"override",
"public",
"int",
"count",
"(",
"@",
"nullable",
"decl",
"object",
"element",
")",
"{",
"int",
"count",
"1",
"=",
"multiset",
"1",
"count",
"(",
"element",
")",
";",
"return",
"(",
"count",
"1",
"=",
"=",
"0",
")",
"?",
"0",
":",
"math",
"max",
"(",
"0",
",",
"count",
"1",
"-",
"multiset",
"2",
"count",
"(",
"element",
")",
")",
";",
"}",
"@",
"override",
"public",
"void",
"clear",
"(",
")",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
")",
";",
"}",
"@",
"override",
"iterator",
"<",
"e",
">",
"element",
"iterator",
"(",
")",
"{",
"final",
"iterator",
"<",
"entry",
"<",
"e",
">",
">",
"iterator",
"1",
"=",
"multiset",
"1",
"entry",
"set",
"(",
")",
"iterator",
"(",
")",
";",
"return",
"new",
"abstract",
"iterator",
"<",
"e",
">",
"(",
")",
"{",
"@",
"override",
"protected",
"e",
"compute",
"next",
"(",
")",
"{",
"while",
"(",
"iterator",
"1",
"has",
"next",
"(",
")",
")",
"{",
"entry",
"<",
"e",
">",
"entry",
"1",
"=",
"iterator",
"1",
"next",
"(",
")",
";",
"e",
"element",
"=",
"entry",
"1",
"get",
"element",
"(",
")",
";",
"if",
"(",
"entry",
"1",
"get",
"count",
"(",
")",
">",
"multiset",
"2",
"count",
"(",
"element",
")",
")",
"{",
"return",
"element",
";",
"}",
"}",
"return",
"end",
"of",
"data",
"(",
")",
";",
"}",
"}",
";",
"}",
"@",
"override",
"iterator",
"<",
"entry",
"<",
"e",
">",
">",
"entry",
"iterator",
"(",
")",
"{",
"final",
"iterator",
"<",
"entry",
"<",
"e",
">",
">",
"iterator",
"1",
"=",
"multiset",
"1",
"entry",
"set",
"(",
")",
"iterator",
"(",
")",
";",
"return",
"new",
"abstract",
"iterator",
"<",
"entry",
"<",
"e",
">",
">",
"(",
")",
"{",
"@",
"override",
"protected",
"entry",
"<",
"e",
">",
"compute",
"next",
"(",
")",
"{",
"while",
"(",
"iterator",
"1",
"has",
"next",
"(",
")",
")",
"{",
"entry",
"<",
"e",
">",
"entry",
"1",
"=",
"iterator",
"1",
"next",
"(",
")",
";",
"e",
"element",
"=",
"entry",
"1",
"get",
"element",
"(",
")",
";",
"int",
"count",
"=",
"entry",
"1",
"get",
"count",
"(",
")",
"-",
"multiset",
"2",
"count",
"(",
"element",
")",
";",
"if",
"(",
"count",
">",
"0",
")",
"{",
"return",
"immutable",
"entry",
"(",
"element",
",",
"count",
")",
";",
"}",
"}",
"return",
"end",
"of",
"data",
"(",
")",
";",
"}",
"}",
";",
"}",
"@",
"override",
"int",
"distinct",
"elements",
"(",
")",
"{",
"return",
"iterators",
"size",
"(",
"entry",
"iterator",
"(",
")",
")",
";",
"}",
"}",
";",
"}"
]
|
[
"returns",
"{",
"@",
"code",
"true",
"}",
"if",
"there",
"was",
"an",
"automatic",
"removal",
"due",
"to",
"eviction",
"(",
"the",
"cause",
"is",
"neither",
"{",
"@",
"link",
"#",
"explicit",
"}",
"nor",
"{",
"@",
"link",
"#",
"replaced",
"}",
")"
]
| [
"abstract",
"boolean",
"was",
"evicted",
"(",
")",
";"
]
|
[
"checks",
"whether",
"a",
"block",
"is",
"sufficiently",
"replicatedstored",
"for",
"decommission",
"inprogress",
"or",
"entering",
"maintenance",
"datanodes",
"for",
"replicated",
"blocks",
"or",
"striped",
"blocks",
",",
"full",
"-",
"strength",
"replication",
"or",
"storage",
"is",
"not",
"always",
"necessary",
",",
"hence",
"\"",
"sufficient",
"\""
]
| [
"protected",
"boolean",
"is",
"sufficient",
"(",
"block",
"info",
"block",
",",
"block",
"collection",
"bc",
",",
"number",
"replicas",
"number",
"replicas",
",",
"boolean",
"is",
"decommission",
",",
"boolean",
"is",
"maintenance",
")",
"{",
"if",
"(",
"block",
"manager",
"has",
"enough",
"effective",
"replicas",
"(",
"block",
",",
"number",
"replicas",
",",
"0",
")",
")",
"{",
"/",
"/",
"block",
"has",
"enough",
"replica",
",",
"skip",
"log",
"trace",
"(",
"\"",
"block",
"{",
"}",
"does",
"not",
"need",
"replication",
"\"",
",",
"block",
")",
";",
"return",
"true",
";",
"}",
"final",
"int",
"num",
"expected",
"=",
"block",
"manager",
"get",
"expected",
"live",
"redundancy",
"num",
"(",
"block",
",",
"number",
"replicas",
")",
";",
"final",
"int",
"num",
"live",
"=",
"number",
"replicas",
"live",
"replicas",
"(",
")",
";",
"/",
"/",
"block",
"is",
"under",
"-",
"replicated",
"log",
"trace",
"(",
"\"",
"block",
"{",
"}",
"num",
"expected",
"=",
"{",
"}",
",",
"num",
"live",
"=",
"{",
"}",
"\"",
",",
"block",
",",
"num",
"expected",
",",
"num",
"live",
")",
";",
"if",
"(",
"is",
"decommission",
"&",
"&",
"num",
"expected",
">",
"num",
"live",
")",
"{",
"if",
"(",
"bc",
"is",
"under",
"construction",
"(",
")",
"&",
"&",
"block",
"equals",
"(",
"bc",
"get",
"last",
"block",
"(",
")",
")",
")",
"{",
"/",
"/",
"can",
"decom",
"a",
"uc",
"block",
"as",
"long",
"as",
"there",
"will",
"still",
"be",
"min",
"replicas",
"if",
"(",
"block",
"manager",
"has",
"min",
"storage",
"(",
"block",
",",
"num",
"live",
")",
")",
"{",
"log",
"trace",
"(",
"\"",
"uc",
"block",
"{",
"}",
"sufficiently",
"-",
"replicated",
"since",
"num",
"live",
"(",
"{",
"}",
")",
"\"",
"+",
"\"",
">",
"=",
"min",
"r",
"(",
"{",
"}",
")",
"\"",
",",
"block",
",",
"num",
"live",
",",
"block",
"manager",
"get",
"min",
"storage",
"num",
"(",
"block",
")",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"log",
"trace",
"(",
"\"",
"uc",
"block",
"{",
"}",
"insufficiently",
"-",
"replicated",
"since",
"num",
"live",
"\"",
"+",
"\"",
"(",
"{",
"}",
")",
"<",
"min",
"r",
"(",
"{",
"}",
")",
"\"",
",",
"block",
",",
"num",
"live",
",",
"block",
"manager",
"get",
"min",
"storage",
"num",
"(",
"block",
")",
")",
";",
"}",
"}",
"else",
"{",
"/",
"/",
"can",
"decom",
"a",
"non",
"-",
"uc",
"as",
"long",
"as",
"the",
"default",
"replication",
"is",
"met",
"if",
"(",
"num",
"live",
">",
"=",
"block",
"manager",
"get",
"default",
"storage",
"num",
"(",
"block",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"if",
"(",
"is",
"maintenance",
"&",
"&",
"num",
"live",
">",
"=",
"block",
"manager",
"get",
"min",
"replication",
"to",
"be",
"in",
"maintenance",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
]
|
[
"tests",
"that",
"free",
"slots",
"which",
"are",
"reported",
"as",
"allocated",
"won",
"'",
"t",
"be",
"considered",
"for",
"fulfilling",
"other",
"pending",
"slot",
"requests",
"see",
":",
"flink",
"-",
"8505"
]
| [
"public",
"void",
"test",
"report",
"allocated",
"slot",
"(",
")",
"throws",
"exception",
"{",
"final",
"resource",
"i",
"d",
"task",
"manager",
"id",
"=",
"resource",
"i",
"d",
"generate",
"(",
")",
";",
"final",
"resource",
"actions",
"resource",
"actions",
"=",
"new",
"testing",
"resource",
"actions",
"builder",
"(",
")",
"build",
"(",
")",
";",
"final",
"testing",
"task",
"executor",
"gateway",
"task",
"executor",
"gateway",
"=",
"new",
"testing",
"task",
"executor",
"gateway",
"builder",
"(",
")",
"create",
"testing",
"task",
"executor",
"gateway",
"(",
")",
";",
"final",
"task",
"executor",
"connection",
"task",
"executor",
"connection",
"=",
"new",
"task",
"executor",
"connection",
"(",
"task",
"manager",
"id",
",",
"task",
"executor",
"gateway",
")",
";",
"try",
"(",
"final",
"slot",
"manager",
"impl",
"slot",
"manager",
"=",
"create",
"slot",
"manager",
"(",
"resource",
"manager",
"id",
"generate",
"(",
")",
",",
"resource",
"actions",
")",
")",
"{",
"/",
"/",
"initially",
"report",
"a",
"single",
"slot",
"as",
"free",
"final",
"slot",
"i",
"d",
"slot",
"id",
"=",
"new",
"slot",
"i",
"d",
"(",
"task",
"manager",
"id",
",",
"0",
")",
";",
"final",
"slot",
"status",
"initial",
"slot",
"status",
"=",
"new",
"slot",
"status",
"(",
"slot",
"id",
",",
"resource",
"profile",
"any",
")",
";",
"final",
"slot",
"report",
"initial",
"slot",
"report",
"=",
"new",
"slot",
"report",
"(",
"initial",
"slot",
"status",
")",
";",
"slot",
"manager",
"register",
"task",
"manager",
"(",
"task",
"executor",
"connection",
",",
"initial",
"slot",
"report",
",",
"resource",
"profile",
"any",
",",
"resource",
"profile",
"any",
")",
";",
"assert",
"that",
"(",
"slot",
"manager",
"get",
"number",
"registered",
"slots",
"(",
")",
",",
"is",
"(",
"equal",
"to",
"(",
"1",
")",
")",
")",
";",
"/",
"/",
"now",
"report",
"this",
"slot",
"as",
"allocated",
"final",
"slot",
"status",
"slot",
"status",
"=",
"new",
"slot",
"status",
"(",
"slot",
"id",
",",
"resource",
"profile",
"any",
",",
"new",
"job",
"i",
"d",
"(",
")",
",",
"new",
"allocation",
"i",
"d",
"(",
")",
")",
";",
"final",
"slot",
"report",
"slot",
"report",
"=",
"new",
"slot",
"report",
"(",
"slot",
"status",
")",
";",
"slot",
"manager",
"report",
"slot",
"status",
"(",
"task",
"executor",
"connection",
"get",
"instance",
"i",
"d",
"(",
")",
",",
"slot",
"report",
")",
";",
"/",
"/",
"this",
"slot",
"request",
"should",
"not",
"be",
"fulfilled",
"final",
"allocation",
"i",
"d",
"allocation",
"id",
"=",
"new",
"allocation",
"i",
"d",
"(",
")",
";",
"final",
"slot",
"request",
"slot",
"request",
"=",
"new",
"slot",
"request",
"(",
"new",
"job",
"i",
"d",
"(",
")",
",",
"allocation",
"id",
",",
"resource",
"profile",
"unknown",
",",
"\"",
"foobar",
"\"",
")",
";",
"/",
"/",
"this",
"triggered",
"an",
"illegal",
"state",
"exception",
"before",
"slot",
"manager",
"register",
"slot",
"request",
"(",
"slot",
"request",
")",
";",
"assert",
"that",
"(",
"slot",
"manager",
"get",
"slot",
"request",
"(",
"allocation",
"id",
")",
"is",
"assigned",
"(",
")",
",",
"is",
"(",
"false",
")",
")",
";",
"}",
"}"
]
|
[
"dynamically",
"materialize",
"this",
"stream",
"to",
"topics",
"using",
"the",
"provided",
"{",
"@",
"link",
"produced",
"}",
"instance",
"the",
"topic",
"names",
"for",
"each",
"record",
"to",
"send",
"to",
"is",
"dynamically",
"determined",
"based",
"on",
"the",
"{",
"@",
"link",
"topic",
"name",
"extractor",
"}"
]
| [
"void",
"to",
"(",
"final",
"topic",
"name",
"extractor",
"<",
"k",
",",
"v",
">",
"topic",
"extractor",
",",
"final",
"produced",
"<",
"k",
",",
"v",
">",
"produced",
")",
";"
]
|
[
"returns",
"the",
"number",
"of",
"bytes",
"that",
"can",
"be",
"written",
"out",
"of",
"the",
"{",
"@",
"link",
"byte",
"buffer",
"}",
"array",
"that",
"was",
"obtained",
"via",
"{",
"@",
"link",
"#",
"nio",
"buffers",
"(",
")",
"}",
"this",
"method",
"must",
"be",
"called",
"after",
"{",
"@",
"link",
"#",
"nio",
"buffers",
"(",
")",
"}",
"was",
"called"
]
| [
"public",
"long",
"nio",
"buffer",
"size",
"(",
")",
"{",
"return",
"nio",
"buffer",
"size",
";",
"}"
]
|
[
"get",
"the",
"latest",
"snapshot",
"index",
"blob",
"id",
"snapshot",
"index",
"blobs",
"are",
"named",
"index",
"-",
"n",
",",
"where",
"n",
"is",
"the",
"next",
"version",
"number",
"from",
"when",
"the",
"index",
"blob",
"was",
"written",
"each",
"individual",
"index",
"-",
"n",
"blob",
"is",
"only",
"written",
"once",
"and",
"never",
"overwritten",
"the",
"highest",
"numbered",
"index",
"-",
"n",
"blob",
"is",
"the",
"latest",
"one",
"that",
"contains",
"the",
"current",
"snapshots",
"in",
"the",
"repository",
"package",
"private",
"for",
"testing"
]
| [
"long",
"latest",
"index",
"blob",
"id",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"try",
"{",
"/",
"/",
"first",
",",
"try",
"listing",
"all",
"index",
"-",
"n",
"blobs",
"(",
"there",
"should",
"only",
"be",
"two",
"index",
"-",
"n",
"blobs",
"at",
"any",
"given",
"/",
"/",
"time",
"in",
"a",
"repository",
"if",
"cleanup",
"is",
"happening",
"properly",
")",
"and",
"pick",
"the",
"index",
"-",
"n",
"blob",
"with",
"the",
"/",
"/",
"highest",
"n",
"value",
"-",
"this",
"will",
"be",
"the",
"latest",
"index",
"blob",
"for",
"the",
"repository",
"note",
",",
"we",
"do",
"this",
"/",
"/",
"instead",
"of",
"directly",
"reading",
"the",
"index",
"latest",
"blob",
"to",
"get",
"the",
"current",
"index",
"-",
"n",
"blob",
"because",
"/",
"/",
"index",
"latest",
"is",
"not",
"written",
"atomically",
"and",
"is",
"not",
"immutable",
"-",
"on",
"every",
"index",
"-",
"n",
"change",
",",
"/",
"/",
"we",
"first",
"delete",
"the",
"old",
"index",
"latest",
"and",
"then",
"write",
"the",
"new",
"one",
"if",
"the",
"repository",
"is",
"not",
"/",
"/",
"read",
"-",
"only",
",",
"it",
"is",
"possible",
"that",
"we",
"try",
"deleting",
"the",
"index",
"latest",
"blob",
"while",
"it",
"is",
"being",
"read",
"/",
"/",
"by",
"some",
"other",
"operation",
"(",
"such",
"as",
"the",
"get",
"snapshots",
"operation",
")",
"in",
"some",
"file",
"systems",
",",
"it",
"is",
"/",
"/",
"illegal",
"to",
"delete",
"a",
"file",
"while",
"it",
"is",
"being",
"read",
"elsewhere",
"(",
"e",
"g",
"windows",
")",
"for",
"read",
"-",
"only",
"/",
"/",
"repositories",
",",
"we",
"read",
"for",
"index",
"latest",
",",
"both",
"because",
"listing",
"blob",
"prefixes",
"is",
"often",
"unsupported",
"/",
"/",
"and",
"because",
"the",
"index",
"latest",
"blob",
"will",
"never",
"be",
"deleted",
"and",
"re",
"-",
"written",
"return",
"list",
"blobs",
"to",
"get",
"latest",
"index",
"id",
"(",
")",
";",
"}",
"catch",
"(",
"unsupported",
"operation",
"exception",
"e",
")",
"{",
"/",
"/",
"if",
"its",
"a",
"read",
"-",
"only",
"repository",
",",
"listing",
"blobs",
"by",
"prefix",
"may",
"not",
"be",
"supported",
"(",
"e",
"g",
"a",
"url",
"repository",
")",
",",
"/",
"/",
"in",
"this",
"case",
",",
"try",
"reading",
"the",
"latest",
"index",
"generation",
"from",
"the",
"index",
"latest",
"blob",
"try",
"{",
"return",
"read",
"snapshot",
"index",
"latest",
"blob",
"(",
")",
";",
"}",
"catch",
"(",
"no",
"such",
"file",
"exception",
"nsfe",
")",
"{",
"return",
"repository",
"data",
"empty",
"repo",
"gen",
";",
"}",
"}",
"}"
]
|
[
"allow",
"this",
"plugin",
"to",
"load",
"extensions",
"from",
"other",
"plugins",
"this",
"method",
"is",
"called",
"once",
"only",
",",
"after",
"initializing",
"this",
"plugin",
"and",
"all",
"plugins",
"extending",
"this",
"plugin",
"it",
"is",
"called",
"before",
"any",
"other",
"methods",
"on",
"this",
"plugin",
"instance",
"are",
"called"
]
| [
"default",
"void",
"load",
"extensions",
"(",
"extension",
"loader",
"loader",
")",
"{",
"}"
]
|
[
"fs",
"which",
"keeps",
"markers"
]
| [
"protected",
"s",
"3",
"a",
"file",
"system",
"get",
"keeping",
"f",
"s",
"(",
")",
"{",
"return",
"keeping",
"f",
"s",
";",
"}"
]
|
[
"fake",
"endpoint",
"to",
"test",
"group",
"parameters",
"(",
"optional",
")",
"fake",
"endpoint",
"to",
"test",
"group",
"parameters",
"(",
"optional",
")"
]
| [
"void",
"test",
"group",
"parameters",
"(",
"@",
"param",
"(",
"\"",
"required",
"string",
"group",
"\"",
")",
"integer",
"required",
"string",
"group",
",",
"@",
"param",
"(",
"\"",
"required",
"boolean",
"group",
"\"",
")",
"boolean",
"required",
"boolean",
"group",
",",
"@",
"param",
"(",
"\"",
"required",
"int",
"6",
"4",
"group",
"\"",
")",
"long",
"required",
"int",
"6",
"4",
"group",
",",
"@",
"param",
"(",
"\"",
"string",
"group",
"\"",
")",
"integer",
"string",
"group",
",",
"@",
"param",
"(",
"\"",
"boolean",
"group",
"\"",
")",
"boolean",
"boolean",
"group",
",",
"@",
"param",
"(",
"\"",
"int",
"6",
"4",
"group",
"\"",
")",
"long",
"int",
"6",
"4",
"group",
")",
";"
]
|
[
"append",
"to",
"the",
"underlying",
"transaction",
"log"
]
| [
"public",
"boolean",
"append",
"(",
"request",
"si",
")",
"throws",
"i",
"o",
"exception",
"{",
"txn",
"count",
"increment",
"and",
"get",
"(",
")",
";",
"return",
"this",
"snap",
"log",
"append",
"(",
"si",
")",
";",
"}"
]
|
[
"execute",
"an",
"operation",
";",
"any",
"exception",
"raised",
"is",
"caught",
"and",
"logged",
"at",
"debug",
"the",
"result",
"is",
"only",
"non",
"-",
"empty",
"if",
"the",
"operation",
"succeeded"
]
| [
"public",
"static",
"<",
"t",
">",
"optional",
"<",
"t",
">",
"quietly",
"eval",
"(",
"string",
"action",
",",
"string",
"path",
",",
"callable",
"raising",
"i",
"o",
"e",
"<",
"t",
">",
"operation",
")",
"{",
"try",
"{",
"return",
"optional",
"of",
"(",
"once",
"(",
"action",
",",
"path",
",",
"operation",
")",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"log",
"debug",
"(",
"\"",
"action",
"{",
"}",
"failed",
"\"",
",",
"action",
",",
"e",
")",
";",
"return",
"optional",
"empty",
"(",
")",
";",
"}",
"}"
]
|
[
"writes",
"the",
"java",
"source",
"with",
"the",
"writer",
"values",
"to",
"the",
"specified",
"package",
"and",
"derived",
"dir"
]
| [
"public",
"void",
"write",
"(",
"string",
"package",
"name",
")",
"throws",
"i",
"o",
"exception",
"{",
"write",
"source",
"(",
"package",
"name",
",",
"values",
")",
";",
"}"
]
|
[
"get",
"{",
"@",
"link",
"#",
"pass",
"qps",
"(",
")",
"}",
"+",
"{",
"@",
"link",
"#",
"block",
"qps",
"(",
")",
"}",
"request",
"per",
"second"
]
| [
"double",
"total",
"qps",
"(",
")",
";"
]
|
[
"gets",
"an",
"asset",
"file"
]
| [
"public",
"fi",
"get",
"(",
"string",
"path",
",",
"boolean",
"safe",
")",
"{",
"if",
"(",
"files",
"contains",
"key",
"(",
"path",
")",
")",
"{",
"return",
"files",
"get",
"(",
"path",
")",
";",
"}",
"else",
"if",
"(",
"files",
"contains",
"key",
"(",
"\"",
"/",
"\"",
"+",
"path",
")",
")",
"{",
"return",
"files",
"get",
"(",
"\"",
"/",
"\"",
"+",
"path",
")",
";",
"}",
"else",
"if",
"(",
"core",
"files",
"=",
"=",
"null",
"&",
"&",
"!",
"safe",
")",
"{",
"/",
"/",
"headless",
"return",
"fi",
"get",
"(",
"path",
")",
";",
"}",
"else",
"{",
"return",
"core",
"files",
"internal",
"(",
"path",
")",
";",
"}",
"}"
]
|
[
"assert",
"that",
"content",
"exists",
"at",
"the",
"given",
"x",
"path"
]
| [
"public",
"request",
"matcher",
"exists",
"(",
")",
"{",
"return",
"(",
"xpath",
"request",
"matcher",
")",
"request",
"-",
">",
"this",
"xpath",
"helper",
"exists",
"(",
"request",
"get",
"body",
"as",
"bytes",
"(",
")",
",",
"default",
"encoding",
")",
";",
"}"
]
|
[
"restores",
"the",
"property",
"from",
"the",
"input",
"stream",
"to",
"the",
"given",
"index"
]
| [
"protected",
"void",
"restore",
"property",
"(",
"object",
"input",
"stream",
"ois",
",",
"long",
"index",
")",
"throws",
"i",
"o",
"exception",
",",
"class",
"not",
"found",
"exception",
"{",
"put",
"string",
"(",
"index",
",",
"(",
"string",
")",
"ois",
"read",
"object",
"(",
")",
")",
";",
"}"
]
|
[
"disable",
"or",
"enable",
"tracing",
"features",
"enabled",
"by",
"default",
"for",
"the",
"current",
"release",
",",
"calling",
"{",
"@",
"code",
"set",
"tracing",
"enabled",
"(",
"true",
")",
"}",
"may",
"have",
"a",
"side",
"effect",
"that",
"disables",
"retry"
]
| [
"public",
"void",
"set",
"tracing",
"enabled",
"(",
"boolean",
"value",
")",
"{",
"tracing",
"enabled",
"=",
"value",
";",
"}"
]
|
[
"older",
"browsers",
"do",
"not",
"support",
"the",
"web",
"audio",
"api",
"this",
"is",
"where",
"we",
"find",
"out"
]
| [
"public",
"static",
"native",
"boolean",
"is",
"supported",
"(",
")",
"/",
"*",
"-",
"{",
"return",
"typeof",
"(",
"window",
"audio",
"context",
"|",
"|",
"window",
"webkit",
"audio",
"context",
")",
"!",
"=",
"\"",
"undefined",
"\"",
";",
"}"
]
|
[
"returns",
"a",
"request",
"builder",
"that",
"uses",
"the",
"{",
"@",
"link",
"com",
"bumptech",
"glide",
"load",
"model",
"model",
"loader",
"factory",
"}",
"currently",
"registered",
"or",
"{",
"@",
"link",
"integer",
"}",
"to",
"load",
"the",
"image",
"represented",
"by",
"the",
"given",
"{",
"@",
"link",
"integer",
"}",
"resource",
"id",
"defaults",
"to",
"{",
"@",
"link",
"com",
"bumptech",
"glide",
"load",
"model",
"resource",
"loader",
"}",
"to",
"load",
"resource",
"id",
"models",
"by",
"default",
"this",
"method",
"adds",
"a",
"version",
"code",
"and",
"night",
"mode",
"based",
"signature",
"to",
"the",
"cache",
"key",
"used",
"to",
"cache",
"this",
"resource",
"in",
"glide",
"this",
"signature",
"is",
"sufficient",
"to",
"guarantee",
"that",
"end",
"users",
"will",
"see",
"the",
"most",
"up",
"to",
"date",
"versions",
"of",
"your",
"drawables",
",",
"but",
"during",
"development",
"if",
"you",
"do",
"not",
"increment",
"your",
"version",
"code",
"before",
"each",
"install",
"and",
"you",
"replace",
"a",
"drawable",
"with",
"different",
"data",
"without",
"changing",
"the",
"drawable",
"name",
",",
"you",
"may",
"see",
"inconsistent",
"cached",
"data",
"to",
"get",
"around",
"this",
",",
"consider",
"using",
"{",
"@",
"link",
"com",
"bumptech",
"glide",
"load",
"engine",
"disk",
"cache",
"strategy",
"#",
"none",
"}",
"via",
"{",
"@",
"link",
"request",
"options",
"#",
"disk",
"cache",
"strategy",
"(",
"com",
"bumptech",
"glide",
"load",
"engine",
"disk",
"cache",
"strategy",
")",
"}",
"during",
"development",
",",
"and",
"re",
"-",
"enabling",
"the",
"default",
"{",
"@",
"link",
"com",
"bumptech",
"glide",
"load",
"engine",
"disk",
"cache",
"strategy",
"#",
"resource",
"}",
"for",
"release",
"builds",
"this",
"method",
"will",
"load",
"non",
"-",
"{",
"@",
"link",
"android",
"graphics",
"bitmap",
"}",
"resources",
"like",
"{",
"@",
"link",
"android",
"graphics",
"drawable",
"vector",
"drawable",
"}",
"s",
"although",
"glide",
"makes",
"a",
"best",
"effort",
"to",
"apply",
"{",
"@",
"link",
"com",
"bumptech",
"glide",
"load",
"transformation",
"}",
"s",
"to",
"these",
"{",
"@",
"link",
"drawable",
"}",
"s",
"by",
"either",
"extracting",
"the",
"underlying",
"{",
"@",
"link",
"bitmap",
"}",
"or",
"by",
"converting",
"the",
"{",
"@",
"link",
"drawable",
"}",
"to",
"a",
"{",
"@",
"link",
"bitmap",
"}",
",",
"glide",
"is",
"still",
"not",
"able",
"to",
"transform",
"all",
"types",
"of",
"resources",
"animated",
"{",
"@",
"link",
"drawable",
"}",
"s",
"cannot",
"be",
"transformed",
"(",
"other",
"than",
"{",
"@",
"link",
"com",
"bumptech",
"glide",
"load",
"resource",
"gif",
"gif",
"drawable",
"}",
")",
"to",
"avoid",
"load",
"failures",
"if",
"a",
"{",
"@",
"link",
"drawable",
"}",
"can",
"'",
"t",
"be",
"transformed",
",",
"use",
"the",
"optional",
"transformation",
"methods",
"like",
"{",
"@",
"link",
"request",
"options",
"#",
"optional",
"transform",
"(",
"class",
",",
"transformation",
")",
"}",
"in",
"some",
"cases",
"converting",
"{",
"@",
"link",
"drawable",
"}",
"s",
"to",
"{",
"@",
"link",
"bitmap",
"}",
"s",
"may",
"be",
"inefficient",
"use",
"this",
"method",
",",
"especially",
"in",
"conjunction",
"with",
"{",
"@",
"link",
"com",
"bumptech",
"glide",
"load",
"transformation",
"}",
"s",
"with",
"caution",
"for",
"non",
"-",
"{",
"@",
"link",
"bitmap",
"}",
"{",
"@",
"link",
"drawable",
"}",
"s"
]
| [
"public",
"request",
"builder",
"<",
"transcode",
"type",
">",
"load",
"(",
"@",
"raw",
"res",
"@",
"drawable",
"res",
"@",
"nullable",
"integer",
"resource",
"id",
")",
"{",
"return",
"load",
"generic",
"(",
"resource",
"id",
")",
"apply",
"(",
"signature",
"of",
"(",
"android",
"resource",
"signature",
"obtain",
"(",
"context",
")",
")",
")",
";",
"}"
]
|
[
"same",
"to",
"{",
"@",
"link",
"#",
"send",
"(",
"message",
",",
"send",
"callback",
")",
"}",
"with",
"target",
"message",
"queue",
"specified"
]
| [
"public",
"void",
"send",
"(",
"message",
"msg",
",",
"message",
"queue",
"mq",
",",
"send",
"callback",
"send",
"callback",
")",
"throws",
"m",
"q",
"client",
"exception",
",",
"remoting",
"exception",
",",
"interrupted",
"exception",
"{",
"msg",
"set",
"topic",
"(",
"with",
"namespace",
"(",
"msg",
"get",
"topic",
"(",
")",
")",
")",
";",
"this",
"default",
"m",
"q",
"producer",
"impl",
"send",
"(",
"msg",
",",
"queue",
"with",
"namespace",
"(",
"mq",
")",
",",
"send",
"callback",
")",
";",
"}"
]
|
[
"add",
"a",
"{",
"@",
"code",
"listener",
"}",
"that",
"is",
"executed",
"by",
"the",
"internal",
"{",
"@",
"code",
"indices",
"cleaner",
"}",
"given",
"the",
"{",
"@",
"link",
"#",
"get",
"retention",
"(",
")",
"retention",
"}",
"time"
]
| [
"public",
"void",
"add",
"(",
"listener",
"listener",
")",
"{",
"listeners",
"add",
"(",
"listener",
")",
";",
"}"
]
|
[
"get",
"the",
"equate",
"name"
]
| [
"public",
"string",
"get",
"name",
"(",
")",
"{",
"return",
"name",
";",
"}"
]
|
[
"moves",
"the",
"properties",
"defined",
"in",
"the",
"range",
"from",
"the",
"start",
"address",
"thru",
"the",
"end",
"address",
"to",
"now",
"be",
"located",
"beginning",
"at",
"the",
"new",
"start",
"address",
"the",
"moved",
"properties",
"will",
"be",
"located",
"at",
"the",
"same",
"relative",
"location",
"to",
"the",
"new",
"start",
"address",
"as",
"they",
"were",
"previously",
"to",
"the",
"start",
"address"
]
| [
"public",
"void",
"move",
"range",
"(",
"address",
"start",
",",
"address",
"end",
",",
"address",
"new",
"start",
")",
";"
]
|
[
"given",
"the",
"time",
"in",
"long",
"milliseconds",
",",
"returns",
"a",
"string",
"in",
"the",
"sortable",
"format",
"xhrs",
",",
"ymins",
",",
"zsec",
"x",
",",
"y",
",",
"and",
"z",
"are",
"always",
"two",
"-",
"digit",
"if",
"the",
"time",
"is",
"more",
"than",
"100",
"hours",
",",
"it",
"is",
"displayed",
"as",
"9",
"9hrs",
",",
"5",
"9mins",
",",
"5",
"9sec"
]
| [
"public",
"static",
"string",
"format",
"time",
"sortable",
"(",
"long",
"time",
"diff",
")",
"{",
"string",
"builder",
"buf",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"long",
"hours",
"=",
"time",
"diff",
"/",
"(",
"60",
"*",
"60",
"*",
"1000",
")",
";",
"long",
"rem",
"=",
"(",
"time",
"diff",
"%",
"(",
"60",
"*",
"60",
"*",
"1000",
")",
")",
";",
"long",
"minutes",
"=",
"rem",
"/",
"(",
"60",
"*",
"1000",
")",
";",
"rem",
"=",
"rem",
"%",
"(",
"60",
"*",
"1000",
")",
";",
"long",
"seconds",
"=",
"rem",
"/",
"1000",
";",
"/",
"/",
"if",
"hours",
"is",
"more",
"than",
"99",
"hours",
",",
"it",
"will",
"be",
"set",
"a",
"max",
"value",
"format",
"if",
"(",
"hours",
">",
"99",
")",
"{",
"hours",
"=",
"99",
";",
"minutes",
"=",
"59",
";",
"seconds",
"=",
"59",
";",
"}",
"buf",
"append",
"(",
"string",
"format",
"(",
"\"",
"%",
"0",
"2d",
"\"",
",",
"hours",
")",
")",
";",
"buf",
"append",
"(",
"\"",
"hrs",
",",
"\"",
")",
";",
"buf",
"append",
"(",
"string",
"format",
"(",
"\"",
"%",
"0",
"2d",
"\"",
",",
"minutes",
")",
")",
";",
"buf",
"append",
"(",
"\"",
"mins",
",",
"\"",
")",
";",
"buf",
"append",
"(",
"string",
"format",
"(",
"\"",
"%",
"0",
"2d",
"\"",
",",
"seconds",
")",
")",
";",
"buf",
"append",
"(",
"\"",
"sec",
"\"",
")",
";",
"return",
"buf",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"create",
"control",
"files",
"before",
"a",
"test",
"run",
"number",
"of",
"files",
"created",
"is",
"equal",
"to",
"the",
"number",
"of",
"maps",
"specified"
]
| [
"private",
"void",
"create",
"control",
"files",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"log",
"info",
"(",
"\"",
"creating",
"\"",
"+",
"number",
"of",
"maps",
"+",
"\"",
"control",
"files",
"\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"number",
"of",
"maps",
";",
"i",
"+",
"+",
")",
"{",
"string",
"str",
"file",
"name",
"=",
"\"",
"n",
"n",
"bench",
"controlfile",
"\"",
"+",
"i",
";",
"path",
"file",
"path",
"=",
"new",
"path",
"(",
"new",
"path",
"(",
"base",
"dir",
",",
"control",
"dir",
"name",
")",
",",
"str",
"file",
"name",
")",
";",
"sequence",
"file",
"writer",
"writer",
"=",
"null",
";",
"try",
"{",
"writer",
"=",
"sequence",
"file",
"create",
"writer",
"(",
"get",
"conf",
"(",
")",
",",
"writer",
"file",
"(",
"file",
"path",
")",
",",
"writer",
"key",
"class",
"(",
"text",
"class",
")",
",",
"writer",
"value",
"class",
"(",
"long",
"writable",
"class",
")",
",",
"writer",
"compression",
"(",
"compression",
"type",
"none",
")",
")",
";",
"writer",
"append",
"(",
"new",
"text",
"(",
"str",
"file",
"name",
")",
",",
"new",
"long",
"writable",
"(",
"i",
")",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"writer",
"!",
"=",
"null",
")",
"{",
"writer",
"close",
"(",
")",
";",
"}",
"}",
"}",
"}"
]
|
[
"report",
"a",
"process",
"operation",
"error",
"at",
"the",
"current",
"system",
"time"
]
| [
"public",
"void",
"report",
"a",
"file",
"error",
"(",
")",
"{",
"total",
"processed",
"files",
"incr",
"(",
")",
";",
"processed",
"files",
"incr",
"(",
")",
";",
"total",
"file",
"errors",
"incr",
"(",
")",
";",
"file",
"errors",
"incr",
"(",
")",
";",
"}"
]
|
[
"see",
"{",
"@",
"link",
"socket",
"#",
"get",
"so",
"linger",
"(",
")",
"}",
"calling",
"this",
"method",
"does",
"not",
"trigger",
"mode",
"detection"
]
| [
"public",
"int",
"get",
"so",
"linger",
"(",
")",
"throws",
"socket",
"exception",
"{",
"return",
"get",
"socket",
"allow",
"unknown",
"mode",
"(",
")",
"get",
"so",
"linger",
"(",
")",
";",
"}"
]
|
[
"gets",
"a",
"api",
"name",
"suffix",
"for",
"generated",
"models",
"this",
"name",
"will",
"be",
"appended",
"to",
"a",
"api",
"name",
"this",
"option",
"is",
"often",
"used",
"to",
"circumvent",
"compilation",
"issues",
"where",
"models",
"match",
"keywords",
"example",
":",
"suffix",
"<",
"code",
">",
"gen",
"<",
"code",
">",
"applied",
"to",
"<",
"code",
">",
"object",
"<",
"code",
">",
"results",
"in",
"a",
"generated",
"class",
"named",
"<",
"code",
">",
"object",
"gen",
"<",
"code",
">"
]
| [
"public",
"string",
"get",
"api",
"name",
"suffix",
"(",
")",
"{",
"return",
"api",
"name",
"suffix",
";",
"}"
]
|
[
"creates",
"a",
"symbolic",
"link"
]
| [
"public",
"void",
"create",
"symlink",
"(",
"string",
"target",
",",
"string",
"link",
",",
"boolean",
"create",
"parent",
")",
"throws",
"i",
"o",
"exception",
"{",
"check",
"open",
"(",
")",
";",
"try",
"(",
"trace",
"scope",
"ignored",
"=",
"new",
"path",
"trace",
"scope",
"(",
"\"",
"create",
"symlink",
"\"",
",",
"target",
")",
")",
"{",
"final",
"fs",
"permission",
"dir",
"perm",
"=",
"apply",
"u",
"mask",
"(",
"null",
")",
";",
"namenode",
"create",
"symlink",
"(",
"target",
",",
"link",
",",
"dir",
"perm",
",",
"create",
"parent",
")",
";",
"}",
"catch",
"(",
"remote",
"exception",
"re",
")",
"{",
"throw",
"re",
"unwrap",
"remote",
"exception",
"(",
"access",
"control",
"exception",
"class",
",",
"file",
"already",
"exists",
"exception",
"class",
",",
"file",
"not",
"found",
"exception",
"class",
",",
"parent",
"not",
"directory",
"exception",
"class",
",",
"n",
"s",
"quota",
"exceeded",
"exception",
"class",
",",
"d",
"s",
"quota",
"exceeded",
"exception",
"class",
",",
"quota",
"by",
"storage",
"type",
"exceeded",
"exception",
"class",
",",
"unresolved",
"path",
"exception",
"class",
",",
"snapshot",
"access",
"control",
"exception",
"class",
")",
";",
"}",
"}"
]
|
[
"gets",
"release",
"note",
"for",
"the",
"generated",
"instance",
"generally",
"used",
"by",
"git",
"push",
"sh",
"in",
"generated",
"sources",
"which",
"support",
"it",
"this",
"value",
"may",
"also",
"be",
"used",
"by",
"templates",
"in",
"maven",
"style",
"references",
",",
"r",
"e",
"a",
"d",
"m",
"es",
",",
"or",
"other",
"documentation"
]
| [
"public",
"string",
"get",
"release",
"note",
"(",
")",
"{",
"return",
"release",
"note",
";",
"}"
]
|
[
"helper",
"method",
"to",
"determine",
"if",
"a",
"list",
"of",
"registers",
"are",
"sequential",
",",
"including",
"degenerate",
"cases",
"for",
"empty",
"or",
"single",
"-",
"element",
"lists"
]
| [
"protected",
"static",
"boolean",
"is",
"reg",
"list",
"sequential",
"(",
"register",
"spec",
"list",
"list",
")",
"{",
"int",
"sz",
"=",
"list",
"size",
"(",
")",
";",
"if",
"(",
"sz",
"<",
"2",
")",
"{",
"return",
"true",
";",
"}",
"int",
"first",
"=",
"list",
"get",
"(",
"0",
")",
"get",
"reg",
"(",
")",
";",
"int",
"next",
"=",
"first",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sz",
";",
"i",
"+",
"+",
")",
"{",
"register",
"spec",
"one",
"=",
"list",
"get",
"(",
"i",
")",
";",
"if",
"(",
"one",
"get",
"reg",
"(",
")",
"!",
"=",
"next",
")",
"{",
"return",
"false",
";",
"}",
"next",
"+",
"=",
"one",
"get",
"category",
"(",
")",
";",
"}",
"return",
"true",
";",
"}"
]
|
[
"translates",
"by",
"the",
"specified",
"amount",
"of",
"units"
]
| [
"public",
"void",
"translate",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"this",
"position",
"add",
"(",
"x",
",",
"y",
",",
"z",
")",
";",
"updated",
"=",
"false",
";",
"}"
]
|
[
"recursively",
"dump",
"states",
"of",
"all",
"queues"
]
| [
"public",
"string",
"dump",
"state",
"(",
")",
"{",
"string",
"builder",
"sb",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"dump",
"state",
"internal",
"(",
"sb",
")",
";",
"return",
"sb",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"set",
"the",
"http",
"session",
"to",
"use",
",",
"possibly",
"re",
"-",
"used",
"across",
"requests",
"individual",
"attributes",
"provided",
"via",
"{",
"@",
"link",
"#",
"session",
"attr",
"(",
"string",
",",
"object",
")",
"}",
"override",
"the",
"content",
"of",
"the",
"session",
"provided",
"here"
]
| [
"public",
"mock",
"http",
"servlet",
"request",
"builder",
"session",
"(",
"mock",
"http",
"session",
"session",
")",
"{",
"assert",
"not",
"null",
"(",
"session",
",",
"\"",
"'",
"session",
"'",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"this",
"session",
"=",
"session",
";",
"return",
"this",
";",
"}"
]
|
[
"create",
"application",
"log",
"directories",
"on",
"all",
"disks"
]
| [
"void",
"create",
"container",
"log",
"dirs",
"(",
"string",
"app",
"id",
",",
"string",
"container",
"id",
",",
"list",
"<",
"string",
">",
"log",
"dirs",
",",
"string",
"user",
")",
"throws",
"i",
"o",
"exception",
"{",
"boolean",
"container",
"log",
"dir",
"status",
"=",
"false",
";",
"fs",
"permission",
"container",
"log",
"dir",
"perms",
"=",
"new",
"fs",
"permission",
"(",
"get",
"log",
"dir",
"permissions",
"(",
")",
")",
";",
"for",
"(",
"string",
"root",
"log",
"dir",
":",
"log",
"dirs",
")",
"{",
"/",
"/",
"create",
"$",
"log",
"dir",
"/",
"$",
"appid",
"/",
"$",
"containerid",
"path",
"app",
"log",
"dir",
"=",
"new",
"path",
"(",
"root",
"log",
"dir",
",",
"app",
"id",
")",
";",
"path",
"container",
"log",
"dir",
"=",
"new",
"path",
"(",
"app",
"log",
"dir",
",",
"container",
"id",
")",
";",
"try",
"{",
"create",
"dir",
"(",
"container",
"log",
"dir",
",",
"container",
"log",
"dir",
"perms",
",",
"true",
",",
"user",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"log",
"warn",
"(",
"\"",
"unable",
"to",
"create",
"the",
"container",
"-",
"log",
"directory",
":",
"{",
"}",
"\"",
",",
"app",
"log",
"dir",
",",
"e",
")",
";",
"continue",
";",
"}",
"container",
"log",
"dir",
"status",
"=",
"true",
";",
"}",
"if",
"(",
"!",
"container",
"log",
"dir",
"status",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"not",
"able",
"to",
"initialize",
"container",
"-",
"log",
"directories",
"\"",
"+",
"\"",
"in",
"any",
"of",
"the",
"configured",
"local",
"directories",
"for",
"container",
"\"",
"+",
"container",
"id",
")",
";",
"}",
"}"
]
|
[
"get",
"the",
"{",
"@",
"code",
"hikari",
"pool",
"m",
"x",
"bean",
"}",
"for",
"this",
"hikari",
"data",
"source",
"instance",
"if",
"this",
"method",
"is",
"called",
"on",
"a",
"{",
"@",
"code",
"hikari",
"data",
"source",
"}",
"that",
"has",
"been",
"constructed",
"without",
"a",
"{",
"@",
"code",
"hikari",
"config",
"}",
"instance",
",",
"and",
"before",
"an",
"initial",
"call",
"to",
"{",
"@",
"code",
"#",
"get",
"connection",
"(",
")",
"}",
",",
"the",
"return",
"value",
"will",
"be",
"{",
"@",
"code",
"null",
"}"
]
| [
"public",
"hikari",
"pool",
"m",
"x",
"bean",
"get",
"hikari",
"pool",
"m",
"x",
"bean",
"(",
")",
"{",
"return",
"pool",
";",
"}"
]
|
[
"adds",
"{",
"@",
"link",
"job",
"property",
"}"
]
| [
"public",
"void",
"add",
"property",
"(",
"job",
"property",
"<",
"?",
"super",
"job",
"t",
">",
"job",
"prop",
")",
"throws",
"i",
"o",
"exception",
"{",
"(",
"(",
"job",
"property",
")",
"job",
"prop",
")",
"set",
"owner",
"(",
"this",
")",
";",
"properties",
"add",
"(",
"job",
"prop",
")",
";",
"save",
"(",
")",
";",
"}"
]
|
[
"returns",
"whether",
"any",
"of",
"the",
"stack",
"entries",
"after",
"the",
"given",
"offsets",
"are",
"necessary"
]
| [
"private",
"boolean",
"is",
"any",
"stack",
"entry",
"necessary",
"after",
"(",
"instruction",
"offset",
"value",
"instruction",
"offsets",
",",
"int",
"stack",
"index",
")",
"{",
"int",
"offset",
"count",
"=",
"instruction",
"offsets",
"instruction",
"offset",
"count",
"(",
")",
";",
"for",
"(",
"int",
"offset",
"index",
"=",
"0",
";",
"offset",
"index",
"<",
"offset",
"count",
";",
"offset",
"index",
"+",
"+",
")",
"{",
"if",
"(",
"is",
"stack",
"entry",
"necessary",
"after",
"(",
"instruction",
"offsets",
"instruction",
"offset",
"(",
"offset",
"index",
")",
",",
"stack",
"index",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
]
|
[
"get",
"the",
"local",
"filesystem",
"this",
"may",
"be",
"overridden"
]
| [
"protected",
"file",
"system",
"get",
"local",
"f",
"s",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"file",
"system",
"get",
"local",
"(",
"get",
"conf",
"(",
")",
")",
";",
"}"
]
|
[
"get",
"the",
"port",
"number"
]
| [
"public",
"int",
"get",
"port",
"number",
"(",
")",
"{",
"return",
"port",
"number",
";",
"}"
]
|
[
"get",
"user",
"{",
"username",
"}",
":",
"get",
"user",
"by",
"user",
"name"
]
| [
"default",
"response",
"entity",
"<",
"user",
">",
"get",
"user",
"by",
"name",
"(",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"the",
"name",
"that",
"needs",
"to",
"be",
"fetched",
"use",
"user",
"1",
"for",
"testing",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"path",
"variable",
"(",
"\"",
"username",
"\"",
")",
"string",
"username",
")",
"{",
"return",
"get",
"delegate",
"(",
")",
"get",
"user",
"by",
"name",
"(",
"username",
")",
";",
"}"
]
|
[
"each",
"value",
"in",
"the",
"methods",
"table",
"must",
"be",
"a",
"method",
"info",
"(",
"?",
"4",
"6",
")",
"structure",
"giving",
"a",
"complete",
"description",
"of",
"a",
"method",
"in",
"this",
"class",
"or",
"interface",
"if",
"neither",
"of",
"the",
"acc",
"native",
"and",
"acc",
"abstract",
"flags",
"are",
"set",
"in",
"the",
"access",
"flags",
"item",
"of",
"a",
"method",
"info",
"structure",
",",
"the",
"java",
"virtual",
"machine",
"instructions",
"implementing",
"the",
"method",
"are",
"also",
"supplied",
"the",
"method",
"info",
"structures",
"represent",
"all",
"methods",
"declared",
"by",
"this",
"class",
"or",
"interface",
"type",
",",
"including",
"instance",
"methods",
",",
"class",
"methods",
",",
"instance",
"initialization",
"methods",
"(",
"?",
"2",
"9",
")",
",",
"and",
"any",
"class",
"or",
"interface",
"initialization",
"method",
"(",
"?",
"2",
"9",
")",
"the",
"methods",
"table",
"does",
"not",
"include",
"items",
"representing",
"methods",
"that",
"are",
"inherited",
"from",
"superclasses",
"or",
"superinterfaces"
]
| [
"public",
"method",
"info",
"java",
"[",
"]",
"get",
"methods",
"(",
")",
"{",
"return",
"methods",
";",
"}"
]
|
[
"update",
"the",
"message",
"consuming",
"thread",
"core",
"pool",
"size"
]
| [
"public",
"void",
"update",
"core",
"pool",
"size",
"(",
"int",
"core",
"pool",
"size",
")",
"{",
"this",
"default",
"m",
"q",
"push",
"consumer",
"impl",
"update",
"core",
"pool",
"size",
"(",
"core",
"pool",
"size",
")",
";",
"}"
]
|
[
"release",
"a",
"previously",
"obtained",
"reference",
",",
"causing",
"the",
"object",
"to",
"be",
"disposed",
"when",
"this",
"was",
"the",
"last",
"reference"
]
| [
"public",
"void",
"release",
"(",
")",
"{",
"if",
"(",
"-",
"-",
"ref",
"count",
"<",
"=",
"0",
"&",
"&",
"bullet",
"use",
"ref",
"counting",
")",
"dispose",
"(",
")",
";",
"}"
]
|
[
"this",
"is",
"the",
"function",
"that",
"re",
"-",
"groups",
"values",
"for",
"a",
"key",
"into",
"sub",
"-",
"groups",
"based",
"on",
"a",
"secondary",
"key",
"(",
"input",
"tag",
")"
]
| [
"private",
"sorted",
"map",
"<",
"object",
",",
"resetable",
"iterator",
">",
"regroup",
"(",
"object",
"key",
",",
"iterator",
"arg",
"1",
",",
"reporter",
"reporter",
")",
"throws",
"i",
"o",
"exception",
"{",
"this",
"num",
"of",
"values",
"=",
"0",
";",
"sorted",
"map",
"<",
"object",
",",
"resetable",
"iterator",
">",
"retv",
"=",
"new",
"tree",
"map",
"<",
"object",
",",
"resetable",
"iterator",
">",
"(",
")",
";",
"tagged",
"map",
"output",
"a",
"record",
"=",
"null",
";",
"while",
"(",
"arg",
"1",
"has",
"next",
"(",
")",
")",
"{",
"this",
"num",
"of",
"values",
"+",
"=",
"1",
";",
"if",
"(",
"this",
"num",
"of",
"values",
"%",
"100",
"=",
"=",
"0",
")",
"{",
"reporter",
"set",
"status",
"(",
"\"",
"key",
":",
"\"",
"+",
"key",
"to",
"string",
"(",
")",
"+",
"\"",
"num",
"of",
"values",
":",
"\"",
"+",
"this",
"num",
"of",
"values",
")",
";",
"}",
"if",
"(",
"this",
"num",
"of",
"values",
">",
"this",
"max",
"num",
"of",
"values",
"per",
"group",
")",
"{",
"continue",
";",
"}",
"a",
"record",
"=",
"(",
"(",
"tagged",
"map",
"output",
")",
"arg",
"1",
"next",
"(",
")",
")",
"clone",
"(",
"job",
")",
";",
"text",
"tag",
"=",
"a",
"record",
"get",
"tag",
"(",
")",
";",
"resetable",
"iterator",
"data",
"=",
"retv",
"get",
"(",
"tag",
")",
";",
"if",
"(",
"data",
"=",
"=",
"null",
")",
"{",
"data",
"=",
"create",
"resetable",
"iterator",
"(",
")",
";",
"retv",
"put",
"(",
"tag",
",",
"data",
")",
";",
"}",
"data",
"add",
"(",
"a",
"record",
")",
";",
"}",
"if",
"(",
"this",
"num",
"of",
"values",
">",
"this",
"largest",
"num",
"of",
"values",
")",
"{",
"this",
"largest",
"num",
"of",
"values",
"=",
"num",
"of",
"values",
";",
"log",
"info",
"(",
"\"",
"key",
":",
"\"",
"+",
"key",
"to",
"string",
"(",
")",
"+",
"\"",
"this",
"largest",
"num",
"of",
"values",
":",
"\"",
"+",
"this",
"largest",
"num",
"of",
"values",
")",
";",
"}",
"return",
"retv",
";",
"}"
]
|
[
"tests",
"the",
"proper",
"consumption",
"when",
"having",
"a",
"1",
":",
"1",
"correspondence",
"between",
"kafka",
"partitions",
"and",
"flink",
"sources"
]
| [
"public",
"void",
"run",
"one",
"to",
"one",
"exactly",
"once",
"test",
"(",
")",
"throws",
"exception",
"{",
"final",
"string",
"topic",
"=",
"\"",
"one",
"to",
"one",
"topic",
"\"",
";",
"final",
"int",
"parallelism",
"=",
"5",
";",
"final",
"int",
"num",
"elements",
"per",
"partition",
"=",
"1000",
";",
"final",
"int",
"total",
"elements",
"=",
"parallelism",
"*",
"num",
"elements",
"per",
"partition",
";",
"final",
"int",
"fail",
"after",
"elements",
"=",
"num",
"elements",
"per",
"partition",
"/",
"3",
";",
"create",
"test",
"topic",
"(",
"topic",
",",
"parallelism",
",",
"1",
")",
";",
"data",
"generators",
"generate",
"randomized",
"integer",
"sequence",
"(",
"stream",
"execution",
"environment",
"get",
"execution",
"environment",
"(",
")",
",",
"kafka",
"server",
",",
"topic",
",",
"parallelism",
",",
"num",
"elements",
"per",
"partition",
",",
"true",
")",
";",
"/",
"/",
"run",
"the",
"topology",
"that",
"fails",
"and",
"recovers",
"deserialization",
"schema",
"<",
"integer",
">",
"schema",
"=",
"new",
"type",
"information",
"serialization",
"schema",
"<",
">",
"(",
"basic",
"type",
"info",
"int",
"type",
"info",
",",
"new",
"execution",
"config",
"(",
")",
")",
";",
"stream",
"execution",
"environment",
"env",
"=",
"stream",
"execution",
"environment",
"get",
"execution",
"environment",
"(",
")",
";",
"env",
"enable",
"checkpointing",
"(",
"500",
")",
";",
"env",
"set",
"parallelism",
"(",
"parallelism",
")",
";",
"env",
"set",
"restart",
"strategy",
"(",
"restart",
"strategies",
"fixed",
"delay",
"restart",
"(",
"1",
",",
"0",
")",
")",
";",
"properties",
"props",
"=",
"new",
"properties",
"(",
")",
";",
"props",
"put",
"all",
"(",
"standard",
"props",
")",
";",
"props",
"put",
"all",
"(",
"secure",
"props",
")",
";",
"flink",
"kafka",
"consumer",
"base",
"<",
"integer",
">",
"kafka",
"source",
"=",
"kafka",
"server",
"get",
"consumer",
"(",
"topic",
",",
"schema",
",",
"props",
")",
";",
"env",
"add",
"source",
"(",
"kafka",
"source",
")",
"map",
"(",
"new",
"partition",
"validating",
"mapper",
"(",
"parallelism",
",",
"1",
")",
")",
"map",
"(",
"new",
"failing",
"identity",
"mapper",
"<",
"integer",
">",
"(",
"fail",
"after",
"elements",
")",
")",
"add",
"sink",
"(",
"new",
"validating",
"exactly",
"once",
"sink",
"(",
"total",
"elements",
")",
")",
"set",
"parallelism",
"(",
"1",
")",
";",
"failing",
"identity",
"mapper",
"failed",
"before",
"=",
"false",
";",
"try",
"execute",
"(",
"env",
",",
"\"",
"one",
"-",
"to",
"-",
"one",
"exactly",
"once",
"test",
"\"",
")",
";",
"delete",
"test",
"topic",
"(",
"topic",
")",
";",
"}"
]
|
[
"initializes",
"log",
"probabilities",
"based",
"on",
"counts",
"from",
"the",
"given",
"input",
"stream"
]
| [
"private",
"static",
"void",
"load",
"string",
"models",
"(",
"input",
"stream",
"trigram",
"file",
"stream",
",",
"string",
"filename",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"assume",
"it",
"'",
"s",
"a",
"valid",
"file",
"(",
"since",
"there",
"is",
"a",
"valid",
"input",
"stream",
"for",
"it",
")",
"ingest",
"model",
"(",
"trigram",
"file",
"stream",
",",
"filename",
")",
";",
"last",
"loaded",
"trigram",
"model",
"=",
"filename",
";",
"}"
]
|
[
"pass",
"through",
"'",
"f",
"'",
"after",
"ensuring",
"that",
"we",
"can",
"access",
"the",
"file",
"attributes"
]
| [
"private",
"file",
"stating",
"(",
"file",
"f",
")",
"{",
"filter",
"non",
"null",
"(",
")",
"stat",
"(",
"f",
")",
";",
"return",
"f",
";",
"}"
]
|
[
"adds",
"each",
"element",
"of",
"{",
"@",
"code",
"elements",
"}",
"to",
"the",
"{",
"@",
"code",
"immutable",
"sorted",
"set",
"}",
",",
"ignoring",
"duplicate",
"elements",
"(",
"only",
"the",
"first",
"duplicate",
"element",
"is",
"added",
")"
]
| [
"public",
"builder",
"<",
"e",
">",
"add",
"all",
"(",
"iterator",
"<",
"?",
"extends",
"e",
">",
"elements",
")",
"{",
"super",
"add",
"all",
"(",
"elements",
")",
";",
"return",
"this",
";",
"}"
]
|
[
"if",
"{",
"@",
"code",
"true",
"}",
"is",
"used",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"man",
"7",
"orglinuxman",
"-",
"pagesman",
"7ip",
"7",
"html",
"\"",
">",
"ip",
"transparent",
"is",
"enabled",
",",
"{",
"@",
"code",
"false",
"}",
"for",
"disable",
"it",
"default",
"is",
"disabled"
]
| [
"public",
"epoll",
"socket",
"channel",
"config",
"set",
"ip",
"transparent",
"(",
"boolean",
"transparent",
")",
"{",
"try",
"{",
"(",
"(",
"epoll",
"socket",
"channel",
")",
"channel",
")",
"socket",
"set",
"ip",
"transparent",
"(",
"transparent",
")",
";",
"return",
"this",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"throw",
"new",
"channel",
"exception",
"(",
"e",
")",
";",
"}",
"}"
]
|
[
"return",
"true",
"if",
"this",
"inline",
"response",
"default",
"object",
"is",
"equal",
"to",
"o"
]
| [
"public",
"boolean",
"equals",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"this",
"=",
"=",
"o",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"o",
"=",
"=",
"null",
"|",
"|",
"get",
"class",
"(",
")",
"!",
"=",
"o",
"get",
"class",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"inline",
"response",
"default",
"inline",
"response",
"default",
"=",
"(",
"inline",
"response",
"default",
")",
"o",
";",
"return",
"objects",
"equals",
"(",
"this",
"string",
",",
"inline",
"response",
"default",
"string",
")",
";",
"}"
]
|
[
"waits",
"till",
"all",
"existing",
"data",
"is",
"flushed",
"and",
"confirmations",
"received",
"from",
"datanodes"
]
| [
"protected",
"void",
"flush",
"internal",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"long",
"to",
"wait",
"for",
"=",
"flush",
"internal",
"without",
"waiting",
"ack",
"(",
")",
";",
"get",
"streamer",
"(",
")",
"wait",
"for",
"acked",
"seqno",
"(",
"to",
"wait",
"for",
")",
";",
"}"
]
|
[
"adds",
"a",
"type",
"information",
"hint",
"about",
"the",
"return",
"type",
"of",
"this",
"operator",
"this",
"method",
"can",
"be",
"used",
"in",
"cases",
"where",
"flink",
"cannot",
"determine",
"automatically",
"what",
"the",
"produced",
"type",
"of",
"a",
"function",
"is",
"that",
"can",
"be",
"the",
"case",
"if",
"the",
"function",
"uses",
"generic",
"type",
"variables",
"in",
"the",
"return",
"type",
"that",
"cannot",
"be",
"inferred",
"from",
"the",
"input",
"type",
"classes",
"can",
"be",
"used",
"as",
"type",
"hints",
"for",
"non",
"-",
"generic",
"types",
"(",
"classes",
"without",
"generic",
"parameters",
")",
",",
"but",
"not",
"for",
"generic",
"types",
"like",
"for",
"example",
"tuples",
"for",
"those",
"generic",
"types",
",",
"please",
"use",
"the",
"{",
"@",
"link",
"#",
"returns",
"(",
"type",
"hint",
")",
"}",
"method",
"use",
"this",
"method",
"the",
"following",
"way",
":",
"{",
"@",
"code",
"data",
"set",
"<",
"string",
"[",
"]",
">",
"result",
"=",
"data",
"1",
"join",
"(",
"data",
"2",
")",
"where",
"(",
"\"",
"id",
"\"",
")",
"equal",
"to",
"(",
"\"",
"field",
"x",
"\"",
")",
"with",
"(",
"new",
"join",
"function",
"with",
"non",
"inferrable",
"return",
"type",
"(",
")",
")",
"returns",
"(",
"string",
"[",
"]",
"class",
")",
";",
"}"
]
| [
"public",
"o",
"returns",
"(",
"class",
"<",
"out",
">",
"type",
"class",
")",
"{",
"require",
"non",
"null",
"(",
"type",
"class",
",",
"\"",
"type",
"class",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"try",
"{",
"return",
"returns",
"(",
"type",
"information",
"of",
"(",
"type",
"class",
")",
")",
";",
"}",
"catch",
"(",
"invalid",
"types",
"exception",
"e",
")",
"{",
"throw",
"new",
"invalid",
"types",
"exception",
"(",
"\"",
"cannot",
"infer",
"the",
"type",
"information",
"from",
"the",
"class",
"alone",
"\"",
"+",
"\"",
"this",
"is",
"most",
"likely",
"because",
"the",
"class",
"represents",
"a",
"generic",
"type",
"in",
"that",
"case",
",",
"\"",
"+",
"\"",
"please",
"use",
"the",
"'",
"returns",
"(",
"type",
"hint",
")",
"'",
"method",
"instead",
"\"",
",",
"e",
")",
";",
"}",
"}"
]
|
[
"find",
"a",
"header",
"value",
"holder",
"by",
"name",
",",
"ignoring",
"casing"
]
| [
"public",
"static",
"header",
"value",
"holder",
"get",
"by",
"name",
"(",
"map",
"<",
"string",
",",
"header",
"value",
"holder",
">",
"headers",
",",
"string",
"name",
")",
"{",
"assert",
"not",
"null",
"(",
"name",
",",
"\"",
"header",
"name",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"for",
"(",
"map",
"entry",
"<",
"string",
",",
"header",
"value",
"holder",
">",
"entry",
":",
"headers",
"entry",
"set",
"(",
")",
")",
"{",
"if",
"(",
"entry",
"get",
"key",
"(",
")",
"equals",
"ignore",
"case",
"(",
"name",
")",
")",
"{",
"return",
"entry",
"get",
"value",
"(",
")",
";",
"}",
"}",
"return",
"null",
";",
"}"
]
|
[
"returns",
"the",
"provider",
"key",
"from",
"an",
"info",
"(",
"provider",
"instance",
")"
]
| [
"private",
"static",
"provider",
"key",
"get",
"provider",
"key",
"(",
"info",
"info",
")",
"throws",
"eval",
"exception",
"{",
"provider",
"provider",
"=",
"info",
"get",
"provider",
"(",
")",
";",
"if",
"(",
"!",
"provider",
"is",
"exported",
"(",
")",
")",
"{",
"/",
"/",
"todo",
"(",
"adonovan",
")",
":",
"report",
"separate",
"error",
"events",
"at",
"distinct",
"locations",
":",
"/",
"/",
"\"",
"cannot",
"return",
"non",
"-",
"exported",
"provider",
"\"",
"(",
"at",
"location",
"of",
"instantiation",
")",
",",
"and",
"/",
"/",
"\"",
"provider",
"definition",
"not",
"at",
"top",
"level",
"\"",
"(",
"at",
"location",
"of",
"definition",
")",
"throw",
"info",
"error",
"(",
"info",
",",
"\"",
"the",
"rule",
"implementation",
"function",
"returned",
"an",
"instance",
"of",
"an",
"unnamed",
"provider",
"\"",
"+",
"\"",
"a",
"provider",
"becomes",
"named",
"by",
"being",
"assigned",
"to",
"a",
"global",
"variable",
"in",
"a",
"bzl",
"file",
"\"",
"+",
"\"",
"(",
"provider",
"defined",
"at",
"%",
"s",
")",
"\"",
",",
"provider",
"get",
"location",
"(",
")",
")",
";",
"}",
"return",
"provider",
"get",
"key",
"(",
")",
";",
"}"
]
|
[
"returns",
"a",
"{",
"@",
"code",
"data",
"descriptor",
"}",
"view",
"of",
"the",
"given",
"buffer",
"the",
"buffer",
"is",
"assumed",
"to",
"contain",
"a",
"valid",
"\"",
"data",
"descriptor",
"\"",
"record",
"beginning",
"at",
"the",
"buffers",
"current",
"position"
]
| [
"public",
"static",
"data",
"descriptor",
"view",
"of",
"(",
"byte",
"buffer",
"buffer",
")",
"{",
"data",
"descriptor",
"view",
"=",
"new",
"data",
"descriptor",
"(",
"buffer",
"slice",
"(",
")",
")",
";",
"int",
"size",
"=",
"view",
"get",
"size",
"(",
")",
";",
"view",
"buffer",
"position",
"(",
"0",
")",
"limit",
"(",
"size",
")",
";",
"buffer",
"position",
"(",
"buffer",
"position",
"(",
")",
"+",
"size",
")",
";",
"return",
"view",
";",
"}"
]
|
[
"calculates",
"the",
"fingerprint",
"for",
"a",
"given",
"hash",
"the",
"fingerprint",
"is",
"simply",
"the",
"first",
"`",
"bits",
"per",
"entry",
"`",
"number",
"of",
"bits",
"that",
"are",
"non",
"-",
"zero",
"if",
"the",
"entire",
"hash",
"is",
"zero",
",",
"`",
"(",
"int",
")",
"1",
"`",
"is",
"used",
"expert",
"-",
"level",
"api"
]
| [
"static",
"int",
"fingerprint",
"(",
"int",
"hash",
",",
"int",
"bits",
"per",
"entry",
",",
"int",
"fingerprint",
"mask",
")",
"{",
"if",
"(",
"hash",
"=",
"=",
"0",
")",
"{",
"/",
"/",
"we",
"use",
"0",
"as",
"\"",
"empty",
"\"",
"so",
"if",
"the",
"hash",
"actually",
"hashes",
"to",
"zero",
"return",
"1",
"/",
"/",
"some",
"other",
"impls",
"will",
"re",
"-",
"hash",
"with",
"a",
"salt",
"but",
"this",
"seems",
"simpler",
"return",
"1",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"+",
"bits",
"per",
"entry",
"<",
"=",
"long",
"size",
";",
"i",
"+",
"=",
"bits",
"per",
"entry",
")",
"{",
"int",
"v",
"=",
"(",
"hash",
">",
">",
"i",
")",
"&",
"fingerprint",
"mask",
";",
"if",
"(",
"v",
"!",
"=",
"0",
")",
"{",
"return",
"v",
";",
"}",
"}",
"return",
"1",
";",
"}"
]
|
[
"returns",
"the",
"injection",
"point",
"to",
"which",
"this",
"dependency",
"belongs",
",",
"or",
"null",
"if",
"this",
"dependency",
"isn",
"'",
"t",
"attached",
"to",
"a",
"particular",
"injection",
"point"
]
| [
"public",
"injection",
"point",
"get",
"injection",
"point",
"(",
")",
"{",
"return",
"injection",
"point",
";",
"}"
]
|
[
"here",
"we",
"create",
"the",
"following",
"requests",
"queue",
"structure",
":",
"r1",
"1",
",",
"w1",
"2",
",",
"r1",
"3",
",",
"r2",
"1",
",",
"r2",
"2",
",",
"w2",
"3",
",",
"r2",
"4",
",",
"r3",
"1",
",",
"r3",
"2",
",",
"r3",
"3",
",",
"w3",
"4",
",",
"r3",
"5",
",",
",",
"w5",
"6",
",",
"r5",
"7",
"i",
"e",
",",
"5",
"sessions",
",",
"each",
"has",
"different",
"amount",
"or",
"read",
"requests",
",",
"followed",
"by",
"single",
"write",
"and",
"afterwards",
"single",
"read",
"the",
"idea",
"is",
"to",
"check",
"that",
"all",
"of",
"the",
"reads",
"that",
"can",
"be",
"processed",
"concurrently",
"do",
"so",
",",
"and",
"that",
"none",
"of",
"the",
"uncommited",
"requests",
",",
"followed",
"by",
"the",
"reads",
"are",
"processed"
]
| [
"public",
"void",
"process",
"as",
"much",
"uncommitted",
"requests",
"as",
"possible",
"test",
"(",
")",
"throws",
"exception",
"{",
"final",
"string",
"path",
"=",
"\"",
"/",
"test",
"as",
"much",
"as",
"possible",
"\"",
";",
"list",
"<",
"request",
">",
"should",
"be",
"processed",
"=",
"new",
"linked",
"list",
"<",
"request",
">",
"(",
")",
";",
"set",
"<",
"request",
">",
"should",
"not",
"be",
"processed",
"=",
"new",
"hash",
"set",
"<",
"request",
">",
"(",
")",
";",
"for",
"(",
"int",
"session",
"id",
"=",
"1",
";",
"session",
"id",
"<",
"=",
"5",
";",
"+",
"+",
"session",
"id",
")",
"{",
"for",
"(",
"int",
"read",
"req",
"id",
"=",
"1",
";",
"read",
"req",
"id",
"<",
"=",
"session",
"id",
";",
"+",
"+",
"read",
"req",
"id",
")",
"{",
"request",
"read",
"req",
"=",
"new",
"request",
"(",
"new",
"get",
"data",
"request",
"(",
"path",
",",
"false",
")",
",",
"op",
"code",
"get",
"data",
",",
"session",
"id",
",",
"read",
"req",
"id",
")",
";",
"should",
"be",
"processed",
"add",
"(",
"read",
"req",
")",
";",
"processor",
"queued",
"requests",
"add",
"(",
"read",
"req",
")",
";",
"}",
"request",
"write",
"req",
"=",
"new",
"request",
"(",
"new",
"create",
"request",
"(",
"path",
",",
"new",
"byte",
"[",
"0",
"]",
",",
"ids",
"open",
"acl",
"unsafe",
",",
"create",
"mode",
"persistent",
"sequential",
"to",
"flag",
"(",
")",
")",
",",
"op",
"code",
"create",
",",
"session",
"id",
",",
"session",
"id",
"+",
"1",
")",
";",
"request",
"read",
"req",
"=",
"new",
"request",
"(",
"new",
"get",
"data",
"request",
"(",
"path",
",",
"false",
")",
",",
"op",
"code",
"get",
"data",
",",
"session",
"id",
",",
"session",
"id",
"+",
"2",
")",
";",
"processor",
"queued",
"requests",
"add",
"(",
"write",
"req",
")",
";",
"processor",
"queued",
"write",
"requests",
"add",
"(",
"write",
"req",
")",
";",
"processor",
"queued",
"requests",
"add",
"(",
"read",
"req",
")",
";",
"should",
"not",
"be",
"processed",
"add",
"(",
"write",
"req",
")",
";",
"should",
"not",
"be",
"processed",
"add",
"(",
"read",
"req",
")",
";",
"}",
"processor",
"init",
"threads",
"(",
"default",
"size",
"of",
"thread",
"pool",
")",
";",
"processor",
"stopped",
"main",
"loop",
"=",
"true",
";",
"processor",
"run",
"(",
")",
";",
"thread",
"sleep",
"(",
"1000",
")",
";",
"should",
"be",
"processed",
"remove",
"all",
"(",
"processed",
"requests",
")",
";",
"for",
"(",
"request",
"r",
":",
"should",
"be",
"processed",
")",
"{",
"log",
"error",
"(",
"\"",
"did",
"not",
"process",
"{",
"}",
"\"",
",",
"r",
")",
";",
"}",
"assert",
"true",
"(",
"should",
"be",
"processed",
"is",
"empty",
"(",
")",
",",
"\"",
"not",
"all",
"requests",
"were",
"processed",
"\"",
")",
";",
"assert",
"false",
"(",
"should",
"not",
"be",
"processed",
"remove",
"all",
"(",
"processed",
"requests",
")",
",",
"\"",
"processed",
"a",
"wrong",
"request",
"\"",
")",
";",
"}"
]
|
[
"returns",
"the",
"total",
"number",
"of",
"compressed",
"bytes",
"input",
"so",
"far"
]
| [
"public",
"long",
"get",
"bytes",
"read",
"(",
")",
"{",
"check",
"stream",
"(",
")",
";",
"return",
"get",
"bytes",
"read",
"(",
"stream",
")",
";",
"}"
]
|
[
"creates",
"a",
"new",
"set",
"of",
"rotation",
"options",
"to",
"use",
"a",
"specific",
"rotation",
"angle",
"the",
"rotation",
"will",
"be",
"carried",
"out",
"in",
"the",
"pipeline"
]
| [
"public",
"static",
"rotation",
"options",
"force",
"rotation",
"(",
"@",
"rotation",
"angle",
"int",
"angle",
")",
"{",
"return",
"new",
"rotation",
"options",
"(",
"angle",
",",
"false",
")",
";",
"}"
]
|
[
"create",
"a",
"transaction",
"status",
"instance",
"for",
"the",
"given",
"arguments"
]
| [
"protected",
"default",
"transaction",
"status",
"new",
"transaction",
"status",
"(",
"transaction",
"definition",
"definition",
",",
"@",
"nullable",
"object",
"transaction",
",",
"boolean",
"new",
"transaction",
",",
"boolean",
"new",
"synchronization",
",",
"boolean",
"debug",
",",
"@",
"nullable",
"object",
"suspended",
"resources",
")",
"{",
"boolean",
"actual",
"new",
"synchronization",
"=",
"new",
"synchronization",
"&",
"&",
"!",
"transaction",
"synchronization",
"manager",
"is",
"synchronization",
"active",
"(",
")",
";",
"return",
"new",
"default",
"transaction",
"status",
"(",
"transaction",
",",
"new",
"transaction",
",",
"actual",
"new",
"synchronization",
",",
"definition",
"is",
"read",
"only",
"(",
")",
",",
"debug",
",",
"suspended",
"resources",
")",
";",
"}"
]
|
[
"get",
"prefix",
"ns",
"wrapped",
"array"
]
| [
"public",
"list",
"<",
"integer",
">",
"get",
"prefix",
"ns",
"wrapped",
"array",
"(",
")",
"{",
"return",
"prefix",
"ns",
"wrapped",
"array",
";",
"}"
]
|
[
"returns",
"a",
"{",
"@",
"link",
"internal",
"timer",
"service",
"}",
"that",
"can",
"be",
"used",
"to",
"query",
"current",
"processing",
"time",
"and",
"event",
"time",
"and",
"to",
"set",
"timers",
"an",
"operator",
"can",
"have",
"several",
"timer",
"services",
",",
"where",
"each",
"has",
"its",
"own",
"namespace",
"serializer",
"timer",
"services",
"are",
"differentiated",
"by",
"the",
"string",
"key",
"that",
"is",
"given",
"when",
"requesting",
"them",
",",
"if",
"you",
"call",
"this",
"method",
"with",
"the",
"same",
"key",
"multiple",
"times",
"you",
"will",
"get",
"the",
"same",
"timer",
"service",
"instance",
"in",
"subsequent",
"requests",
"timers",
"are",
"always",
"scoped",
"to",
"a",
"key",
",",
"the",
"currently",
"active",
"key",
"of",
"a",
"keyed",
"stream",
"operation",
"when",
"a",
"timer",
"fires",
",",
"this",
"key",
"will",
"also",
"be",
"set",
"as",
"the",
"currently",
"active",
"key",
"each",
"timer",
"has",
"attached",
"metadata",
",",
"the",
"namespace",
"different",
"timer",
"services",
"can",
"have",
"a",
"different",
"namespace",
"type",
"if",
"you",
"don",
"'",
"t",
"need",
"namespace",
"differentiation",
"you",
"can",
"use",
"{",
"@",
"link",
"void",
"namespace",
"serializer",
"}",
"as",
"the",
"namespace",
"serializer"
]
| [
"public",
"<",
"k",
",",
"n",
">",
"internal",
"timer",
"service",
"<",
"n",
">",
"get",
"internal",
"timer",
"service",
"(",
"string",
"name",
",",
"type",
"serializer",
"<",
"n",
">",
"namespace",
"serializer",
",",
"triggerable",
"<",
"k",
",",
"n",
">",
"triggerable",
")",
"{",
"if",
"(",
"time",
"service",
"manager",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"\"",
"the",
"timer",
"service",
"has",
"not",
"been",
"initialized",
"\"",
")",
";",
"}",
"@",
"suppress",
"warnings",
"(",
"\"",
"unchecked",
"\"",
")",
"internal",
"time",
"service",
"manager",
"<",
"k",
">",
"keyed",
"time",
"service",
"handler",
"=",
"(",
"internal",
"time",
"service",
"manager",
"<",
"k",
">",
")",
"time",
"service",
"manager",
";",
"keyed",
"state",
"backend",
"<",
"k",
">",
"keyed",
"state",
"backend",
"=",
"get",
"keyed",
"state",
"backend",
"(",
")",
";",
"check",
"state",
"(",
"keyed",
"state",
"backend",
"!",
"=",
"null",
",",
"\"",
"timers",
"can",
"only",
"be",
"used",
"on",
"keyed",
"operators",
"\"",
")",
";",
"return",
"keyed",
"time",
"service",
"handler",
"get",
"internal",
"timer",
"service",
"(",
"name",
",",
"keyed",
"state",
"backend",
"get",
"key",
"serializer",
"(",
")",
",",
"namespace",
"serializer",
",",
"triggerable",
")",
";",
"}"
]
|
[
"get",
"the",
"{",
"@",
"linkplain",
"platform",
"transaction",
"manager",
"transaction",
"manager",
"}",
"to",
"use",
"for",
"the",
"supplied",
"{",
"@",
"linkplain",
"test",
"context",
"test",
"context",
"}",
"and",
"{",
"@",
"code",
"qualifier",
"}",
"delegates",
"to",
"{",
"@",
"link",
"#",
"get",
"transaction",
"manager",
"(",
"test",
"context",
")",
"}",
"if",
"the",
"supplied",
"{",
"@",
"code",
"qualifier",
"}",
"is",
"{",
"@",
"code",
"null",
"}",
"or",
"empty"
]
| [
"protected",
"platform",
"transaction",
"manager",
"get",
"transaction",
"manager",
"(",
"test",
"context",
"test",
"context",
",",
"@",
"nullable",
"string",
"qualifier",
")",
"{",
"/",
"/",
"look",
"up",
"by",
"type",
"and",
"qualifier",
"from",
"@",
"transactional",
"if",
"(",
"string",
"utils",
"has",
"text",
"(",
"qualifier",
")",
")",
"{",
"try",
"{",
"/",
"/",
"use",
"autowire",
"-",
"capable",
"factory",
"in",
"order",
"to",
"support",
"extended",
"qualifier",
"matching",
"/",
"/",
"(",
"only",
"exposed",
"on",
"the",
"internal",
"bean",
"factory",
",",
"not",
"on",
"the",
"application",
"context",
")",
"bean",
"factory",
"bf",
"=",
"test",
"context",
"get",
"application",
"context",
"(",
")",
"get",
"autowire",
"capable",
"bean",
"factory",
"(",
")",
";",
"return",
"bean",
"factory",
"annotation",
"utils",
"qualified",
"bean",
"of",
"type",
"(",
"bf",
",",
"platform",
"transaction",
"manager",
"class",
",",
"qualifier",
")",
";",
"}",
"catch",
"(",
"runtime",
"exception",
"ex",
")",
"{",
"if",
"(",
"logger",
"is",
"warn",
"enabled",
"(",
")",
")",
"{",
"logger",
"warn",
"(",
"string",
"format",
"(",
"\"",
"caught",
"exception",
"while",
"retrieving",
"transaction",
"manager",
"with",
"qualifier",
"'",
"%",
"s",
"'",
"for",
"test",
"context",
"%",
"s",
"\"",
",",
"qualifier",
",",
"test",
"context",
")",
",",
"ex",
")",
";",
"}",
"throw",
"ex",
";",
"}",
"}",
"/",
"/",
"else",
"return",
"get",
"transaction",
"manager",
"(",
"test",
"context",
")",
";",
"}"
]
|
[
"return",
"string",
"representation",
"for",
"debugging",
"purposes"
]
| [
"public",
"string",
"to",
"string",
"(",
")",
"{",
"return",
"\"",
"field",
"range",
":",
"(",
"\"",
"+",
"start",
"+",
"\"",
":",
":",
"\"",
"+",
"end",
"+",
"\"",
")",
"\"",
";",
"}"
]
|
[
"generate",
"a",
"string",
"to",
"be",
"used",
"as",
"the",
"key",
"for",
"the",
"given",
"locality",
"in",
"the",
"lb",
"policy",
"config"
]
| [
"private",
"static",
"string",
"locality",
"name",
"(",
"locality",
"locality",
")",
"{",
"return",
"locality",
"to",
"string",
"(",
")",
";",
"}"
]
|
[
"returns",
"the",
"data",
"of",
"the",
"http",
"response",
"as",
"an",
"{",
"@",
"link",
"input",
"stream",
"}",
"<",
"b",
">",
"<",
"br",
">",
"warning",
":",
"<",
"b",
">",
"do",
"not",
"store",
"a",
"reference",
"to",
"this",
"input",
"stream",
"outside",
"of",
"{",
"@",
"link",
"http",
"response",
"listener",
"#",
"handle",
"http",
"response",
"(",
"http",
"response",
")",
"}",
"the",
"underlying",
"http",
"connection",
"will",
"be",
"closed",
"after",
"that",
"callback",
"finishes",
"executing",
"reading",
"from",
"the",
"input",
"stream",
"after",
"it",
"'",
"s",
"connection",
"has",
"been",
"closed",
"will",
"lead",
"to",
"exception"
]
| [
"input",
"stream",
"get",
"result",
"as",
"stream",
"(",
")",
";"
]
|
[
"prints",
"the",
"current",
"version",
",",
"revision",
"and",
"build",
"date",
"to",
"the",
"standard",
"out"
]
| [
"public",
"static",
"void",
"main",
"(",
"string",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"args",
"length",
">",
"1",
")",
"{",
"print",
"usage",
"(",
")",
";",
"}",
"if",
"(",
"args",
"length",
"=",
"=",
"0",
"|",
"|",
"(",
"args",
"length",
"=",
"=",
"1",
"&",
"&",
"args",
"[",
"0",
"]",
"equals",
"(",
"\"",
"-",
"-",
"full",
"\"",
")",
")",
")",
"{",
"system",
"out",
"println",
"(",
"get",
"full",
"version",
"(",
")",
")",
";",
"service",
"utils",
"request",
"system",
"exit",
"(",
"exit",
"code",
"execution",
"finished",
"get",
"value",
"(",
")",
")",
";",
"}",
"if",
"(",
"args",
"[",
"0",
"]",
"equals",
"(",
"\"",
"-",
"-",
"short",
"\"",
")",
")",
"{",
"system",
"out",
"println",
"(",
"get",
"version",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"args",
"[",
"0",
"]",
"equals",
"(",
"\"",
"-",
"-",
"revision",
"\"",
")",
")",
"{",
"system",
"out",
"println",
"(",
"get",
"version",
"revision",
"(",
")",
")",
";",
"}",
"else",
"{",
"print",
"usage",
"(",
")",
";",
"}",
"service",
"utils",
"request",
"system",
"exit",
"(",
"exit",
"code",
"execution",
"finished",
"get",
"value",
"(",
")",
")",
";",
"}"
]
|
[
"register",
"a",
"customized",
"library"
]
| [
"public",
"synchronized",
"static",
"long",
"register",
"library",
"(",
"string",
"library",
"name",
",",
"string",
"clazz",
")",
"{",
"assert",
"native",
"library",
"loaded",
"(",
")",
";",
"final",
"long",
"ret",
"=",
"j",
"n",
"i",
"register",
"module",
"(",
"library",
"name",
"get",
"bytes",
"(",
"charsets",
"utf",
"8",
")",
",",
"clazz",
"get",
"bytes",
"(",
"charsets",
"utf",
"8",
")",
")",
";",
"if",
"(",
"ret",
"!",
"=",
"0",
")",
"{",
"log",
"warn",
"(",
"\"",
"can",
"'",
"t",
"create",
"native",
"object",
"for",
"class",
"\"",
"+",
"clazz",
"+",
"\"",
",",
"probably",
"not",
"exist",
"\"",
")",
";",
"}",
"return",
"ret",
";",
"}"
]
|
[
"return",
"if",
"this",
"status",
"represents",
"a",
"field",
"or",
"object",
"error"
]
| [
"public",
"boolean",
"is",
"error",
"(",
")",
"{",
"return",
"(",
"this",
"error",
"codes",
"length",
">",
"0",
")",
";",
"}"
]
|
[
"sorts",
"this",
"array",
"the",
"array",
"elements",
"must",
"implement",
"{",
"@",
"link",
"comparable",
"}",
"this",
"method",
"is",
"not",
"thread",
"safe",
"(",
"uses",
"{",
"@",
"link",
"sort",
"#",
"instance",
"(",
")",
"}",
")"
]
| [
"public",
"void",
"sort",
"(",
")",
"{",
"sort",
"instance",
"(",
")",
"sort",
"(",
"items",
",",
"0",
",",
"size",
")",
";",
"}"
]
|
[
"adapt",
"the",
"given",
"predicate",
"and",
"response",
"provider",
"function",
"to",
"a",
"filter",
"function",
"that",
"returns",
"a",
"{",
"@",
"code",
"server",
"response",
"}",
"on",
"a",
"given",
"exception"
]
| [
"static",
"<",
"t",
"extends",
"server",
"response",
">",
"handler",
"filter",
"function",
"<",
"t",
",",
"t",
">",
"of",
"error",
"handler",
"(",
"predicate",
"<",
"throwable",
">",
"predicate",
",",
"bi",
"function",
"<",
"throwable",
",",
"server",
"request",
",",
"t",
">",
"error",
"handler",
")",
"{",
"assert",
"not",
"null",
"(",
"predicate",
",",
"\"",
"predicate",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"assert",
"not",
"null",
"(",
"error",
"handler",
",",
"\"",
"error",
"handler",
"must",
"not",
"be",
"null",
"\"",
")",
";",
"return",
"(",
"request",
",",
"next",
")",
"-",
">",
"{",
"try",
"{",
"t",
"t",
"=",
"next",
"handle",
"(",
"request",
")",
";",
"if",
"(",
"t",
"instanceof",
"error",
"handling",
"server",
"response",
")",
"{",
"(",
"(",
"error",
"handling",
"server",
"response",
")",
"t",
")",
"add",
"error",
"handler",
"(",
"predicate",
",",
"error",
"handler",
")",
";",
"}",
"return",
"t",
";",
"}",
"catch",
"(",
"throwable",
"throwable",
")",
"{",
"if",
"(",
"predicate",
"test",
"(",
"throwable",
")",
")",
"{",
"return",
"error",
"handler",
"apply",
"(",
"throwable",
",",
"request",
")",
";",
"}",
"else",
"{",
"throw",
"throwable",
";",
"}",
"}",
"}",
";",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"create",
"a",
"statement"
]
| [
"public",
"static",
"statement",
"statement",
"(",
"boolean",
"allow",
",",
"string",
"scope",
",",
"collection",
"<",
"string",
">",
"actions",
")",
"{",
"return",
"new",
"statement",
"(",
"role",
"model",
"effect",
"(",
"allow",
")",
")",
"add",
"actions",
"(",
"actions",
")",
"add",
"resources",
"(",
"scope",
")",
";",
"}"
]
|
[
"combines",
"a",
"pair",
"of",
"strings",
"as",
"two",
"columns",
",",
"or",
"if",
"this",
"is",
"one",
"-",
"column",
"output",
",",
"format",
"the",
"otherwise",
"-",
"second",
"column"
]
| [
"protected",
"final",
"string",
"two",
"columns",
"(",
"string",
"s",
"1",
",",
"string",
"s",
"2",
")",
"{",
"int",
"w",
"1",
"=",
"get",
"width",
"1",
"(",
")",
";",
"int",
"w",
"2",
"=",
"get",
"width",
"2",
"(",
")",
";",
"try",
"{",
"if",
"(",
"w",
"1",
"=",
"=",
"0",
")",
"{",
"int",
"len",
"2",
"=",
"s",
"2",
"length",
"(",
")",
";",
"string",
"writer",
"sw",
"=",
"new",
"string",
"writer",
"(",
"len",
"2",
"*",
"2",
")",
";",
"indenting",
"writer",
"iw",
"=",
"new",
"indenting",
"writer",
"(",
"sw",
",",
"w",
"2",
",",
"separator",
")",
";",
"iw",
"write",
"(",
"s",
"2",
")",
";",
"if",
"(",
"(",
"len",
"2",
"=",
"=",
"0",
")",
"|",
"|",
"(",
"s",
"2",
"char",
"at",
"(",
"len",
"2",
"-",
"1",
")",
"!",
"=",
"'",
"\\",
"n",
"'",
")",
")",
"{",
"iw",
"write",
"(",
"'",
"\\",
"n",
"'",
")",
";",
"}",
"iw",
"flush",
"(",
")",
";",
"return",
"sw",
"to",
"string",
"(",
")",
";",
"}",
"else",
"{",
"return",
"two",
"column",
"output",
"to",
"string",
"(",
"s",
"1",
",",
"w",
"1",
",",
"separator",
",",
"s",
"2",
",",
"w",
"2",
")",
";",
"}",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ex",
")",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"ex",
")",
";",
"}",
"}"
]
|
[
"tests",
"config",
"keys",
"with",
"multiple",
"requirements"
]
| [
"public",
"void",
"multi",
"condition",
"config",
"keys",
"(",
")",
"throws",
"exception",
"{",
"write",
"hello",
"rules",
"(",
"/",
"*",
"include",
"default",
"condition",
"=",
"*",
"/",
"true",
")",
";",
"scratch",
"file",
"(",
"\"",
"conditions",
"/",
"build",
"\"",
",",
"\"",
"config",
"setting",
"(",
"\"",
",",
"\"",
"name",
"=",
"'",
"a",
"'",
",",
"\"",
",",
"\"",
"values",
"=",
"{",
"\"",
",",
"\"",
"'",
"test",
"arg",
"'",
":",
"'",
"a",
"'",
",",
"\"",
",",
"\"",
"'",
"compilation",
"mode",
"'",
":",
"'",
"dbg",
"'",
"\"",
",",
"\"",
"}",
")",
"\"",
",",
"\"",
"config",
"setting",
"(",
"\"",
",",
"\"",
"name",
"=",
"'",
"b",
"'",
",",
"\"",
",",
"\"",
"values",
"=",
"{",
"'",
"test",
"arg",
"'",
":",
"'",
"b",
"'",
"}",
")",
"\"",
")",
";",
"check",
"rule",
"(",
"\"",
"/",
"/",
"java",
"/",
"hello",
":",
"hello",
"\"",
",",
"\"",
"-",
"-",
"test",
"arg",
"=",
"a",
"\"",
",",
"/",
"*",
"expected",
":",
"*",
"/",
"immutable",
"list",
"of",
"(",
"defaultdep",
"input",
")",
",",
"/",
"*",
"not",
"expected",
":",
"*",
"/",
"immutable",
"list",
"of",
"(",
"adep",
"input",
",",
"bdep",
"input",
")",
")",
";",
"check",
"rule",
"(",
"\"",
"/",
"/",
"java",
"/",
"hello",
":",
"hello",
"\"",
",",
"immutable",
"list",
"of",
"(",
"\"",
"-",
"-",
"test",
"arg",
"=",
"a",
"\"",
",",
"\"",
"-",
"-",
"compilation",
"mode",
"=",
"dbg",
"\"",
")",
",",
"/",
"*",
"expected",
":",
"*",
"/",
"immutable",
"list",
"of",
"(",
"adep",
"input",
")",
",",
"/",
"*",
"not",
"expected",
":",
"*",
"/",
"immutable",
"list",
"of",
"(",
"bdep",
"input",
",",
"defaultdep",
"input",
")",
")",
";",
"}"
]
|
[
"validates",
"the",
"given",
"address",
"for",
"this",
"transport"
]
| [
"void",
"validate",
"socket",
"address",
"(",
"socket",
"address",
"address",
")",
"{",
"if",
"(",
"!",
"socket",
"address",
"validator",
"is",
"valid",
"socket",
"address",
"(",
"address",
")",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"invalid",
"address",
"\"",
"+",
"address",
"+",
"\"",
"for",
"transport",
"\"",
"+",
"this",
")",
";",
"}",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"setget",
"the",
"damping",
"ratio",
"(",
"dimensionless",
")"
]
| [
"public",
"float",
"get",
"damping",
"ratio",
"(",
")",
"{",
"return",
"jni",
"get",
"damping",
"ratio",
"(",
"addr",
")",
";",
"}"
]
|
[
"returns",
"the",
"minimum",
"word",
"length",
"below",
"which",
"words",
"will",
"be",
"ignored",
"set",
"this",
"to",
"0",
"for",
"no",
"minimum",
"word",
"length",
"the",
"default",
"is",
"{",
"@",
"link",
"#",
"default",
"min",
"word",
"length",
"}"
]
| [
"public",
"int",
"get",
"min",
"word",
"len",
"(",
")",
"{",
"return",
"min",
"word",
"len",
";",
"}"
]
|
[
"remove",
"a",
"{",
"@",
"link",
"event",
"listener",
"dubbo",
"event",
"listener",
"}"
]
| [
"default",
"void",
"remove",
"event",
"listeners",
"(",
"iterable",
"<",
"e",
">",
"listeners",
")",
"throws",
"null",
"pointer",
"exception",
",",
"illegal",
"argument",
"exception",
"{",
"stream",
"(",
"listeners",
"spliterator",
"(",
")",
",",
"false",
")",
"for",
"each",
"(",
"this",
":",
":",
"remove",
"event",
"listener",
")",
";",
"}"
]
|
[
"return",
"whether",
"the",
"marker",
"set",
"intersections",
"with",
"the",
"given",
"range"
]
| [
"public",
"boolean",
"intersects",
"(",
"address",
"start",
",",
"address",
"end",
")",
"{",
"return",
"marker",
"set",
"intersects",
"(",
"start",
",",
"end",
")",
";",
"}"
]
|
[
"set",
"the",
"clipboard",
"contents",
"with",
"the",
"list",
"of",
"tree",
"nodes"
]
| [
"private",
"void",
"set",
"clipboard",
"contents",
"(",
"g",
"tree",
"g",
"tree",
",",
"clipboard",
"clipboard",
",",
"list",
"<",
"g",
"tree",
"node",
">",
"list",
")",
"{",
"g",
"tree",
"transfer",
"handler",
"drag",
"n",
"drop",
"handler",
"=",
"g",
"tree",
"get",
"drag",
"n",
"drop",
"handler",
"(",
")",
";",
"transferable",
"contents",
"=",
"new",
"data",
"type",
"tree",
"node",
"transferable",
"(",
"drag",
"n",
"drop",
"handler",
",",
"list",
")",
";",
"clipboard",
"set",
"contents",
"(",
"contents",
",",
"clipboard",
"owner",
")",
";",
"}"
]
|
[
"the",
"cooperative",
"assignor",
"must",
"do",
"some",
"additional",
"work",
"and",
"verification",
"of",
"some",
"assignments",
"relative",
"to",
"the",
"eager",
"assignor",
",",
"since",
"it",
"may",
"or",
"may",
"not",
"need",
"to",
"trigger",
"a",
"second",
"follow",
"-",
"up",
"rebalance",
"in",
"addition",
"to",
"the",
"validity",
"requirements",
"described",
"in",
"{",
"@",
"link",
"org",
"apache",
"kafka",
"clients",
"consumer",
"internals",
"abstract",
"sticky",
"assignor",
"test",
"#",
"verify",
"validity",
"and",
"balance",
"(",
"map",
",",
"map",
",",
"map",
")",
"}",
",",
"we",
"must",
"verify",
"that",
"no",
"partition",
"is",
"being",
"revoked",
"and",
"reassigned",
"during",
"the",
"same",
"rebalance",
"this",
"means",
"the",
"initial",
"assignment",
"may",
"be",
"unbalanced",
",",
"so",
"if",
"we",
"do",
"detect",
"partitions",
"being",
"revoked",
"we",
"should",
"trigger",
"a",
"second",
"\"",
"rebalance",
"\"",
"to",
"get",
"the",
"final",
"assignment",
"and",
"then",
"verify",
"that",
"it",
"is",
"both",
"valid",
"and",
"balanced"
]
| [
"public",
"void",
"verify",
"validity",
"and",
"balance",
"(",
"map",
"<",
"string",
",",
"subscription",
">",
"subscriptions",
",",
"map",
"<",
"string",
",",
"list",
"<",
"topic",
"partition",
">",
">",
"assignments",
",",
"map",
"<",
"string",
",",
"integer",
">",
"partitions",
"per",
"topic",
")",
"{",
"int",
"rebalances",
"=",
"0",
";",
"/",
"/",
"partitions",
"are",
"being",
"revoked",
",",
"we",
"must",
"go",
"through",
"another",
"assignment",
"to",
"get",
"the",
"final",
"state",
"while",
"(",
"verify",
"cooperative",
"validity",
"(",
"subscriptions",
",",
"assignments",
")",
")",
"{",
"/",
"/",
"update",
"the",
"subscriptions",
"with",
"the",
"now",
"owned",
"partitions",
"for",
"(",
"map",
"entry",
"<",
"string",
",",
"list",
"<",
"topic",
"partition",
">",
">",
"entry",
":",
"assignments",
"entry",
"set",
"(",
")",
")",
"{",
"string",
"consumer",
"=",
"entry",
"get",
"key",
"(",
")",
";",
"subscription",
"old",
"subscription",
"=",
"subscriptions",
"get",
"(",
"consumer",
")",
";",
"subscriptions",
"put",
"(",
"consumer",
",",
"build",
"subscription",
"(",
"old",
"subscription",
"topics",
"(",
")",
",",
"entry",
"get",
"value",
"(",
")",
")",
")",
";",
"}",
"assignments",
"clear",
"(",
")",
";",
"assignments",
"put",
"all",
"(",
"assignor",
"assign",
"(",
"partitions",
"per",
"topic",
",",
"subscriptions",
")",
")",
";",
"+",
"+",
"rebalances",
";",
"assert",
"true",
"(",
"rebalances",
"<",
"=",
"4",
")",
";",
"}",
"/",
"/",
"check",
"the",
"validity",
"and",
"balance",
"of",
"the",
"final",
"assignment",
"super",
"verify",
"validity",
"and",
"balance",
"(",
"subscriptions",
",",
"assignments",
",",
"partitions",
"per",
"topic",
")",
";",
"}"
]
|
[
"get",
"ship",
"date"
]
| [
"public",
"offset",
"date",
"time",
"get",
"ship",
"date",
"(",
")",
"{",
"return",
"ship",
"date",
";",
"}"
]
|
[
"calls",
"the",
"given",
"runnable",
"on",
"the",
"swing",
"thread"
]
| [
"public",
"static",
"void",
"run",
"now",
"(",
"runnable",
"r",
")",
"{",
"try",
"{",
"/",
"/",
"not",
"sure",
"what",
"a",
"reasonable",
"wait",
"is",
"for",
"a",
"background",
"thread",
";",
"we",
"can",
"make",
"this",
"larger",
"/",
"/",
"if",
"we",
"find",
"that",
"a",
"really",
"slow",
"system",
"ui",
"causes",
"this",
"to",
"fail",
"run",
"now",
"(",
"r",
",",
"swing",
"timeout",
"seconds",
"value",
",",
"time",
"unit",
"seconds",
")",
";",
"}",
"catch",
"(",
"unable",
"to",
"swing",
"exception",
"e",
")",
"{",
"/",
"/",
"/",
"/",
"special",
"cases",
":",
"if",
"we",
"are",
"in",
"production",
"mode",
",",
"then",
"this",
"is",
"most",
"likely",
"a",
"deadlock",
"/",
"/",
"in",
"that",
"case",
",",
"log",
"the",
"thread",
"state",
"in",
"development",
"mode",
",",
"it",
"is",
"possible",
"for",
"this",
"/",
"/",
"to",
"happen",
"while",
"debugging",
"in",
"that",
"case",
",",
"log",
"a",
"message",
",",
"and",
"then",
"post",
"the",
"work",
"/",
"/",
"to",
"be",
"done",
"without",
"a",
"timeout",
"/",
"/",
"string",
"warning",
"=",
"\"",
"timed",
"-",
"out",
"waiting",
"to",
"run",
"a",
"swing",
"task",
"-",
"-",
"potential",
"deadlock",
"!",
"\"",
";",
"if",
"(",
"system",
"utilities",
"is",
"in",
"release",
"mode",
"(",
")",
")",
"{",
"throwable",
"thread",
"dump",
"=",
"reflection",
"utilities",
"create",
"java",
"filtered",
"throwable",
"(",
")",
";",
"msg",
"error",
"(",
"swing",
"class",
",",
"warning",
"+",
"\"",
"\\",
"n",
"threads",
"state",
":",
"\\",
"n",
"\"",
"+",
"thread",
"dump",
")",
";",
"throw",
"new",
"runtime",
"exception",
"(",
"warning",
",",
"e",
")",
";",
"}",
"/",
"/",
"/",
"/",
"dev",
"or",
"testing",
"mode",
"/",
"/",
"/",
"/",
"note",
":",
"using",
"swing",
"class",
"for",
"the",
"originator",
"does",
"not",
"work",
"(",
"presumably",
"it",
"conflicts",
"/",
"/",
"with",
"another",
"logger",
"sharing",
"its",
"name",
"so",
",",
"use",
"the",
"full",
"name",
"here",
"string",
"originator",
"=",
"swing",
"class",
"get",
"name",
"(",
")",
";",
"msg",
"debug",
"(",
"originator",
",",
"warning",
"+",
"\"",
"ignore",
"this",
"message",
"if",
"debugging",
"\"",
")",
";",
"do",
"run",
"(",
"r",
",",
"true",
",",
"swing",
"run",
"error",
"msg",
")",
";",
"}",
"}"
]
|
[
"returns",
"a",
"copy",
"of",
"the",
"the",
"bytes",
"of",
"this",
"dex"
]
| [
"public",
"byte",
"[",
"]",
"get",
"bytes",
"(",
")",
"{",
"byte",
"buffer",
"data",
"=",
"this",
"data",
"duplicate",
"(",
")",
";",
"/",
"/",
"positioned",
"byte",
"buffers",
"aren",
"'",
"t",
"thread",
"safe",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"data",
"capacity",
"(",
")",
"]",
";",
"data",
"position",
"(",
"0",
")",
";",
"data",
"get",
"(",
"result",
")",
";",
"return",
"result",
";",
"}"
]
|
[
"removes",
"all",
"of",
"the",
"specified",
"ranges",
"from",
"this",
"range",
"set",
"(",
"optional",
"operation",
")",
"this",
"is",
"equivalent",
"to",
"calling",
"{",
"@",
"link",
"#",
"remove",
"}",
"on",
"each",
"of",
"the",
"ranges",
"in",
"{",
"@",
"code",
"other",
"}",
"in",
"turn"
]
| [
"default",
"void",
"remove",
"all",
"(",
"iterable",
"<",
"range",
"<",
"c",
">",
">",
"ranges",
")",
"{",
"for",
"(",
"range",
"<",
"c",
">",
"range",
":",
"ranges",
")",
"{",
"remove",
"(",
"range",
")",
";",
"}",
"}",
"/",
"/",
"object",
"methods"
]
|
[
"tests",
"that",
"when",
"the",
"nodes",
"with",
"prior",
"copies",
"of",
"the",
"given",
"shard",
"all",
"return",
"a",
"decision",
"of",
"no",
",",
"and",
"{",
"@",
"link",
"allocation",
"decider",
"#",
"can",
"force",
"allocate",
"primary",
"(",
"shard",
"routing",
",",
"routing",
"node",
",",
"routing",
"allocation",
")",
"}",
"returns",
"a",
"no",
"or",
"throttle",
"decision",
"for",
"a",
"node",
",",
"then",
"we",
"do",
"not",
"force",
"allocate",
"to",
"that",
"node"
]
| [
"public",
"void",
"test",
"dont",
"allocate",
"on",
"no",
"or",
"throttle",
"force",
"allocation",
"decision",
"(",
")",
"{",
"test",
"allocator",
"add",
"data",
"(",
"node",
"1",
",",
"\"",
"alloc",
"id",
"1",
"\"",
",",
"random",
"boolean",
"(",
")",
")",
";",
"boolean",
"force",
"decision",
"no",
"=",
"random",
"boolean",
"(",
")",
";",
"allocation",
"deciders",
"deciders",
"=",
"new",
"allocation",
"deciders",
"(",
"arrays",
"as",
"list",
"(",
"/",
"/",
"since",
"both",
"deciders",
"here",
"return",
"a",
"no",
"decision",
"for",
"allocating",
"a",
"shard",
",",
"/",
"/",
"the",
"allocator",
"will",
"see",
"if",
"it",
"can",
"force",
"assign",
"the",
"primary",
",",
"where",
"the",
"decision",
"will",
"be",
"either",
"no",
"or",
"throttle",
",",
"/",
"/",
"so",
"the",
"shard",
"will",
"remain",
"un",
"-",
"initialized",
"new",
"test",
"allocate",
"decision",
"(",
"decision",
"no",
")",
",",
"force",
"decision",
"no",
"?",
"get",
"no",
"decider",
"that",
"denies",
"force",
"allocate",
"(",
")",
":",
"get",
"no",
"decider",
"that",
"throttles",
"force",
"allocate",
"(",
")",
")",
")",
";",
"routing",
"allocation",
"allocation",
"=",
"routing",
"allocation",
"with",
"one",
"primary",
"no",
"replicas",
"(",
"deciders",
",",
"cluster",
"recovered",
",",
"\"",
"alloc",
"id",
"1",
"\"",
")",
";",
"allocate",
"all",
"unassigned",
"(",
"allocation",
")",
";",
"assert",
"that",
"(",
"allocation",
"routing",
"nodes",
"changed",
"(",
")",
",",
"equal",
"to",
"(",
"true",
")",
")",
";",
"list",
"<",
"shard",
"routing",
">",
"ignored",
"=",
"allocation",
"routing",
"nodes",
"(",
")",
"unassigned",
"(",
")",
"ignored",
"(",
")",
";",
"assert",
"equals",
"(",
"ignored",
"size",
"(",
")",
",",
"1",
")",
";",
"assert",
"equals",
"(",
"ignored",
"get",
"(",
"0",
")",
"unassigned",
"info",
"(",
")",
"get",
"last",
"allocation",
"status",
"(",
")",
",",
"force",
"decision",
"no",
"?",
"allocation",
"status",
"deciders",
"no",
":",
"allocation",
"status",
"deciders",
"throttled",
")",
";",
"assert",
"true",
"(",
"allocation",
"routing",
"nodes",
"(",
")",
"shards",
"with",
"state",
"(",
"shard",
"routing",
"state",
"initializing",
")",
"is",
"empty",
"(",
")",
")",
";",
"}"
]
|
[
"find",
"first",
"by",
"uid",
",",
"otp",
"pair"
]
| [
"public",
"couch",
"db",
"google",
"authenticator",
"token",
"find",
"one",
"by",
"uid",
"for",
"otp",
"(",
"final",
"string",
"uid",
",",
"final",
"integer",
"otp",
")",
"{",
"val",
"view",
"=",
"create",
"query",
"(",
"\"",
"by",
"uid",
"otp",
"\"",
")",
"key",
"(",
"complex",
"key",
"of",
"(",
"uid",
",",
"otp",
")",
")",
"limit",
"(",
"1",
")",
";",
"return",
"db",
"query",
"view",
"(",
"view",
",",
"couch",
"db",
"google",
"authenticator",
"token",
"class",
")",
"stream",
"(",
")",
"find",
"first",
"(",
")",
"or",
"else",
"(",
"null",
")",
";",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.