docstring_tokens
list | code_tokens
list |
---|---|
[
"attempts",
"to",
"minimize",
"the",
"compile",
"-",
"time",
"classpath",
"before",
"invoking",
"javac",
",",
"falling",
"back",
"to",
"a",
"regular",
"compile"
] |
[
"blaze",
"javac",
"result",
"compile",
"sources",
"(",
"java",
"library",
"build",
"request",
"build",
",",
"javac",
"runner",
"javac",
"runner",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"minimize",
"classpath",
",",
"but",
"only",
"if",
"we",
"'",
"re",
"actually",
"compiling",
"some",
"sources",
"(",
"some",
"invocations",
"of",
"/",
"/",
"java",
"builder",
"are",
"only",
"building",
"resource",
"jars",
")",
"immutable",
"list",
"<",
"path",
">",
"compressed",
"classpath",
"=",
"build",
"get",
"class",
"path",
"(",
")",
";",
"if",
"(",
"!",
"build",
"get",
"source",
"files",
"(",
")",
"is",
"empty",
"(",
")",
"&",
"&",
"build",
"reduce",
"classpath",
"mode",
"(",
")",
"=",
"=",
"reduce",
"classpath",
"mode",
"javabuilder",
"reduced",
")",
"{",
"compressed",
"classpath",
"=",
"build",
"get",
"dependency",
"module",
"(",
")",
"compute",
"strict",
"classpath",
"(",
"build",
"get",
"class",
"path",
"(",
")",
")",
";",
"}",
"/",
"/",
"compile",
"!",
"blaze",
"javac",
"result",
"result",
"=",
"javac",
"runner",
"invoke",
"javac",
"(",
"build",
"to",
"blaze",
"javac",
"arguments",
"(",
"compressed",
"classpath",
")",
")",
";",
"/",
"/",
"if",
"javac",
"errored",
"out",
"because",
"of",
"missing",
"entries",
"on",
"the",
"classpath",
",",
"give",
"it",
"another",
"try",
"boolean",
"fallback",
"=",
"!",
"result",
"is",
"ok",
"(",
")",
";",
"if",
"(",
"fallback",
")",
"{",
"if",
"(",
"build",
"reduce",
"classpath",
"mode",
"(",
")",
"=",
"=",
"reduce",
"classpath",
"mode",
"bazel",
"reduced",
")",
"{",
"return",
"blaze",
"javac",
"result",
"fallback",
"(",
")",
";",
"}",
"if",
"(",
"build",
"reduce",
"classpath",
"mode",
"(",
")",
"=",
"=",
"reduce",
"classpath",
"mode",
"javabuilder",
"reduced",
")",
"{",
"result",
"=",
"fallback",
"(",
"build",
",",
"javac",
"runner",
")",
";",
"}",
"}",
"blaze",
"javac",
"statistics",
"builder",
"stats",
"=",
"result",
"statistics",
"(",
")",
"to",
"builder",
"(",
")",
"min",
"classpath",
"length",
"(",
"build",
"get",
"dependency",
"module",
"(",
")",
"get",
"implicit",
"dependencies",
"map",
"(",
")",
"size",
"(",
")",
")",
";",
"build",
"get",
"processors",
"(",
")",
"stream",
"(",
")",
"map",
"(",
"p",
"-",
">",
"p",
"substring",
"(",
"p",
"last",
"index",
"of",
"(",
"'",
"'",
")",
"+",
"1",
")",
")",
"for",
"each",
"ordered",
"(",
"stats",
":",
":",
"add",
"processor",
")",
";",
"switch",
"(",
"build",
"reduce",
"classpath",
"mode",
"(",
")",
")",
"{",
"case",
"bazel",
"reduced",
":",
"case",
"bazel",
"fallback",
":",
"stats",
"transitive",
"classpath",
"length",
"(",
"build",
"full",
"classpath",
"length",
"(",
")",
")",
";",
"stats",
"reduced",
"classpath",
"length",
"(",
"build",
"reduced",
"classpath",
"length",
"(",
")",
")",
";",
"stats",
"transitive",
"classpath",
"fallback",
"(",
"build",
"reduce",
"classpath",
"mode",
"(",
")",
"=",
"=",
"reduce",
"classpath",
"mode",
"bazel",
"fallback",
")",
";",
"break",
";",
"case",
"javabuilder",
"reduced",
":",
"stats",
"transitive",
"classpath",
"length",
"(",
"build",
"get",
"class",
"path",
"(",
")",
"size",
"(",
")",
")",
";",
"stats",
"reduced",
"classpath",
"length",
"(",
"compressed",
"classpath",
"size",
"(",
")",
")",
";",
"stats",
"transitive",
"classpath",
"fallback",
"(",
"fallback",
")",
";",
"break",
";",
"default",
":",
"throw",
"new",
"assertion",
"error",
"(",
"build",
"reduce",
"classpath",
"mode",
"(",
")",
")",
";",
"}",
"return",
"result",
"with",
"statistics",
"(",
"stats",
"build",
"(",
")",
")",
";",
"}"
] |
[
"determines",
"whether",
"any",
"of",
"this",
"range",
"set",
"'",
"s",
"member",
"ranges",
"contains",
"{",
"@",
"code",
"value",
"}"
] |
[
"boolean",
"contains",
"(",
"c",
"value",
")",
";"
] |
[
"sets",
"the",
"end",
"as",
"given"
] |
[
"public",
"void",
"set",
"end",
"(",
"int",
"end",
")",
"{",
"this",
"end",
"=",
"end",
";",
"}"
] |
[
"returns",
"the",
"current",
"tool"
] |
[
"public",
"plugin",
"tool",
"get",
"tool",
"(",
")",
"{",
"return",
"tool",
";",
"}"
] |
[
"get",
"the",
"name",
"of",
"the",
"last",
"group",
"that",
"was",
"pasted"
] |
[
"string",
"get",
"last",
"group",
"pasted",
"(",
")",
"{",
"return",
"last",
"group",
"pasted",
";",
"}"
] |
[
"verify",
"thread",
"safety",
"by",
"using",
"a",
"collection",
"whose",
"size",
"(",
")",
"may",
"be",
"inconsistent",
"with",
"the",
"actual",
"number",
"of",
"elements",
"tests",
"using",
"this",
"method",
"might",
"fail",
"in",
"gwt",
"because",
"the",
"gwt",
"emulations",
"might",
"count",
"on",
"size",
"(",
")",
"during",
"copy",
"it",
"is",
"safe",
"to",
"do",
"so",
"in",
"gwt",
"because",
"javascript",
"is",
"single",
"-",
"threaded"
] |
[
"void",
"verify",
"thread",
"safe",
"(",
")",
"{",
"list",
"<",
"string",
">",
"sample",
"=",
"lists",
"new",
"array",
"list",
"(",
"\"",
"a",
"\"",
",",
"\"",
"b",
"\"",
",",
"\"",
"c",
"\"",
")",
";",
"for",
"(",
"int",
"delta",
":",
"new",
"int",
"[",
"]",
"{",
"-",
"1",
",",
"0",
",",
"1",
"}",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sample",
"size",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"collection",
"<",
"string",
">",
"misleading",
"=",
"helpers",
"misleading",
"size",
"collection",
"(",
"delta",
")",
";",
"list",
"<",
"string",
">",
"expected",
"=",
"sample",
"sub",
"list",
"(",
"0",
",",
"i",
")",
";",
"misleading",
"add",
"all",
"(",
"expected",
")",
";",
"assert",
"equals",
"(",
"\"",
"delta",
":",
"\"",
"+",
"delta",
"+",
"\"",
"sample",
"size",
":",
"\"",
"+",
"i",
",",
"sets",
"new",
"hash",
"set",
"(",
"expected",
")",
",",
"copy",
"of",
"(",
"misleading",
")",
")",
";",
"}",
"}",
"}"
] |
[
"get",
"my",
"string"
] |
[
"public",
"string",
"get",
"my",
"string",
"(",
")",
"{",
"return",
"my",
"string",
";",
"}"
] |
[
"injects",
"non",
"-",
"hermetic",
"{",
"@",
"link",
"version",
"}",
"information",
"for",
"this",
"environment",
"this",
"may",
"be",
"called",
"during",
"the",
"course",
"of",
"{",
"@",
"link",
"sky",
"function",
"#",
"compute",
"(",
"sky",
"key",
",",
"environment",
")",
"}",
"if",
"the",
"function",
"discovers",
"version",
"information",
"for",
"the",
"{",
"@",
"link",
"sky",
"key",
"}",
"environments",
"that",
"either",
"do",
"not",
"need",
"or",
"wish",
"to",
"ignore",
"non",
"-",
"hermetic",
"version",
"information",
"may",
"keep",
"the",
"default",
"no",
"-",
"op",
"implementation"
] |
[
"default",
"void",
"inject",
"version",
"for",
"non",
"hermetic",
"function",
"(",
"version",
"version",
")",
"{",
"}"
] |
[
"this",
"method",
"should",
"only",
"be",
"called",
"if",
"a",
"programmer",
"adds",
"a",
"new",
"precedence",
"to",
"{",
"@",
"link",
"key",
"binding",
"precedence",
"}",
"and",
"does",
"not",
"update",
"the",
"algorithm",
"of",
"{",
"@",
"link",
"#",
"dispatch",
"key",
"event",
"(",
"key",
"event",
")",
"}",
"to",
"take",
"into",
"account",
"the",
"new",
"precedence"
] |
[
"private",
"boolean",
"throw",
"assert",
"exception",
"(",
")",
"{",
"throw",
"new",
"assert",
"exception",
"(",
"\"",
"new",
"precedence",
"added",
"to",
"key",
"binding",
"precedence",
"?",
"\"",
")",
";",
"}"
] |
[
"get",
"the",
"portion",
"of",
"an",
"http",
"request",
"to",
"elasticsearch",
"that",
"can",
"be",
"manipulated",
"without",
"changing",
"elasticsearch",
"'",
"s",
"behavior"
] |
[
"public",
"request",
"options",
"get",
"options",
"(",
")",
"{",
"return",
"options",
";",
"}"
] |
[
"test",
"that",
"a",
"replica",
"request",
"is",
"rejected",
"if",
"it",
"arrives",
"at",
"a",
"shard",
"with",
"a",
"wrong",
"allocation",
"id"
] |
[
"public",
"void",
"test",
"replica",
"action",
"rejects",
"wrong",
"aid",
"(",
")",
"throws",
"exception",
"{",
"final",
"string",
"index",
"=",
"\"",
"test",
"\"",
";",
"final",
"shard",
"id",
"shard",
"id",
"=",
"new",
"shard",
"id",
"(",
"index",
",",
"\"",
"na",
"\"",
",",
"0",
")",
";",
"cluster",
"state",
"state",
"=",
"state",
"(",
"index",
",",
"false",
",",
"shard",
"routing",
"state",
"started",
",",
"shard",
"routing",
"state",
"started",
")",
";",
"final",
"shard",
"routing",
"replica",
"=",
"state",
"routing",
"table",
"(",
")",
"shard",
"routing",
"table",
"(",
"shard",
"id",
")",
"replica",
"shards",
"(",
")",
"get",
"(",
"0",
")",
";",
"/",
"/",
"simulate",
"execution",
"of",
"the",
"node",
"holding",
"the",
"replica",
"state",
"=",
"cluster",
"state",
"builder",
"(",
"state",
")",
"nodes",
"(",
"discovery",
"nodes",
"builder",
"(",
"state",
"nodes",
"(",
")",
")",
"local",
"node",
"id",
"(",
"replica",
"current",
"node",
"id",
"(",
")",
")",
")",
"build",
"(",
")",
";",
"set",
"state",
"(",
"cluster",
"service",
",",
"state",
")",
";",
"plain",
"action",
"future",
"<",
"transport",
"response",
">",
"listener",
"=",
"new",
"plain",
"action",
"future",
"<",
">",
"(",
")",
";",
"request",
"request",
"=",
"new",
"request",
"(",
"shard",
"id",
")",
"timeout",
"(",
"\"",
"1ms",
"\"",
")",
";",
"action",
"handle",
"replica",
"request",
"(",
"new",
"transport",
"replication",
"action",
"concrete",
"replica",
"request",
"<",
">",
"(",
"request",
",",
"\"",
"not",
"a",
"valid",
"aid",
"\"",
",",
"random",
"non",
"negative",
"long",
"(",
")",
",",
"random",
"non",
"negative",
"long",
"(",
")",
",",
"random",
"non",
"negative",
"long",
"(",
")",
")",
",",
"create",
"transport",
"channel",
"(",
"listener",
")",
",",
"maybe",
"task",
"(",
")",
")",
";",
"try",
"{",
"listener",
"get",
"(",
")",
";",
"fail",
"(",
"\"",
"using",
"a",
"wrong",
"aid",
"didn",
"'",
"t",
"fail",
"the",
"operation",
"\"",
")",
";",
"}",
"catch",
"(",
"execution",
"exception",
"exec",
"exception",
")",
"{",
"throwable",
"throwable",
"=",
"exec",
"exception",
"get",
"cause",
"(",
")",
";",
"if",
"(",
"action",
"retry",
"primary",
"exception",
"(",
"throwable",
")",
"=",
"=",
"false",
")",
"{",
"throw",
"new",
"assertion",
"error",
"(",
"\"",
"thrown",
"exception",
"is",
"not",
"retriable",
"\"",
",",
"throwable",
")",
";",
"}",
"assert",
"that",
"(",
"throwable",
"get",
"message",
"(",
")",
",",
"contains",
"string",
"(",
"\"",
"not",
"a",
"valid",
"aid",
"\"",
")",
")",
";",
"}",
"}"
] |
[
"get",
"the",
"information",
"of",
"the",
"current",
"state",
"of",
"the",
"reduce",
"tasks",
"of",
"a",
"job"
] |
[
"public",
"task",
"report",
"[",
"]",
"get",
"reduce",
"task",
"reports",
"(",
"job",
"i",
"d",
"job",
"id",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"get",
"task",
"reports",
"(",
"job",
"id",
",",
"task",
"type",
"reduce",
")",
";",
"}"
] |
[
"find",
"purchase",
"order",
"by",
"id",
"for",
"valid",
"response",
"try",
"integer",
"i",
"ds",
"with",
"value",
"&",
"lt",
";",
"&",
"#",
"x",
"3",
"d",
";",
"5",
"or",
"&",
"gt",
";",
"10",
"other",
"values",
"will",
"generated",
"exceptions"
] |
[
"public",
"void",
"get",
"order",
"by",
"id",
"(",
"long",
"order",
"id",
",",
"handler",
"<",
"async",
"result",
"<",
"order",
">",
">",
"result",
"handler",
")",
"{",
"get",
"order",
"by",
"id",
"(",
"order",
"id",
",",
"null",
",",
"result",
"handler",
")",
";",
"}"
] |
[
"determines",
"a",
"unique",
"keep",
"file",
"name",
"for",
"saving",
"a",
"copy",
"of",
"the",
"hijack",
"file",
"when",
"its",
"hijack",
"is",
"undone"
] |
[
"private",
"string",
"get",
"keep",
"name",
"(",
"domain",
"folder",
"parent",
",",
"string",
"name",
")",
"{",
"int",
"one",
"up",
"=",
"1",
";",
"string",
"keep",
"name",
"=",
"name",
"+",
"\"",
"keep",
"\"",
";",
"while",
"(",
"true",
")",
"{",
"domain",
"file",
"df",
"=",
"parent",
"get",
"file",
"(",
"keep",
"name",
")",
";",
"if",
"(",
"df",
"!",
"=",
"null",
")",
"{",
"keep",
"name",
"=",
"name",
"+",
"\"",
"keep",
"\"",
"+",
"one",
"up",
";",
"+",
"+",
"one",
"up",
";",
"}",
"return",
"keep",
"name",
";",
"}",
"}"
] |
[
"register",
"an",
"exception",
"that",
"happened",
"to",
"get",
"suppressed",
"during",
"the",
"creation",
"of",
"a",
"singleton",
"bean",
"instance",
",",
"e",
"g",
"a",
"temporary",
"circular",
"reference",
"resolution",
"problem",
"the",
"default",
"implementation",
"preserves",
"any",
"given",
"exception",
"in",
"this",
"registry",
"'",
"s",
"collection",
"of",
"suppressed",
"exceptions",
",",
"up",
"to",
"a",
"limit",
"of",
"100",
"exceptions",
",",
"adding",
"them",
"as",
"related",
"causes",
"to",
"an",
"eventual",
"top",
"-",
"level",
"{",
"@",
"link",
"bean",
"creation",
"exception",
"}"
] |
[
"protected",
"void",
"on",
"suppressed",
"exception",
"(",
"exception",
"ex",
")",
"{",
"synchronized",
"(",
"this",
"singleton",
"objects",
")",
"{",
"if",
"(",
"this",
"suppressed",
"exceptions",
"!",
"=",
"null",
"&",
"&",
"this",
"suppressed",
"exceptions",
"size",
"(",
")",
"<",
"suppressed",
"exceptions",
"limit",
")",
"{",
"this",
"suppressed",
"exceptions",
"add",
"(",
"ex",
")",
";",
"}",
"}",
"}"
] |
[
"test",
"record",
"iterator"
] |
[
"private",
"void",
"delete",
"iterated",
"index",
"fields",
"(",
"int",
"record",
"cnt",
",",
"int",
"test",
"col",
"ix",
",",
"long",
"key",
"increment",
",",
"int",
"var",
"data",
"size",
")",
"throws",
"i",
"o",
"exception",
"{",
"d",
"b",
"record",
"[",
"]",
"recs",
"=",
"null",
";",
"if",
"(",
"key",
"increment",
"=",
"=",
"0",
")",
"{",
"recs",
"=",
"create",
"random",
"table",
"records",
"(",
"d",
"b",
"test",
"utils",
"all",
"types",
",",
"record",
"cnt",
",",
"var",
"data",
"size",
")",
";",
"}",
"else",
"{",
"recs",
"=",
"create",
"ordered",
"table",
"records",
"(",
"d",
"b",
"test",
"utils",
"all",
"types",
",",
"record",
"cnt",
",",
"key",
"increment",
",",
"var",
"data",
"size",
")",
";",
"}",
"long",
"tx",
"id",
"=",
"dbh",
"start",
"transaction",
"(",
")",
";",
"try",
"{",
"table",
"table",
"=",
"dbh",
"get",
"table",
"(",
"table",
"1",
"name",
")",
";",
"arrays",
"sort",
"(",
"recs",
",",
"new",
"rec",
"column",
"comparator",
"(",
"test",
"col",
"ix",
")",
")",
";",
"/",
"/",
"count",
"unique",
"index",
"values",
"int",
"field",
"cnt",
"=",
"0",
";",
"field",
"last",
"field",
"=",
"null",
";",
"array",
"list",
"<",
"field",
">",
"field",
"list",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"d",
"b",
"record",
"rec",
":",
"recs",
")",
"{",
"field",
"f",
"=",
"rec",
"get",
"field",
"(",
"test",
"col",
"ix",
")",
";",
"if",
"(",
"last",
"field",
"=",
"=",
"null",
"|",
"|",
"!",
"last",
"field",
"equals",
"(",
"f",
")",
")",
"{",
"last",
"field",
"=",
"f",
";",
"field",
"list",
"add",
"(",
"f",
")",
";",
"+",
"+",
"field",
"cnt",
";",
"}",
"}",
"/",
"/",
"/",
"/",
"index",
"field",
"iterator",
"does",
"not",
"support",
"variable",
"length",
"fields",
"/",
"/",
"if",
"(",
"last",
"field",
"is",
"variable",
"length",
"(",
")",
")",
"{",
"return",
";",
"/",
"/",
"skip",
"test",
"}",
"/",
"/",
"forward",
"-",
"delete",
"all",
"records",
"d",
"b",
"field",
"iterator",
"iter",
"=",
"table",
"index",
"field",
"iterator",
"(",
"test",
"col",
"ix",
")",
";",
"int",
"cnt",
"=",
"0",
";",
"while",
"(",
"iter",
"has",
"next",
"(",
")",
")",
"{",
"assert",
"equals",
"(",
"field",
"list",
"get",
"(",
"cnt",
"+",
"+",
")",
",",
"iter",
"next",
"(",
")",
")",
";",
"assert",
"true",
"(",
"iter",
"delete",
"(",
")",
")",
";",
"}",
"assert",
"equals",
"(",
"field",
"cnt",
",",
"cnt",
")",
";",
"assert",
"equals",
"(",
"0",
",",
"table",
"get",
"record",
"count",
"(",
")",
")",
";",
"}",
"finally",
"{",
"dbh",
"delete",
"table",
"(",
"table",
"1",
"name",
")",
";",
"dbh",
"end",
"transaction",
"(",
"tx",
"id",
",",
"true",
")",
";",
"}",
"if",
"(",
"key",
"increment",
"=",
"=",
"0",
")",
"{",
"recs",
"=",
"create",
"random",
"table",
"records",
"(",
"d",
"b",
"test",
"utils",
"all",
"types",
",",
"record",
"cnt",
",",
"var",
"data",
"size",
")",
";",
"}",
"else",
"{",
"recs",
"=",
"create",
"ordered",
"table",
"records",
"(",
"d",
"b",
"test",
"utils",
"all",
"types",
",",
"record",
"cnt",
",",
"key",
"increment",
",",
"var",
"data",
"size",
")",
";",
"}",
"tx",
"id",
"=",
"dbh",
"start",
"transaction",
"(",
")",
";",
"try",
"{",
"table",
"table",
"=",
"dbh",
"get",
"table",
"(",
"table",
"1",
"name",
")",
";",
"arrays",
"sort",
"(",
"recs",
",",
"new",
"rec",
"column",
"comparator",
"(",
"test",
"col",
"ix",
")",
")",
";",
"/",
"/",
"count",
"unique",
"index",
"values",
"int",
"field",
"cnt",
"=",
"0",
";",
"field",
"last",
"field",
"=",
"null",
";",
"array",
"list",
"<",
"field",
">",
"field",
"list",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"d",
"b",
"record",
"rec",
":",
"recs",
")",
"{",
"field",
"f",
"=",
"rec",
"get",
"field",
"(",
"test",
"col",
"ix",
")",
";",
"if",
"(",
"last",
"field",
"=",
"=",
"null",
"|",
"|",
"!",
"last",
"field",
"equals",
"(",
"f",
")",
")",
"{",
"last",
"field",
"=",
"f",
";",
"field",
"list",
"add",
"(",
"f",
")",
";",
"+",
"+",
"field",
"cnt",
";",
"}",
"}",
"/",
"/",
"reverse",
"-",
"delete",
"all",
"records",
"int",
"cnt",
"=",
"field",
"cnt",
"-",
"1",
";",
"int",
"last",
"ix",
"=",
"recs",
"length",
"-",
"1",
";",
"d",
"b",
"field",
"iterator",
"iter",
"=",
"table",
"index",
"field",
"iterator",
"(",
"recs",
"[",
"0",
"]",
"get",
"field",
"(",
"test",
"col",
"ix",
")",
",",
"recs",
"[",
"last",
"ix",
"]",
"get",
"field",
"(",
"test",
"col",
"ix",
")",
",",
"false",
",",
"test",
"col",
"ix",
")",
";",
"while",
"(",
"iter",
"has",
"previous",
"(",
")",
")",
"{",
"assert",
"equals",
"(",
"field",
"list",
"get",
"(",
"cnt",
"-",
"-",
")",
",",
"iter",
"previous",
"(",
")",
")",
";",
"assert",
"true",
"(",
"iter",
"delete",
"(",
")",
")",
";",
"}",
"assert",
"equals",
"(",
"-",
"1",
",",
"cnt",
")",
";",
"assert",
"equals",
"(",
"0",
",",
"table",
"get",
"record",
"count",
"(",
")",
")",
";",
"}",
"finally",
"{",
"dbh",
"delete",
"table",
"(",
"table",
"1",
"name",
")",
";",
"dbh",
"end",
"transaction",
"(",
"tx",
"id",
",",
"true",
")",
";",
"}",
"}"
] |
[
"compares",
"two",
"expression",
"arguments",
"(",
"typically",
"numbers",
")",
",",
"if",
"possible",
"otherwise",
"returns",
"null",
"(",
"the",
"arguments",
"are",
"not",
"comparable",
"or",
"at",
"least",
"one",
"of",
"them",
"is",
"null",
")"
] |
[
"static",
"integer",
"compare",
"(",
"object",
"l",
",",
"object",
"r",
")",
"{",
"if",
"(",
"l",
"=",
"=",
"null",
"|",
"|",
"r",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"/",
"/",
"typical",
"number",
"comparison",
"if",
"(",
"l",
"instanceof",
"number",
"&",
"&",
"r",
"instanceof",
"number",
")",
"{",
"return",
"compare",
"(",
"(",
"number",
")",
"l",
",",
"(",
"number",
")",
"r",
")",
";",
"}",
"if",
"(",
"l",
"instanceof",
"comparable",
"&",
"&",
"r",
"instanceof",
"comparable",
")",
"{",
"try",
"{",
"return",
"integer",
"value",
"of",
"(",
"(",
"(",
"comparable",
")",
"l",
")",
"compare",
"to",
"(",
"r",
")",
")",
";",
"}",
"catch",
"(",
"class",
"cast",
"exception",
"cce",
")",
"{",
"/",
"/",
"when",
"types",
"are",
"not",
"compatible",
",",
"cce",
"is",
"thrown",
"/",
"/",
"fall",
"back",
"to",
"null",
"return",
"null",
";",
"}",
"}",
"return",
"null",
";",
"}"
] |
[
"only",
"select",
"tasks",
"which",
"have",
"a",
"global",
"variable",
"value",
"less",
"than",
"the",
"passed",
"value",
"when",
"the",
"ended",
"booleans",
",",
"byte",
"-",
"arrays",
"and",
"{",
"@",
"link",
"serializable",
"}",
"objects",
"(",
"which",
"are",
"not",
"primitive",
"type",
"wrappers",
")",
"are",
"not",
"supported"
] |
[
"t",
"process",
"variable",
"value",
"less",
"than",
"(",
"string",
"name",
",",
"object",
"value",
")",
";"
] |
[
"verifies",
"that",
"the",
"given",
"rule",
"supports",
"the",
"minimum",
"os",
"attribute",
"under",
"the",
"watch",
"o",
"s",
"platform",
"type",
",",
"and",
"adds",
"compile",
"and",
"link",
"args",
"to",
"set",
"the",
"minimum",
"os",
"appropriately",
"for",
"watchos",
",",
"including",
"compile",
"args",
"for",
"dependencies"
] |
[
"protected",
"void",
"check",
"minimum",
"os",
"link",
"and",
"compile",
"arg",
"watchos",
"(",
"rule",
"type",
"rule",
"type",
")",
"throws",
"exception",
"{",
"rule",
"type",
"scratch",
"target",
"(",
"scratch",
",",
"\"",
"deps",
"\"",
",",
"\"",
"[",
"'",
"/",
"/",
"package",
":",
"objc",
"lib",
"'",
"]",
"\"",
",",
"\"",
"platform",
"type",
"\"",
",",
"\"",
"'",
"watchos",
"'",
"\"",
",",
"\"",
"minimum",
"os",
"version",
"\"",
",",
"\"",
"'",
"5",
"4",
"'",
"\"",
")",
";",
"scratch",
"file",
"(",
"\"",
"package",
"/",
"build",
"\"",
",",
"\"",
"objc",
"library",
"(",
"name",
"=",
"'",
"objc",
"lib",
"'",
",",
"srcs",
"=",
"[",
"'",
"b",
"m",
"'",
"]",
")",
"\"",
")",
";",
"use",
"configuration",
"(",
"\"",
"-",
"-",
"xcode",
"version",
"=",
"5",
"8",
"\"",
")",
";",
"command",
"action",
"link",
"action",
"=",
"link",
"action",
"(",
"\"",
"/",
"/",
"x",
":",
"x",
"\"",
")",
";",
"command",
"action",
"objc",
"lib",
"archive",
"action",
"=",
"(",
"command",
"action",
")",
"get",
"generating",
"action",
"(",
"get",
"first",
"artifact",
"ending",
"with",
"(",
"link",
"action",
"get",
"inputs",
"(",
")",
",",
"\"",
"libobjc",
"lib",
"a",
"\"",
")",
")",
";",
"command",
"action",
"objc",
"lib",
"compile",
"action",
"=",
"(",
"command",
"action",
")",
"get",
"generating",
"action",
"(",
"get",
"first",
"artifact",
"ending",
"with",
"(",
"objc",
"lib",
"archive",
"action",
"get",
"inputs",
"(",
")",
",",
"\"",
"b",
"o",
"\"",
")",
")",
";",
"string",
"link",
"args",
"=",
"joiner",
"on",
"(",
"\"",
"\"",
")",
"join",
"(",
"link",
"action",
"get",
"arguments",
"(",
")",
")",
";",
"string",
"compile",
"args",
"=",
"joiner",
"on",
"(",
"\"",
"\"",
")",
"join",
"(",
"objc",
"lib",
"compile",
"action",
"get",
"arguments",
"(",
")",
")",
";",
"assert",
"that",
"(",
"link",
"args",
")",
"contains",
"(",
"\"",
"-",
"mwatchos",
"-",
"simulator",
"-",
"version",
"-",
"min",
"=",
"5",
"4",
"\"",
")",
";",
"assert",
"that",
"(",
"compile",
"args",
")",
"contains",
"(",
"\"",
"-",
"mwatchos",
"-",
"simulator",
"-",
"version",
"-",
"min",
"=",
"5",
"4",
"\"",
")",
";",
"}"
] |
[
"handler",
"for",
"a",
"stream",
"error",
"sends",
"a",
"{",
"@",
"code",
"rst",
"stream",
"}",
"frame",
"to",
"the",
"remote",
"endpoint",
"and",
"closes",
"the",
"stream"
] |
[
"protected",
"void",
"on",
"stream",
"error",
"(",
"channel",
"handler",
"context",
"ctx",
",",
"boolean",
"outbound",
",",
"@",
"suppress",
"warnings",
"(",
"\"",
"unused",
"\"",
")",
"throwable",
"cause",
",",
"stream",
"exception",
"http",
"2",
"ex",
")",
"{",
"final",
"int",
"stream",
"id",
"=",
"http",
"2",
"ex",
"stream",
"id",
"(",
")",
";",
"http",
"2",
"stream",
"stream",
"=",
"connection",
"(",
")",
"stream",
"(",
"stream",
"id",
")",
";",
"/",
"/",
"if",
"this",
"is",
"caused",
"by",
"reading",
"headers",
"that",
"are",
"too",
"large",
",",
"send",
"a",
"header",
"with",
"status",
"431",
"if",
"(",
"http",
"2",
"ex",
"instanceof",
"http",
"2",
"exception",
"header",
"list",
"size",
"exception",
"&",
"&",
"(",
"(",
"http",
"2",
"exception",
"header",
"list",
"size",
"exception",
")",
"http",
"2",
"ex",
")",
"during",
"decode",
"(",
")",
"&",
"&",
"connection",
"(",
")",
"is",
"server",
"(",
")",
")",
"{",
"/",
"/",
"note",
"we",
"have",
"to",
"check",
"to",
"make",
"sure",
"that",
"a",
"stream",
"exists",
"before",
"we",
"send",
"our",
"reply",
"/",
"/",
"we",
"likely",
"always",
"create",
"the",
"stream",
"below",
"as",
"the",
"stream",
"isn",
"'",
"t",
"created",
"until",
"the",
"/",
"/",
"header",
"block",
"is",
"completely",
"processed",
"/",
"/",
"the",
"case",
"of",
"a",
"stream",
"id",
"referring",
"to",
"a",
"stream",
"which",
"was",
"already",
"closed",
"is",
"handled",
"/",
"/",
"by",
"create",
"stream",
"and",
"will",
"land",
"us",
"in",
"the",
"catch",
"block",
"below",
"if",
"(",
"stream",
"=",
"=",
"null",
")",
"{",
"try",
"{",
"stream",
"=",
"encoder",
"connection",
"(",
")",
"remote",
"(",
")",
"create",
"stream",
"(",
"stream",
"id",
",",
"true",
")",
";",
"}",
"catch",
"(",
"http",
"2",
"exception",
"e",
")",
"{",
"reset",
"unknown",
"stream",
"(",
"ctx",
",",
"stream",
"id",
",",
"http",
"2",
"ex",
"error",
"(",
")",
"code",
"(",
")",
",",
"ctx",
"new",
"promise",
"(",
")",
")",
";",
"return",
";",
"}",
"}",
"/",
"/",
"ensure",
"that",
"we",
"have",
"not",
"already",
"sent",
"headers",
"on",
"this",
"stream",
"if",
"(",
"stream",
"!",
"=",
"null",
"&",
"&",
"!",
"stream",
"is",
"headers",
"sent",
"(",
")",
")",
"{",
"try",
"{",
"handle",
"server",
"header",
"decode",
"size",
"error",
"(",
"ctx",
",",
"stream",
")",
";",
"}",
"catch",
"(",
"throwable",
"cause",
"2",
")",
"{",
"on",
"error",
"(",
"ctx",
",",
"outbound",
",",
"connection",
"error",
"(",
"internal",
"error",
",",
"cause",
"2",
",",
"\"",
"error",
"decode",
"size",
"error",
"\"",
")",
")",
";",
"}",
"}",
"}",
"if",
"(",
"stream",
"=",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"outbound",
"|",
"|",
"connection",
"(",
")",
"local",
"(",
")",
"may",
"have",
"created",
"stream",
"(",
"stream",
"id",
")",
")",
"{",
"reset",
"unknown",
"stream",
"(",
"ctx",
",",
"stream",
"id",
",",
"http",
"2",
"ex",
"error",
"(",
")",
"code",
"(",
")",
",",
"ctx",
"new",
"promise",
"(",
")",
")",
";",
"}",
"}",
"else",
"{",
"reset",
"stream",
"(",
"ctx",
",",
"stream",
",",
"http",
"2",
"ex",
"error",
"(",
")",
"code",
"(",
")",
",",
"ctx",
"new",
"promise",
"(",
")",
")",
";",
"}",
"}"
] |
[
"register",
"a",
"listener",
"that",
"will",
"be",
"called",
"when",
"this",
"model",
"visibility",
"has",
"changed",
"the",
"listener",
"will",
"contribute",
"to",
"this",
"model",
"'",
"s",
"hash",
"code",
"state",
"per",
"the",
"{",
"@",
"link",
"com",
"airbnb",
"epoxy",
"epoxy",
"attribute",
"option",
"#",
"do",
"not",
"hash",
"}",
"rules"
] |
[
"public",
"model",
"with",
"super",
"attributes",
"$",
"sub",
"model",
"with",
"super",
"attributes",
"on",
"visibility",
"changed",
"(",
"on",
"model",
"visibility",
"changed",
"listener",
"<",
"model",
"with",
"super",
"attributes",
"$",
"sub",
"model",
"with",
"super",
"attributes",
",",
"object",
">",
"listener",
")",
"{",
"on",
"mutation",
"(",
")",
";",
"this",
"on",
"model",
"visibility",
"changed",
"listener",
"epoxy",
"generated",
"model",
"=",
"listener",
";",
"return",
"this",
";",
"}"
] |
[
"looks",
"through",
"the",
"payloads",
"list",
"and",
"returns",
"the",
"first",
"model",
"found",
"with",
"the",
"given",
"model",
"id",
"this",
"assumes",
"that",
"the",
"payloads",
"list",
"will",
"only",
"contain",
"objects",
"of",
"type",
"{",
"@",
"link",
"diff",
"payload",
"}",
",",
"and",
"will",
"throw",
"if",
"an",
"unexpected",
"type",
"is",
"found"
] |
[
"public",
"static",
"epoxy",
"model",
"<",
"?",
">",
"get",
"model",
"from",
"payload",
"(",
"list",
"<",
"object",
">",
"payloads",
",",
"long",
"model",
"id",
")",
"{",
"if",
"(",
"payloads",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"object",
"payload",
":",
"payloads",
")",
"{",
"diff",
"payload",
"diff",
"payload",
"=",
"(",
"diff",
"payload",
")",
"payload",
";",
"if",
"(",
"diff",
"payload",
"single",
"model",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"diff",
"payload",
"single",
"model",
"id",
"(",
")",
"=",
"=",
"model",
"id",
")",
"{",
"return",
"diff",
"payload",
"single",
"model",
";",
"}",
"}",
"else",
"{",
"epoxy",
"model",
"<",
"?",
">",
"model",
"for",
"id",
"=",
"diff",
"payload",
"models",
"by",
"id",
"get",
"(",
"model",
"id",
")",
";",
"if",
"(",
"model",
"for",
"id",
"!",
"=",
"null",
")",
"{",
"return",
"model",
"for",
"id",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}"
] |
[
"returns",
"a",
"string",
"which",
"is",
"a",
"printout",
"of",
"a",
"stack",
"trace",
"for",
"each",
"thread",
"running",
"in",
"the",
"current",
"jvm"
] |
[
"public",
"static",
"string",
"create",
"stack",
"trace",
"for",
"all",
"threads",
"(",
")",
"{",
"map",
"<",
"thread",
",",
"stack",
"trace",
"element",
"[",
"]",
">",
"all",
"stack",
"traces",
"=",
"thread",
"get",
"all",
"stack",
"traces",
"(",
")",
";",
"set",
"<",
"entry",
"<",
"thread",
",",
"stack",
"trace",
"element",
"[",
"]",
">",
">",
"entry",
"set",
"=",
"all",
"stack",
"traces",
"entry",
"set",
"(",
")",
";",
"string",
"builder",
"builder",
"=",
"new",
"string",
"builder",
"(",
")",
";",
"for",
"(",
"entry",
"<",
"thread",
",",
"stack",
"trace",
"element",
"[",
"]",
">",
"entry",
":",
"entry",
"set",
")",
"{",
"builder",
"append",
"(",
"\"",
"thread",
":",
"\"",
"+",
"entry",
"get",
"key",
"(",
")",
"get",
"name",
"(",
")",
")",
"append",
"(",
"'",
"\\",
"n",
"'",
")",
";",
"stack",
"trace",
"element",
"[",
"]",
"value",
"=",
"entry",
"get",
"value",
"(",
")",
";",
"for",
"(",
"stack",
"trace",
"element",
"stack",
"trace",
"element",
":",
"value",
")",
"{",
"builder",
"append",
"(",
"'",
"\\",
"t",
"'",
")",
"append",
"(",
"\"",
"at",
"\"",
")",
"append",
"(",
"stack",
"trace",
"element",
")",
"append",
"(",
"'",
"\\",
"n",
"'",
")",
";",
"}",
"}",
"return",
"builder",
"to",
"string",
"(",
")",
";",
"}"
] |
[
"sets",
"extra",
"data"
] |
[
"public",
"void",
"set",
"extra",
"data",
"(",
"string",
"extra",
"data",
")",
"{",
"this",
"extra",
"data",
"=",
"extra",
"data",
";",
"}"
] |
[
"returns",
"the",
"dynamic",
"hash",
"value",
"associated",
"with",
"the",
"referenced",
"constant",
"varnode",
"a",
"value",
"of",
"zero",
"(",
"0",
")",
"indicates",
"not",
"applicable"
] |
[
"long",
"get",
"dynamic",
"hash",
"value",
"(",
")",
";"
] |
[
"since",
"{",
"@",
"link",
"abstract",
"keyed",
"state",
"backend",
"#",
"get",
"keys",
"(",
"string",
",",
"object",
")",
"}",
"does",
"'",
"t",
"support",
"concurrent",
"modification",
"and",
"{",
"@",
"link",
"abstract",
"keyed",
"state",
"backend",
"#",
"apply",
"to",
"all",
"keys",
"(",
"object",
",",
"type",
"serializer",
",",
"state",
"descriptor",
",",
"keyed",
"state",
"function",
")",
"}",
"rely",
"on",
"it",
"to",
"get",
"keys",
"from",
"backend",
"so",
"we",
"need",
"this",
"unit",
"test",
"to",
"verify",
"the",
"concurrent",
"modification",
"with",
"{",
"@",
"link",
"abstract",
"keyed",
"state",
"backend",
"#",
"apply",
"to",
"all",
"keys",
"(",
"object",
",",
"type",
"serializer",
",",
"state",
"descriptor",
",",
"keyed",
"state",
"function",
")",
"}"
] |
[
"public",
"void",
"test",
"concurrent",
"modification",
"with",
"apply",
"to",
"all",
"keys",
"(",
")",
"throws",
"exception",
"{",
"abstract",
"keyed",
"state",
"backend",
"<",
"integer",
">",
"backend",
"=",
"create",
"keyed",
"backend",
"(",
"int",
"serializer",
"instance",
")",
";",
"try",
"{",
"list",
"state",
"descriptor",
"<",
"string",
">",
"list",
"state",
"descriptor",
"=",
"new",
"list",
"state",
"descriptor",
"<",
">",
"(",
"\"",
"foo",
"\"",
",",
"string",
"serializer",
"instance",
")",
";",
"list",
"state",
"<",
"string",
">",
"list",
"state",
"=",
"backend",
"get",
"partitioned",
"state",
"(",
"void",
"namespace",
"instance",
",",
"void",
"namespace",
"serializer",
"instance",
",",
"list",
"state",
"descriptor",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"100",
";",
"+",
"+",
"i",
")",
"{",
"backend",
"set",
"current",
"key",
"(",
"i",
")",
";",
"list",
"state",
"add",
"(",
"\"",
"hello",
"\"",
"+",
"i",
")",
";",
"}",
"/",
"/",
"valid",
"state",
"value",
"via",
"apply",
"to",
"all",
"keys",
"(",
")",
"backend",
"apply",
"to",
"all",
"keys",
"(",
"void",
"namespace",
"instance",
",",
"void",
"namespace",
"serializer",
"instance",
",",
"list",
"state",
"descriptor",
",",
"new",
"keyed",
"state",
"function",
"<",
"integer",
",",
"list",
"state",
"<",
"string",
">",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"process",
"(",
"integer",
"key",
",",
"list",
"state",
"<",
"string",
">",
"state",
")",
"throws",
"exception",
"{",
"assert",
"equals",
"(",
"\"",
"hello",
"\"",
"+",
"key",
",",
"state",
"get",
"(",
")",
"iterator",
"(",
")",
"next",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"/",
"/",
"clear",
"state",
"via",
"apply",
"to",
"all",
"keys",
"(",
")",
"backend",
"apply",
"to",
"all",
"keys",
"(",
"void",
"namespace",
"instance",
",",
"void",
"namespace",
"serializer",
"instance",
",",
"list",
"state",
"descriptor",
",",
"new",
"keyed",
"state",
"function",
"<",
"integer",
",",
"list",
"state",
"<",
"string",
">",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"process",
"(",
"integer",
"key",
",",
"list",
"state",
"<",
"string",
">",
"state",
")",
"throws",
"exception",
"{",
"state",
"clear",
"(",
")",
";",
"}",
"}",
")",
";",
"/",
"/",
"valid",
"that",
"state",
"has",
"been",
"cleared",
"backend",
"apply",
"to",
"all",
"keys",
"(",
"void",
"namespace",
"instance",
",",
"void",
"namespace",
"serializer",
"instance",
",",
"list",
"state",
"descriptor",
",",
"new",
"keyed",
"state",
"function",
"<",
"integer",
",",
"list",
"state",
"<",
"string",
">",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"process",
"(",
"integer",
"key",
",",
"list",
"state",
"<",
"string",
">",
"state",
")",
"throws",
"exception",
"{",
"assert",
"false",
"(",
"state",
"get",
"(",
")",
"iterator",
"(",
")",
"has",
"next",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"/",
"/",
"clear",
"(",
")",
"with",
"add",
"(",
")",
"in",
"apply",
"to",
"all",
"keys",
"(",
")",
"backend",
"apply",
"to",
"all",
"keys",
"(",
"void",
"namespace",
"instance",
",",
"void",
"namespace",
"serializer",
"instance",
",",
"list",
"state",
"descriptor",
",",
"new",
"keyed",
"state",
"function",
"<",
"integer",
",",
"list",
"state",
"<",
"string",
">",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"process",
"(",
"integer",
"key",
",",
"list",
"state",
"<",
"string",
">",
"state",
")",
"throws",
"exception",
"{",
"state",
"add",
"(",
"\"",
"hello",
"\"",
"+",
"key",
")",
";",
"state",
"clear",
"(",
")",
";",
"state",
"add",
"(",
"\"",
"hello",
"\"",
"+",
"key",
")",
";",
"}",
"}",
")",
";",
"/",
"/",
"valid",
"state",
"value",
"via",
"apply",
"to",
"all",
"keys",
"(",
")",
"backend",
"apply",
"to",
"all",
"keys",
"(",
"void",
"namespace",
"instance",
",",
"void",
"namespace",
"serializer",
"instance",
",",
"list",
"state",
"descriptor",
",",
"new",
"keyed",
"state",
"function",
"<",
"integer",
",",
"list",
"state",
"<",
"string",
">",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"process",
"(",
"integer",
"key",
",",
"list",
"state",
"<",
"string",
">",
"state",
")",
"throws",
"exception",
"{",
"final",
"iterator",
"<",
"string",
">",
"it",
"=",
"state",
"get",
"(",
")",
"iterator",
"(",
")",
";",
"assert",
"equals",
"(",
"\"",
"hello",
"\"",
"+",
"key",
",",
"it",
"next",
"(",
")",
")",
";",
"assert",
"false",
"(",
"it",
"has",
"next",
"(",
")",
")",
";",
"/",
"/",
"finally",
"verify",
"we",
"have",
"no",
"more",
"elements",
"}",
"}",
")",
";",
"}",
"finally",
"{",
"i",
"o",
"utils",
"close",
"quietly",
"(",
"backend",
")",
";",
"backend",
"dispose",
"(",
")",
";",
"}",
"}"
] |
[
"actual",
"implementation",
"of",
"leaving",
"an",
"activity"
] |
[
"protected",
"void",
"perform",
"outgoing",
"behavior",
"(",
"execution",
"entity",
"execution",
",",
"boolean",
"check",
"conditions",
",",
"boolean",
"throw",
"exception",
"if",
"execution",
"stuck",
")",
"{",
"propagate",
"variables",
"to",
"parent",
"(",
"execution",
")",
";",
"get",
"agenda",
"(",
")",
"plan",
"take",
"outgoing",
"sequence",
"flows",
"operation",
"(",
"execution",
",",
"true",
")",
";",
"}"
] |
[
"get",
"a",
"scanner",
"that",
"covers",
"a",
"specific",
"key",
"range"
] |
[
"public",
"scanner",
"create",
"scanner",
"by",
"key",
"(",
"raw",
"comparable",
"begin",
"key",
",",
"raw",
"comparable",
"end",
"key",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"(",
"begin",
"key",
"!",
"=",
"null",
")",
"&",
"&",
"(",
"end",
"key",
"!",
"=",
"null",
")",
"&",
"&",
"(",
"compare",
"keys",
"(",
"begin",
"key",
",",
"end",
"key",
")",
">",
"=",
"0",
")",
")",
"{",
"return",
"new",
"scanner",
"(",
"this",
",",
"begin",
"key",
",",
"begin",
"key",
")",
";",
"}",
"return",
"new",
"scanner",
"(",
"this",
",",
"begin",
"key",
",",
"end",
"key",
")",
";",
"}"
] |
[
"checks",
"whether",
"{",
"@",
"link",
"completable",
"future",
"}",
"will",
"completed",
"exceptionally",
"within",
"a",
"certain",
"time"
] |
[
"public",
"static",
"<",
"t",
">",
"future",
"will",
"fail",
"matcher",
"<",
"t",
">",
"future",
"will",
"complete",
"exceptionally",
"(",
"function",
"<",
"throwable",
",",
"boolean",
">",
"exception",
"check",
",",
"duration",
"timeout",
",",
"string",
"check",
"description",
")",
"{",
"objects",
"require",
"non",
"null",
"(",
"exception",
"check",
",",
"\"",
"exception",
"type",
"should",
"not",
"be",
"null",
"\"",
")",
";",
"objects",
"require",
"non",
"null",
"(",
"timeout",
",",
"\"",
"timeout",
"should",
"not",
"be",
"null",
"\"",
")",
";",
"return",
"new",
"future",
"will",
"fail",
"matcher",
"<",
">",
"(",
"exception",
"check",
",",
"timeout",
",",
"check",
"description",
")",
";",
"}"
] |
[
"triggers",
"a",
"browser",
"click",
"at",
"the",
"current",
"cursor",
"location",
"thus",
",",
"this",
"method",
"should",
"be",
"called",
"only",
"after",
"the",
"browser",
"location",
"is",
"set",
"the",
"the",
"desired",
"field"
] |
[
"public",
"void",
"click",
"(",
"code",
"browser",
"plugin",
"code",
"browser",
",",
"int",
"click",
"count",
")",
"{",
"click",
"(",
"code",
"browser",
",",
"click",
"count",
",",
"true",
")",
";",
"}"
] |
[
"make",
"sure",
"at",
"least",
"one",
"non",
"-",
"transient",
"volume",
"has",
"a",
"saved",
"copy",
"of",
"the",
"replica",
"an",
"infinite",
"loop",
"is",
"used",
"to",
"ensure",
"the",
"async",
"lazy",
"persist",
"tasks",
"are",
"completely",
"done",
"before",
"verification",
"caller",
"of",
"this",
"method",
"expects",
"either",
"a",
"successful",
"pass",
"or",
"timeout",
"failure"
] |
[
"protected",
"final",
"void",
"ensure",
"lazy",
"persist",
"blocks",
"are",
"saved",
"(",
"final",
"located",
"blocks",
"located",
"blocks",
")",
"throws",
"i",
"o",
"exception",
",",
"interrupted",
"exception",
",",
"timeout",
"exception",
"{",
"final",
"string",
"bpid",
"=",
"cluster",
"get",
"namesystem",
"(",
")",
"get",
"block",
"pool",
"id",
"(",
")",
";",
"final",
"set",
"<",
"long",
">",
"persisted",
"block",
"ids",
"=",
"new",
"hash",
"set",
"<",
"long",
">",
"(",
")",
";",
"/",
"/",
"we",
"should",
"find",
"a",
"persisted",
"copy",
"for",
"each",
"located",
"block",
"try",
"(",
"fs",
"dataset",
"spi",
"fs",
"volume",
"references",
"volumes",
"=",
"cluster",
"get",
"data",
"nodes",
"(",
")",
"get",
"(",
"0",
")",
"get",
"f",
"s",
"dataset",
"(",
")",
"get",
"fs",
"volume",
"references",
"(",
")",
")",
"{",
"generic",
"test",
"utils",
"wait",
"for",
"(",
"(",
")",
"-",
">",
"{",
"for",
"(",
"located",
"block",
"lb",
":",
"located",
"blocks",
"get",
"located",
"blocks",
"(",
")",
")",
"{",
"for",
"(",
"fs",
"volume",
"spi",
"v",
":",
"volumes",
")",
"{",
"if",
"(",
"v",
"is",
"transient",
"storage",
"(",
")",
")",
"{",
"continue",
";",
"}",
"fs",
"volume",
"impl",
"volume",
"=",
"(",
"fs",
"volume",
"impl",
")",
"v",
";",
"file",
"lazy",
"persist",
"dir",
";",
"try",
"{",
"lazy",
"persist",
"dir",
"=",
"volume",
"get",
"block",
"pool",
"slice",
"(",
"bpid",
")",
"get",
"lazypersist",
"dir",
"(",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"ioe",
")",
"{",
"return",
"false",
";",
"}",
"long",
"block",
"id",
"=",
"lb",
"get",
"block",
"(",
")",
"get",
"block",
"id",
"(",
")",
";",
"file",
"target",
"dir",
"=",
"datanode",
"util",
"id",
"to",
"block",
"dir",
"(",
"lazy",
"persist",
"dir",
",",
"block",
"id",
")",
";",
"file",
"block",
"file",
"=",
"new",
"file",
"(",
"target",
"dir",
",",
"lb",
"get",
"block",
"(",
")",
"get",
"block",
"name",
"(",
")",
")",
";",
"if",
"(",
"block",
"file",
"exists",
"(",
")",
")",
"{",
"/",
"/",
"found",
"a",
"persisted",
"copy",
"for",
"this",
"block",
"and",
"added",
"to",
"the",
"set",
"persisted",
"block",
"ids",
"add",
"(",
"block",
"id",
")",
";",
"}",
"}",
"}",
"return",
"(",
"persisted",
"block",
"ids",
"size",
"(",
")",
"=",
"=",
"located",
"blocks",
"get",
"located",
"blocks",
"(",
")",
"size",
"(",
")",
")",
";",
"}",
",",
"wait",
"poll",
"interval",
"large",
"ms",
",",
"wait",
"for",
"storage",
"types",
"ms",
")",
";",
"}",
"}"
] |
[
"verify",
"permission",
"for",
"a",
"mount",
"point",
"when",
"the",
"multiple",
"destinations",
"are",
"present",
"with",
"both",
"having",
"same",
"permissions",
"it",
"returns",
"the",
"same",
"actual",
"permissions",
"of",
"the",
"actual",
"destinations",
"pointed",
"by",
"the",
"mount",
"point"
] |
[
"public",
"void",
"test",
"mount",
"table",
"permissions",
"multi",
"dest",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"try",
"{",
"map",
"<",
"string",
",",
"string",
">",
"dest",
"map",
"=",
"new",
"hash",
"map",
"<",
">",
"(",
")",
";",
"dest",
"map",
"put",
"(",
"\"",
"ns",
"0",
"\"",
",",
"\"",
"/",
"tmp",
"/",
"testdir",
"\"",
")",
";",
"dest",
"map",
"put",
"(",
"\"",
"ns",
"1",
"\"",
",",
"\"",
"/",
"tmp",
"/",
"testdir",
"0",
"1",
"\"",
")",
";",
"mount",
"table",
"add",
"entry",
"=",
"mount",
"table",
"new",
"instance",
"(",
"\"",
"/",
"testdir",
"\"",
",",
"dest",
"map",
")",
";",
"assert",
"true",
"(",
"add",
"mount",
"table",
"(",
"add",
"entry",
")",
")",
";",
"nn",
"fs",
"0",
"mkdirs",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"/",
"testdir",
"\"",
")",
")",
";",
"nn",
"fs",
"0",
"set",
"owner",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"/",
"testdir",
"\"",
")",
",",
"\"",
"aowner",
"\"",
",",
"\"",
"agroup",
"\"",
")",
";",
"nn",
"fs",
"0",
"set",
"permission",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"/",
"testdir",
"\"",
")",
",",
"fs",
"permission",
"create",
"immutable",
"(",
"(",
"short",
")",
"775",
")",
")",
";",
"nn",
"fs",
"1",
"mkdirs",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"/",
"testdir",
"0",
"1",
"\"",
")",
")",
";",
"nn",
"fs",
"1",
"set",
"owner",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"/",
"testdir",
"0",
"1",
"\"",
")",
",",
"\"",
"aowner",
"\"",
",",
"\"",
"agroup",
"\"",
")",
";",
"nn",
"fs",
"1",
"set",
"permission",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"/",
"testdir",
"0",
"1",
"\"",
")",
",",
"fs",
"permission",
"create",
"immutable",
"(",
"(",
"short",
")",
"775",
")",
")",
";",
"file",
"status",
"[",
"]",
"list",
"=",
"router",
"fs",
"list",
"status",
"(",
"new",
"path",
"(",
"\"",
"/",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"agroup",
"\"",
",",
"list",
"[",
"0",
"]",
"get",
"group",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"aowner",
"\"",
",",
"list",
"[",
"0",
"]",
"get",
"owner",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"(",
"short",
")",
"775",
",",
"list",
"[",
"0",
"]",
"get",
"permission",
"(",
")",
"to",
"short",
"(",
")",
")",
";",
"}",
"finally",
"{",
"nn",
"fs",
"0",
"delete",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"\"",
")",
",",
"true",
")",
";",
"nn",
"fs",
"1",
"delete",
"(",
"new",
"path",
"(",
"\"",
"/",
"tmp",
"\"",
")",
",",
"true",
")",
";",
"}",
"}"
] |
[
"deletes",
"multiple",
"blobs",
"from",
"the",
"specific",
"bucket",
"using",
"a",
"batch",
"request"
] |
[
"void",
"delete",
"blobs",
"ignoring",
"if",
"not",
"exists",
"(",
"collection",
"<",
"string",
">",
"blob",
"names",
")",
"throws",
"i",
"o",
"exception",
"{",
"if",
"(",
"blob",
"names",
"is",
"empty",
"(",
")",
")",
"{",
"return",
";",
"}",
"final",
"list",
"<",
"blob",
"id",
">",
"blob",
"ids",
"to",
"delete",
"=",
"blob",
"names",
"stream",
"(",
")",
"map",
"(",
"blob",
"-",
">",
"blob",
"id",
"of",
"(",
"bucket",
"name",
",",
"blob",
")",
")",
"collect",
"(",
"collectors",
"to",
"list",
"(",
")",
")",
";",
"final",
"list",
"<",
"blob",
"id",
">",
"failed",
"blobs",
"=",
"collections",
"synchronized",
"list",
"(",
"new",
"array",
"list",
"<",
">",
"(",
")",
")",
";",
"try",
"{",
"socket",
"access",
"do",
"privileged",
"void",
"i",
"o",
"exception",
"(",
"(",
")",
"-",
">",
"{",
"final",
"atomic",
"reference",
"<",
"storage",
"exception",
">",
"ioe",
"=",
"new",
"atomic",
"reference",
"<",
">",
"(",
")",
";",
"final",
"storage",
"batch",
"batch",
"=",
"client",
"(",
")",
"batch",
"(",
")",
";",
"for",
"(",
"blob",
"id",
"blob",
":",
"blob",
"ids",
"to",
"delete",
")",
"{",
"batch",
"delete",
"(",
"blob",
")",
"notify",
"(",
"new",
"batch",
"result",
"callback",
"<",
">",
"(",
")",
"{",
"@",
"override",
"public",
"void",
"success",
"(",
"boolean",
"result",
")",
"{",
"}",
"@",
"override",
"public",
"void",
"error",
"(",
"storage",
"exception",
"exception",
")",
"{",
"if",
"(",
"exception",
"get",
"code",
"(",
")",
"!",
"=",
"http",
"not",
"found",
")",
"{",
"failed",
"blobs",
"add",
"(",
"blob",
")",
";",
"if",
"(",
"ioe",
"compare",
"and",
"set",
"(",
"null",
",",
"exception",
")",
"=",
"=",
"false",
")",
"{",
"ioe",
"get",
"(",
")",
"add",
"suppressed",
"(",
"exception",
")",
";",
"}",
"}",
"}",
"}",
")",
";",
"}",
"batch",
"submit",
"(",
")",
";",
"final",
"storage",
"exception",
"exception",
"=",
"ioe",
"get",
"(",
")",
";",
"if",
"(",
"exception",
"!",
"=",
"null",
")",
"{",
"throw",
"exception",
";",
"}",
"}",
")",
";",
"}",
"catch",
"(",
"final",
"exception",
"e",
")",
"{",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"exception",
"when",
"deleting",
"blobs",
"[",
"\"",
"+",
"failed",
"blobs",
"+",
"\"",
"]",
"\"",
",",
"e",
")",
";",
"}",
"assert",
"failed",
"blobs",
"is",
"empty",
"(",
")",
";",
"}"
] |
[
"return",
"true",
"if",
"this",
"outer",
"composite",
"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",
";",
"}",
"outer",
"composite",
"outer",
"composite",
"=",
"(",
"outer",
"composite",
")",
"o",
";",
"return",
"objects",
"equals",
"(",
"this",
"my",
"number",
",",
"outer",
"composite",
"my",
"number",
")",
"&",
"&",
"objects",
"equals",
"(",
"this",
"my",
"string",
",",
"outer",
"composite",
"my",
"string",
")",
"&",
"&",
"objects",
"equals",
"(",
"this",
"my",
"boolean",
",",
"outer",
"composite",
"my",
"boolean",
")",
";",
"}"
] |
[
"builds",
"a",
"thread",
"-",
"safe",
"map",
"this",
"method",
"does",
"not",
"alter",
"the",
"state",
"of",
"this",
"{",
"@",
"code",
"map",
"maker",
"}",
"instance",
",",
"so",
"it",
"can",
"be",
"invoked",
"again",
"to",
"create",
"multiple",
"independent",
"maps",
"the",
"bulk",
"operations",
"{",
"@",
"code",
"put",
"all",
"}",
",",
"{",
"@",
"code",
"equals",
"}",
",",
"and",
"{",
"@",
"code",
"clear",
"}",
"are",
"not",
"guaranteed",
"to",
"be",
"performed",
"atomically",
"on",
"the",
"returned",
"map",
"additionally",
",",
"{",
"@",
"code",
"size",
"}",
"and",
"{",
"@",
"code",
"contains",
"value",
"}",
"are",
"implemented",
"as",
"bulk",
"read",
"operations",
",",
"and",
"thus",
"may",
"fail",
"to",
"observe",
"concurrent",
"writes"
] |
[
"public",
"<",
"k",
",",
"v",
">",
"concurrent",
"map",
"<",
"k",
",",
"v",
">",
"make",
"map",
"(",
")",
"{",
"if",
"(",
"!",
"use",
"custom",
"map",
")",
"{",
"return",
"new",
"concurrent",
"hash",
"map",
"<",
">",
"(",
"get",
"initial",
"capacity",
"(",
")",
",",
"0",
"7",
"5f",
",",
"get",
"concurrency",
"level",
"(",
")",
")",
";",
"}",
"return",
"map",
"maker",
"internal",
"map",
"create",
"(",
"this",
")",
";",
"}"
] |
[
"completion",
"prefix",
"fuzzy",
"query"
] |
[
"public",
"completion",
"query",
"fuzzy",
"query",
"(",
"string",
"value",
",",
"fuzziness",
"fuzziness",
",",
"int",
"non",
"fuzzy",
"prefix",
"length",
",",
"int",
"min",
"fuzzy",
"prefix",
"length",
",",
"int",
"max",
"expansions",
",",
"boolean",
"transpositions",
",",
"boolean",
"unicode",
"aware",
")",
"{",
"return",
"new",
"fuzzy",
"completion",
"query",
"(",
"get",
"text",
"search",
"info",
"(",
")",
"get",
"search",
"analyzer",
"(",
")",
"analyzer",
"(",
")",
",",
"new",
"term",
"(",
"name",
"(",
")",
",",
"indexed",
"value",
"for",
"search",
"(",
"value",
")",
")",
",",
"null",
",",
"fuzziness",
"as",
"distance",
"(",
")",
",",
"transpositions",
",",
"non",
"fuzzy",
"prefix",
"length",
",",
"min",
"fuzzy",
"prefix",
"length",
",",
"unicode",
"aware",
",",
"max",
"expansions",
")",
";",
"}"
] |
[
"this",
"test",
"creates",
"lots",
"of",
"threads",
"that",
"hammer",
"on",
"the",
"pool"
] |
[
"public",
"void",
"test",
"stressful",
"situation",
"(",
")",
"throws",
"exception",
"{",
"int",
"num",
"threads",
"=",
"10",
";",
"final",
"int",
"iterations",
"=",
"50000",
";",
"final",
"int",
"poolable",
"size",
"=",
"1024",
";",
"final",
"long",
"total",
"memory",
"=",
"num",
"threads",
"/",
"2",
"*",
"poolable",
"size",
";",
"final",
"buffer",
"pool",
"pool",
"=",
"new",
"buffer",
"pool",
"(",
"total",
"memory",
",",
"poolable",
"size",
",",
"metrics",
",",
"time",
",",
"metric",
"group",
")",
";",
"list",
"<",
"stress",
"test",
"thread",
">",
"threads",
"=",
"new",
"array",
"list",
"<",
"stress",
"test",
"thread",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"num",
"threads",
";",
"i",
"+",
"+",
")",
"threads",
"add",
"(",
"new",
"stress",
"test",
"thread",
"(",
"pool",
",",
"iterations",
")",
")",
";",
"for",
"(",
"stress",
"test",
"thread",
"thread",
":",
"threads",
")",
"thread",
"start",
"(",
")",
";",
"for",
"(",
"stress",
"test",
"thread",
"thread",
":",
"threads",
")",
"thread",
"join",
"(",
")",
";",
"for",
"(",
"stress",
"test",
"thread",
"thread",
":",
"threads",
")",
"assert",
"true",
"(",
"thread",
"success",
"get",
"(",
")",
",",
"\"",
"thread",
"should",
"have",
"completed",
"all",
"iterations",
"successfully",
"\"",
")",
";",
"assert",
"equals",
"(",
"total",
"memory",
",",
"pool",
"available",
"memory",
"(",
")",
")",
";",
"}"
] |
[
"copy",
"the",
"contents",
"of",
"the",
"given",
"byte",
"array",
"to",
"the",
"given",
"output",
"stream",
"leaves",
"the",
"stream",
"open",
"when",
"done"
] |
[
"public",
"static",
"void",
"copy",
"(",
"byte",
"[",
"]",
"in",
",",
"output",
"stream",
"out",
")",
"throws",
"i",
"o",
"exception",
"{",
"assert",
"not",
"null",
"(",
"in",
",",
"\"",
"no",
"input",
"byte",
"array",
"specified",
"\"",
")",
";",
"assert",
"not",
"null",
"(",
"out",
",",
"\"",
"no",
"output",
"stream",
"specified",
"\"",
")",
";",
"out",
"write",
"(",
"in",
")",
";",
"out",
"flush",
"(",
")",
";",
"}"
] |
[
"gets",
"fallback",
"action"
] |
[
"protected",
"command",
"action",
"get",
"fallback",
"action",
"(",
")",
"{",
"return",
"command",
"actions",
"get",
"fallback",
"action",
"(",
")",
";",
"}"
] |
[
"a",
"stream",
"obtained",
"via",
"this",
"call",
"must",
"be",
"closed",
"before",
"using",
"other",
"a",
"p",
"is",
"of",
"this",
"class",
"or",
"else",
"the",
"invocation",
"will",
"block"
] |
[
"public",
"f",
"s",
"data",
"output",
"stream",
"create",
"(",
"path",
"file",
",",
"fs",
"permission",
"permission",
",",
"boolean",
"overwrite",
",",
"int",
"buffer",
"size",
",",
"short",
"replication",
",",
"long",
"block",
"size",
",",
"progressable",
"progress",
")",
"throws",
"i",
"o",
"exception",
"{",
"final",
"f",
"t",
"p",
"client",
"client",
"=",
"connect",
"(",
")",
";",
"path",
"work",
"dir",
"=",
"new",
"path",
"(",
"client",
"print",
"working",
"directory",
"(",
")",
")",
";",
"path",
"absolute",
"=",
"make",
"absolute",
"(",
"work",
"dir",
",",
"file",
")",
";",
"file",
"status",
"status",
";",
"try",
"{",
"status",
"=",
"get",
"file",
"status",
"(",
"client",
",",
"file",
")",
";",
"}",
"catch",
"(",
"file",
"not",
"found",
"exception",
"fnfe",
")",
"{",
"status",
"=",
"null",
";",
"}",
"if",
"(",
"status",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"overwrite",
"&",
"&",
"!",
"status",
"is",
"directory",
"(",
")",
")",
"{",
"delete",
"(",
"client",
",",
"file",
",",
"false",
")",
";",
"}",
"else",
"{",
"disconnect",
"(",
"client",
")",
";",
"throw",
"new",
"file",
"already",
"exists",
"exception",
"(",
"\"",
"file",
"already",
"exists",
":",
"\"",
"+",
"file",
")",
";",
"}",
"}",
"path",
"parent",
"=",
"absolute",
"get",
"parent",
"(",
")",
";",
"if",
"(",
"parent",
"=",
"=",
"null",
"|",
"|",
"!",
"mkdirs",
"(",
"client",
",",
"parent",
",",
"fs",
"permission",
"get",
"dir",
"default",
"(",
")",
")",
")",
"{",
"parent",
"=",
"(",
"parent",
"=",
"=",
"null",
")",
"?",
"new",
"path",
"(",
"\"",
"/",
"\"",
")",
":",
"parent",
";",
"disconnect",
"(",
"client",
")",
";",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"create",
"(",
")",
":",
"mkdirs",
"failed",
"to",
"create",
":",
"\"",
"+",
"parent",
")",
";",
"}",
"client",
"allocate",
"(",
"buffer",
"size",
")",
";",
"/",
"/",
"change",
"to",
"parent",
"directory",
"on",
"the",
"server",
"only",
"then",
"can",
"we",
"write",
"to",
"the",
"/",
"/",
"file",
"on",
"the",
"server",
"by",
"opening",
"up",
"an",
"output",
"stream",
"as",
"a",
"side",
"effect",
"the",
"/",
"/",
"working",
"directory",
"on",
"the",
"server",
"is",
"changed",
"to",
"the",
"parent",
"directory",
"of",
"the",
"/",
"/",
"file",
"the",
"ftp",
"client",
"connection",
"is",
"closed",
"when",
"close",
"(",
")",
"is",
"called",
"on",
"the",
"/",
"/",
"f",
"s",
"data",
"output",
"stream",
"client",
"change",
"working",
"directory",
"(",
"parent",
"to",
"uri",
"(",
")",
"get",
"path",
"(",
")",
")",
";",
"output",
"stream",
"output",
"stream",
"=",
"client",
"store",
"file",
"stream",
"(",
"file",
"get",
"name",
"(",
")",
")",
";",
"if",
"(",
"!",
"f",
"t",
"p",
"reply",
"is",
"positive",
"preliminary",
"(",
"client",
"get",
"reply",
"code",
"(",
")",
")",
")",
"{",
"/",
"/",
"the",
"ftp",
"client",
"is",
"an",
"inconsistent",
"state",
"must",
"close",
"the",
"stream",
"/",
"/",
"which",
"in",
"turn",
"will",
"logout",
"and",
"disconnect",
"from",
"ftp",
"server",
"if",
"(",
"output",
"stream",
"!",
"=",
"null",
")",
"{",
"i",
"o",
"utils",
"close",
"stream",
"(",
"output",
"stream",
")",
";",
"}",
"disconnect",
"(",
"client",
")",
";",
"throw",
"new",
"i",
"o",
"exception",
"(",
"\"",
"unable",
"to",
"create",
"file",
":",
"\"",
"+",
"file",
"+",
"\"",
",",
"aborting",
"\"",
")",
";",
"}",
"f",
"s",
"data",
"output",
"stream",
"fos",
"=",
"new",
"f",
"s",
"data",
"output",
"stream",
"(",
"output",
"stream",
",",
"statistics",
")",
"{",
"@",
"override",
"public",
"void",
"close",
"(",
")",
"throws",
"i",
"o",
"exception",
"{",
"super",
"close",
"(",
")",
";",
"if",
"(",
"!",
"client",
"is",
"connected",
"(",
")",
")",
"{",
"throw",
"new",
"f",
"t",
"p",
"exception",
"(",
"\"",
"client",
"not",
"connected",
"\"",
")",
";",
"}",
"boolean",
"cmd",
"completed",
"=",
"client",
"complete",
"pending",
"command",
"(",
")",
";",
"disconnect",
"(",
"client",
")",
";",
"if",
"(",
"!",
"cmd",
"completed",
")",
"{",
"throw",
"new",
"f",
"t",
"p",
"exception",
"(",
"\"",
"could",
"not",
"complete",
"transfer",
",",
"reply",
"code",
"-",
"\"",
"+",
"client",
"get",
"reply",
"code",
"(",
")",
")",
";",
"}",
"}",
"}",
";",
"return",
"fos",
";",
"}"
] |
[
"returns",
"a",
"file",
"'",
"s",
"all",
"x",
"attrs"
] |
[
"public",
"static",
"map",
"<",
"string",
",",
"byte",
"[",
"]",
">",
"get",
"x",
"attrs",
"(",
"file",
"system",
"file",
"system",
",",
"path",
"path",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"file",
"system",
"get",
"x",
"attrs",
"(",
"path",
")",
";",
"}"
] |
[
"convenience",
"method",
"for",
"{",
"@",
"link",
"#",
"decode",
"list",
"(",
"byte",
"[",
"]",
",",
"collection",
")",
"}"
] |
[
"list",
"<",
"t",
">",
"decode",
"list",
"(",
"byte",
"[",
"]",
"serialized",
")",
";"
] |
[
"return",
"true",
"if",
"this",
"animal",
"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",
";",
"}",
"animal",
"animal",
"=",
"(",
"animal",
")",
"o",
";",
"return",
"objects",
"equals",
"(",
"this",
"class",
"name",
",",
"animal",
"class",
"name",
")",
"&",
"&",
"objects",
"equals",
"(",
"this",
"color",
",",
"animal",
"color",
")",
";",
"}"
] |
[
"get",
"the",
"name",
"for",
"this",
"node"
] |
[
"public",
"string",
"get",
"name",
"(",
")",
"{",
"return",
"name",
";",
"}"
] |
[
"subtype",
"to",
"provide",
"{",
"@",
"link",
"run",
"#",
"get",
"id",
"(",
")",
"}",
"so",
"that",
"this",
"class",
"doesn",
"'",
"t",
"have",
"to",
"depend",
"on",
"it"
] |
[
"protected",
"string",
"get",
"id",
"of",
"(",
"r",
"r",
")",
"{",
"return",
"string",
"value",
"of",
"(",
"get",
"number",
"of",
"(",
"r",
")",
")",
";",
"}"
] |
[
"resolve",
"the",
"factory",
"method",
"in",
"the",
"specified",
"bean",
"definition",
",",
"if",
"possible",
"{",
"@",
"link",
"root",
"bean",
"definition",
"#",
"get",
"resolved",
"factory",
"method",
"(",
")",
"}",
"can",
"be",
"checked",
"for",
"the",
"result"
] |
[
"public",
"void",
"resolve",
"factory",
"method",
"if",
"possible",
"(",
"root",
"bean",
"definition",
"mbd",
")",
"{",
"class",
"<",
"?",
">",
"factory",
"class",
";",
"boolean",
"is",
"static",
";",
"if",
"(",
"mbd",
"get",
"factory",
"bean",
"name",
"(",
")",
"!",
"=",
"null",
")",
"{",
"factory",
"class",
"=",
"this",
"bean",
"factory",
"get",
"type",
"(",
"mbd",
"get",
"factory",
"bean",
"name",
"(",
")",
")",
";",
"is",
"static",
"=",
"false",
";",
"}",
"else",
"{",
"factory",
"class",
"=",
"mbd",
"get",
"bean",
"class",
"(",
")",
";",
"is",
"static",
"=",
"true",
";",
"}",
"assert",
"state",
"(",
"factory",
"class",
"!",
"=",
"null",
",",
"\"",
"unresolvable",
"factory",
"class",
"\"",
")",
";",
"factory",
"class",
"=",
"class",
"utils",
"get",
"user",
"class",
"(",
"factory",
"class",
")",
";",
"method",
"[",
"]",
"candidates",
"=",
"get",
"candidate",
"methods",
"(",
"factory",
"class",
",",
"mbd",
")",
";",
"method",
"unique",
"candidate",
"=",
"null",
";",
"for",
"(",
"method",
"candidate",
":",
"candidates",
")",
"{",
"if",
"(",
"modifier",
"is",
"static",
"(",
"candidate",
"get",
"modifiers",
"(",
")",
")",
"=",
"=",
"is",
"static",
"&",
"&",
"mbd",
"is",
"factory",
"method",
"(",
"candidate",
")",
")",
"{",
"if",
"(",
"unique",
"candidate",
"=",
"=",
"null",
")",
"{",
"unique",
"candidate",
"=",
"candidate",
";",
"}",
"else",
"if",
"(",
"is",
"param",
"mismatch",
"(",
"unique",
"candidate",
",",
"candidate",
")",
")",
"{",
"unique",
"candidate",
"=",
"null",
";",
"break",
";",
"}",
"}",
"}",
"mbd",
"factory",
"method",
"to",
"introspect",
"=",
"unique",
"candidate",
";",
"}"
] |
[
"get",
"the",
"item",
"at",
"the",
"specified",
"position",
"in",
"the",
"adapter"
] |
[
"public",
"fragment",
"get",
"item",
"at",
"(",
"int",
"position",
")",
"{",
"return",
"m",
"pages",
"get",
"(",
"position",
")",
";",
"}"
] |
[
"find",
"the",
"fields",
"constant",
"that",
"matches",
"field",
"id",
",",
"or",
"null",
"if",
"its",
"not",
"found"
] |
[
"public",
"static",
"fields",
"find",
"by",
"thrift",
"id",
"(",
"int",
"field",
"id",
")",
"{",
"switch",
"(",
"field",
"id",
")",
"{",
"case",
"1",
":",
"/",
"/",
"id",
"return",
"id",
";",
"default",
":",
"return",
"null",
";",
"}",
"}"
] |
[
"indicates",
"whether",
"the",
"content",
"of",
"this",
"gif",
"texture",
"view",
"is",
"opaque",
"the",
"content",
"is",
"assumed",
"to",
"be",
"<",
"b",
">",
"non",
"-",
"opaque",
"<",
"b",
">",
"by",
"default",
"(",
"unlike",
"{",
"@",
"link",
"texture",
"view",
"}",
"view",
"that",
"is",
"known",
"to",
"be",
"opaque",
"can",
"take",
"a",
"faster",
"drawing",
"case",
"than",
"non",
"-",
"opaque",
"one",
"<",
"br",
">",
"opacity",
"change",
"will",
"cause",
"animation",
"to",
"restart"
] |
[
"public",
"void",
"set",
"opaque",
"(",
"boolean",
"opaque",
")",
"{",
"if",
"(",
"opaque",
"!",
"=",
"is",
"opaque",
"(",
")",
")",
"{",
"super",
"set",
"opaque",
"(",
"opaque",
")",
";",
"set",
"input",
"source",
"(",
"m",
"input",
"source",
")",
";",
"}",
"}"
] |
[
"updated",
"user",
"this",
"can",
"only",
"be",
"done",
"by",
"the",
"logged",
"in",
"user"
] |
[
"public",
"completable",
"future",
"<",
"void",
">",
"update",
"user",
"(",
"string",
"username",
",",
"user",
"body",
")",
"throws",
"api",
"exception",
"{",
"try",
"{",
"http",
"request",
"builder",
"local",
"var",
"request",
"builder",
"=",
"update",
"user",
"request",
"builder",
"(",
"username",
",",
"body",
")",
";",
"return",
"member",
"var",
"http",
"client",
"send",
"async",
"(",
"local",
"var",
"request",
"builder",
"build",
"(",
")",
",",
"http",
"response",
"body",
"handlers",
"of",
"string",
"(",
")",
")",
"then",
"compose",
"async",
"(",
"local",
"var",
"response",
"-",
">",
"{",
"if",
"(",
"local",
"var",
"response",
"status",
"code",
"(",
")",
"/",
"100",
"!",
"=",
"2",
")",
"{",
"return",
"completable",
"future",
"failed",
"future",
"(",
"get",
"api",
"exception",
"(",
"\"",
"update",
"user",
"\"",
",",
"local",
"var",
"response",
")",
")",
";",
"}",
"return",
"completable",
"future",
"completed",
"future",
"(",
"null",
")",
";",
"}",
")",
";",
"}",
"catch",
"(",
"api",
"exception",
"e",
")",
"{",
"return",
"completable",
"future",
"failed",
"future",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"this",
"method",
"is",
"used",
"to",
"determine",
"if",
"a",
"request",
"should",
"be",
"executed",
"as",
"the",
"system",
"user",
",",
"even",
"if",
"the",
"request",
"already",
"has",
"a",
"user",
"associated",
"with",
"it",
"in",
"order",
"for",
"the",
"user",
"to",
"be",
"replaced",
"by",
"the",
"system",
"user",
"one",
"of",
"the",
"following",
"conditions",
"must",
"be",
"true",
":",
"the",
"action",
"is",
"an",
"internal",
"action",
"and",
"no",
"user",
"is",
"associated",
"with",
"the",
"request",
"the",
"action",
"is",
"an",
"internal",
"action",
"and",
"the",
"thread",
"context",
"contains",
"a",
"non",
"-",
"internal",
"action",
"as",
"the",
"originating",
"action"
] |
[
"public",
"static",
"boolean",
"should",
"replace",
"user",
"with",
"system",
"(",
"thread",
"context",
"thread",
"context",
",",
"string",
"action",
")",
"{",
"/",
"/",
"the",
"action",
"must",
"be",
"internal",
"or",
"the",
"thread",
"context",
"must",
"be",
"a",
"system",
"context",
"if",
"(",
"thread",
"context",
"is",
"system",
"context",
"(",
")",
"=",
"=",
"false",
"&",
"&",
"is",
"internal",
"action",
"(",
"action",
")",
"=",
"=",
"false",
")",
"{",
"return",
"false",
";",
"}",
"/",
"/",
"there",
"is",
"no",
"authentication",
"object",
"and",
"we",
"are",
"executing",
"in",
"a",
"system",
"context",
"or",
"an",
"internal",
"action",
"/",
"/",
"and",
"there",
"authentication",
"authentication",
"=",
"thread",
"context",
"get",
"transient",
"(",
"authentication",
"field",
"authentication",
"key",
")",
";",
"if",
"(",
"authentication",
"=",
"=",
"null",
"&",
"&",
"thread",
"context",
"get",
"transient",
"(",
"client",
"helper",
"action",
"origin",
"transient",
"name",
")",
"=",
"=",
"null",
")",
"{",
"return",
"true",
";",
"}",
"/",
"/",
"we",
"have",
"a",
"internal",
"action",
"being",
"executed",
"by",
"a",
"user",
"other",
"than",
"the",
"system",
"user",
",",
"lets",
"verify",
"that",
"there",
"is",
"a",
"/",
"/",
"originating",
"action",
"that",
"is",
"not",
"a",
"internal",
"action",
"we",
"verify",
"that",
"there",
"must",
"be",
"a",
"originating",
"action",
"as",
"an",
"/",
"/",
"internal",
"action",
"should",
"never",
"be",
"called",
"by",
"user",
"code",
"from",
"a",
"client",
"final",
"string",
"originating",
"action",
"=",
"thread",
"context",
"get",
"transient",
"(",
"authorization",
"service",
"field",
"originating",
"action",
"key",
")",
";",
"if",
"(",
"originating",
"action",
"!",
"=",
"null",
"&",
"&",
"is",
"internal",
"action",
"(",
"originating",
"action",
")",
"=",
"=",
"false",
")",
"{",
"return",
"true",
";",
"}",
"/",
"/",
"either",
"there",
"was",
"no",
"originating",
"action",
"or",
"the",
"originating",
"action",
"was",
"an",
"internal",
"action",
",",
"/",
"/",
"we",
"should",
"not",
"replace",
"under",
"these",
"circumstances",
"return",
"false",
";",
"}"
] |
[
"invalidate",
"the",
"association",
"for",
"the",
"specified",
"key",
"a",
"removal",
"notification",
"will",
"be",
"issued",
"for",
"invalidated",
"entries",
"with",
"{",
"@",
"link",
"org",
"elasticsearch",
"common",
"cache",
"removal",
"notification",
"removal",
"reason",
"}",
"invalidated"
] |
[
"public",
"void",
"invalidate",
"(",
"k",
"key",
")",
"{",
"cache",
"segment",
"<",
"k",
",",
"v",
">",
"segment",
"=",
"get",
"cache",
"segment",
"(",
"key",
")",
";",
"segment",
"remove",
"(",
"key",
",",
"invalidation",
"consumer",
")",
";",
"}"
] |
[
"pet",
"status",
"in",
"the",
"store"
] |
[
"public",
"status",
"enum",
"get",
"status",
"(",
")",
"{",
"return",
"status",
";",
"}"
] |
[
"create",
"a",
"new",
"{",
"@",
"link",
"profiles",
"}",
"instance",
"that",
"checks",
"for",
"matches",
"against",
"the",
"given",
"profile",
"strings",
"the",
"returned",
"instance",
"will",
"{",
"@",
"linkplain",
"profiles",
"#",
"matches",
"(",
"predicate",
")",
"match",
"}",
"if",
"any",
"one",
"of",
"the",
"given",
"profile",
"strings",
"matches",
"a",
"profile",
"string",
"may",
"contain",
"a",
"simple",
"profile",
"name",
"(",
"for",
"example",
"{",
"@",
"code",
"\"",
"production",
"\"",
"}",
")",
"or",
"a",
"profile",
"expression",
"a",
"profile",
"expression",
"allows",
"for",
"more",
"complicated",
"profile",
"logic",
"to",
"be",
"expressed",
",",
"for",
"example",
"{",
"@",
"code",
"\"",
"production",
"&",
"cloud",
"\"",
"}",
"the",
"following",
"operators",
"are",
"supported",
"in",
"profile",
"expressions",
"{",
"@",
"code",
"!",
"}",
"-",
"a",
"logical",
"not",
"of",
"the",
"profile",
"or",
"profile",
"expression",
"{",
"@",
"code",
"&",
"}",
"-",
"a",
"logical",
"and",
"of",
"the",
"profiles",
"or",
"profile",
"expressions",
"{",
"@",
"code",
"|",
"}",
"-",
"a",
"logical",
"or",
"of",
"the",
"profiles",
"or",
"profile",
"expressions",
"please",
"note",
"that",
"the",
"{",
"@",
"code",
"&",
"}",
"and",
"{",
"@",
"code",
"|",
"}",
"operators",
"may",
"not",
"be",
"mixed",
"without",
"using",
"parentheses",
"for",
"example",
"{",
"@",
"code",
"\"",
"a",
"&",
"b",
"|",
"c",
"\"",
"}",
"is",
"not",
"a",
"valid",
"expression",
";",
"it",
"must",
"be",
"expressed",
"as",
"{",
"@",
"code",
"\"",
"(",
"a",
"&",
"b",
")",
"|",
"c",
"\"",
"}",
"or",
"{",
"@",
"code",
"\"",
"a",
"&",
"(",
"b",
"|",
"c",
")",
"\"",
"}",
"as",
"of",
"spring",
"framework",
"5",
"1",
"17",
",",
"two",
"{",
"@",
"code",
"profiles",
"}",
"instances",
"returned",
"by",
"this",
"method",
"are",
"considered",
"equivalent",
"to",
"each",
"other",
"(",
"in",
"terms",
"of",
"{",
"@",
"code",
"equals",
"(",
")",
"}",
"and",
"{",
"@",
"code",
"hash",
"code",
"(",
")",
"}",
"semantics",
")",
"if",
"they",
"are",
"created",
"with",
"identical",
"profile",
"strings"
] |
[
"static",
"profiles",
"of",
"(",
"string",
"profiles",
")",
"{",
"return",
"profiles",
"parser",
"parse",
"(",
"profiles",
")",
";",
"}"
] |
[
"returns",
"true",
"if",
"all",
"suitable",
"nodes",
"for",
"the",
"job",
"are",
"offline"
] |
[
"private",
"boolean",
"is",
"all",
"suitable",
"nodes",
"offline",
"(",
"r",
"build",
")",
"{",
"label",
"label",
"=",
"get",
"assigned",
"label",
"(",
")",
";",
"if",
"(",
"label",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"invalid",
"label",
"put",
"in",
"queue",
"to",
"make",
"administrator",
"fix",
"if",
"(",
"label",
"get",
"nodes",
"(",
")",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"/",
"/",
"returns",
"true",
",",
"if",
"all",
"suitable",
"nodes",
"are",
"offline",
"return",
"label",
"is",
"offline",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"can",
"roam",
")",
"{",
"for",
"(",
"node",
"n",
":",
"jenkins",
"get",
"(",
")",
"get",
"nodes",
"(",
")",
")",
"{",
"computer",
"c",
"=",
"n",
"to",
"computer",
"(",
")",
";",
"if",
"(",
"c",
"!",
"=",
"null",
"&",
"&",
"c",
"is",
"online",
"(",
")",
"&",
"&",
"c",
"is",
"accepting",
"tasks",
"(",
")",
"&",
"&",
"n",
"get",
"mode",
"(",
")",
"=",
"=",
"mode",
"normal",
")",
"{",
"/",
"/",
"some",
"executor",
"is",
"online",
"that",
"is",
"ready",
"and",
"this",
"job",
"can",
"run",
"anywhere",
"return",
"false",
";",
"}",
"}",
"/",
"/",
"we",
"can",
"roam",
",",
"check",
"that",
"the",
"master",
"is",
"set",
"to",
"be",
"used",
"as",
"much",
"as",
"possible",
",",
"and",
"not",
"tied",
"jobs",
"only",
"return",
"jenkins",
"get",
"(",
")",
"get",
"mode",
"(",
")",
"=",
"=",
"mode",
"exclusive",
";",
"}",
"}",
"return",
"true",
";",
"}"
] |
[
"closes",
"all",
"elements",
"in",
"the",
"iterable",
"with",
"close",
"quietly",
"(",
")"
] |
[
"public",
"static",
"void",
"close",
"all",
"quietly",
"(",
"auto",
"closeable",
"closeables",
")",
"{",
"close",
"all",
"quietly",
"(",
"as",
"list",
"(",
"closeables",
")",
")",
";",
"}"
] |
[
"merge",
"the",
"outputs",
"from",
"multiple",
"namespaces"
] |
[
"static",
"<",
"t",
">",
"t",
"[",
"]",
"merge",
"(",
"map",
"<",
"federation",
"namespace",
"info",
",",
"t",
"[",
"]",
">",
"map",
",",
"class",
"<",
"t",
">",
"clazz",
")",
"{",
"/",
"/",
"put",
"all",
"results",
"into",
"a",
"set",
"to",
"avoid",
"repeats",
"set",
"<",
"t",
">",
"ret",
"=",
"new",
"linked",
"hash",
"set",
"<",
">",
"(",
")",
";",
"for",
"(",
"t",
"[",
"]",
"values",
":",
"map",
"values",
"(",
")",
")",
"{",
"if",
"(",
"values",
"!",
"=",
"null",
")",
"{",
"for",
"(",
"t",
"val",
":",
"values",
")",
"{",
"ret",
"add",
"(",
"val",
")",
";",
"}",
"}",
"}",
"return",
"to",
"array",
"(",
"ret",
",",
"clazz",
")",
";",
"}"
] |
[
"specify",
"whether",
"the",
"database",
"supports",
"the",
"use",
"of",
"schema",
"name",
"in",
"procedure",
"calls"
] |
[
"protected",
"void",
"set",
"supports",
"schemas",
"in",
"procedure",
"calls",
"(",
"boolean",
"supports",
"schemas",
"in",
"procedure",
"calls",
")",
"{",
"this",
"supports",
"schemas",
"in",
"procedure",
"calls",
"=",
"supports",
"schemas",
"in",
"procedure",
"calls",
";",
"}"
] |
[
"get",
"the",
"unique",
"identification",
"of",
"this",
"request"
] |
[
"public",
"allocation",
"i",
"d",
"get",
"allocation",
"id",
"(",
")",
"{",
"return",
"allocation",
"id",
";",
"}"
] |
[
"get",
"float",
"minimum",
":",
"54",
"3",
"maximum",
":",
"987",
"6"
] |
[
"public",
"float",
"get",
"float",
"(",
")",
"{",
"return",
"float",
";",
"}"
] |
[
"construct",
"a",
"hash",
"value",
"for",
"an",
"array",
"of",
"byte",
"array"
] |
[
"public",
"static",
"m",
"d",
"5",
"hash",
"digest",
"(",
"byte",
"[",
"]",
"[",
"]",
"data",
"arr",
",",
"int",
"start",
",",
"int",
"len",
")",
"{",
"byte",
"[",
"]",
"digest",
";",
"message",
"digest",
"digester",
"=",
"get",
"digester",
"(",
")",
";",
"for",
"(",
"byte",
"[",
"]",
"data",
":",
"data",
"arr",
")",
"{",
"digester",
"update",
"(",
"data",
",",
"start",
",",
"len",
")",
";",
"}",
"digest",
"=",
"digester",
"digest",
"(",
")",
";",
"return",
"new",
"m",
"d",
"5",
"hash",
"(",
"digest",
")",
";",
"}"
] |
[
"get",
"attribute",
"number"
] |
[
"public",
"big",
"decimal",
"get",
"attribute",
"number",
"(",
")",
"{",
"return",
"attribute",
"number",
";",
"}"
] |
[
"set",
"the",
"number",
"of",
"views",
"to",
"show",
"on",
"screen",
"in",
"this",
"carousel",
"at",
"a",
"time",
",",
"partial",
"numbers",
"are",
"allowed",
"this",
"is",
"useful",
"where",
"you",
"want",
"to",
"easily",
"control",
"for",
"the",
"number",
"of",
"items",
"on",
"screen",
",",
"regardless",
"of",
"screen",
"size",
"for",
"example",
",",
"you",
"could",
"set",
"this",
"to",
"1",
"2f",
"so",
"that",
"one",
"view",
"is",
"shown",
"in",
"full",
"and",
"20",
"%",
"of",
"the",
"next",
"view",
"\"",
"peeks",
"\"",
"from",
"the",
"edge",
"to",
"indicate",
"that",
"there",
"is",
"more",
"content",
"to",
"scroll",
"to",
"another",
"pattern",
"is",
"setting",
"a",
"different",
"view",
"count",
"depending",
"on",
"whether",
"the",
"device",
"is",
"phone",
"or",
"tablet",
"additionally",
",",
"if",
"a",
"linear",
"layout",
"manager",
"is",
"used",
"this",
"value",
"will",
"be",
"forwarded",
"to",
"{",
"@",
"link",
"linear",
"layout",
"manager",
"#",
"set",
"initial",
"prefetch",
"item",
"count",
"(",
"int",
")",
"}",
"as",
"a",
"performance",
"optimization",
"if",
"you",
"want",
"to",
"only",
"change",
"the",
"prefetch",
"count",
"without",
"changing",
"the",
"view",
"size",
"you",
"can",
"simply",
"use",
"{",
"@",
"link",
"#",
"set",
"initial",
"prefetch",
"item",
"count",
"(",
"int",
")",
"}"
] |
[
"public",
"void",
"set",
"num",
"views",
"to",
"show",
"on",
"screen",
"(",
"float",
"view",
"count",
")",
"{",
"num",
"views",
"to",
"show",
"on",
"screen",
"=",
"view",
"count",
";",
"set",
"initial",
"prefetch",
"item",
"count",
"(",
"(",
"int",
")",
"math",
"ceil",
"(",
"view",
"count",
")",
")",
";",
"}"
] |
[
"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",
"\"",
")",
";",
"}"
] |
[
"<",
"code",
">",
"optional",
"aapt",
"pb",
"reference",
"ref",
"=",
"1",
";",
"<",
"code",
">"
] |
[
"public",
"builder",
"merge",
"ref",
"(",
"com",
"android",
"aapt",
"resources",
"reference",
"value",
")",
"{",
"copy",
"on",
"write",
"(",
")",
";",
"instance",
"merge",
"ref",
"(",
"value",
")",
";",
"return",
"this",
";",
"}"
] |
[
"returns",
"a",
"new",
"in",
"memory",
"partition",
"object",
"this",
"is",
"required",
"as",
"a",
"plug",
"for",
"re",
"openable",
"mutable",
"hash",
"table"
] |
[
"protected",
"hash",
"partition",
"<",
"bt",
",",
"pt",
">",
"get",
"new",
"in",
"memory",
"partition",
"(",
"int",
"number",
",",
"int",
"recursion",
"level",
")",
"{",
"return",
"new",
"hash",
"partition",
"<",
"bt",
",",
"pt",
">",
"(",
"this",
"build",
"side",
"serializer",
",",
"this",
"probe",
"side",
"serializer",
",",
"number",
",",
"recursion",
"level",
",",
"this",
"available",
"memory",
"remove",
"(",
"this",
"available",
"memory",
"size",
"(",
")",
"-",
"1",
")",
",",
"this",
",",
"this",
"segment",
"size",
")",
";",
"}"
] |
[
"the",
"relative",
"complement",
",",
"or",
"difference",
",",
"of",
"the",
"specified",
"left",
"and",
"right",
"set",
",",
"returned",
"as",
"a",
"sorted",
"set",
"namely",
",",
"the",
"resulting",
"set",
"contains",
"all",
"the",
"elements",
"that",
"are",
"in",
"the",
"left",
"set",
"but",
"not",
"in",
"the",
"right",
"set",
",",
"and",
"the",
"set",
"is",
"sorted",
"using",
"the",
"natural",
"ordering",
"of",
"element",
"type",
"neither",
"input",
"is",
"mutated",
"by",
"this",
"operation",
",",
"an",
"entirely",
"new",
"set",
"is",
"returned"
] |
[
"public",
"static",
"<",
"t",
">",
"sorted",
"set",
"<",
"t",
">",
"sorted",
"difference",
"(",
"final",
"set",
"<",
"t",
">",
"left",
",",
"final",
"set",
"<",
"t",
">",
"right",
")",
"{",
"objects",
"require",
"non",
"null",
"(",
"left",
")",
";",
"objects",
"require",
"non",
"null",
"(",
"right",
")",
";",
"return",
"left",
"stream",
"(",
")",
"filter",
"(",
"k",
"-",
">",
"right",
"contains",
"(",
"k",
")",
"=",
"=",
"false",
")",
"collect",
"(",
"to",
"sorted",
"set",
"(",
")",
")",
";",
"}"
] |
[
"write",
"null",
"terminated",
"string",
"to",
"byte",
"buffers"
] |
[
"public",
"void",
"write",
"string",
"nul",
"(",
"final",
"string",
"value",
")",
"{",
"byte",
"buf",
"write",
"bytes",
"(",
"value",
"get",
"bytes",
"(",
")",
")",
";",
"byte",
"buf",
"write",
"byte",
"(",
"0",
")",
";",
"}"
] |
[
"returns",
"the",
"test",
"name",
"in",
"a",
"user",
"-",
"friendly",
"format",
"will",
"generally",
"include",
"the",
"target",
"name",
"and",
"shard",
"number",
",",
"if",
"applicable"
] |
[
"public",
"string",
"get",
"test",
"name",
"(",
")",
"{",
"return",
"test",
"action",
"get",
"test",
"name",
"(",
")",
";",
"}"
] |
[
"get",
"prefix",
"ns",
"array"
] |
[
"public",
"list",
"<",
"integer",
">",
"get",
"prefix",
"ns",
"array",
"(",
")",
"{",
"return",
"prefix",
"ns",
"array",
";",
"}"
] |
[
"get",
"name",
"integer"
] |
[
"public",
"integer",
"get",
"name",
"integer",
"(",
")",
"{",
"return",
"name",
"integer",
";",
"}"
] |
[
"add",
"service",
"name"
] |
[
"public",
"void",
"set",
"service",
"name",
"(",
"string",
"service",
"name",
")",
"{",
"set",
"(",
"service",
",",
"service",
"name",
")",
";",
"}"
] |
[
"ensure",
"a",
"buffer",
"filled",
"with",
"zero",
"bytes",
"from",
"current",
"readablewritable",
"position"
] |
[
"static",
"byte",
"buffer",
"reset",
"buffer",
"(",
"byte",
"buffer",
"buffer",
",",
"int",
"len",
")",
"{",
"int",
"pos",
"=",
"buffer",
"position",
"(",
")",
";",
"buffer",
"put",
"(",
"get",
"empty",
"chunk",
"(",
"len",
")",
",",
"0",
",",
"len",
")",
";",
"buffer",
"position",
"(",
"pos",
")",
";",
"return",
"buffer",
";",
"}"
] |
[
"get",
"the",
"primary",
"call",
"reference",
"address",
"from",
"the",
"current",
"instruction"
] |
[
"address",
"get",
"primary",
"call",
"reference",
"(",
")",
";"
] |
[
"updates",
"specific",
"index",
"level",
"settings",
"using",
"the",
"update",
"indices",
"settings",
"api",
"see",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchreferencecurrentindices",
"-",
"update",
"-",
"settings",
"html",
"\"",
">",
"update",
"indices",
"settings",
"api",
"on",
"elastic",
"co"
] |
[
"public",
"acknowledged",
"response",
"put",
"settings",
"(",
"update",
"settings",
"request",
"update",
"settings",
"request",
",",
"request",
"options",
"options",
")",
"throws",
"i",
"o",
"exception",
"{",
"return",
"rest",
"high",
"level",
"client",
"perform",
"request",
"and",
"parse",
"entity",
"(",
"update",
"settings",
"request",
",",
"indices",
"request",
"converters",
":",
":",
"index",
"put",
"settings",
",",
"options",
",",
"acknowledged",
"response",
":",
":",
"from",
"x",
"content",
",",
"empty",
"set",
"(",
")",
")",
";",
"}"
] |
[
"queue",
"an",
"animation",
"to",
"be",
"applied",
"when",
"the",
"{",
"@",
"link",
"#",
"current",
"}",
"animation",
"is",
"finished",
"if",
"the",
"current",
"animation",
"is",
"continuously",
"looping",
"it",
"will",
"be",
"synchronized",
"on",
"next",
"loop"
] |
[
"public",
"animation",
"desc",
"queue",
"(",
"final",
"string",
"id",
",",
"int",
"loop",
"count",
",",
"float",
"speed",
",",
"final",
"animation",
"listener",
"listener",
",",
"float",
"transition",
"time",
")",
"{",
"return",
"queue",
"(",
"id",
",",
"0f",
",",
"-",
"1f",
",",
"loop",
"count",
",",
"speed",
",",
"listener",
",",
"transition",
"time",
")",
";",
"}"
] |
[
"return",
"the",
"value",
"of",
"this",
"short",
"writable"
] |
[
"public",
"short",
"get",
"(",
")",
"{",
"return",
"value",
";",
"}"
] |
[
"process",
"the",
"result",
"of",
"the",
"asynchronous",
"call",
"on",
"success",
",",
"rc",
"is",
"{",
"@",
"link",
"keeper",
"exception",
"code",
"#",
"ok",
"}",
"all",
"{",
"@",
"code",
"op",
"results",
"}",
"are",
"non",
"-",
"{",
"@",
"link",
"op",
"result",
"error",
"result",
"}",
"on",
"failure",
",",
"rc",
"is",
"a",
"failure",
"code",
"in",
"{",
"@",
"link",
"keeper",
"exception",
"code",
"}",
"either",
"{",
"@",
"code",
"op",
"results",
"}",
"is",
"null",
",",
"or",
"all",
"{",
"@",
"code",
"op",
"results",
"}",
"are",
"{",
"@",
"link",
"op",
"result",
"error",
"result",
"}",
"all",
"operations",
"will",
"be",
"rolled",
"back",
"even",
"if",
"operations",
"before",
"the",
"failing",
"one",
"were",
"successful"
] |
[
"void",
"process",
"result",
"(",
"int",
"rc",
",",
"string",
"path",
",",
"object",
"ctx",
",",
"list",
"<",
"op",
"result",
">",
"op",
"results",
")",
";"
] |
[
"creates",
"a",
"new",
"{",
"@",
"link",
"inet",
"socket",
"address",
"}",
"on",
"localhost",
"that",
"overrides",
"the",
"host",
"with",
"{",
"@",
"link",
"#",
"test",
"server",
"host",
"}"
] |
[
"public",
"static",
"inet",
"socket",
"address",
"test",
"server",
"address",
"(",
"inet",
"socket",
"address",
"original",
"sock",
"addr",
")",
"{",
"try",
"{",
"inet",
"address",
"inet",
"address",
"=",
"inet",
"address",
"get",
"by",
"name",
"(",
"\"",
"localhost",
"\"",
")",
";",
"inet",
"address",
"=",
"inet",
"address",
"get",
"by",
"address",
"(",
"test",
"server",
"host",
",",
"inet",
"address",
"get",
"address",
"(",
")",
")",
";",
"return",
"new",
"inet",
"socket",
"address",
"(",
"inet",
"address",
",",
"original",
"sock",
"addr",
"get",
"port",
"(",
")",
")",
";",
"}",
"catch",
"(",
"unknown",
"host",
"exception",
"e",
")",
"{",
"throw",
"new",
"runtime",
"exception",
"(",
"e",
")",
";",
"}",
"}"
] |
[
"encodes",
"an",
"ip",
"address",
"properly",
"as",
"a",
"url",
"string",
"this",
"method",
"makes",
"sure",
"that",
"i",
"pv",
"6",
"addresses",
"have",
"the",
"proper",
"formatting",
"to",
"be",
"included",
"in",
"u",
"r",
"ls"
] |
[
"public",
"static",
"string",
"ip",
"address",
"to",
"url",
"string",
"(",
"inet",
"address",
"address",
")",
"{",
"if",
"(",
"address",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"null",
"pointer",
"exception",
"(",
"\"",
"address",
"is",
"null",
"\"",
")",
";",
"}",
"else",
"if",
"(",
"address",
"instanceof",
"inet",
"4",
"address",
")",
"{",
"return",
"address",
"get",
"host",
"address",
"(",
")",
";",
"}",
"else",
"if",
"(",
"address",
"instanceof",
"inet",
"6",
"address",
")",
"{",
"return",
"get",
"i",
"pv",
"6",
"url",
"representation",
"(",
"(",
"inet",
"6",
"address",
")",
"address",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"unrecognized",
"type",
"of",
"inet",
"address",
":",
"\"",
"+",
"address",
")",
";",
"}",
"}"
] |
[
"if",
"the",
"size",
"of",
"the",
"array",
"is",
"insufficient",
"to",
"hold",
"the",
"given",
"capacity",
"then",
"copy",
"the",
"array",
"into",
"a",
"new",
",",
"larger",
"array"
] |
[
"private",
"void",
"ensure",
"capacity",
"(",
"int",
"min",
"capacity",
")",
"{",
"long",
"current",
"capacity",
"=",
"data",
"length",
";",
"if",
"(",
"min",
"capacity",
"<",
"=",
"current",
"capacity",
")",
"{",
"return",
";",
"}",
"/",
"/",
"increase",
"capacity",
"by",
"at",
"least",
"~",
"50",
"%",
"long",
"expanded",
"capacity",
"=",
"math",
"max",
"(",
"min",
"capacity",
",",
"current",
"capacity",
"+",
"(",
"current",
"capacity",
">",
">",
"1",
")",
")",
";",
"int",
"new",
"capacity",
"=",
"(",
"int",
")",
"math",
"min",
"(",
"max",
"array",
"size",
",",
"expanded",
"capacity",
")",
";",
"if",
"(",
"new",
"capacity",
"<",
"min",
"capacity",
")",
"{",
"/",
"/",
"throw",
"exception",
"as",
"unbounded",
"arrays",
"are",
"not",
"expected",
"to",
"fill",
"throw",
"new",
"runtime",
"exception",
"(",
"\"",
"requested",
"array",
"size",
"\"",
"+",
"min",
"capacity",
"+",
"\"",
"exceeds",
"limit",
"of",
"\"",
"+",
"max",
"array",
"size",
")",
";",
"}",
"data",
"=",
"arrays",
"copy",
"of",
"(",
"data",
",",
"new",
"capacity",
")",
";",
"}"
] |
[
"find",
"purchase",
"order",
"by",
"id",
"for",
"valid",
"response",
"try",
"integer",
"i",
"ds",
"with",
"value",
"&",
"lt",
";",
"&",
"#",
"x",
"3",
"d",
";",
"5",
"or",
"&",
"gt",
";",
"10",
"other",
"values",
"will",
"generated",
"exceptions",
"<",
"b",
">",
"200",
"<",
"b",
">",
"-",
"successful",
"operation",
"<",
"b",
">",
"400",
"<",
"b",
">",
"-",
"invalid",
"id",
"supplied",
"<",
"b",
">",
"404",
"<",
"b",
">",
"-",
"order",
"not",
"found"
] |
[
"public",
"mono",
"<",
"order",
">",
"get",
"order",
"by",
"id",
"(",
"long",
"order",
"id",
")",
"throws",
"web",
"client",
"response",
"exception",
"{",
"object",
"post",
"body",
"=",
"null",
";",
"/",
"/",
"verify",
"the",
"required",
"parameter",
"'",
"order",
"id",
"'",
"is",
"set",
"if",
"(",
"order",
"id",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"web",
"client",
"response",
"exception",
"(",
"\"",
"missing",
"the",
"required",
"parameter",
"'",
"order",
"id",
"'",
"when",
"calling",
"get",
"order",
"by",
"id",
"\"",
",",
"http",
"status",
"bad",
"request",
"value",
"(",
")",
",",
"http",
"status",
"bad",
"request",
"get",
"reason",
"phrase",
"(",
")",
",",
"null",
",",
"null",
",",
"null",
")",
";",
"}",
"/",
"/",
"create",
"path",
"and",
"map",
"variables",
"final",
"map",
"<",
"string",
",",
"object",
">",
"path",
"params",
"=",
"new",
"hash",
"map",
"<",
"string",
",",
"object",
">",
"(",
")",
";",
"path",
"params",
"put",
"(",
"\"",
"order",
"id",
"\"",
",",
"order",
"id",
")",
";",
"final",
"multi",
"value",
"map",
"<",
"string",
",",
"string",
">",
"query",
"params",
"=",
"new",
"linked",
"multi",
"value",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"final",
"http",
"headers",
"header",
"params",
"=",
"new",
"http",
"headers",
"(",
")",
";",
"final",
"multi",
"value",
"map",
"<",
"string",
",",
"string",
">",
"cookie",
"params",
"=",
"new",
"linked",
"multi",
"value",
"map",
"<",
"string",
",",
"string",
">",
"(",
")",
";",
"final",
"multi",
"value",
"map",
"<",
"string",
",",
"object",
">",
"form",
"params",
"=",
"new",
"linked",
"multi",
"value",
"map",
"<",
"string",
",",
"object",
">",
"(",
")",
";",
"final",
"string",
"[",
"]",
"local",
"var",
"accepts",
"=",
"{",
"\"",
"application",
"/",
"xml",
"\"",
",",
"\"",
"application",
"/",
"json",
"\"",
"}",
";",
"final",
"list",
"<",
"media",
"type",
">",
"local",
"var",
"accept",
"=",
"api",
"client",
"select",
"header",
"accept",
"(",
"local",
"var",
"accepts",
")",
";",
"final",
"string",
"[",
"]",
"local",
"var",
"content",
"types",
"=",
"{",
"}",
";",
"final",
"media",
"type",
"local",
"var",
"content",
"type",
"=",
"api",
"client",
"select",
"header",
"content",
"type",
"(",
"local",
"var",
"content",
"types",
")",
";",
"string",
"[",
"]",
"local",
"var",
"auth",
"names",
"=",
"new",
"string",
"[",
"]",
"{",
"}",
";",
"parameterized",
"type",
"reference",
"<",
"order",
">",
"local",
"var",
"return",
"type",
"=",
"new",
"parameterized",
"type",
"reference",
"<",
"order",
">",
"(",
")",
"{",
"}",
";",
"return",
"api",
"client",
"invoke",
"a",
"p",
"i",
"(",
"\"",
"/",
"store",
"/",
"order",
"/",
"{",
"order",
"id",
"}",
"\"",
",",
"http",
"method",
"get",
",",
"path",
"params",
",",
"query",
"params",
",",
"post",
"body",
",",
"header",
"params",
",",
"cookie",
"params",
",",
"form",
"params",
",",
"local",
"var",
"accept",
",",
"local",
"var",
"content",
"type",
",",
"local",
"var",
"auth",
"names",
",",
"local",
"var",
"return",
"type",
")",
";",
"}"
] |
[
"encodes",
"a",
"byte",
"array",
"into",
"base",
"6",
"4",
"notation",
"does",
"not",
"g",
"zip",
"-",
"compress",
"data"
] |
[
"public",
"static",
"string",
"encode",
"bytes",
"(",
"byte",
"[",
"]",
"source",
")",
"{",
"/",
"/",
"since",
"we",
"'",
"re",
"not",
"going",
"to",
"have",
"the",
"gzip",
"encoding",
"turned",
"on",
",",
"/",
"/",
"we",
"'",
"re",
"not",
"going",
"to",
"have",
"an",
"java",
"io",
"i",
"o",
"exception",
"thrown",
",",
"so",
"/",
"/",
"we",
"should",
"not",
"force",
"the",
"user",
"to",
"have",
"to",
"catch",
"it",
"string",
"encoded",
"=",
"null",
";",
"try",
"{",
"encoded",
"=",
"encode",
"bytes",
"(",
"source",
",",
"0",
",",
"source",
"length",
",",
"no",
"options",
")",
";",
"}",
"catch",
"(",
"java",
"io",
"i",
"o",
"exception",
"ex",
")",
"{",
"assert",
"false",
":",
"ex",
"get",
"message",
"(",
")",
";",
"}",
"/",
"/",
"end",
"catch",
"assert",
"encoded",
"!",
"=",
"null",
";",
"return",
"encoded",
";",
"}"
] |
[
"{",
"@",
"inherit",
"doc",
"}"
] |
[
"public",
"void",
"visit",
"branch",
"(",
"int",
"opcode",
",",
"int",
"offset",
",",
"int",
"length",
",",
"int",
"target",
")",
"{",
"clear",
"(",
")",
";",
"}"
] |
[
"decset",
"25",
",",
"dectcem",
",",
"controls",
"visibility",
"of",
"the",
"cursor"
] |
[
"public",
"void",
"test",
"show",
"hide",
"cursor",
"(",
")",
"{",
"with",
"terminal",
"sized",
"(",
"3",
",",
"3",
")",
";",
"assert",
"true",
"(",
"\"",
"initially",
"the",
"cursor",
"should",
"be",
"visible",
"\"",
",",
"m",
"terminal",
"is",
"showing",
"cursor",
"(",
")",
")",
";",
"enter",
"string",
"(",
"\"",
"\\",
"033",
"[",
"?",
"2",
"5l",
"\"",
")",
";",
"/",
"/",
"hide",
"cursor",
"(",
"dectcem",
")",
"assert",
"false",
"(",
"m",
"terminal",
"is",
"showing",
"cursor",
"(",
")",
")",
";",
"enter",
"string",
"(",
"\"",
"\\",
"033",
"[",
"?",
"2",
"5h",
"\"",
")",
";",
"/",
"/",
"show",
"cursor",
"(",
"dectcem",
")",
"assert",
"true",
"(",
"m",
"terminal",
"is",
"showing",
"cursor",
"(",
")",
")",
";",
"enter",
"string",
"(",
"\"",
"\\",
"033",
"[",
"?",
"2",
"5l",
"\"",
")",
";",
"/",
"/",
"hide",
"cursor",
"(",
"dectcem",
")",
",",
"again",
"assert",
"false",
"(",
"m",
"terminal",
"is",
"showing",
"cursor",
"(",
")",
")",
";",
"m",
"terminal",
"reset",
"(",
")",
";",
"assert",
"true",
"(",
"\"",
"resetting",
"the",
"terminal",
"should",
"show",
"the",
"cursor",
"\"",
",",
"m",
"terminal",
"is",
"showing",
"cursor",
"(",
")",
")",
";",
"enter",
"string",
"(",
"\"",
"\\",
"033",
"[",
"?",
"2",
"5l",
"\"",
")",
";",
"assert",
"false",
"(",
"m",
"terminal",
"is",
"showing",
"cursor",
"(",
")",
")",
";",
"enter",
"string",
"(",
"\"",
"\\",
"0",
"3",
"3c",
"\"",
")",
";",
"/",
"/",
"ris",
"resetting",
"should",
"reveal",
"cursor",
"assert",
"true",
"(",
"m",
"terminal",
"is",
"showing",
"cursor",
"(",
")",
")",
";",
"}"
] |
[
"tests",
"whether",
"retry",
"policy",
"retries",
"specified",
"number",
"of",
"times"
] |
[
"public",
"void",
"test",
"client",
"retries",
"specified",
"number",
"of",
"times",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"conf",
"set",
"int",
"(",
"common",
"configuration",
"keys",
"public",
"kms",
"client",
"failover",
"max",
"retries",
"key",
",",
"10",
")",
";",
"k",
"m",
"s",
"client",
"provider",
"p",
"1",
"=",
"mock",
"(",
"k",
"m",
"s",
"client",
"provider",
"class",
")",
";",
"when",
"(",
"p",
"1",
"create",
"key",
"(",
"mockito",
"any",
"string",
"(",
")",
",",
"mockito",
"any",
"(",
"options",
"class",
")",
")",
")",
"then",
"throw",
"(",
"new",
"connect",
"timeout",
"exception",
"(",
"\"",
"p",
"1",
"\"",
")",
")",
";",
"k",
"m",
"s",
"client",
"provider",
"p",
"2",
"=",
"mock",
"(",
"k",
"m",
"s",
"client",
"provider",
"class",
")",
";",
"when",
"(",
"p",
"2",
"create",
"key",
"(",
"mockito",
"any",
"string",
"(",
")",
",",
"mockito",
"any",
"(",
"options",
"class",
")",
")",
")",
"then",
"throw",
"(",
"new",
"connect",
"timeout",
"exception",
"(",
"\"",
"p",
"2",
"\"",
")",
")",
";",
"when",
"(",
"p",
"1",
"get",
"k",
"m",
"s",
"url",
"(",
")",
")",
"then",
"return",
"(",
"\"",
"p",
"1",
"\"",
")",
";",
"when",
"(",
"p",
"2",
"get",
"k",
"m",
"s",
"url",
"(",
")",
")",
"then",
"return",
"(",
"\"",
"p",
"2",
"\"",
")",
";",
"load",
"balancing",
"k",
"m",
"s",
"client",
"provider",
"kp",
"=",
"new",
"load",
"balancing",
"k",
"m",
"s",
"client",
"provider",
"(",
"new",
"k",
"m",
"s",
"client",
"provider",
"[",
"]",
"{",
"p",
"1",
",",
"p",
"2",
"}",
",",
"0",
",",
"conf",
")",
";",
"try",
"{",
"kp",
"create",
"key",
"(",
"\"",
"test",
"3",
"\"",
",",
"new",
"options",
"(",
"conf",
")",
")",
";",
"fail",
"(",
"\"",
"should",
"fail",
"\"",
")",
";",
"}",
"catch",
"(",
"exception",
"e",
")",
"{",
"assert",
"(",
"e",
"instanceof",
"connect",
"timeout",
"exception",
")",
";",
"}",
"verify",
"(",
"p",
"1",
",",
"mockito",
"times",
"(",
"6",
")",
")",
"create",
"key",
"(",
"mockito",
"eq",
"(",
"\"",
"test",
"3",
"\"",
")",
",",
"mockito",
"any",
"(",
"options",
"class",
")",
")",
";",
"verify",
"(",
"p",
"2",
",",
"mockito",
"times",
"(",
"5",
")",
")",
"create",
"key",
"(",
"mockito",
"eq",
"(",
"\"",
"test",
"3",
"\"",
")",
",",
"mockito",
"any",
"(",
"options",
"class",
")",
")",
";",
"}"
] |
[
"pops",
"values",
"from",
"the",
"stack",
"of",
"the",
"indicated",
"types",
"(",
"popped",
"in",
"reverse",
"argument",
"order",
",",
"so",
"the",
"first",
"indicated",
"type",
"is",
"for",
"the",
"deepest",
"element",
"of",
"the",
"stack",
")",
",",
"and",
"store",
"them",
"in",
"the",
"arguments",
"area",
",",
"indicating",
"that",
"there",
"are",
"now",
"that",
"many",
"arguments",
"also",
",",
"clear",
"the",
"auxiliary",
"arguments"
] |
[
"public",
"void",
"pop",
"args",
"(",
"frame",
"frame",
",",
"type",
"type",
"1",
",",
"type",
"type",
"2",
")",
";"
] |
[
"creates",
"an",
"executor",
"for",
"the",
"current",
"set",
"of",
"blaze",
"runtime",
",",
"execution",
"options",
",",
"and",
"request"
] |
[
"private",
"blaze",
"executor",
"create",
"executor",
"(",
")",
"{",
"return",
"new",
"blaze",
"executor",
"(",
"runtime",
"get",
"file",
"system",
"(",
")",
",",
"env",
"get",
"exec",
"root",
"(",
")",
",",
"get",
"reporter",
"(",
")",
",",
"runtime",
"get",
"clock",
"(",
")",
",",
"runtime",
"get",
"bug",
"reporter",
"(",
")",
",",
"request",
",",
"action",
"context",
"registry",
",",
"spawn",
"strategy",
"registry",
")",
";",
"}"
] |
[
"sets",
"commit",
"method",
"name"
] |
[
"public",
"void",
"set",
"commit",
"method",
"name",
"(",
"string",
"commit",
"method",
"name",
")",
"{",
"this",
"commit",
"method",
"name",
"=",
"commit",
"method",
"name",
";",
"}"
] |
[
"test",
"that",
"marking",
"the",
"shared",
"edits",
"dir",
"as",
"being",
"\"",
"required",
"\"",
"causes",
"the",
"nn",
"to",
"fail",
"if",
"that",
"dir",
"can",
"'",
"t",
"be",
"accessed"
] |
[
"public",
"void",
"test",
"failure",
"of",
"shared",
"dir",
"(",
")",
"throws",
"exception",
"{",
"configuration",
"conf",
"=",
"new",
"configuration",
"(",
")",
";",
"conf",
"set",
"long",
"(",
"dfs",
"namenode",
"resource",
"check",
"interval",
"key",
",",
"2000",
")",
";",
"/",
"/",
"the",
"shared",
"edits",
"dir",
"will",
"automatically",
"be",
"marked",
"required",
"mini",
"d",
"f",
"s",
"cluster",
"cluster",
"=",
"null",
";",
"file",
"shared",
"edits",
"dir",
"=",
"null",
";",
"try",
"{",
"cluster",
"=",
"new",
"mini",
"d",
"f",
"s",
"cluster",
"builder",
"(",
"conf",
")",
"nn",
"topology",
"(",
"mini",
"d",
"f",
"s",
"n",
"n",
"topology",
"simple",
"h",
"a",
"topology",
"(",
")",
")",
"num",
"data",
"nodes",
"(",
"0",
")",
"check",
"exit",
"on",
"shutdown",
"(",
"false",
")",
"build",
"(",
")",
";",
"cluster",
"wait",
"active",
"(",
")",
";",
"cluster",
"transition",
"to",
"active",
"(",
"0",
")",
";",
"file",
"system",
"fs",
"=",
"h",
"a",
"test",
"util",
"configure",
"failover",
"fs",
"(",
"cluster",
",",
"conf",
")",
";",
"assert",
"true",
"(",
"fs",
"mkdirs",
"(",
"new",
"path",
"(",
"\"",
"/",
"test",
"1",
"\"",
")",
")",
")",
";",
"/",
"/",
"blow",
"away",
"the",
"shared",
"edits",
"dir",
"uri",
"shared",
"edits",
"uri",
"=",
"cluster",
"get",
"shared",
"edits",
"dir",
"(",
"0",
",",
"1",
")",
";",
"shared",
"edits",
"dir",
"=",
"new",
"file",
"(",
"shared",
"edits",
"uri",
")",
";",
"assert",
"equals",
"(",
"0",
",",
"file",
"util",
"chmod",
"(",
"shared",
"edits",
"dir",
"get",
"absolute",
"path",
"(",
")",
",",
"\"",
"-",
"w",
"\"",
",",
"true",
")",
")",
";",
"thread",
"sleep",
"(",
"conf",
"get",
"long",
"(",
"dfs",
"namenode",
"resource",
"check",
"interval",
"key",
",",
"dfs",
"namenode",
"resource",
"check",
"interval",
"default",
")",
"*",
"2",
")",
";",
"name",
"node",
"nn",
"1",
"=",
"cluster",
"get",
"name",
"node",
"(",
"1",
")",
";",
"assert",
"true",
"(",
"nn",
"1",
"is",
"standby",
"state",
"(",
")",
")",
";",
"assert",
"false",
"(",
"\"",
"stand",
"by",
"name",
"node",
"should",
"not",
"go",
"to",
"safe",
"mode",
"on",
"resource",
"unavailability",
"\"",
",",
"nn",
"1",
"is",
"in",
"safe",
"mode",
"(",
")",
")",
";",
"name",
"node",
"nn",
"0",
"=",
"cluster",
"get",
"name",
"node",
"(",
"0",
")",
";",
"try",
"{",
"/",
"/",
"make",
"sure",
"that",
"subsequent",
"operations",
"on",
"the",
"nn",
"fail",
"nn",
"0",
"get",
"rpc",
"server",
"(",
")",
"roll",
"edit",
"log",
"(",
")",
";",
"fail",
"(",
"\"",
"succeeded",
"in",
"rolling",
"edit",
"log",
"despite",
"shared",
"dir",
"being",
"deleted",
"\"",
")",
";",
"}",
"catch",
"(",
"exit",
"exception",
"ee",
")",
"{",
"generic",
"test",
"utils",
"assert",
"exception",
"contains",
"(",
"\"",
"finalize",
"log",
"segment",
"1",
",",
"3",
"failed",
"for",
"required",
"journal",
"\"",
",",
"ee",
")",
";",
"}",
"/",
"/",
"check",
"that",
"none",
"of",
"the",
"edits",
"dirs",
"rolled",
",",
"since",
"the",
"shared",
"edits",
"/",
"/",
"dir",
"didn",
"'",
"t",
"roll",
"regression",
"test",
"for",
"hdfs",
"-",
"2874",
"for",
"(",
"uri",
"edits",
"uri",
":",
"cluster",
"get",
"name",
"edits",
"dirs",
"(",
"0",
")",
")",
"{",
"if",
"(",
"edits",
"uri",
"equals",
"(",
"shared",
"edits",
"uri",
")",
")",
"{",
"continue",
";",
"}",
"file",
"edits",
"dir",
"=",
"new",
"file",
"(",
"edits",
"uri",
"get",
"path",
"(",
")",
")",
";",
"file",
"cur",
"dir",
"=",
"new",
"file",
"(",
"edits",
"dir",
",",
"\"",
"current",
"\"",
")",
";",
"generic",
"test",
"utils",
"assert",
"glob",
"equals",
"(",
"cur",
"dir",
",",
"\"",
"edits",
"*",
"\"",
",",
"n",
"n",
"storage",
"get",
"in",
"progress",
"edits",
"file",
"name",
"(",
"1",
")",
")",
";",
"}",
"}",
"finally",
"{",
"if",
"(",
"shared",
"edits",
"dir",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"without",
"this",
"test",
"cleanup",
"will",
"fail",
"file",
"util",
"chmod",
"(",
"shared",
"edits",
"dir",
"get",
"absolute",
"path",
"(",
")",
",",
"\"",
"+",
"w",
"\"",
",",
"true",
")",
";",
"}",
"if",
"(",
"cluster",
"!",
"=",
"null",
")",
"{",
"cluster",
"shutdown",
"(",
")",
";",
"}",
"}",
"}"
] |
[
"get",
"prefix",
"ns",
"string"
] |
[
"public",
"string",
"get",
"prefix",
"ns",
"string",
"(",
")",
"{",
"return",
"prefix",
"ns",
"string",
";",
"}"
] |
[
"returns",
"the",
"{",
"@",
"link",
"platform",
"info",
"}",
"describing",
"the",
"target",
"'",
"s",
"default",
"execution",
"platform"
] |
[
"platform",
"info",
"get",
"execution",
"platform",
"(",
")",
";"
] |
[
"unregisters",
"the",
"listener",
"with",
"the",
"registry"
] |
[
"public",
"void",
"unregister",
"listener",
"(",
"job",
"i",
"d",
"job",
"id",
")",
"{",
"listeners",
"remove",
"(",
"job",
"id",
")",
";",
"}"
] |
[
"sets",
"the",
"id",
"to",
"index",
"the",
"document",
"under",
"optional",
",",
"and",
"if",
"not",
"set",
",",
"one",
"will",
"be",
"automatically",
"generated"
] |
[
"public",
"index",
"request",
"builder",
"set",
"id",
"(",
"string",
"id",
")",
"{",
"request",
"id",
"(",
"id",
")",
";",
"return",
"this",
";",
"}"
] |
[
"<",
"code",
">",
"optional",
"string",
"name",
"=",
"2",
";",
"<",
"code",
">"
] |
[
"public",
"com",
"google",
"protobuf",
"byte",
"string",
"get",
"name",
"bytes",
"(",
")",
"{",
"return",
"com",
"google",
"protobuf",
"byte",
"string",
"copy",
"from",
"utf",
"8",
"(",
"name",
")",
";",
"}"
] |
[
"get",
"string",
"item"
] |
[
"public",
"string",
"get",
"string",
"item",
"(",
")",
"{",
"return",
"string",
"item",
";",
"}"
] |
[
"if",
"the",
"given",
"configuration",
"defines",
"a",
"{",
"@",
"link",
"header",
"converter",
"}",
"using",
"the",
"named",
"configuration",
"property",
",",
"return",
"a",
"new",
"configured",
"instance"
] |
[
"public",
"header",
"converter",
"new",
"header",
"converter",
"(",
"abstract",
"config",
"config",
",",
"string",
"class",
"property",
"name",
",",
"class",
"loader",
"usage",
"class",
"loader",
"usage",
")",
"{",
"class",
"<",
"?",
"extends",
"header",
"converter",
">",
"klass",
"=",
"null",
";",
"switch",
"(",
"class",
"loader",
"usage",
")",
"{",
"case",
"current",
"classloader",
":",
"if",
"(",
"!",
"config",
"originals",
"(",
")",
"contains",
"key",
"(",
"class",
"property",
"name",
")",
")",
"{",
"/",
"/",
"this",
"connector",
"configuration",
"does",
"not",
"define",
"the",
"header",
"converter",
"via",
"the",
"specified",
"property",
"name",
"return",
"null",
";",
"}",
"/",
"/",
"attempt",
"to",
"load",
"first",
"with",
"the",
"current",
"classloader",
",",
"and",
"plugins",
"as",
"a",
"fallback",
"/",
"/",
"note",
":",
"we",
"can",
"'",
"t",
"use",
"config",
"get",
"configured",
"instance",
"because",
"we",
"have",
"to",
"remove",
"the",
"property",
"prefixes",
"/",
"/",
"before",
"calling",
"config",
"(",
")",
"klass",
"=",
"plugin",
"class",
"from",
"config",
"(",
"config",
",",
"class",
"property",
"name",
",",
"header",
"converter",
"class",
",",
"delegating",
"loader",
"header",
"converters",
"(",
")",
")",
";",
"break",
";",
"case",
"plugins",
":",
"/",
"/",
"attempt",
"to",
"load",
"with",
"the",
"plugin",
"class",
"loader",
",",
"which",
"uses",
"the",
"current",
"classloader",
"as",
"a",
"fallback",
"/",
"/",
"note",
"that",
"there",
"will",
"always",
"be",
"at",
"least",
"a",
"default",
"header",
"converter",
"for",
"the",
"worker",
"string",
"converter",
"class",
"or",
"alias",
"=",
"config",
"get",
"class",
"(",
"class",
"property",
"name",
")",
"get",
"name",
"(",
")",
";",
"try",
"{",
"klass",
"=",
"plugin",
"class",
"(",
"delegating",
"loader",
",",
"converter",
"class",
"or",
"alias",
",",
"header",
"converter",
"class",
")",
";",
"}",
"catch",
"(",
"class",
"not",
"found",
"exception",
"e",
")",
"{",
"throw",
"new",
"connect",
"exception",
"(",
"\"",
"failed",
"to",
"find",
"any",
"class",
"that",
"implements",
"header",
"converter",
"and",
"which",
"name",
"matches",
"\"",
"+",
"converter",
"class",
"or",
"alias",
"+",
"\"",
",",
"available",
"header",
"converters",
"are",
":",
"\"",
"+",
"plugin",
"names",
"(",
"delegating",
"loader",
"header",
"converters",
"(",
")",
")",
")",
";",
"}",
"}",
"if",
"(",
"klass",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"connect",
"exception",
"(",
"\"",
"unable",
"to",
"initialize",
"the",
"header",
"converter",
"specified",
"in",
"'",
"\"",
"+",
"class",
"property",
"name",
"+",
"\"",
"'",
"\"",
")",
";",
"}",
"string",
"config",
"prefix",
"=",
"class",
"property",
"name",
"+",
"\"",
"\"",
";",
"map",
"<",
"string",
",",
"object",
">",
"converter",
"config",
"=",
"config",
"originals",
"with",
"prefix",
"(",
"config",
"prefix",
")",
";",
"converter",
"config",
"put",
"(",
"converter",
"config",
"type",
"config",
",",
"converter",
"type",
"header",
"get",
"name",
"(",
")",
")",
";",
"log",
"debug",
"(",
"\"",
"configuring",
"the",
"header",
"converter",
"with",
"configuration",
"keys",
":",
"{",
"}",
"{",
"}",
"\"",
",",
"system",
"line",
"separator",
"(",
")",
",",
"converter",
"config",
"key",
"set",
"(",
")",
")",
";",
"header",
"converter",
"plugin",
";",
"class",
"loader",
"saved",
"loader",
"=",
"compare",
"and",
"swap",
"loaders",
"(",
"klass",
"get",
"class",
"loader",
"(",
")",
")",
";",
"try",
"{",
"plugin",
"=",
"new",
"plugin",
"(",
"klass",
")",
";",
"plugin",
"configure",
"(",
"converter",
"config",
")",
";",
"}",
"finally",
"{",
"compare",
"and",
"swap",
"loaders",
"(",
"saved",
"loader",
")",
";",
"}",
"return",
"plugin",
";",
"}"
] |
[
"cleans",
"up",
"the",
"class",
"by",
"closing",
"resources"
] |
[
"public",
"static",
"void",
"dispose",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"file",
"writer",
"!",
"=",
"null",
")",
"{",
"file",
"writer",
"close",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"i",
"o",
"exception",
"new",
"exception",
")",
"{",
"/",
"/",
"squash",
"}",
"file",
"writer",
"=",
"null",
";",
"}"
] |
[
"this",
"does",
"a",
"very",
"basic",
"pass",
"at",
"validating",
"that",
"a",
"header",
"'",
"s",
"value",
"contains",
"only",
"expected",
"characters",
"according",
"to",
"rfc",
"-",
"5987",
",",
"and",
"those",
"that",
"it",
"references",
"https",
":",
"tools",
"ietf",
"orghtmlrfc",
"5",
"9",
"8",
"7",
"this",
"is",
"only",
"expected",
"to",
"be",
"used",
"for",
"assertions",
"the",
"idea",
"is",
"that",
"only",
"readable",
"us",
"-",
"ascii",
"characters",
"are",
"expected",
";",
"the",
"rest",
"must",
"be",
"encoded",
"with",
"percent",
"encoding",
",",
"which",
"makes",
"checking",
"for",
"a",
"valid",
"character",
"range",
"very",
"simple"
] |
[
"public",
"static",
"boolean",
"valid",
"header",
"value",
"(",
"string",
"value",
")",
"{",
"if",
"(",
"strings",
"has",
"text",
"(",
"value",
")",
"=",
"=",
"false",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"value",
"length",
"(",
")",
";",
"i",
"+",
"+",
")",
"{",
"char",
"c",
"=",
"value",
"char",
"at",
"(",
"i",
")",
";",
"/",
"/",
"32",
"=",
"'",
"'",
"(",
"31",
"=",
"unit",
"separator",
")",
";",
"126",
"=",
"'",
"~",
"'",
"(",
"127",
"=",
"del",
")",
"if",
"(",
"c",
"<",
"32",
"|",
"|",
"c",
">",
"126",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}"
] |
[
"processes",
"the",
"fields",
"of",
"the",
"given",
"class"
] |
[
"private",
"static",
"void",
"process",
"fields",
"(",
"direct",
"class",
"file",
"cf",
",",
"class",
"def",
"item",
"out",
",",
"dex",
"file",
"dex",
"file",
")",
"{",
"cst",
"type",
"this",
"class",
"=",
"cf",
"get",
"this",
"class",
"(",
")",
";",
"field",
"list",
"fields",
"=",
"cf",
"get",
"fields",
"(",
")",
";",
"int",
"sz",
"=",
"fields",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sz",
";",
"i",
"+",
"+",
")",
"{",
"field",
"one",
"=",
"fields",
"get",
"(",
"i",
")",
";",
"try",
"{",
"cst",
"field",
"ref",
"field",
"=",
"new",
"cst",
"field",
"ref",
"(",
"this",
"class",
",",
"one",
"get",
"nat",
"(",
")",
")",
";",
"int",
"access",
"flags",
"=",
"one",
"get",
"access",
"flags",
"(",
")",
";",
"if",
"(",
"access",
"flags",
"is",
"static",
"(",
"access",
"flags",
")",
")",
"{",
"typed",
"constant",
"const",
"val",
"=",
"one",
"get",
"constant",
"value",
"(",
")",
";",
"encoded",
"field",
"fi",
"=",
"new",
"encoded",
"field",
"(",
"field",
",",
"access",
"flags",
")",
";",
"if",
"(",
"const",
"val",
"!",
"=",
"null",
")",
"{",
"const",
"val",
"=",
"coerce",
"constant",
"(",
"const",
"val",
",",
"field",
"get",
"type",
"(",
")",
")",
";",
"}",
"out",
"add",
"static",
"field",
"(",
"fi",
",",
"const",
"val",
")",
";",
"}",
"else",
"{",
"encoded",
"field",
"fi",
"=",
"new",
"encoded",
"field",
"(",
"field",
",",
"access",
"flags",
")",
";",
"out",
"add",
"instance",
"field",
"(",
"fi",
")",
";",
"}",
"annotations",
"annotations",
"=",
"attribute",
"translator",
"get",
"annotations",
"(",
"one",
"get",
"attributes",
"(",
")",
")",
";",
"if",
"(",
"annotations",
"size",
"(",
")",
"!",
"=",
"0",
")",
"{",
"out",
"add",
"field",
"annotations",
"(",
"field",
",",
"annotations",
",",
"dex",
"file",
")",
";",
"}",
"dex",
"file",
"get",
"field",
"ids",
"(",
")",
"intern",
"(",
"field",
")",
";",
"}",
"catch",
"(",
"runtime",
"exception",
"ex",
")",
"{",
"string",
"msg",
"=",
"\"",
"while",
"processing",
"\"",
"+",
"one",
"get",
"name",
"(",
")",
"to",
"human",
"(",
")",
"+",
"\"",
"\"",
"+",
"one",
"get",
"descriptor",
"(",
")",
"to",
"human",
"(",
")",
";",
"throw",
"exception",
"with",
"context",
"with",
"context",
"(",
"ex",
",",
"msg",
")",
";",
"}",
"}",
"}"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.