docstring_tokens
list | code_tokens
list |
---|---|
[
"maybe",
"throws",
"an",
"exception",
";",
")"
]
| [
"void",
"maybe",
"throw",
"(",
"flags",
"flag",
")",
"throws",
"i",
"o",
"exception",
";"
]
|
[
"since",
"we",
"allow",
"resetting",
"the",
"timer",
"(",
"shutting",
"down",
"the",
"thread",
")",
"we",
"need",
"to",
"lazily",
"re",
"-",
"start",
"it",
"if",
"it",
"starts",
"being",
"used",
"again",
"this",
"does",
"the",
"lazy",
"initialization",
"and",
"start",
"of",
"the",
"thread",
"in",
"a",
"thread",
"-",
"safe",
"manner",
"while",
"having",
"little",
"cost",
"the",
"rest",
"of",
"the",
"time"
]
| [
"protected",
"void",
"start",
"thread",
"if",
"needed",
"(",
")",
"{",
"/",
"/",
"create",
"and",
"start",
"thread",
"if",
"one",
"doesn",
"'",
"t",
"exist",
"while",
"(",
"executor",
"get",
"(",
")",
"=",
"=",
"null",
"|",
"|",
"!",
"executor",
"get",
"(",
")",
"is",
"initialized",
"(",
")",
")",
"{",
"if",
"(",
"executor",
"compare",
"and",
"set",
"(",
"null",
",",
"new",
"scheduled",
"executor",
"(",
")",
")",
")",
"{",
"/",
"/",
"initialize",
"the",
"executor",
"that",
"we",
"'",
"won",
"'",
"setting",
"executor",
"get",
"(",
")",
"initialize",
"(",
")",
";",
"}",
"}",
"}"
]
|
[
"clear",
"all",
"state",
"information"
]
| [
"public",
"void",
"clear",
"(",
")",
"{",
"key",
"=",
"null",
";",
"pos",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"iters",
"length",
";",
"+",
"+",
"i",
")",
"{",
"iters",
"[",
"i",
"]",
"clear",
"(",
")",
";",
"iters",
"[",
"i",
"]",
"=",
"empty",
";",
"}",
"}"
]
|
[
"make",
"sure",
"that",
"in",
"-",
"progress",
"streams",
"aren",
"'",
"t",
"counted",
"if",
"we",
"don",
"'",
"t",
"ask",
"for",
"them"
]
| [
"public",
"void",
"test",
"exclude",
"in",
"progress",
"streams",
"(",
")",
"throws",
"corruption",
"exception",
",",
"i",
"o",
"exception",
"{",
"file",
"f",
"=",
"new",
"file",
"(",
"test",
"edit",
"log",
"test",
"dir",
"+",
"\"",
"/",
"excludeinprogressstreams",
"\"",
")",
";",
"/",
"/",
"don",
"'",
"t",
"close",
"the",
"edit",
"log",
"once",
"the",
"files",
"have",
"been",
"set",
"up",
"n",
"n",
"storage",
"storage",
"=",
"setup",
"edits",
"(",
"collections",
"<",
"uri",
">",
"singleton",
"list",
"(",
"f",
"to",
"u",
"r",
"i",
"(",
")",
")",
",",
"10",
",",
"false",
")",
";",
"storage",
"directory",
"sd",
"=",
"storage",
"dir",
"iterator",
"(",
"name",
"node",
"dir",
"type",
"edits",
")",
"next",
"(",
")",
";",
"file",
"journal",
"manager",
"jm",
"=",
"new",
"file",
"journal",
"manager",
"(",
"conf",
",",
"sd",
",",
"storage",
")",
";",
"/",
"/",
"if",
"we",
"exclude",
"the",
"in",
"-",
"progess",
"stream",
",",
"we",
"should",
"only",
"have",
"100",
"tx",
"assert",
"equals",
"(",
"100",
",",
"get",
"number",
"of",
"transactions",
"(",
"jm",
",",
"1",
",",
"false",
",",
"false",
")",
")",
";",
"edit",
"log",
"input",
"stream",
"elis",
"=",
"get",
"journal",
"input",
"stream",
"(",
"jm",
",",
"90",
",",
"false",
")",
";",
"try",
"{",
"f",
"s",
"edit",
"log",
"op",
"last",
"read",
"op",
"=",
"null",
";",
"while",
"(",
"(",
"last",
"read",
"op",
"=",
"elis",
"read",
"op",
"(",
")",
")",
"!",
"=",
"null",
")",
"{",
"assert",
"true",
"(",
"last",
"read",
"op",
"get",
"transaction",
"id",
"(",
")",
"<",
"=",
"100",
")",
";",
"}",
"}",
"finally",
"{",
"i",
"o",
"utils",
"cleanup",
"with",
"logger",
"(",
"log",
",",
"elis",
")",
";",
"}",
"}"
]
|
[
"get",
"the",
"default",
"api",
"client",
",",
"which",
"would",
"be",
"used",
"when",
"creating",
"api",
"instances",
"without",
"providing",
"an",
"api",
"client"
]
| [
"public",
"static",
"api",
"client",
"get",
"default",
"api",
"client",
"(",
")",
"{",
"return",
"default",
"api",
"client",
";",
"}"
]
|
[
"only",
"log",
"body",
"in",
"debugger",
"mode",
"for",
"size",
"&",
"security",
"consideration"
]
| [
"public",
"static",
"object",
"get",
"request",
"without",
"data",
"(",
"object",
"message",
")",
"{",
"if",
"(",
"logger",
"is",
"debug",
"enabled",
"(",
")",
")",
"{",
"return",
"message",
";",
"}",
"if",
"(",
"message",
"instanceof",
"request",
")",
"{",
"request",
"request",
"=",
"(",
"request",
")",
"message",
";",
"request",
"set",
"data",
"(",
"null",
")",
";",
"return",
"request",
";",
"}",
"else",
"if",
"(",
"message",
"instanceof",
"response",
")",
"{",
"response",
"response",
"=",
"(",
"response",
")",
"message",
";",
"response",
"set",
"result",
"(",
"null",
")",
";",
"return",
"response",
";",
"}",
"return",
"message",
";",
"}"
]
|
[
"removes",
"acl",
"entries",
"from",
"files",
"and",
"directories",
"other",
"acl",
"entries",
"are",
"retained"
]
| [
"public",
"void",
"remove",
"acl",
"entries",
"(",
"path",
"path",
",",
"list",
"<",
"acl",
"entry",
">",
"acl",
"spec",
")",
"throws",
"i",
"o",
"exception",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
"get",
"class",
"(",
")",
"get",
"simple",
"name",
"(",
")",
"+",
"\"",
"doesn",
"'",
"t",
"support",
"remove",
"acl",
"entries",
"\"",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"the",
"node",
"is",
"in",
"the",
"process",
"of",
"loading",
"its",
"children",
"see",
"{",
"@",
"link",
"g",
"tree",
"slow",
"loading",
"node",
"}"
]
| [
"public",
"synchronized",
"final",
"boolean",
"is",
"in",
"progress",
"(",
")",
"{",
"return",
"is",
"in",
"progress",
"(",
"children",
")",
";",
"}"
]
|
[
"creates",
"a",
"{",
"@",
"link",
"bulk",
"processor",
"builder",
"}",
"for",
"creating",
"the",
"bulk",
"processor"
]
| [
"bulk",
"processor",
"builder",
"create",
"bulk",
"processor",
"builder",
"(",
"c",
"client",
",",
"bulk",
"processor",
"listener",
"listener",
")",
";"
]
|
[
"returns",
"the",
"name",
"of",
"the",
"metric"
]
| [
"string",
"get",
"metric",
"name",
"(",
")",
";"
]
|
[
"collects",
"compilation",
"prerequisite",
"artifacts"
]
| [
"static",
"nested",
"set",
"<",
"artifact",
">",
"collect",
"compilation",
"prerequisites",
"(",
"rule",
"context",
"rule",
"context",
",",
"cc",
"compilation",
"context",
"cc",
"compilation",
"context",
")",
"{",
"/",
"/",
"todo",
"(",
"bazel",
"-",
"team",
")",
":",
"use",
"cc",
"compilation",
"context",
"get",
"compilation",
"prerequisites",
"(",
")",
"instead",
";",
"note",
"/",
"/",
"that",
"this",
"/",
"/",
"will",
"/",
"/",
"need",
"cleaning",
"up",
"the",
"prerequisites",
",",
"as",
"the",
"{",
"@",
"code",
"cc",
"compilation",
"context",
"}",
"currently",
"/",
"/",
"collects",
"them",
"/",
"/",
"transitively",
"(",
"to",
"get",
"transitive",
"headers",
")",
",",
"but",
"source",
"files",
"are",
"not",
"transitive",
"compilation",
"/",
"/",
"prerequisites",
"nested",
"set",
"builder",
"<",
"artifact",
">",
"prerequisites",
"=",
"nested",
"set",
"builder",
"stable",
"order",
"(",
")",
";",
"if",
"(",
"rule",
"context",
"attributes",
"(",
")",
"has",
"(",
"\"",
"srcs",
"\"",
",",
"build",
"type",
"label",
"list",
")",
")",
"{",
"for",
"(",
"file",
"provider",
"provider",
":",
"rule",
"context",
"get",
"prerequisites",
"(",
"\"",
"srcs",
"\"",
",",
"file",
"provider",
"class",
")",
")",
"{",
"prerequisites",
"add",
"all",
"(",
"file",
"type",
"filter",
"(",
"provider",
"get",
"files",
"to",
"build",
"(",
")",
"to",
"list",
"(",
")",
",",
"source",
"category",
"cc",
"and",
"objc",
"get",
"source",
"types",
"(",
")",
")",
")",
";",
"}",
"}",
"prerequisites",
"add",
"transitive",
"(",
"cc",
"compilation",
"context",
"get",
"declared",
"include",
"srcs",
"(",
")",
")",
";",
"prerequisites",
"add",
"transitive",
"(",
"cc",
"compilation",
"context",
"get",
"additional",
"inputs",
"(",
")",
")",
";",
"prerequisites",
"add",
"transitive",
"(",
"cc",
"compilation",
"context",
"get",
"transitive",
"modules",
"(",
"true",
")",
")",
";",
"prerequisites",
"add",
"transitive",
"(",
"cc",
"compilation",
"context",
"get",
"transitive",
"modules",
"(",
"false",
")",
")",
";",
"return",
"prerequisites",
"build",
"(",
")",
";",
"}"
]
|
[
"asynchronously",
"delete",
"a",
"role",
"mapping",
"see",
"<",
"a",
"href",
"=",
"\"",
"https",
":",
"www",
"elastic",
"coguideenelasticsearchreferencecurrentsecurity",
"-",
"api",
"-",
"delete",
"-",
"role",
"-",
"mapping",
"html",
"\"",
">",
"the",
"docs",
"for",
"more"
]
| [
"public",
"cancellable",
"delete",
"role",
"mapping",
"async",
"(",
"delete",
"role",
"mapping",
"request",
"request",
",",
"request",
"options",
"options",
",",
"action",
"listener",
"<",
"delete",
"role",
"mapping",
"response",
">",
"listener",
")",
"{",
"return",
"rest",
"high",
"level",
"client",
"perform",
"request",
"async",
"and",
"parse",
"entity",
"(",
"request",
",",
"security",
"request",
"converters",
":",
":",
"delete",
"role",
"mapping",
",",
"options",
",",
"delete",
"role",
"mapping",
"response",
":",
":",
"from",
"x",
"content",
",",
"listener",
",",
"empty",
"set",
"(",
")",
")",
";",
"}"
]
|
[
"if",
"this",
"is",
"a",
"checked",
"-",
"out",
"copy",
"and",
"a",
"cumulative",
"change",
"file",
"should",
"be",
"maintained",
",",
"this",
"method",
"must",
"be",
"invoked",
"following",
"construction"
]
| [
"public",
"void",
"set",
"is",
"checkout",
"copy",
"(",
"boolean",
"state",
")",
"{",
"is",
"check",
"out",
"copy",
"=",
"state",
";",
"}"
]
|
[
"check",
"if",
"this",
"directory",
"is",
"a",
"descendant",
"directory",
"of",
"a",
"snapshot",
"root",
"directory"
]
| [
"public",
"boolean",
"is",
"descendant",
"of",
"snapshot",
"root",
"(",
"i",
"node",
"directory",
"snapshot",
"root",
"dir",
")",
"{",
"preconditions",
"check",
"argument",
"(",
"snapshot",
"root",
"dir",
"is",
"snapshottable",
"(",
")",
")",
";",
"i",
"node",
"directory",
"dir",
"=",
"this",
";",
"while",
"(",
"dir",
"!",
"=",
"null",
")",
"{",
"if",
"(",
"dir",
"equals",
"(",
"snapshot",
"root",
"dir",
")",
")",
"{",
"return",
"true",
";",
"}",
"dir",
"=",
"dir",
"get",
"parent",
"(",
")",
";",
"}",
"return",
"false",
";",
"}"
]
|
[
"create",
"transition",
"state",
"to",
"acceptable",
"usage",
"policy"
]
| [
"protected",
"void",
"create",
"transition",
"state",
"to",
"acceptable",
"usage",
"policy",
"(",
"final",
"flow",
"flow",
")",
"{",
"val",
"submit",
"=",
"get",
"real",
"submission",
"state",
"(",
"flow",
")",
";",
"create",
"transition",
"for",
"state",
"(",
"submit",
",",
"cas",
"webflow",
"constants",
"transition",
"id",
"success",
",",
"cas",
"webflow",
"constants",
"state",
"id",
"aup",
"check",
",",
"true",
")",
";",
"}"
]
|
[
"returns",
"the",
"bridge",
"method",
"for",
"writing",
"a",
"static",
"field",
",",
"identified",
"by",
"(",
"putstatic",
")",
"instruction"
]
| [
"public",
"final",
"method",
"key",
"bridge",
"of",
"static",
"write",
"(",
")",
"{",
"return",
"method",
"key",
"create",
"(",
"owner",
"(",
")",
",",
"name",
"with",
"suffix",
"(",
"\"",
"bridge",
"setter",
"\"",
")",
",",
"type",
"get",
"method",
"descriptor",
"(",
"get",
"field",
"type",
"(",
")",
",",
"get",
"field",
"type",
"(",
")",
")",
")",
";",
"}"
]
|
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
]
| [
"private",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
]
|
[
"returns",
"buffers",
"that",
"failed",
"or",
"passed",
"from",
"completed",
"queue"
]
| [
"private",
"read",
"buffer",
"get",
"buffer",
"from",
"completed",
"queue",
"(",
"final",
"abfs",
"input",
"stream",
"stream",
",",
"final",
"long",
"requested",
"offset",
")",
"{",
"for",
"(",
"read",
"buffer",
"buffer",
":",
"completed",
"read",
"list",
")",
"{",
"/",
"/",
"buffer",
"is",
"returned",
"if",
"the",
"requested",
"offset",
"is",
"at",
"or",
"above",
"buffer",
"'",
"s",
"/",
"/",
"offset",
"but",
"less",
"than",
"buffer",
"'",
"s",
"length",
"or",
"the",
"actual",
"requested",
"length",
"if",
"(",
"(",
"buffer",
"get",
"stream",
"(",
")",
"=",
"=",
"stream",
")",
"&",
"&",
"(",
"requested",
"offset",
">",
"=",
"buffer",
"get",
"offset",
"(",
")",
")",
"&",
"&",
"(",
"(",
"requested",
"offset",
"<",
"buffer",
"get",
"offset",
"(",
")",
"+",
"buffer",
"get",
"length",
"(",
")",
")",
"|",
"|",
"(",
"requested",
"offset",
"<",
"buffer",
"get",
"offset",
"(",
")",
"+",
"buffer",
"get",
"requested",
"length",
"(",
")",
")",
")",
")",
"{",
"return",
"buffer",
";",
"}",
"}",
"return",
"null",
";",
"}"
]
|
[
"setup",
"for",
"the",
"whole",
"base",
"test",
"class"
]
| [
"public",
"static",
"void",
"init",
"(",
")",
"{",
"search",
"module",
"search",
"module",
"=",
"new",
"search",
"module",
"(",
"settings",
"empty",
",",
"empty",
"list",
"(",
")",
")",
";",
"named",
"writeable",
"registry",
"=",
"new",
"named",
"writeable",
"registry",
"(",
"search",
"module",
"get",
"named",
"writeables",
"(",
")",
")",
";",
"x",
"content",
"registry",
"=",
"new",
"named",
"x",
"content",
"registry",
"(",
"search",
"module",
"get",
"named",
"x",
"contents",
"(",
")",
")",
";",
"}"
]
|
[
"makes",
"sure",
"that",
"the",
"project",
"-",
"scoped",
"environment",
"variables",
"are",
"getting",
"consulted"
]
| [
"public",
"void",
"project",
"scoped",
"(",
")",
"throws",
"exception",
"{",
"free",
"style",
"project",
"p",
"=",
"j",
"create",
"free",
"style",
"project",
"(",
")",
";",
"capture",
"environment",
"builder",
"c",
"=",
"new",
"capture",
"environment",
"builder",
"(",
")",
";",
"p",
"get",
"builders",
"list",
"(",
")",
"add",
"(",
"c",
")",
";",
"p",
"set",
"description",
"(",
"\"",
"issac",
"newton",
"\"",
")",
";",
"j",
"assert",
"build",
"status",
"success",
"(",
"p",
"schedule",
"build",
"2",
"(",
"0",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"issac",
"newton",
"\"",
",",
"c",
"get",
"env",
"vars",
"(",
")",
"get",
"(",
"\"",
"abc",
"\"",
")",
")",
";",
"assert",
"equals",
"(",
"\"",
"master",
"\"",
",",
"c",
"get",
"env",
"vars",
"(",
")",
"get",
"(",
"\"",
"node",
"name",
"\"",
")",
")",
";",
"}"
]
|
[
"returns",
"true",
"if",
"the",
"end",
"of",
"the",
"decompressed",
"data",
"output",
"stream",
"has",
"been",
"reached"
]
| [
"public",
"boolean",
"finished",
"(",
")",
"{",
"return",
"(",
"finished",
"&",
"&",
"uncompressed",
"direct",
"buf",
"remaining",
"(",
")",
"=",
"=",
"0",
")",
";",
"}"
]
|
[
"collects",
"and",
"processes",
"all",
"the",
"rule",
"and",
"attribute",
"documentation",
"in",
"input",
"dirs",
"and",
"generates",
"the",
"build",
"encyclopedia",
"into",
"the",
"output",
"dir"
]
| [
"public",
"void",
"generate",
"documentation",
"(",
"list",
"<",
"string",
">",
"input",
"dirs",
",",
"string",
"output",
"dir",
",",
"string",
"deny",
"list",
")",
"throws",
"build",
"encyclopedia",
"doc",
"exception",
",",
"i",
"o",
"exception",
"{",
"build",
"doc",
"collector",
"collector",
"=",
"new",
"build",
"doc",
"collector",
"(",
"product",
"name",
",",
"rule",
"class",
"provider",
",",
"false",
")",
";",
"rule",
"link",
"expander",
"expander",
"=",
"new",
"rule",
"link",
"expander",
"(",
"product",
"name",
",",
"false",
")",
";",
"map",
"<",
"string",
",",
"rule",
"documentation",
">",
"rule",
"doc",
"entries",
"=",
"collector",
"collect",
"(",
"input",
"dirs",
",",
"deny",
"list",
",",
"expander",
")",
";",
"warn",
"about",
"undocumented",
"rules",
"(",
"sets",
"difference",
"(",
"rule",
"class",
"provider",
"get",
"rule",
"class",
"map",
"(",
")",
"key",
"set",
"(",
")",
",",
"rule",
"doc",
"entries",
"key",
"set",
"(",
")",
")",
")",
";",
"write",
"static",
"doc",
"(",
"output",
"dir",
",",
"expander",
",",
"\"",
"make",
"-",
"variables",
"\"",
")",
";",
"write",
"static",
"doc",
"(",
"output",
"dir",
",",
"expander",
",",
"\"",
"functions",
"\"",
")",
";",
"write",
"common",
"definitions",
"page",
"(",
"output",
"dir",
",",
"expander",
")",
";",
"write",
"rule",
"docs",
"(",
"output",
"dir",
",",
"expander",
",",
"rule",
"doc",
"entries",
"values",
"(",
")",
")",
";",
"}"
]
|
[
"get",
"the",
"bookmark",
"property",
"name",
"for",
"a",
"specified",
"bookmark",
"type"
]
| [
"private",
"static",
"string",
"get",
"property",
"name",
"(",
"string",
"bookmark",
"type",
")",
"{",
"if",
"(",
"bookmark",
"type",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"bookmark",
"type",
"note",
"equals",
"(",
"bookmark",
"type",
")",
")",
"{",
"return",
"base",
"property",
"name",
";",
"}",
"return",
"base",
"property",
"name",
"+",
"bookmark",
"type",
";",
"}"
]
|
[
"adds",
"the",
"dropped",
"data",
"to",
"this",
"drop",
"service"
]
| [
"public",
"void",
"add",
"(",
"object",
"context",
"obj",
",",
"object",
"data",
",",
"data",
"flavor",
"flavor",
")",
";"
]
|
[
"construct",
"a",
"{",
"@",
"link",
"simple",
"response",
"}",
"for",
"the",
"given",
"request"
]
| [
"public",
"static",
"simple",
"response",
"make",
"response",
"(",
"simple",
"request",
"request",
")",
"{",
"if",
"(",
"request",
"get",
"response",
"size",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"!",
"messages",
"payload",
"type",
"compressable",
"equals",
"(",
"request",
"get",
"response",
"type",
"(",
")",
")",
")",
"{",
"throw",
"status",
"internal",
"augment",
"description",
"(",
"\"",
"error",
"creating",
"payload",
"\"",
")",
"as",
"runtime",
"exception",
"(",
")",
";",
"}",
"byte",
"string",
"body",
"=",
"byte",
"string",
"copy",
"from",
"(",
"new",
"byte",
"[",
"request",
"get",
"response",
"size",
"(",
")",
"]",
")",
";",
"messages",
"payload",
"type",
"type",
"=",
"request",
"get",
"response",
"type",
"(",
")",
";",
"payload",
"payload",
"=",
"payload",
"new",
"builder",
"(",
")",
"set",
"type",
"(",
"type",
")",
"set",
"body",
"(",
"body",
")",
"build",
"(",
")",
";",
"return",
"simple",
"response",
"new",
"builder",
"(",
")",
"set",
"payload",
"(",
"payload",
")",
"build",
"(",
")",
";",
"}",
"return",
"simple",
"response",
"get",
"default",
"instance",
"(",
")",
";",
"}"
]
|
[
"truncate",
"has",
"the",
"following",
"properties",
":",
"1",
")",
"any",
"block",
"deletions",
"occur",
"now",
"2",
")",
"i",
"node",
"length",
"is",
"truncated",
"now",
"-",
"new",
"clients",
"can",
"only",
"read",
"up",
"to",
"the",
"truncated",
"length",
"3",
")",
"i",
"node",
"will",
"be",
"set",
"to",
"uc",
"and",
"last",
"block",
"set",
"to",
"under",
"recovery",
"4",
")",
"nn",
"will",
"trigger",
"dn",
"truncation",
"recovery",
"and",
"waits",
"for",
"d",
"ns",
"to",
"report",
"5",
")",
"file",
"is",
"considered",
"under",
"recovery",
"until",
"truncation",
"recovery",
"completes",
"6",
")",
"soft",
"and",
"hard",
"lease",
"expiration",
"require",
"truncation",
"recovery",
"to",
"complete"
]
| [
"private",
"static",
"boolean",
"unprotected",
"truncate",
"(",
"f",
"s",
"namesystem",
"fsn",
",",
"i",
"nodes",
"in",
"path",
"iip",
",",
"long",
"new",
"length",
",",
"blocks",
"map",
"update",
"info",
"collected",
"blocks",
",",
"long",
"mtime",
",",
"quota",
"counts",
"delta",
")",
"throws",
"i",
"o",
"exception",
"{",
"assert",
"fsn",
"has",
"write",
"lock",
"(",
")",
";",
"i",
"node",
"file",
"file",
"=",
"iip",
"get",
"last",
"i",
"node",
"(",
")",
"as",
"file",
"(",
")",
";",
"int",
"latest",
"snapshot",
"=",
"iip",
"get",
"latest",
"snapshot",
"id",
"(",
")",
";",
"file",
"record",
"modification",
"(",
"latest",
"snapshot",
",",
"true",
")",
";",
"verify",
"quota",
"for",
"truncate",
"(",
"fsn",
",",
"iip",
",",
"file",
",",
"new",
"length",
",",
"delta",
")",
";",
"set",
"<",
"block",
"info",
">",
"to",
"retain",
"=",
"file",
"get",
"snapshot",
"blocks",
"to",
"retain",
"(",
"latest",
"snapshot",
")",
";",
"long",
"remaining",
"length",
"=",
"file",
"collect",
"blocks",
"beyond",
"max",
"(",
"new",
"length",
",",
"collected",
"blocks",
",",
"to",
"retain",
")",
";",
"file",
"set",
"modification",
"time",
"(",
"mtime",
")",
";",
"/",
"/",
"return",
"whether",
"on",
"a",
"block",
"boundary",
"return",
"(",
"remaining",
"length",
"-",
"new",
"length",
")",
"=",
"=",
"0",
";",
"}"
]
|
[
"tests",
"that",
"we",
"can",
"manually",
"recover",
"from",
"a",
"failed",
"allocation",
"due",
"to",
"shards",
"being",
"moved",
"away",
"etc"
]
| [
"public",
"void",
"test",
"create",
"shrink",
"index",
"fails",
"(",
")",
"throws",
"exception",
"{",
"internal",
"cluster",
"(",
")",
"ensure",
"at",
"least",
"num",
"data",
"nodes",
"(",
"2",
")",
";",
"prepare",
"create",
"(",
"\"",
"source",
"\"",
")",
"set",
"settings",
"(",
"settings",
"builder",
"(",
")",
"put",
"(",
"index",
"settings",
"(",
")",
")",
"put",
"(",
"\"",
"number",
"of",
"shards",
"\"",
",",
"random",
"int",
"between",
"(",
"2",
",",
"7",
")",
")",
"put",
"(",
"\"",
"number",
"of",
"replicas",
"\"",
",",
"0",
")",
")",
"get",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"20",
";",
"i",
"+",
"+",
")",
"{",
"client",
"(",
")",
"prepare",
"index",
"(",
"\"",
"source",
"\"",
")",
"set",
"source",
"(",
"\"",
"{",
"\\",
"\"",
"foo",
"\\",
"\"",
":",
"\\",
"\"",
"bar",
"\\",
"\"",
",",
"\\",
"\"",
"i",
"\\",
"\"",
":",
"\"",
"+",
"i",
"+",
"\"",
"}",
"\"",
",",
"x",
"content",
"type",
"json",
")",
"get",
"(",
")",
";",
"}",
"immutable",
"open",
"map",
"<",
"string",
",",
"discovery",
"node",
">",
"data",
"nodes",
"=",
"client",
"(",
")",
"admin",
"(",
")",
"cluster",
"(",
")",
"prepare",
"state",
"(",
")",
"get",
"(",
")",
"get",
"state",
"(",
")",
"nodes",
"(",
")",
"get",
"data",
"nodes",
"(",
")",
";",
"assert",
"true",
"(",
"\"",
"at",
"least",
"2",
"nodes",
"but",
"was",
":",
"\"",
"+",
"data",
"nodes",
"size",
"(",
")",
",",
"data",
"nodes",
"size",
"(",
")",
">",
"=",
"2",
")",
";",
"discovery",
"node",
"[",
"]",
"discovery",
"nodes",
"=",
"data",
"nodes",
"values",
"(",
")",
"to",
"array",
"(",
"discovery",
"node",
"class",
")",
";",
"string",
"spare",
"node",
"=",
"discovery",
"nodes",
"[",
"0",
"]",
"get",
"name",
"(",
")",
";",
"string",
"merge",
"node",
"=",
"discovery",
"nodes",
"[",
"1",
"]",
"get",
"name",
"(",
")",
";",
"/",
"/",
"ensure",
"all",
"shards",
"are",
"allocated",
"otherwise",
"the",
"ensure",
"green",
"below",
"might",
"not",
"succeed",
"since",
"we",
"require",
"the",
"merge",
"node",
"/",
"/",
"if",
"we",
"change",
"the",
"setting",
"too",
"quickly",
"we",
"will",
"end",
"up",
"with",
"one",
"replica",
"unassigned",
"which",
"can",
"'",
"t",
"be",
"assigned",
"anymore",
"due",
"/",
"/",
"to",
"the",
"require",
"name",
"below",
"ensure",
"green",
"(",
")",
";",
"/",
"/",
"relocate",
"all",
"shards",
"to",
"one",
"node",
"such",
"that",
"we",
"can",
"merge",
"it",
"client",
"(",
")",
"admin",
"(",
")",
"indices",
"(",
")",
"prepare",
"update",
"settings",
"(",
"\"",
"source",
"\"",
")",
"set",
"settings",
"(",
"settings",
"builder",
"(",
")",
"put",
"(",
"\"",
"index",
"routing",
"allocation",
"require",
"name",
"\"",
",",
"merge",
"node",
")",
"put",
"(",
"\"",
"index",
"blocks",
"write",
"\"",
",",
"true",
")",
")",
"get",
"(",
")",
";",
"ensure",
"green",
"(",
")",
";",
"/",
"/",
"now",
"merge",
"source",
"into",
"a",
"single",
"shard",
"index",
"client",
"(",
")",
"admin",
"(",
")",
"indices",
"(",
")",
"prepare",
"resize",
"index",
"(",
"\"",
"source",
"\"",
",",
"\"",
"target",
"\"",
")",
"set",
"wait",
"for",
"active",
"shards",
"(",
"active",
"shard",
"count",
"none",
")",
"set",
"settings",
"(",
"settings",
"builder",
"(",
")",
"put",
"(",
"\"",
"index",
"routing",
"allocation",
"exclude",
"name",
"\"",
",",
"merge",
"node",
")",
"/",
"/",
"we",
"manually",
"exclude",
"the",
"merge",
"node",
"to",
"forcefully",
"fuck",
"it",
"up",
"put",
"(",
"\"",
"index",
"number",
"of",
"replicas",
"\"",
",",
"0",
")",
"put",
"(",
"\"",
"index",
"allocation",
"max",
"retries",
"\"",
",",
"1",
")",
"build",
"(",
")",
")",
"get",
"(",
")",
";",
"client",
"(",
")",
"admin",
"(",
")",
"cluster",
"(",
")",
"prepare",
"health",
"(",
"\"",
"target",
"\"",
")",
"set",
"wait",
"for",
"events",
"(",
"priority",
"languid",
")",
"get",
"(",
")",
";",
"/",
"/",
"now",
"we",
"move",
"all",
"shards",
"away",
"from",
"the",
"merge",
"node",
"client",
"(",
")",
"admin",
"(",
")",
"indices",
"(",
")",
"prepare",
"update",
"settings",
"(",
"\"",
"source",
"\"",
")",
"set",
"settings",
"(",
"settings",
"builder",
"(",
")",
"put",
"(",
"\"",
"index",
"routing",
"allocation",
"require",
"name",
"\"",
",",
"spare",
"node",
")",
"put",
"(",
"\"",
"index",
"blocks",
"write",
"\"",
",",
"true",
")",
")",
"get",
"(",
")",
";",
"ensure",
"green",
"(",
"\"",
"source",
"\"",
")",
";",
"client",
"(",
")",
"admin",
"(",
")",
"indices",
"(",
")",
"prepare",
"update",
"settings",
"(",
"\"",
"target",
"\"",
")",
"/",
"/",
"erase",
"the",
"forcefully",
"fuckup",
"!",
"set",
"settings",
"(",
"settings",
"builder",
"(",
")",
"put",
"null",
"(",
"\"",
"index",
"routing",
"allocation",
"exclude",
"name",
"\"",
")",
")",
"get",
"(",
")",
";",
"/",
"/",
"wait",
"until",
"it",
"fails",
"assert",
"busy",
"(",
"(",
")",
"-",
">",
"{",
"cluster",
"state",
"response",
"cluster",
"state",
"response",
"=",
"client",
"(",
")",
"admin",
"(",
")",
"cluster",
"(",
")",
"prepare",
"state",
"(",
")",
"get",
"(",
")",
";",
"routing",
"table",
"routing",
"tables",
"=",
"cluster",
"state",
"response",
"get",
"state",
"(",
")",
"routing",
"table",
"(",
")",
";",
"assert",
"true",
"(",
"routing",
"tables",
"index",
"(",
"\"",
"target",
"\"",
")",
"shard",
"(",
"0",
")",
"get",
"shards",
"(",
")",
"get",
"(",
"0",
")",
"unassigned",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"unassigned",
"info",
"reason",
"allocation",
"failed",
",",
"routing",
"tables",
"index",
"(",
"\"",
"target",
"\"",
")",
"shard",
"(",
"0",
")",
"get",
"shards",
"(",
")",
"get",
"(",
"0",
")",
"unassigned",
"info",
"(",
")",
"get",
"reason",
"(",
")",
")",
";",
"assert",
"equals",
"(",
"1",
",",
"routing",
"tables",
"index",
"(",
"\"",
"target",
"\"",
")",
"shard",
"(",
"0",
")",
"get",
"shards",
"(",
")",
"get",
"(",
"0",
")",
"unassigned",
"info",
"(",
")",
"get",
"num",
"failed",
"allocations",
"(",
")",
")",
";",
"}",
")",
";",
"client",
"(",
")",
"admin",
"(",
")",
"indices",
"(",
")",
"prepare",
"update",
"settings",
"(",
"\"",
"source",
"\"",
")",
"/",
"/",
"now",
"relocate",
"them",
"all",
"to",
"the",
"right",
"node",
"set",
"settings",
"(",
"settings",
"builder",
"(",
")",
"put",
"(",
"\"",
"index",
"routing",
"allocation",
"require",
"name",
"\"",
",",
"merge",
"node",
")",
")",
"get",
"(",
")",
";",
"ensure",
"green",
"(",
"\"",
"source",
"\"",
")",
";",
"refresh",
"cluster",
"info",
"(",
")",
";",
"/",
"/",
"kick",
"off",
"a",
"retry",
"and",
"wait",
"until",
"it",
"'",
"s",
"done",
"!",
"cluster",
"reroute",
"response",
"cluster",
"reroute",
"response",
"=",
"client",
"(",
")",
"admin",
"(",
")",
"cluster",
"(",
")",
"prepare",
"reroute",
"(",
")",
"set",
"retry",
"failed",
"(",
"true",
")",
"get",
"(",
")",
";",
"long",
"expected",
"shard",
"size",
"=",
"cluster",
"reroute",
"response",
"get",
"state",
"(",
")",
"routing",
"table",
"(",
")",
"index",
"(",
"\"",
"target",
"\"",
")",
"shard",
"(",
"0",
")",
"get",
"shards",
"(",
")",
"get",
"(",
"0",
")",
"get",
"expected",
"shard",
"size",
"(",
")",
";",
"/",
"/",
"we",
"support",
"the",
"expected",
"shard",
"size",
"in",
"the",
"allocator",
"to",
"sum",
"up",
"over",
"the",
"source",
"index",
"shards",
"assert",
"true",
"(",
"\"",
"expected",
"shard",
"size",
"must",
"be",
"set",
"but",
"wasn",
"'",
"t",
":",
"\"",
"+",
"expected",
"shard",
"size",
",",
"expected",
"shard",
"size",
">",
"0",
")",
";",
"ensure",
"green",
"(",
")",
";",
"assert",
"hit",
"count",
"(",
"client",
"(",
")",
"prepare",
"search",
"(",
"\"",
"target",
"\"",
")",
"set",
"size",
"(",
"100",
")",
"set",
"query",
"(",
"new",
"terms",
"query",
"builder",
"(",
"\"",
"foo",
"\"",
",",
"\"",
"bar",
"\"",
")",
")",
"get",
"(",
")",
",",
"20",
")",
";",
"}"
]
|
[
"if",
"set",
"to",
"true",
",",
"chart",
"continues",
"to",
"scroll",
"after",
"touch",
"up",
"default",
":",
"true"
]
| [
"public",
"boolean",
"is",
"drag",
"deceleration",
"enabled",
"(",
")",
"{",
"return",
"m",
"drag",
"deceleration",
"enabled",
";",
"}"
]
|
[
"set",
"the",
"name",
"of",
"the",
"model",
"attribute",
"that",
"represents",
"the",
"xslt",
"source",
"if",
"not",
"specified",
",",
"the",
"model",
"map",
"will",
"be",
"searched",
"for",
"a",
"matching",
"value",
"type",
"the",
"following",
"source",
"types",
"are",
"supported",
"out",
"of",
"the",
"box",
":",
"{",
"@",
"link",
"javax",
"xml",
"transform",
"source",
"}",
",",
"{",
"@",
"link",
"org",
"w",
"3c",
"dom",
"document",
"}",
",",
"{",
"@",
"link",
"org",
"w",
"3c",
"dom",
"node",
"}",
",",
"{",
"@",
"link",
"java",
"io",
"reader",
"}",
",",
"{",
"@",
"link",
"java",
"io",
"input",
"stream",
"}",
"and",
"{",
"@",
"link",
"org",
"springframework",
"core",
"io",
"resource",
"}"
]
| [
"public",
"void",
"set",
"source",
"key",
"(",
"string",
"source",
"key",
")",
"{",
"this",
"source",
"key",
"=",
"source",
"key",
";",
"}"
]
|
[
"expect",
"mapping",
"num"
]
| [
"public",
"int",
"get",
"n",
"(",
")",
"{",
"return",
"n",
";",
"}"
]
|
[
"returns",
"a",
"map",
"from",
"{",
"@",
"link",
"dependency",
"}",
"inputs",
"to",
"the",
"{",
"@",
"link",
"configured",
"target",
"and",
"data",
"}",
"s",
"corresponding",
"to",
"those",
"dependencies",
"for",
"use",
"for",
"legacy",
"support",
"and",
"tests",
"calling",
"through",
"{",
"@",
"code",
"build",
"view",
"}",
"only",
"if",
"a",
"requested",
"configured",
"target",
"is",
"in",
"error",
",",
"the",
"corresponding",
"value",
"is",
"omitted",
"from",
"the",
"returned",
"list",
"except"
]
| [
"private",
"immutable",
"multimap",
"<",
"dependency",
"key",
",",
"configured",
"target",
"and",
"data",
">",
"get",
"configured",
"target",
"map",
"for",
"testing",
"(",
"extended",
"event",
"handler",
"event",
"handler",
",",
"build",
"configuration",
"original",
"config",
",",
"iterable",
"<",
"dependency",
"key",
">",
"keys",
")",
"throws",
"invalid",
"configuration",
"exception",
",",
"interrupted",
"exception",
"{",
"check",
"active",
"(",
")",
";",
"multimap",
"<",
"dependency",
"key",
",",
"build",
"configuration",
">",
"configs",
";",
"if",
"(",
"original",
"config",
"!",
"=",
"null",
")",
"{",
"configs",
"=",
"get",
"configurations",
"(",
"event",
"handler",
",",
"original",
"config",
"get",
"options",
"(",
")",
",",
"keys",
")",
"get",
"configuration",
"map",
"(",
")",
";",
"}",
"else",
"{",
"configs",
"=",
"array",
"list",
"multimap",
"create",
"(",
")",
";",
"for",
"(",
"dependency",
"key",
"key",
":",
"keys",
")",
"{",
"configs",
"put",
"(",
"key",
",",
"null",
")",
";",
"}",
"}",
"final",
"list",
"<",
"sky",
"key",
">",
"sky",
"keys",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"dependency",
"key",
"key",
":",
"keys",
")",
"{",
"if",
"(",
"!",
"configs",
"contains",
"key",
"(",
"key",
")",
")",
"{",
"/",
"/",
"if",
"we",
"couldn",
"'",
"t",
"compute",
"a",
"configuration",
"for",
"this",
"target",
",",
"the",
"target",
"was",
"in",
"error",
"(",
"e",
"g",
"/",
"/",
"it",
"couldn",
"'",
"t",
"be",
"loaded",
")",
"exclude",
"it",
"from",
"the",
"results",
"continue",
";",
"}",
"for",
"(",
"build",
"configuration",
"dep",
"config",
":",
"configs",
"get",
"(",
"key",
")",
")",
"{",
"sky",
"keys",
"add",
"(",
"configured",
"target",
"key",
"builder",
"(",
")",
"set",
"label",
"(",
"key",
"get",
"label",
"(",
")",
")",
"set",
"configuration",
"(",
"dep",
"config",
")",
"build",
"(",
")",
")",
";",
"for",
"(",
"aspect",
"deps",
"aspect",
"deps",
":",
"key",
"get",
"aspects",
"(",
")",
"get",
"used",
"aspects",
"(",
")",
")",
"{",
"sky",
"keys",
"add",
"(",
"aspect",
"value",
"key",
"create",
"aspect",
"key",
"(",
"key",
"get",
"label",
"(",
")",
",",
"dep",
"config",
",",
"aspect",
"deps",
"get",
"aspect",
"(",
")",
",",
"dep",
"config",
")",
")",
";",
"}",
"}",
"sky",
"keys",
"add",
"(",
"package",
"value",
"key",
"(",
"key",
"get",
"label",
"(",
")",
"get",
"package",
"identifier",
"(",
")",
")",
")",
";",
"}",
"evaluation",
"result",
"<",
"sky",
"value",
">",
"result",
"=",
"evaluate",
"sky",
"keys",
"(",
"event",
"handler",
",",
"sky",
"keys",
")",
";",
"immutable",
"multimap",
"builder",
"<",
"dependency",
"key",
",",
"configured",
"target",
"and",
"data",
">",
"cts",
"=",
"immutable",
"multimap",
"builder",
"(",
")",
";",
"/",
"/",
"logic",
"copied",
"from",
"configured",
"target",
"function",
"#",
"compute",
"dependencies",
"set",
"<",
"sky",
"key",
">",
"alias",
"packages",
"to",
"fetch",
"=",
"new",
"hash",
"set",
"<",
">",
"(",
")",
";",
"list",
"<",
"dependency",
"key",
">",
"alias",
"keys",
"to",
"redo",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"evaluation",
"result",
"<",
"sky",
"value",
">",
"alias",
"package",
"values",
"=",
"null",
";",
"iterable",
"<",
"dependency",
"key",
">",
"keys",
"to",
"process",
"=",
"keys",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"2",
";",
"i",
"+",
"+",
")",
"{",
"dependent",
"node",
"loop",
":",
"for",
"(",
"dependency",
"key",
"key",
":",
"keys",
"to",
"process",
")",
"{",
"if",
"(",
"!",
"configs",
"contains",
"key",
"(",
"key",
")",
")",
"{",
"/",
"/",
"if",
"we",
"couldn",
"'",
"t",
"compute",
"a",
"configuration",
"for",
"this",
"target",
",",
"the",
"target",
"was",
"in",
"error",
"(",
"e",
"g",
"/",
"/",
"it",
"couldn",
"'",
"t",
"be",
"loaded",
")",
"exclude",
"it",
"from",
"the",
"results",
"continue",
";",
"}",
"for",
"(",
"build",
"configuration",
"dep",
"config",
":",
"configs",
"get",
"(",
"key",
")",
")",
"{",
"sky",
"key",
"configured",
"target",
"key",
"=",
"configured",
"target",
"key",
"builder",
"(",
")",
"set",
"label",
"(",
"key",
"get",
"label",
"(",
")",
")",
"set",
"configuration",
"(",
"dep",
"config",
")",
"build",
"(",
")",
";",
"if",
"(",
"result",
"get",
"(",
"configured",
"target",
"key",
")",
"=",
"=",
"null",
")",
"{",
"continue",
";",
"}",
"configured",
"target",
"configured",
"target",
"=",
"(",
"(",
"configured",
"target",
"value",
")",
"result",
"get",
"(",
"configured",
"target",
"key",
")",
")",
"get",
"configured",
"target",
"(",
")",
";",
"label",
"label",
"=",
"configured",
"target",
"get",
"label",
"(",
")",
";",
"sky",
"key",
"package",
"key",
"=",
"package",
"value",
"key",
"(",
"label",
"get",
"package",
"identifier",
"(",
")",
")",
";",
"package",
"value",
"package",
"value",
";",
"if",
"(",
"i",
"=",
"=",
"0",
")",
"{",
"package",
"value",
"=",
"(",
"package",
"value",
")",
"result",
"get",
"(",
"package",
"key",
")",
";",
"if",
"(",
"package",
"value",
"=",
"=",
"null",
")",
"{",
"alias",
"packages",
"to",
"fetch",
"add",
"(",
"package",
"key",
")",
";",
"alias",
"keys",
"to",
"redo",
"add",
"(",
"key",
")",
";",
"continue",
";",
"}",
"}",
"else",
"{",
"package",
"value",
"=",
"(",
"package",
"value",
")",
"preconditions",
"check",
"not",
"null",
"(",
"alias",
"package",
"values",
"get",
"(",
"package",
"key",
")",
",",
"package",
"key",
")",
";",
"}",
"list",
"<",
"configured",
"aspect",
">",
"configured",
"aspects",
"=",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"for",
"(",
"aspect",
"deps",
"aspect",
"deps",
":",
"key",
"get",
"aspects",
"(",
")",
"get",
"used",
"aspects",
"(",
")",
")",
"{",
"sky",
"key",
"aspect",
"key",
"=",
"aspect",
"value",
"key",
"create",
"aspect",
"key",
"(",
"key",
"get",
"label",
"(",
")",
",",
"dep",
"config",
",",
"aspect",
"deps",
"get",
"aspect",
"(",
")",
",",
"dep",
"config",
")",
";",
"if",
"(",
"result",
"get",
"(",
"aspect",
"key",
")",
"=",
"=",
"null",
")",
"{",
"continue",
"dependent",
"node",
"loop",
";",
"}",
"configured",
"aspects",
"add",
"(",
"(",
"(",
"aspect",
"value",
")",
"result",
"get",
"(",
"aspect",
"key",
")",
")",
"get",
"configured",
"aspect",
"(",
")",
")",
";",
"}",
"try",
"{",
"configured",
"target",
"merged",
"target",
"=",
"merged",
"configured",
"target",
"of",
"(",
"configured",
"target",
",",
"configured",
"aspects",
")",
";",
"build",
"configuration",
"value",
"key",
"config",
"key",
"=",
"merged",
"target",
"get",
"configuration",
"key",
"(",
")",
";",
"build",
"configuration",
"resolved",
"config",
"=",
"dep",
"config",
";",
"if",
"(",
"config",
"key",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"unfortunately",
",",
"it",
"'",
"s",
"possible",
"to",
"get",
"a",
"configured",
"target",
"with",
"a",
"null",
"configuration",
"/",
"/",
"when",
"dep",
"config",
"is",
"non",
"-",
"null",
",",
"so",
"we",
"need",
"to",
"explicitly",
"override",
"it",
"in",
"that",
"case",
"resolved",
"config",
"=",
"null",
";",
"}",
"else",
"if",
"(",
"!",
"config",
"key",
"equals",
"(",
"build",
"configuration",
"value",
"key",
"(",
"dep",
"config",
")",
")",
")",
"{",
"/",
"/",
"retroactive",
"trimming",
"may",
"change",
"the",
"configuration",
"associated",
"with",
"the",
"dependency",
"/",
"/",
"if",
"it",
"does",
",",
"we",
"need",
"to",
"get",
"that",
"instance",
"/",
"/",
"todo",
"(",
"b",
"/",
"140632978",
")",
":",
"doing",
"these",
"individually",
"instead",
"of",
"doing",
"them",
"all",
"at",
"once",
"may",
"/",
"/",
"end",
"up",
"being",
"wasteful",
"use",
"of",
"skyframe",
"although",
"these",
"configurations",
"are",
"guaranteed",
"/",
"/",
"to",
"be",
"in",
"the",
"skyframe",
"cache",
"(",
"because",
"the",
"dependency",
"would",
"have",
"had",
"to",
"retrieve",
"/",
"/",
"them",
"to",
"be",
"created",
"in",
"the",
"first",
"place",
")",
",",
"looking",
"them",
"up",
"repeatedly",
"may",
"be",
"slower",
"/",
"/",
"than",
"just",
"keeping",
"a",
"local",
"cache",
"and",
"assigning",
"the",
"same",
"configuration",
"to",
"all",
"the",
"/",
"/",
"c",
"ts",
"which",
"need",
"it",
"profile",
"this",
"and",
"see",
"if",
"there",
"'",
"s",
"a",
"better",
"way",
"if",
"(",
"!",
"dep",
"config",
"trim",
"configurations",
"retroactively",
"(",
")",
")",
"{",
"throw",
"new",
"assertion",
"error",
"(",
"\"",
"loading",
"configurations",
"mid",
"-",
"dependency",
"resolution",
"should",
"only",
"happen",
"when",
"\"",
"+",
"\"",
"retroactive",
"trimming",
"is",
"enabled",
"\"",
")",
";",
"}",
"resolved",
"config",
"=",
"get",
"configuration",
"(",
"event",
"handler",
",",
"merged",
"target",
"get",
"configuration",
"key",
"(",
")",
")",
";",
"}",
"cts",
"put",
"(",
"key",
",",
"new",
"configured",
"target",
"and",
"data",
"(",
"merged",
"target",
",",
"package",
"value",
"get",
"package",
"(",
")",
"get",
"target",
"(",
"configured",
"target",
"get",
"label",
"(",
")",
"get",
"name",
"(",
")",
")",
",",
"resolved",
"config",
",",
"null",
")",
")",
";",
"}",
"catch",
"(",
"duplicate",
"exception",
"|",
"no",
"such",
"target",
"exception",
"e",
")",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"string",
"format",
"(",
"\"",
"error",
"creating",
"%",
"s",
"\"",
",",
"configured",
"target",
"get",
"label",
"(",
")",
")",
",",
"e",
")",
";",
"}",
"}",
"}",
"if",
"(",
"alias",
"keys",
"to",
"redo",
"is",
"empty",
"(",
")",
")",
"{",
"break",
";",
"}",
"alias",
"package",
"values",
"=",
"evaluate",
"sky",
"keys",
"(",
"event",
"handler",
",",
"alias",
"packages",
"to",
"fetch",
")",
";",
"keys",
"to",
"process",
"=",
"alias",
"keys",
"to",
"redo",
";",
"}",
"supplier",
"<",
"map",
"<",
"build",
"configuration",
"value",
"key",
",",
"build",
"configuration",
">",
">",
"configuration",
"lookup",
"supplier",
"=",
"(",
")",
"-",
">",
"configs",
"values",
"(",
")",
"stream",
"(",
")",
"collect",
"(",
"collectors",
"to",
"map",
"(",
"build",
"configuration",
"value",
":",
":",
"key",
",",
"java",
"util",
"function",
"function",
"identity",
"(",
")",
")",
")",
";",
"/",
"/",
"we",
"ignore",
"the",
"return",
"value",
"here",
"because",
"tests",
"effectively",
"run",
"with",
"-",
"-",
"keep",
"going",
",",
"and",
"the",
"/",
"/",
"loading",
"-",
"phase",
"-",
"error",
"bit",
"is",
"only",
"needed",
"if",
"we",
"'",
"re",
"constructing",
"a",
"skyframe",
"analysis",
"result",
"skyframe",
"build",
"view",
"process",
"errors",
"(",
"result",
",",
"configuration",
"lookup",
"supplier",
",",
"this",
",",
"event",
"handler",
",",
"/",
"*",
"keep",
"going",
"=",
"*",
"/",
"true",
",",
"/",
"*",
"event",
"bus",
"=",
"*",
"/",
"null",
")",
";",
"return",
"cts",
"build",
"(",
")",
";",
"}"
]
|
[
"assert",
"the",
"number",
"of",
"flash",
"attributes"
]
| [
"public",
"result",
"matcher",
"attribute",
"count",
"(",
"int",
"count",
")",
"{",
"return",
"result",
"-",
">",
"assert",
"equals",
"(",
"\"",
"flash",
"map",
"size",
"\"",
",",
"count",
",",
"result",
"get",
"flash",
"map",
"(",
")",
"size",
"(",
")",
")",
";",
"}"
]
|
[
"attempt",
"to",
"set",
"the",
"writer",
"to",
"a",
"new",
"value"
]
| [
"public",
"boolean",
"attempt",
"to",
"set",
"writer",
"(",
"thread",
"prev",
"writer",
",",
"thread",
"new",
"writer",
")",
"{",
"return",
"writer",
"compare",
"and",
"set",
"(",
"prev",
"writer",
",",
"new",
"writer",
")",
";",
"}"
]
|
[
"sets",
"whether",
"the",
"shuffle",
"button",
"is",
"shown"
]
| [
"public",
"void",
"set",
"show",
"shuffle",
"button",
"(",
"boolean",
"show",
"shuffle",
"button",
")",
"{",
"assertions",
"check",
"state",
"not",
"null",
"(",
"controller",
")",
";",
"controller",
"set",
"show",
"shuffle",
"button",
"(",
"show",
"shuffle",
"button",
")",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"float",
"'"
]
| [
"public",
"void",
"float",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"float",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"updates",
"the",
"existing",
"hierarchy",
"builder",
"based",
"on",
"the",
"xml",
"attributes",
"this",
"method",
"is",
"useful",
"if",
"a",
"custom",
"view",
"uses",
"different",
"default",
"values",
"in",
"that",
"case",
"a",
"builder",
"with",
"adjusted",
"default",
"values",
"can",
"be",
"passed",
"to",
"this",
"method",
"and",
"only",
"the",
"properties",
"explicitly",
"specified",
"in",
"xml",
"will",
"be",
"overridden",
"the",
"builder",
"can",
"be",
"modified",
"afterwards",
"in",
"case",
"some",
"xml",
"attributes",
"needs",
"to",
"be",
"overridden"
]
| [
"public",
"static",
"generic",
"drawee",
"hierarchy",
"builder",
"update",
"builder",
"(",
"generic",
"drawee",
"hierarchy",
"builder",
"builder",
",",
"context",
"context",
",",
"@",
"nullable",
"attribute",
"set",
"attrs",
")",
"{",
"/",
"/",
"these",
"paramters",
"cannot",
"be",
"applied",
"immediately",
"so",
"we",
"store",
"them",
"first",
"int",
"progress",
"bar",
"auto",
"rotate",
"interval",
"=",
"0",
";",
"int",
"rounded",
"corner",
"radius",
"=",
"0",
";",
"boolean",
"round",
"top",
"left",
"=",
"true",
";",
"boolean",
"round",
"top",
"right",
"=",
"true",
";",
"boolean",
"round",
"bottom",
"left",
"=",
"true",
";",
"boolean",
"round",
"bottom",
"right",
"=",
"true",
";",
"boolean",
"round",
"top",
"start",
"=",
"true",
";",
"boolean",
"round",
"top",
"end",
"=",
"true",
";",
"boolean",
"round",
"bottom",
"start",
"=",
"true",
";",
"boolean",
"round",
"bottom",
"end",
"=",
"true",
";",
"if",
"(",
"attrs",
"!",
"=",
"null",
")",
"{",
"typed",
"array",
"gdh",
"attrs",
"=",
"context",
"obtain",
"styled",
"attributes",
"(",
"attrs",
",",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
")",
";",
"try",
"{",
"final",
"int",
"index",
"count",
"=",
"gdh",
"attrs",
"get",
"index",
"count",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"index",
"count",
";",
"i",
"+",
"+",
")",
"{",
"final",
"int",
"attr",
"=",
"gdh",
"attrs",
"get",
"index",
"(",
"i",
")",
";",
"/",
"/",
"most",
"popular",
"ones",
"first",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"actual",
"image",
"scale",
"type",
")",
"{",
"builder",
"set",
"actual",
"image",
"scale",
"type",
"(",
"get",
"scale",
"type",
"from",
"xml",
"(",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"placeholder",
"image",
")",
"{",
"builder",
"set",
"placeholder",
"image",
"(",
"get",
"drawable",
"(",
"context",
",",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"pressed",
"state",
"overlay",
"image",
")",
"{",
"builder",
"set",
"pressed",
"state",
"overlay",
"(",
"get",
"drawable",
"(",
"context",
",",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"progress",
"bar",
"image",
")",
"{",
"builder",
"set",
"progress",
"bar",
"image",
"(",
"get",
"drawable",
"(",
"context",
",",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"/",
"/",
"the",
"remaining",
"ones",
"without",
"any",
"particular",
"order",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"fade",
"duration",
")",
"{",
"builder",
"set",
"fade",
"duration",
"(",
"gdh",
"attrs",
"get",
"int",
"(",
"attr",
",",
"0",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"view",
"aspect",
"ratio",
")",
"{",
"builder",
"set",
"desired",
"aspect",
"ratio",
"(",
"gdh",
"attrs",
"get",
"float",
"(",
"attr",
",",
"0",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"placeholder",
"image",
"scale",
"type",
")",
"{",
"builder",
"set",
"placeholder",
"image",
"scale",
"type",
"(",
"get",
"scale",
"type",
"from",
"xml",
"(",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"retry",
"image",
")",
"{",
"builder",
"set",
"retry",
"image",
"(",
"get",
"drawable",
"(",
"context",
",",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"retry",
"image",
"scale",
"type",
")",
"{",
"builder",
"set",
"retry",
"image",
"scale",
"type",
"(",
"get",
"scale",
"type",
"from",
"xml",
"(",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"failure",
"image",
")",
"{",
"builder",
"set",
"failure",
"image",
"(",
"get",
"drawable",
"(",
"context",
",",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"failure",
"image",
"scale",
"type",
")",
"{",
"builder",
"set",
"failure",
"image",
"scale",
"type",
"(",
"get",
"scale",
"type",
"from",
"xml",
"(",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"progress",
"bar",
"image",
"scale",
"type",
")",
"{",
"builder",
"set",
"progress",
"bar",
"image",
"scale",
"type",
"(",
"get",
"scale",
"type",
"from",
"xml",
"(",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"progress",
"bar",
"auto",
"rotate",
"interval",
")",
"{",
"progress",
"bar",
"auto",
"rotate",
"interval",
"=",
"gdh",
"attrs",
"get",
"integer",
"(",
"attr",
",",
"progress",
"bar",
"auto",
"rotate",
"interval",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"background",
"image",
")",
"{",
"builder",
"set",
"background",
"(",
"get",
"drawable",
"(",
"context",
",",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"overlay",
"image",
")",
"{",
"builder",
"set",
"overlay",
"(",
"get",
"drawable",
"(",
"context",
",",
"gdh",
"attrs",
",",
"attr",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"as",
"circle",
")",
"{",
"get",
"rounding",
"params",
"(",
"builder",
")",
"set",
"round",
"as",
"circle",
"(",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"false",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"rounded",
"corner",
"radius",
")",
"{",
"rounded",
"corner",
"radius",
"=",
"gdh",
"attrs",
"get",
"dimension",
"pixel",
"size",
"(",
"attr",
",",
"rounded",
"corner",
"radius",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"top",
"left",
")",
"{",
"round",
"top",
"left",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"top",
"left",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"top",
"right",
")",
"{",
"round",
"top",
"right",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"top",
"right",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"bottom",
"left",
")",
"{",
"round",
"bottom",
"left",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"bottom",
"left",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"bottom",
"right",
")",
"{",
"round",
"bottom",
"right",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"bottom",
"right",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"top",
"start",
")",
"{",
"round",
"top",
"start",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"top",
"start",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"top",
"end",
")",
"{",
"round",
"top",
"end",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"top",
"end",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"bottom",
"start",
")",
"{",
"round",
"bottom",
"start",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"bottom",
"start",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"bottom",
"end",
")",
"{",
"round",
"bottom",
"end",
"=",
"gdh",
"attrs",
"get",
"boolean",
"(",
"attr",
",",
"round",
"bottom",
"end",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"round",
"with",
"overlay",
"color",
")",
"{",
"get",
"rounding",
"params",
"(",
"builder",
")",
"set",
"overlay",
"color",
"(",
"gdh",
"attrs",
"get",
"color",
"(",
"attr",
",",
"0",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"rounding",
"border",
"width",
")",
"{",
"get",
"rounding",
"params",
"(",
"builder",
")",
"set",
"border",
"width",
"(",
"gdh",
"attrs",
"get",
"dimension",
"pixel",
"size",
"(",
"attr",
",",
"0",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"rounding",
"border",
"color",
")",
"{",
"get",
"rounding",
"params",
"(",
"builder",
")",
"set",
"border",
"color",
"(",
"gdh",
"attrs",
"get",
"color",
"(",
"attr",
",",
"0",
")",
")",
";",
"}",
"else",
"if",
"(",
"attr",
"=",
"=",
"r",
"styleable",
"generic",
"drawee",
"hierarchy",
"rounding",
"border",
"padding",
")",
"{",
"get",
"rounding",
"params",
"(",
"builder",
")",
"set",
"padding",
"(",
"gdh",
"attrs",
"get",
"dimension",
"pixel",
"size",
"(",
"attr",
",",
"0",
")",
")",
";",
"}",
"}",
"}",
"finally",
"{",
"gdh",
"attrs",
"recycle",
"(",
")",
";",
"if",
"(",
"android",
"os",
"build",
"version",
"sdk",
"int",
">",
"=",
"17",
"&",
"&",
"context",
"get",
"resources",
"(",
")",
"get",
"configuration",
"(",
")",
"get",
"layout",
"direction",
"(",
")",
"=",
"=",
"view",
"layout",
"direction",
"rtl",
")",
"{",
"round",
"top",
"left",
"=",
"round",
"top",
"left",
"&",
"&",
"round",
"top",
"end",
";",
"round",
"top",
"right",
"=",
"round",
"top",
"right",
"&",
"&",
"round",
"top",
"start",
";",
"round",
"bottom",
"right",
"=",
"round",
"bottom",
"right",
"&",
"&",
"round",
"bottom",
"start",
";",
"round",
"bottom",
"left",
"=",
"round",
"bottom",
"left",
"&",
"&",
"round",
"bottom",
"end",
";",
"}",
"else",
"{",
"round",
"top",
"left",
"=",
"round",
"top",
"left",
"&",
"&",
"round",
"top",
"start",
";",
"round",
"top",
"right",
"=",
"round",
"top",
"right",
"&",
"&",
"round",
"top",
"end",
";",
"round",
"bottom",
"right",
"=",
"round",
"bottom",
"right",
"&",
"&",
"round",
"bottom",
"end",
";",
"round",
"bottom",
"left",
"=",
"round",
"bottom",
"left",
"&",
"&",
"round",
"bottom",
"start",
";",
"}",
"}",
"}",
"/",
"/",
"wrap",
"progress",
"bar",
"if",
"auto",
"-",
"rotating",
"requested",
"if",
"(",
"builder",
"get",
"progress",
"bar",
"image",
"(",
")",
"!",
"=",
"null",
"&",
"&",
"progress",
"bar",
"auto",
"rotate",
"interval",
">",
"0",
")",
"{",
"builder",
"set",
"progress",
"bar",
"image",
"(",
"new",
"auto",
"rotate",
"drawable",
"(",
"builder",
"get",
"progress",
"bar",
"image",
"(",
")",
",",
"progress",
"bar",
"auto",
"rotate",
"interval",
")",
")",
";",
"}",
"/",
"/",
"set",
"rounded",
"corner",
"radii",
"if",
"requested",
"if",
"(",
"rounded",
"corner",
"radius",
">",
"0",
")",
"{",
"get",
"rounding",
"params",
"(",
"builder",
")",
"set",
"corners",
"radii",
"(",
"round",
"top",
"left",
"?",
"rounded",
"corner",
"radius",
":",
"0",
",",
"round",
"top",
"right",
"?",
"rounded",
"corner",
"radius",
":",
"0",
",",
"round",
"bottom",
"right",
"?",
"rounded",
"corner",
"radius",
":",
"0",
",",
"round",
"bottom",
"left",
"?",
"rounded",
"corner",
"radius",
":",
"0",
")",
";",
"}",
"return",
"builder",
";",
"}"
]
|
[
"set",
"the",
"string",
"value",
"only",
"necessary",
"for",
"manipulating",
"a",
"registered",
"value",
",",
"for",
"example",
"in",
"bean",
"factory",
"post",
"processors"
]
| [
"public",
"void",
"set",
"value",
"(",
"@",
"nullable",
"string",
"value",
")",
"{",
"this",
"value",
"=",
"value",
";",
"}"
]
|
[
"returns",
"whether",
"open",
"g",
"l",
"es",
"3",
"0",
"is",
"available",
"if",
"it",
"is",
"you",
"can",
"get",
"an",
"instance",
"of",
"{",
"@",
"link",
"gl30",
"}",
"via",
"{",
"@",
"link",
"#",
"get",
"g",
"l",
"3",
"0",
"(",
")",
"}",
"to",
"access",
"open",
"g",
"l",
"es",
"3",
"0",
"functionality",
"note",
"that",
"this",
"functionality",
"will",
"only",
"be",
"available",
"if",
"you",
"instructed",
"the",
"{",
"@",
"link",
"application",
"}",
"instance",
"to",
"use",
"open",
"g",
"l",
"es",
"3",
"0",
"!"
]
| [
"boolean",
"is",
"g",
"l",
"3",
"0",
"available",
"(",
")",
";"
]
|
[
"returns",
"the",
"size",
"of",
"the",
"output",
"this",
"must",
"be",
"a",
"constant",
"-",
"time",
"operation",
"for",
"all",
"implementations"
]
| [
"int",
"size",
"(",
")",
";"
]
|
[
"sets",
"the",
"status",
"code",
"for",
"the"
]
| [
"public",
"void",
"status",
"(",
"int",
"status",
"code",
")",
"{",
"response",
"set",
"status",
"(",
"status",
"code",
")",
";",
"}"
]
|
[
"this",
"tests",
"a",
"simple",
"get",
"request",
"with",
"a",
"key",
"as",
"the",
"value"
]
| [
"public",
"void",
"should",
"decode",
"request",
"with",
"simple",
"value",
"(",
")",
"{",
"byte",
"buf",
"incoming",
"=",
"unpooled",
"buffer",
"(",
")",
";",
"incoming",
"write",
"bytes",
"(",
"get",
"request",
")",
";",
"channel",
"write",
"inbound",
"(",
"incoming",
")",
";",
"binary",
"memcache",
"request",
"request",
"=",
"channel",
"read",
"inbound",
"(",
")",
";",
"assert",
"that",
"(",
"request",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"assert",
"that",
"(",
"request",
"key",
"(",
")",
",",
"not",
"null",
"value",
"(",
")",
")",
";",
"assert",
"that",
"(",
"request",
"extras",
"(",
")",
",",
"null",
"value",
"(",
")",
")",
";",
"assert",
"that",
"(",
"request",
"key",
"length",
"(",
")",
",",
"is",
"(",
"(",
"short",
")",
"3",
")",
")",
";",
"assert",
"that",
"(",
"request",
"extras",
"length",
"(",
")",
",",
"is",
"(",
"(",
"byte",
")",
"0",
")",
")",
";",
"assert",
"that",
"(",
"request",
"total",
"body",
"length",
"(",
")",
",",
"is",
"(",
"3",
")",
")",
";",
"request",
"release",
"(",
")",
";",
"assert",
"that",
"(",
"channel",
"read",
"inbound",
"(",
")",
",",
"instance",
"of",
"(",
"last",
"memcache",
"content",
"class",
")",
")",
";",
"}"
]
|
[
"get",
"the",
"list",
"of",
"strings",
"that",
"can",
"be",
"related",
"in",
"a",
"txt",
"record",
"for",
"the",
"given",
"endpoint"
]
| [
"protected",
"list",
"<",
"string",
">",
"get",
"text",
"records",
"(",
"endpoint",
"endpoint",
")",
"{",
"map",
"<",
"string",
",",
"string",
">",
"address",
"=",
"endpoint",
"addresses",
"get",
"(",
"0",
")",
";",
"list",
"<",
"string",
">",
"txt",
"recs",
"=",
"new",
"array",
"list",
"<",
"string",
">",
"(",
")",
";",
"txt",
"recs",
"add",
"(",
"\"",
"api",
"=",
"\"",
"+",
"get",
"d",
"n",
"s",
"api",
"fragment",
"(",
"endpoint",
"api",
")",
")",
";",
"if",
"(",
"endpoint",
"address",
"type",
"equals",
"(",
"address",
"types",
"address",
"uri",
")",
")",
"{",
"uri",
"uri",
"=",
"uri",
"create",
"(",
"address",
"get",
"(",
"\"",
"uri",
"\"",
")",
")",
";",
"txt",
"recs",
"add",
"(",
"\"",
"path",
"=",
"\"",
"+",
"uri",
"get",
"path",
"(",
")",
")",
";",
"}",
"return",
"txt",
"recs",
";",
"}"
]
|
[
"customize",
"the",
"given",
"{",
"@",
"link",
"http",
"u",
"r",
"l",
"connection",
"}",
",",
"obtained",
"in",
"the",
"course",
"of",
"an",
"{",
"@",
"link",
"#",
"exists",
"(",
")",
"}",
",",
"{",
"@",
"link",
"#",
"content",
"length",
"(",
")",
"}",
"or",
"{",
"@",
"link",
"#",
"last",
"modified",
"(",
")",
"}",
"call",
"sets",
"request",
"method",
"\"",
"head",
"\"",
"by",
"default",
"can",
"be",
"overridden",
"in",
"subclasses"
]
| [
"protected",
"void",
"customize",
"connection",
"(",
"http",
"u",
"r",
"l",
"connection",
"con",
")",
"throws",
"i",
"o",
"exception",
"{",
"con",
"set",
"request",
"method",
"(",
"\"",
"head",
"\"",
")",
";",
"}"
]
|
[
"the",
"{",
"@",
"code",
"previous",
"acc",
"}",
"is",
"accumulator",
",",
"but",
"input",
"is",
"a",
"row",
"in",
"&",
"lt",
";",
"key",
",",
"accumulator",
"&",
"gt",
";",
"schema",
",",
"the",
"specific",
"generated",
"{",
"@",
"link",
"#",
"local",
"agg",
"}",
"will",
"project",
"the",
"{",
"@",
"code",
"input",
"}",
"to",
"accumulator",
"in",
"merge",
"method"
]
| [
"public",
"row",
"data",
"add",
"input",
"(",
"@",
"nullable",
"row",
"data",
"previous",
"acc",
",",
"row",
"data",
"input",
")",
"throws",
"exception",
"{",
"row",
"data",
"current",
"acc",
";",
"if",
"(",
"previous",
"acc",
"=",
"=",
"null",
")",
"{",
"current",
"acc",
"=",
"local",
"agg",
"create",
"accumulators",
"(",
")",
";",
"}",
"else",
"{",
"current",
"acc",
"=",
"previous",
"acc",
";",
"}",
"local",
"agg",
"set",
"accumulators",
"(",
"current",
"acc",
")",
";",
"local",
"agg",
"merge",
"(",
"input",
")",
";",
"return",
"local",
"agg",
"get",
"accumulators",
"(",
")",
";",
"}"
]
|
[
"configures",
"a",
"friendly",
"name",
"for",
"the",
"generator",
"this",
"will",
"be",
"used",
"by",
"the",
"generator",
"to",
"select",
"the",
"library",
"with",
"the",
"-",
"g",
"flag"
]
| [
"public",
"string",
"get",
"name",
"(",
")",
"{",
"return",
"\"",
"rust",
"-",
"server",
"\"",
";",
"}"
]
|
[
"don",
"'",
"t",
"support",
"logging",
"with",
"payload"
]
| [
"public",
"span",
"log",
"(",
"string",
"event",
"name",
",",
"object",
"payload",
")",
"{",
"return",
"this",
";",
"}"
]
|
[
"create",
"or",
"reuse",
"a",
"bt",
"indexed",
"mesh",
"instance",
"based",
"on",
"the",
"specified",
"tag",
"use",
"{",
"@",
"link",
"#",
"release",
"(",
")",
"}",
"to",
"release",
"the",
"mesh",
"when",
"it",
"'",
"s",
"no",
"longer",
"needed"
]
| [
"public",
"static",
"bt",
"indexed",
"mesh",
"obtain",
"(",
"final",
"object",
"tag",
",",
"final",
"float",
"buffer",
"vertices",
",",
"int",
"size",
"in",
"bytes",
"of",
"each",
"vertex",
",",
"int",
"vertex",
"count",
",",
"int",
"position",
"offset",
"in",
"bytes",
",",
"final",
"short",
"buffer",
"indices",
",",
"int",
"index",
"offset",
",",
"int",
"index",
"count",
")",
"{",
"if",
"(",
"tag",
"=",
"=",
"null",
")",
"throw",
"new",
"gdx",
"runtime",
"exception",
"(",
"\"",
"tag",
"cannot",
"be",
"null",
"\"",
")",
";",
"bt",
"indexed",
"mesh",
"result",
"=",
"get",
"instance",
"(",
"tag",
")",
";",
"if",
"(",
"result",
"=",
"=",
"null",
")",
"{",
"result",
"=",
"new",
"bt",
"indexed",
"mesh",
"(",
"vertices",
",",
"size",
"in",
"bytes",
"of",
"each",
"vertex",
",",
"vertex",
"count",
",",
"position",
"offset",
"in",
"bytes",
",",
"indices",
",",
"index",
"offset",
",",
"index",
"count",
")",
";",
"result",
"tag",
"=",
"tag",
";",
"instances",
"add",
"(",
"result",
")",
";",
"}",
"result",
"obtain",
"(",
")",
";",
"return",
"result",
";",
"}"
]
|
[
"returns",
"an",
"array",
"of",
"start",
"offsets",
"within",
"the",
"segment",
"of",
"the",
"first",
"byte",
"of",
"code",
"from",
"the",
"module"
]
| [
"public",
"int",
"[",
"]",
"get",
"starts",
"(",
")",
"{",
"return",
"starts",
";",
"}"
]
|
[
"creates",
"a",
"session",
"window",
"the",
"boundary",
"of",
"session",
"windows",
"are",
"defined",
"by",
"intervals",
"of",
"inactivity",
",",
"i",
"e",
",",
"a",
"session",
"window",
"is",
"closes",
"if",
"no",
"event",
"appears",
"for",
"a",
"defined",
"gap",
"period"
]
| [
"public",
"static",
"session",
"with",
"gap",
"with",
"gap",
"(",
"string",
"gap",
")",
"{",
"return",
"with",
"gap",
"(",
"expression",
"parser",
"parse",
"expression",
"(",
"gap",
")",
")",
";",
"}"
]
|
[
"render",
"the",
"given",
"model",
"and",
"view",
"this",
"is",
"the",
"last",
"stage",
"in",
"handling",
"a",
"request",
"it",
"may",
"involve",
"resolving",
"the",
"view",
"by",
"name"
]
| [
"protected",
"void",
"render",
"(",
"model",
"and",
"view",
"mv",
",",
"http",
"servlet",
"request",
"request",
",",
"http",
"servlet",
"response",
"response",
")",
"throws",
"exception",
"{",
"/",
"/",
"determine",
"locale",
"for",
"request",
"and",
"apply",
"it",
"to",
"the",
"response",
"locale",
"locale",
"=",
"(",
"this",
"locale",
"resolver",
"!",
"=",
"null",
"?",
"this",
"locale",
"resolver",
"resolve",
"locale",
"(",
"request",
")",
":",
"request",
"get",
"locale",
"(",
")",
")",
";",
"response",
"set",
"locale",
"(",
"locale",
")",
";",
"view",
"view",
";",
"string",
"view",
"name",
"=",
"mv",
"get",
"view",
"name",
"(",
")",
";",
"if",
"(",
"view",
"name",
"!",
"=",
"null",
")",
"{",
"/",
"/",
"we",
"need",
"to",
"resolve",
"the",
"view",
"name",
"view",
"=",
"resolve",
"view",
"name",
"(",
"view",
"name",
",",
"mv",
"get",
"model",
"internal",
"(",
")",
",",
"locale",
",",
"request",
")",
";",
"if",
"(",
"view",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"servlet",
"exception",
"(",
"\"",
"could",
"not",
"resolve",
"view",
"with",
"name",
"'",
"\"",
"+",
"mv",
"get",
"view",
"name",
"(",
")",
"+",
"\"",
"'",
"in",
"servlet",
"with",
"name",
"'",
"\"",
"+",
"get",
"servlet",
"name",
"(",
")",
"+",
"\"",
"'",
"\"",
")",
";",
"}",
"}",
"else",
"{",
"/",
"/",
"no",
"need",
"to",
"lookup",
":",
"the",
"model",
"and",
"view",
"object",
"contains",
"the",
"actual",
"view",
"object",
"view",
"=",
"mv",
"get",
"view",
"(",
")",
";",
"if",
"(",
"view",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"servlet",
"exception",
"(",
"\"",
"model",
"and",
"view",
"[",
"\"",
"+",
"mv",
"+",
"\"",
"]",
"neither",
"contains",
"a",
"view",
"name",
"nor",
"a",
"\"",
"+",
"\"",
"view",
"object",
"in",
"servlet",
"with",
"name",
"'",
"\"",
"+",
"get",
"servlet",
"name",
"(",
")",
"+",
"\"",
"'",
"\"",
")",
";",
"}",
"}",
"/",
"/",
"delegate",
"to",
"the",
"view",
"object",
"for",
"rendering",
"if",
"(",
"logger",
"is",
"trace",
"enabled",
"(",
")",
")",
"{",
"logger",
"trace",
"(",
"\"",
"rendering",
"view",
"[",
"\"",
"+",
"view",
"+",
"\"",
"]",
"\"",
")",
";",
"}",
"try",
"{",
"if",
"(",
"mv",
"get",
"status",
"(",
")",
"!",
"=",
"null",
")",
"{",
"response",
"set",
"status",
"(",
"mv",
"get",
"status",
"(",
")",
"value",
"(",
")",
")",
";",
"}",
"view",
"render",
"(",
"mv",
"get",
"model",
"internal",
"(",
")",
",",
"request",
",",
"response",
")",
";",
"}",
"catch",
"(",
"exception",
"ex",
")",
"{",
"if",
"(",
"logger",
"is",
"debug",
"enabled",
"(",
")",
")",
"{",
"logger",
"debug",
"(",
"\"",
"error",
"rendering",
"view",
"[",
"\"",
"+",
"view",
"+",
"\"",
"]",
"\"",
",",
"ex",
")",
";",
"}",
"throw",
"ex",
";",
"}",
"}"
]
|
[
"get",
"user",
"{",
"username",
"}",
":",
"get",
"user",
"by",
"user",
"name"
]
| [
"default",
"response",
"entity",
"<",
"user",
">",
"get",
"user",
"by",
"name",
"(",
"@",
"api",
"param",
"(",
"value",
"=",
"\"",
"the",
"name",
"that",
"needs",
"to",
"be",
"fetched",
"use",
"user",
"1",
"for",
"testing",
"\"",
",",
"required",
"=",
"true",
")",
"@",
"path",
"variable",
"(",
"\"",
"username",
"\"",
")",
"string",
"username",
")",
"{",
"get",
"request",
"(",
")",
"if",
"present",
"(",
"request",
"-",
">",
"{",
"for",
"(",
"media",
"type",
"media",
"type",
":",
"media",
"type",
"parse",
"media",
"types",
"(",
"request",
"get",
"header",
"(",
"\"",
"accept",
"\"",
")",
")",
")",
"{",
"if",
"(",
"media",
"type",
"is",
"compatible",
"with",
"(",
"media",
"type",
"value",
"of",
"(",
"\"",
"application",
"/",
"json",
"\"",
")",
")",
")",
"{",
"string",
"example",
"string",
"=",
"\"",
"{",
"\\",
"\"",
"first",
"name",
"\\",
"\"",
":",
"\\",
"\"",
"first",
"name",
"\\",
"\"",
",",
"\\",
"\"",
"last",
"name",
"\\",
"\"",
":",
"\\",
"\"",
"last",
"name",
"\\",
"\"",
",",
"\\",
"\"",
"password",
"\\",
"\"",
":",
"\\",
"\"",
"password",
"\\",
"\"",
",",
"\\",
"\"",
"user",
"status",
"\\",
"\"",
":",
"6",
",",
"\\",
"\"",
"phone",
"\\",
"\"",
":",
"\\",
"\"",
"phone",
"\\",
"\"",
",",
"\\",
"\"",
"id",
"\\",
"\"",
":",
"0",
",",
"\\",
"\"",
"email",
"\\",
"\"",
":",
"\\",
"\"",
"email",
"\\",
"\"",
",",
"\\",
"\"",
"username",
"\\",
"\"",
":",
"\\",
"\"",
"username",
"\\",
"\"",
"}",
"\"",
";",
"api",
"util",
"set",
"example",
"response",
"(",
"request",
",",
"\"",
"application",
"/",
"json",
"\"",
",",
"example",
"string",
")",
";",
"break",
";",
"}",
"if",
"(",
"media",
"type",
"is",
"compatible",
"with",
"(",
"media",
"type",
"value",
"of",
"(",
"\"",
"application",
"/",
"xml",
"\"",
")",
")",
")",
"{",
"string",
"example",
"string",
"=",
"\"",
"<",
"user",
">",
"<",
"id",
">",
"123456789",
"<",
"/",
"id",
">",
"<",
"username",
">",
"aeiou",
"<",
"/",
"username",
">",
"<",
"first",
"name",
">",
"aeiou",
"<",
"/",
"first",
"name",
">",
"<",
"last",
"name",
">",
"aeiou",
"<",
"/",
"last",
"name",
">",
"<",
"email",
">",
"aeiou",
"<",
"/",
"email",
">",
"<",
"password",
">",
"aeiou",
"<",
"/",
"password",
">",
"<",
"phone",
">",
"aeiou",
"<",
"/",
"phone",
">",
"<",
"user",
"status",
">",
"123",
"<",
"/",
"user",
"status",
">",
"<",
"/",
"user",
">",
"\"",
";",
"api",
"util",
"set",
"example",
"response",
"(",
"request",
",",
"\"",
"application",
"/",
"xml",
"\"",
",",
"example",
"string",
")",
";",
"break",
";",
"}",
"}",
"}",
")",
";",
"return",
"new",
"response",
"entity",
"<",
">",
"(",
"http",
"status",
"not",
"implemented",
")",
";",
"}"
]
|
[
"converts",
"an",
"object",
"to",
"a",
"double",
"by",
"checking",
"it",
"against",
"known",
"types",
"first"
]
| [
"public",
"static",
"double",
"object",
"to",
"double",
"(",
"object",
"value",
")",
"{",
"double",
"double",
"value",
";",
"if",
"(",
"value",
"instanceof",
"number",
")",
"{",
"double",
"value",
"=",
"(",
"(",
"number",
")",
"value",
")",
"double",
"value",
"(",
")",
";",
"}",
"else",
"if",
"(",
"value",
"instanceof",
"bytes",
"ref",
")",
"{",
"double",
"value",
"=",
"double",
"parse",
"double",
"(",
"(",
"(",
"bytes",
"ref",
")",
"value",
")",
"utf",
"8",
"to",
"string",
"(",
")",
")",
";",
"}",
"else",
"{",
"double",
"value",
"=",
"double",
"parse",
"double",
"(",
"value",
"to",
"string",
"(",
")",
")",
";",
"}",
"return",
"double",
"value",
";",
"}"
]
|
[
"checks",
"that",
"a",
"caller",
"is",
"not",
"trying",
"to",
"access",
"not",
"-",
"stored",
"graph",
"edges"
]
| [
"private",
"void",
"assert",
"keep",
"rdeps",
"(",
")",
"{",
"preconditions",
"check",
"state",
"(",
"keep",
"edges",
"(",
")",
"=",
"=",
"keep",
"edges",
"policy",
"all",
",",
"\"",
"not",
"keeping",
"rdeps",
":",
"%",
"s",
"\"",
",",
"this",
")",
";",
"}"
]
|
[
"sets",
"the",
"hole",
"radius",
"of",
"the",
"drawn",
"circles",
"default",
"radius",
"=",
"2f",
",",
"min",
"=",
"0",
"5f"
]
| [
"public",
"void",
"set",
"circle",
"hole",
"radius",
"(",
"float",
"hole",
"radius",
")",
"{",
"if",
"(",
"hole",
"radius",
">",
"=",
"0",
"5f",
")",
"{",
"m",
"circle",
"hole",
"radius",
"=",
"utils",
"convert",
"dp",
"to",
"pixel",
"(",
"hole",
"radius",
")",
";",
"}",
"else",
"{",
"log",
"e",
"(",
"\"",
"line",
"data",
"set",
"\"",
",",
"\"",
"circle",
"radius",
"cannot",
"be",
"<",
"0",
"5",
"\"",
")",
";",
"}",
"}"
]
|
[
"deletes",
"the",
"cleanup",
"timer",
"set",
"for",
"the",
"contents",
"of",
"the",
"provided",
"window"
]
| [
"protected",
"void",
"delete",
"cleanup",
"timer",
"(",
"w",
"window",
")",
"{",
"long",
"cleanup",
"time",
"=",
"cleanup",
"time",
"(",
"window",
")",
";",
"if",
"(",
"cleanup",
"time",
"=",
"=",
"long",
"max",
"value",
")",
"{",
"/",
"/",
"no",
"need",
"to",
"clean",
"up",
"because",
"we",
"didn",
"'",
"t",
"set",
"one",
"return",
";",
"}",
"if",
"(",
"window",
"assigner",
"is",
"event",
"time",
"(",
")",
")",
"{",
"trigger",
"context",
"delete",
"event",
"time",
"timer",
"(",
"cleanup",
"time",
")",
";",
"}",
"else",
"{",
"trigger",
"context",
"delete",
"processing",
"time",
"timer",
"(",
"cleanup",
"time",
")",
";",
"}",
"}"
]
|
[
"guaranteed",
"to",
"throw",
"an",
"exception",
"and",
"leave",
"the",
"map",
"unmodified"
]
| [
"public",
"final",
"boolean",
"remove",
"(",
"object",
"key",
",",
"object",
"value",
")",
"{",
"throw",
"new",
"unsupported",
"operation",
"exception",
"(",
")",
";",
"}"
]
|
[
"create",
"default",
"global",
"exception",
"handlers"
]
| [
"protected",
"void",
"create",
"default",
"end",
"states",
"(",
"final",
"flow",
"flow",
")",
"{",
"create",
"redirect",
"unauthorized",
"service",
"url",
"end",
"state",
"(",
"flow",
")",
";",
"create",
"service",
"error",
"end",
"state",
"(",
"flow",
")",
";",
"create",
"redirect",
"end",
"state",
"(",
"flow",
")",
";",
"create",
"post",
"end",
"state",
"(",
"flow",
")",
";",
"create",
"inject",
"headers",
"action",
"state",
"(",
"flow",
")",
";",
"create",
"generic",
"login",
"success",
"end",
"state",
"(",
"flow",
")",
";",
"create",
"service",
"warning",
"view",
"state",
"(",
"flow",
")",
";",
"create",
"end",
"webflow",
"end",
"state",
"(",
"flow",
")",
";",
"}"
]
|
[
"remove",
"the",
"specified",
"child",
"from",
"this",
"directory"
]
| [
"public",
"boolean",
"remove",
"child",
"(",
"i",
"node",
"child",
",",
"int",
"latest",
"snapshot",
"id",
")",
"{",
"if",
"(",
"is",
"in",
"latest",
"snapshot",
"(",
"latest",
"snapshot",
"id",
")",
")",
"{",
"/",
"/",
"create",
"snapshot",
"feature",
"if",
"necessary",
"directory",
"with",
"snapshot",
"feature",
"sf",
"=",
"this",
"get",
"directory",
"with",
"snapshot",
"feature",
"(",
")",
";",
"if",
"(",
"sf",
"=",
"=",
"null",
")",
"{",
"sf",
"=",
"this",
"add",
"snapshot",
"feature",
"(",
"null",
")",
";",
"}",
"return",
"sf",
"remove",
"child",
"(",
"this",
",",
"child",
",",
"latest",
"snapshot",
"id",
")",
";",
"}",
"return",
"remove",
"child",
"(",
"child",
")",
";",
"}"
]
|
[
"find",
"the",
"fields",
"constant",
"that",
"matches",
"name",
",",
"or",
"null",
"if",
"its",
"not",
"found"
]
| [
"public",
"static",
"fields",
"find",
"by",
"name",
"(",
"string",
"name",
")",
"{",
"return",
"by",
"name",
"get",
"(",
"name",
")",
";",
"}"
]
|
[
"indicates",
"whether",
"another",
"object",
"is",
"equal",
"to",
"this",
"converter",
"most",
"implementations",
"will",
"have",
"no",
"reason",
"to",
"override",
"the",
"behavior",
"of",
"{",
"@",
"link",
"object",
"#",
"equals",
"}",
"however",
",",
"an",
"implementation",
"may",
"also",
"choose",
"to",
"return",
"{",
"@",
"code",
"true",
"}",
"whenever",
"{",
"@",
"code",
"object",
"}",
"is",
"a",
"{",
"@",
"link",
"converter",
"}",
"that",
"it",
"considers",
"interchangeable",
"with",
"this",
"one",
"\"",
"interchangeable",
"\"",
"typically",
"means",
"that",
"{",
"@",
"code",
"objects",
"equal",
"(",
"this",
"convert",
"(",
"a",
")",
",",
"that",
"convert",
"(",
"a",
")",
")",
"}",
"is",
"true",
"for",
"all",
"{",
"@",
"code",
"a",
"}",
"of",
"type",
"{",
"@",
"code",
"a",
"}",
"(",
"and",
"similarly",
"for",
"{",
"@",
"code",
"reverse",
"}",
")",
"note",
"that",
"a",
"{",
"@",
"code",
"false",
"}",
"result",
"from",
"this",
"method",
"does",
"not",
"imply",
"that",
"the",
"converters",
"are",
"known",
"not",
"to",
"be",
"interchangeable"
]
| [
"public",
"boolean",
"equals",
"(",
"@",
"nullable",
"object",
"object",
")",
"{",
"return",
"super",
"equals",
"(",
"object",
")",
";",
"}",
"/",
"/",
"static",
"converters"
]
|
[
"calls",
"{",
"@",
"link",
"renderable",
"provider",
"#",
"get",
"renderables",
"(",
"array",
",",
"pool",
")",
"}",
"and",
"adds",
"all",
"returned",
"{",
"@",
"link",
"renderable",
"}",
"instances",
"to",
"the",
"current",
"batch",
"to",
"be",
"rendered",
"can",
"only",
"be",
"called",
"after",
"a",
"call",
"to",
"{",
"@",
"link",
"#",
"begin",
"(",
"camera",
")",
"}",
"and",
"before",
"a",
"call",
"to",
"{",
"@",
"link",
"#",
"end",
"(",
")",
"}"
]
| [
"public",
"<",
"t",
"extends",
"renderable",
"provider",
">",
"void",
"render",
"(",
"final",
"iterable",
"<",
"t",
">",
"renderable",
"providers",
")",
"{",
"for",
"(",
"final",
"renderable",
"provider",
"renderable",
"provider",
":",
"renderable",
"providers",
")",
"render",
"(",
"renderable",
"provider",
")",
";",
"}"
]
|
[
"builds",
"the",
"{",
"@",
"link",
"cc",
"compilation",
"context",
"}"
]
| [
"public",
"cc",
"compilation",
"context",
"build",
"(",
")",
"{",
"return",
"build",
"(",
"action",
"construction",
"context",
"=",
"=",
"null",
"?",
"null",
":",
"action",
"construction",
"context",
"get",
"action",
"owner",
"(",
")",
",",
"action",
"construction",
"context",
"=",
"=",
"null",
"?",
"null",
":",
"action",
"construction",
"context",
"get",
"analysis",
"environment",
"(",
")",
"get",
"middleman",
"factory",
"(",
")",
")",
";",
"}"
]
|
[
"return",
"an",
"approximate",
"count",
"of",
"key",
"-",
"value",
"mappings",
"in",
"this",
"store",
"<",
"code",
">",
"rocks",
"d",
"b",
"<",
"code",
">",
"cannot",
"return",
"an",
"exact",
"entry",
"count",
"without",
"doing",
"a",
"full",
"scan",
",",
"so",
"this",
"method",
"relies",
"on",
"the",
"<",
"code",
">",
"rocksdb",
"estimate",
"-",
"num",
"-",
"keys",
"<",
"code",
">",
"property",
"to",
"get",
"an",
"approximate",
"count",
"the",
"returned",
"size",
"also",
"includes",
"a",
"count",
"of",
"dirty",
"keys",
"in",
"the",
"store",
"'",
"s",
"in",
"-",
"memory",
"cache",
",",
"which",
"may",
"lead",
"to",
"some",
"double",
"-",
"counting",
"of",
"entries",
"and",
"inflate",
"the",
"estimate"
]
| [
"public",
"long",
"approximate",
"num",
"entries",
"(",
")",
"{",
"validate",
"store",
"open",
"(",
")",
";",
"final",
"long",
"num",
"entries",
";",
"try",
"{",
"num",
"entries",
"=",
"db",
"accessor",
"approximate",
"num",
"entries",
"(",
")",
";",
"}",
"catch",
"(",
"final",
"rocks",
"d",
"b",
"exception",
"e",
")",
"{",
"throw",
"new",
"processor",
"state",
"exception",
"(",
"\"",
"error",
"fetching",
"property",
"from",
"store",
"\"",
"+",
"name",
",",
"e",
")",
";",
"}",
"if",
"(",
"is",
"overflowing",
"(",
"num",
"entries",
")",
")",
"{",
"return",
"long",
"max",
"value",
";",
"}",
"return",
"num",
"entries",
";",
"}"
]
|
[
"return",
"an",
"array",
"of",
"aop",
"alliance",
"method",
"interceptors",
"to",
"allow",
"use",
"of",
"the",
"given",
"advisor",
"in",
"an",
"interception",
"-",
"based",
"framework",
"don",
"'",
"t",
"worry",
"about",
"the",
"pointcut",
"associated",
"with",
"the",
"{",
"@",
"link",
"advisor",
"}",
",",
"if",
"it",
"is",
"a",
"{",
"@",
"link",
"org",
"springframework",
"aop",
"pointcut",
"advisor",
"}",
":",
"just",
"return",
"an",
"interceptor"
]
| [
"method",
"interceptor",
"[",
"]",
"get",
"interceptors",
"(",
"advisor",
"advisor",
")",
"throws",
"unknown",
"advice",
"type",
"exception",
";"
]
|
[
"get",
"a",
"map",
"from",
"state",
"to",
"alt",
"subset",
"from",
"a",
"configuration",
"set",
"for",
"each",
"configuration",
"{",
"@",
"code",
"c",
"}",
"in",
"{",
"@",
"code",
"configs",
"}",
":",
"map",
"[",
"c",
"{",
"@",
"link",
"a",
"t",
"n",
"config",
"#",
"state",
"state",
"}",
"]",
"u",
"=",
"c",
"{",
"@",
"link",
"a",
"t",
"n",
"config",
"#",
"alt",
"alt",
"}"
]
| [
"public",
"static",
"map",
"<",
"a",
"t",
"n",
"state",
",",
"bit",
"set",
">",
"get",
"state",
"to",
"alt",
"map",
"(",
"a",
"t",
"n",
"config",
"set",
"configs",
")",
"{",
"map",
"<",
"a",
"t",
"n",
"state",
",",
"bit",
"set",
">",
"m",
"=",
"new",
"hash",
"map",
"<",
"a",
"t",
"n",
"state",
",",
"bit",
"set",
">",
"(",
")",
";",
"for",
"(",
"a",
"t",
"n",
"config",
"c",
":",
"configs",
")",
"{",
"bit",
"set",
"alts",
"=",
"m",
"get",
"(",
"c",
"state",
")",
";",
"if",
"(",
"alts",
"=",
"=",
"null",
")",
"{",
"alts",
"=",
"new",
"bit",
"set",
"(",
")",
";",
"m",
"put",
"(",
"c",
"state",
",",
"alts",
")",
";",
"}",
"alts",
"set",
"(",
"c",
"alt",
")",
";",
"}",
"return",
"m",
";",
"}"
]
|
[
"for",
"use",
"by",
"@",
"auto",
"codec",
"since",
"the",
"{",
"@",
"link",
"#",
"default",
"value",
"}",
"field",
"is",
"hard",
"for",
"it",
"to",
"process"
]
| [
"label",
"get",
"default",
"val",
"(",
")",
"{",
"return",
"get",
"default",
"(",
")",
";",
"}"
]
|
[
"given",
"a",
"configuration",
"get",
"the",
"bind",
"host",
"that",
"could",
"be",
"used",
"by",
"zkfc",
"we",
"derive",
"it",
"from",
"nn",
"service",
"rpc",
"bind",
"host",
"or",
"nn",
"rpc",
"bind",
"host"
]
| [
"private",
"static",
"string",
"get",
"zkfc",
"server",
"bind",
"host",
"(",
"configuration",
"conf",
")",
"{",
"string",
"addr",
"=",
"conf",
"get",
"trimmed",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"namenode",
"service",
"rpc",
"bind",
"host",
"key",
")",
";",
"if",
"(",
"addr",
"=",
"=",
"null",
"|",
"|",
"addr",
"is",
"empty",
"(",
")",
")",
"{",
"addr",
"=",
"conf",
"get",
"trimmed",
"(",
"d",
"f",
"s",
"config",
"keys",
"dfs",
"namenode",
"rpc",
"bind",
"host",
"key",
")",
";",
"}",
"return",
"addr",
";",
"}"
]
|
[
"add",
"a",
"replica",
"'",
"s",
"meta",
"information",
"into",
"the",
"map"
]
| [
"replica",
"info",
"add",
"(",
"string",
"bpid",
",",
"replica",
"info",
"replica",
"info",
")",
"{",
"check",
"block",
"pool",
"(",
"bpid",
")",
";",
"check",
"block",
"(",
"replica",
"info",
")",
";",
"try",
"(",
"auto",
"closeable",
"lock",
"l",
"=",
"write",
"lock",
"acquire",
"(",
")",
")",
"{",
"folded",
"tree",
"set",
"<",
"replica",
"info",
">",
"set",
"=",
"map",
"get",
"(",
"bpid",
")",
";",
"if",
"(",
"set",
"=",
"=",
"null",
")",
"{",
"/",
"/",
"add",
"an",
"entry",
"for",
"block",
"pool",
"if",
"it",
"does",
"not",
"exist",
"already",
"set",
"=",
"new",
"folded",
"tree",
"set",
"<",
">",
"(",
")",
";",
"map",
"put",
"(",
"bpid",
",",
"set",
")",
";",
"}",
"return",
"set",
"add",
"or",
"replace",
"(",
"replica",
"info",
")",
";",
"}",
"}"
]
|
[
"sets",
"the",
"pref",
"width",
"and",
"pref",
"height",
"to",
"the",
"specified",
"values"
]
| [
"public",
"container",
"<",
"t",
">",
"pref",
"size",
"(",
"value",
"width",
",",
"value",
"height",
")",
"{",
"if",
"(",
"width",
"=",
"=",
"null",
")",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"width",
"cannot",
"be",
"null",
"\"",
")",
";",
"if",
"(",
"height",
"=",
"=",
"null",
")",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
"\"",
"height",
"cannot",
"be",
"null",
"\"",
")",
";",
"pref",
"width",
"=",
"width",
";",
"pref",
"height",
"=",
"height",
";",
"return",
"this",
";",
"}"
]
|
[
"record",
"context",
"start",
"time"
]
| [
"public",
"static",
"void",
"start",
"(",
"final",
"string",
"name",
")",
"{",
"time",
"record",
"get",
"(",
")",
"put",
"(",
"name",
",",
"system",
"current",
"time",
"millis",
"(",
")",
")",
";",
"}"
]
|
[
"create",
"an",
"http",
"server",
"instance",
"on",
"the",
"given",
"address",
"for",
"the",
"given",
"webapp"
]
| [
"public",
"static",
"http",
"server",
"2",
"create",
"server",
"(",
"string",
"host",
",",
"int",
"port",
")",
"throws",
"i",
"o",
"exception",
"{",
"prepare",
"test",
"webapp",
"(",
")",
";",
"return",
"new",
"http",
"server",
"2",
"builder",
"(",
")",
"set",
"name",
"(",
"test",
")",
"add",
"endpoint",
"(",
"uri",
"create",
"(",
"\"",
"http",
":",
"/",
"/",
"\"",
"+",
"host",
"+",
"\"",
":",
"\"",
"+",
"port",
")",
")",
"set",
"find",
"port",
"(",
"true",
")",
"build",
"(",
")",
";",
"}"
]
|
[
"gets",
"extension",
"associated",
"with",
"files",
"in",
"the",
"given",
"resource",
"directory"
]
| [
"protected",
"abstract",
"string",
"[",
"]",
"get",
"extensions",
"(",
")",
";"
]
|
[
"adds",
"a",
"route",
"to",
"the",
"given",
"handler",
"function",
"that",
"handles",
"all",
"http",
"{",
"@",
"code",
"patch",
"}",
"requests",
"that",
"match",
"the",
"given",
"pattern",
"and",
"predicate",
"for",
"instance",
",",
"the",
"following",
"example",
"routes",
"patch",
"requests",
"for",
"\"",
"user",
"\"",
"that",
"contain",
"json",
"to",
"the",
"{",
"@",
"code",
"edit",
"user",
"}",
"method",
"in",
"{",
"@",
"code",
"user",
"controller",
"}",
":",
"<",
"pre",
"class",
"=",
"\"",
"code",
"\"",
">",
"router",
"function",
"&",
"lt",
";",
"server",
"response",
"&",
"gt",
";",
"route",
"=",
"router",
"functions",
"route",
"(",
")",
"patch",
"(",
"\"",
"user",
"\"",
",",
"request",
"predicates",
"content",
"type",
"(",
"media",
"type",
"application",
"json",
")",
",",
"user",
"controller",
":",
":",
"edit",
"user",
")",
"build",
"(",
")",
";"
]
| [
"builder",
"patch",
"(",
"string",
"pattern",
",",
"request",
"predicate",
"predicate",
",",
"handler",
"function",
"<",
"server",
"response",
">",
"handler",
"function",
")",
";"
]
|
[
"called",
"when",
"an",
"aggregation",
"is",
"operating",
"over",
"a",
"known",
"empty",
"set",
"(",
"usually",
"because",
"the",
"field",
"isn",
"'",
"t",
"specified",
")",
",",
"this",
"method",
"allows",
"for",
"returning",
"a",
"no",
"-",
"op",
"implementation",
"all",
"{",
"@",
"link",
"values",
"source",
"}",
"s",
"should",
"implement",
"this",
"method"
]
| [
"values",
"source",
"get",
"empty",
"(",
")",
";"
]
|
[
"ensure",
"that",
"our",
"estimates",
"are",
"perfect",
"in",
"at",
"least",
"some",
"cases"
]
| [
"public",
"void",
"test",
"estimate",
"size",
"(",
")",
"{",
"assert",
"equals",
"(",
"formatter",
"format",
"with",
"header",
"(",
"first",
"response",
"columns",
"(",
")",
",",
"first",
"response",
"rows",
"(",
")",
")",
"length",
"(",
")",
",",
"formatter",
"estimate",
"size",
"(",
"first",
"response",
"rows",
"(",
")",
"size",
"(",
")",
"+",
"2",
")",
")",
";",
"assert",
"equals",
"(",
"formatter",
"format",
"without",
"header",
"(",
"first",
"response",
"rows",
"(",
")",
")",
"length",
"(",
")",
",",
"formatter",
"estimate",
"size",
"(",
"first",
"response",
"rows",
"(",
")",
"size",
"(",
")",
")",
")",
";",
"}"
]
|
[
"get",
"all",
"listeners"
]
| [
"public",
"json",
"node",
"get",
"all",
"listeners",
"(",
"http",
"servlet",
"request",
"request",
",",
"http",
"servlet",
"response",
"response",
")",
"{",
"if",
"(",
"version",
"judgement",
"all",
"member",
"is",
"new",
"version",
"(",
")",
")",
"{",
"throw",
"new",
"illegal",
"state",
"exception",
"(",
"\"",
"old",
"raft",
"protocol",
"already",
"stop",
"\"",
")",
";",
"}",
"object",
"node",
"result",
"=",
"jackson",
"utils",
"create",
"empty",
"json",
"node",
"(",
")",
";",
"map",
"<",
"string",
",",
"concurrent",
"hash",
"set",
"<",
"record",
"listener",
">",
">",
"listeners",
"=",
"raft",
"core",
"get",
"listeners",
"(",
")",
";",
"array",
"node",
"listener",
"array",
"=",
"jackson",
"utils",
"create",
"empty",
"array",
"node",
"(",
")",
";",
"for",
"(",
"string",
"key",
":",
"listeners",
"key",
"set",
"(",
")",
")",
"{",
"listener",
"array",
"add",
"(",
"key",
")",
";",
"}",
"result",
"replace",
"(",
"\"",
"listeners",
"\"",
",",
"listener",
"array",
")",
";",
"return",
"result",
";",
"}"
]
|
[
"configures",
"logging",
"without",
"elasticsearch",
"configuration",
"files",
"based",
"on",
"the",
"system",
"property",
"\"",
"es",
"logger",
"level",
"\"",
"only",
"as",
"such",
",",
"any",
"logging",
"will",
"be",
"written",
"to",
"the",
"console"
]
| [
"public",
"static",
"void",
"configure",
"logging",
"without",
"config",
"(",
")",
"{",
"/",
"/",
"initialize",
"default",
"for",
"es",
"logger",
"level",
"because",
"we",
"will",
"not",
"read",
"the",
"log",
"4j",
"2",
"properties",
"final",
"string",
"logger",
"level",
"=",
"system",
"get",
"property",
"(",
"\"",
"es",
"logger",
"level",
"\"",
",",
"level",
"info",
"name",
"(",
")",
")",
";",
"final",
"settings",
"settings",
"=",
"settings",
"builder",
"(",
")",
"put",
"(",
"\"",
"logger",
"level",
"\"",
",",
"logger",
"level",
")",
"build",
"(",
")",
";",
"log",
"configurator",
"configure",
"without",
"config",
"(",
"settings",
")",
";",
"}"
]
|
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
]
| [
"private",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
]
|
[
"get",
"the",
"submit",
"time"
]
| [
"public",
"long",
"get",
"submit",
"time",
"(",
")",
"{",
"return",
"datum",
"get",
"submit",
"time",
"(",
")",
";",
"}"
]
|
[
"gets",
"the",
"redirect",
"response"
]
| [
"public",
"static",
"response",
"get",
"redirect",
"response",
"(",
"final",
"string",
"url",
",",
"final",
"map",
"<",
"string",
",",
"string",
">",
"parameters",
")",
"{",
"val",
"builder",
"=",
"new",
"string",
"builder",
"(",
"parameters",
"size",
"(",
")",
"*",
"response",
"initial",
"capacity",
")",
";",
"val",
"sanitized",
"url",
"=",
"sanitize",
"url",
"(",
"url",
")",
";",
"logger",
"trace",
"(",
"\"",
"sanitized",
"url",
"for",
"redirect",
"response",
"is",
"[",
"{",
"}",
"]",
"\"",
",",
"sanitized",
"url",
")",
";",
"val",
"fragment",
"split",
"=",
"splitter",
"on",
"(",
"\"",
"#",
"\"",
")",
"split",
"to",
"list",
"(",
"sanitized",
"url",
")",
";",
"builder",
"append",
"(",
"fragment",
"split",
"get",
"(",
"0",
")",
")",
";",
"val",
"params",
"=",
"parameters",
"entry",
"set",
"(",
")",
"stream",
"(",
")",
"filter",
"(",
"entry",
"-",
">",
"entry",
"get",
"value",
"(",
")",
"!",
"=",
"null",
")",
"map",
"(",
"entry",
"-",
">",
"string",
"join",
"(",
"\"",
"=",
"\"",
",",
"entry",
"get",
"key",
"(",
")",
",",
"encoding",
"utils",
"url",
"encode",
"(",
"entry",
"get",
"value",
"(",
")",
")",
")",
")",
"collect",
"(",
"collectors",
"joining",
"(",
"\"",
"&",
"\"",
")",
")",
";",
"if",
"(",
"!",
"params",
"is",
"empty",
"(",
")",
")",
"{",
"builder",
"append",
"(",
"fragment",
"split",
"get",
"(",
"0",
")",
"contains",
"(",
"\"",
"?",
"\"",
")",
"?",
"\"",
"&",
"\"",
":",
"\"",
"?",
"\"",
")",
";",
"builder",
"append",
"(",
"params",
")",
";",
"}",
"if",
"(",
"fragment",
"split",
"size",
"(",
")",
">",
"1",
")",
"{",
"builder",
"append",
"(",
"'",
"#",
"'",
")",
";",
"builder",
"append",
"(",
"fragment",
"split",
"get",
"(",
"1",
")",
")",
";",
"}",
"val",
"url",
"redirect",
"=",
"builder",
"to",
"string",
"(",
")",
";",
"logger",
"debug",
"(",
"\"",
"final",
"redirect",
"response",
"is",
"[",
"{",
"}",
"]",
"\"",
",",
"url",
"redirect",
")",
";",
"return",
"new",
"default",
"response",
"(",
"response",
"type",
"redirect",
",",
"url",
"redirect",
",",
"parameters",
")",
";",
"}"
]
|
[
"program",
"main",
"entry",
"point"
]
| [
"public",
"static",
"void",
"main",
"(",
"string",
"[",
"]",
"args",
")",
"{",
"var",
"data",
"1",
"=",
"new",
"data",
"(",
"1",
",",
"\"",
"data",
"1",
"\"",
",",
"data",
"data",
"type",
"type",
"1",
")",
";",
"var",
"data",
"2",
"=",
"new",
"data",
"(",
"2",
",",
"\"",
"data",
"2",
"\"",
",",
"data",
"data",
"type",
"type",
"2",
")",
";",
"var",
"data",
"3",
"=",
"new",
"data",
"(",
"3",
",",
"\"",
"data",
"3",
"\"",
",",
"data",
"data",
"type",
"type",
"3",
")",
";",
"var",
"data",
"4",
"=",
"new",
"data",
"(",
"4",
",",
"\"",
"data",
"4",
"\"",
",",
"data",
"data",
"type",
"type",
"1",
")",
";",
"var",
"shard",
"1",
"=",
"new",
"shard",
"(",
"1",
")",
";",
"var",
"shard",
"2",
"=",
"new",
"shard",
"(",
"2",
")",
";",
"var",
"shard",
"3",
"=",
"new",
"shard",
"(",
"3",
")",
";",
"var",
"manager",
"=",
"new",
"lookup",
"shard",
"manager",
"(",
")",
";",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"1",
")",
";",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"2",
")",
";",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"3",
")",
";",
"manager",
"store",
"data",
"(",
"data",
"1",
")",
";",
"manager",
"store",
"data",
"(",
"data",
"2",
")",
";",
"manager",
"store",
"data",
"(",
"data",
"3",
")",
";",
"manager",
"store",
"data",
"(",
"data",
"4",
")",
";",
"shard",
"1",
"clear",
"data",
"(",
")",
";",
"shard",
"2",
"clear",
"data",
"(",
")",
";",
"shard",
"3",
"clear",
"data",
"(",
")",
";",
"var",
"range",
"shard",
"manager",
"=",
"new",
"range",
"shard",
"manager",
"(",
")",
";",
"range",
"shard",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"1",
")",
";",
"range",
"shard",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"2",
")",
";",
"range",
"shard",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"3",
")",
";",
"range",
"shard",
"manager",
"store",
"data",
"(",
"data",
"1",
")",
";",
"range",
"shard",
"manager",
"store",
"data",
"(",
"data",
"2",
")",
";",
"range",
"shard",
"manager",
"store",
"data",
"(",
"data",
"3",
")",
";",
"range",
"shard",
"manager",
"store",
"data",
"(",
"data",
"4",
")",
";",
"shard",
"1",
"clear",
"data",
"(",
")",
";",
"shard",
"2",
"clear",
"data",
"(",
")",
";",
"shard",
"3",
"clear",
"data",
"(",
")",
";",
"var",
"hash",
"shard",
"manager",
"=",
"new",
"hash",
"shard",
"manager",
"(",
")",
";",
"hash",
"shard",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"1",
")",
";",
"hash",
"shard",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"2",
")",
";",
"hash",
"shard",
"manager",
"add",
"new",
"shard",
"(",
"shard",
"3",
")",
";",
"hash",
"shard",
"manager",
"store",
"data",
"(",
"data",
"1",
")",
";",
"hash",
"shard",
"manager",
"store",
"data",
"(",
"data",
"2",
")",
";",
"hash",
"shard",
"manager",
"store",
"data",
"(",
"data",
"3",
")",
";",
"hash",
"shard",
"manager",
"store",
"data",
"(",
"data",
"4",
")",
";",
"shard",
"1",
"clear",
"data",
"(",
")",
";",
"shard",
"2",
"clear",
"data",
"(",
")",
";",
"shard",
"3",
"clear",
"data",
"(",
")",
";",
"}"
]
|
[
"convenience",
"method",
"to",
"run",
"the",
"given",
"task",
"on",
"the",
"swing",
"thread",
"now",
"if",
"swing",
"or",
"later",
"if",
"not"
]
| [
"protected",
"void",
"swing",
"(",
"runnable",
"r",
")",
"{",
"swing",
"run",
"if",
"swing",
"or",
"run",
"later",
"(",
"r",
")",
";",
"}"
]
|
[
"register",
"a",
"listener",
"that",
"will",
"be",
"called",
"when",
"this",
"model",
"is",
"unbound",
"from",
"a",
"view",
"the",
"listener",
"will",
"contribute",
"to",
"this",
"model",
"'",
"s",
"hash",
"code",
"state",
"per",
"the",
"{",
"@",
"link",
"com",
"airbnb",
"epoxy",
"epoxy",
"attribute",
"option",
"#",
"do",
"not",
"hash",
"}",
"rules",
"you",
"may",
"clear",
"the",
"listener",
"by",
"setting",
"a",
"null",
"value",
",",
"or",
"by",
"calling",
"{",
"@",
"link",
"#",
"reset",
"(",
")",
"}"
]
| [
"public",
"base",
"model",
"view",
"model",
"on",
"unbind",
"(",
"on",
"model",
"unbound",
"listener",
"<",
"base",
"model",
"view",
"model",
",",
"base",
"model",
"view",
">",
"listener",
")",
"{",
"on",
"mutation",
"(",
")",
";",
"this",
"on",
"model",
"unbound",
"listener",
"epoxy",
"generated",
"model",
"=",
"listener",
";",
"return",
"this",
";",
"}"
]
|
[
"test",
"the",
"case",
"where",
"the",
"libjars",
",",
"files",
"and",
"archives",
"arguments",
"contains",
"an",
"empty",
"token",
",",
"which",
"should",
"create",
"an",
"illegal",
"argument",
"exception"
]
| [
"public",
"void",
"test",
"empty",
"filenames",
"(",
")",
"throws",
"exception",
"{",
"list",
"<",
"pair",
"<",
"string",
",",
"string",
">",
">",
"args",
"and",
"conf",
"names",
"=",
"new",
"array",
"list",
"<",
"pair",
"<",
"string",
",",
"string",
">",
">",
"(",
")",
";",
"args",
"and",
"conf",
"names",
"add",
"(",
"new",
"pair",
"<",
"string",
",",
"string",
">",
"(",
"\"",
"-",
"libjars",
"\"",
",",
"\"",
"tmpjars",
"\"",
")",
")",
";",
"args",
"and",
"conf",
"names",
"add",
"(",
"new",
"pair",
"<",
"string",
",",
"string",
">",
"(",
"\"",
"-",
"files",
"\"",
",",
"\"",
"tmpfiles",
"\"",
")",
")",
";",
"args",
"and",
"conf",
"names",
"add",
"(",
"new",
"pair",
"<",
"string",
",",
"string",
">",
"(",
"\"",
"-",
"archives",
"\"",
",",
"\"",
"tmparchives",
"\"",
")",
")",
";",
"for",
"(",
"pair",
"<",
"string",
",",
"string",
">",
"arg",
"and",
"conf",
"name",
":",
"args",
"and",
"conf",
"names",
")",
"{",
"string",
"arg",
"=",
"arg",
"and",
"conf",
"name",
"get",
"first",
"(",
")",
";",
"file",
"tmp",
"file",
"one",
"=",
"new",
"file",
"(",
"test",
"dir",
",",
"\"",
"tmpfile",
"1",
"\"",
")",
";",
"path",
"tmp",
"path",
"one",
"=",
"new",
"path",
"(",
"tmp",
"file",
"one",
"to",
"string",
"(",
")",
")",
";",
"file",
"tmp",
"file",
"two",
"=",
"new",
"file",
"(",
"test",
"dir",
",",
"\"",
"tmpfile",
"2",
"\"",
")",
";",
"path",
"tmp",
"path",
"two",
"=",
"new",
"path",
"(",
"tmp",
"file",
"two",
"to",
"string",
"(",
")",
")",
";",
"local",
"fs",
"create",
"(",
"tmp",
"path",
"one",
")",
";",
"local",
"fs",
"create",
"(",
"tmp",
"path",
"two",
")",
";",
"string",
"[",
"]",
"args",
"=",
"new",
"string",
"[",
"2",
"]",
";",
"args",
"[",
"0",
"]",
"=",
"arg",
";",
"/",
"/",
"create",
"an",
"empty",
"path",
"in",
"between",
"two",
"valid",
"files",
",",
"/",
"/",
"which",
"prior",
"to",
"hadoop",
"-",
"10820",
"used",
"to",
"result",
"in",
"the",
"/",
"/",
"working",
"directory",
"being",
"added",
"to",
"\"",
"tmpjars",
"\"",
"(",
"or",
"equivalent",
")",
"args",
"[",
"1",
"]",
"=",
"string",
"format",
"(",
"\"",
"%",
"s",
",",
",",
"%",
"s",
"\"",
",",
"tmp",
"file",
"one",
"to",
"u",
"r",
"i",
"(",
")",
"to",
"string",
"(",
")",
",",
"tmp",
"file",
"two",
"to",
"u",
"r",
"i",
"(",
")",
"to",
"string",
"(",
")",
")",
";",
"try",
"{",
"new",
"generic",
"options",
"parser",
"(",
"conf",
",",
"args",
")",
";",
"fail",
"(",
"\"",
"expected",
"exception",
"for",
"empty",
"filename",
"\"",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"/",
"/",
"expect",
"to",
"receive",
"an",
"illegal",
"argument",
"exception",
"generic",
"test",
"utils",
"assert",
"exception",
"contains",
"(",
"\"",
"file",
"name",
"can",
"'",
"t",
"be",
"\"",
"+",
"\"",
"empty",
"string",
"\"",
",",
"e",
")",
";",
"}",
"/",
"/",
"test",
"zero",
"file",
"list",
"length",
"-",
"it",
"should",
"create",
"an",
"exception",
"args",
"[",
"1",
"]",
"=",
"\"",
",",
",",
"\"",
";",
"try",
"{",
"new",
"generic",
"options",
"parser",
"(",
"conf",
",",
"args",
")",
";",
"fail",
"(",
"\"",
"expected",
"exception",
"for",
"zero",
"file",
"list",
"length",
"\"",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"/",
"/",
"expect",
"to",
"receive",
"an",
"illegal",
"argument",
"exception",
"generic",
"test",
"utils",
"assert",
"exception",
"contains",
"(",
"\"",
"file",
"name",
"can",
"'",
"t",
"be",
"\"",
"+",
"\"",
"empty",
"string",
"\"",
",",
"e",
")",
";",
"}",
"/",
"/",
"test",
"filename",
"with",
"space",
"character",
"/",
"/",
"it",
"should",
"create",
"exception",
"from",
"parser",
"in",
"uri",
"class",
"/",
"/",
"due",
"to",
"uri",
"syntax",
"error",
"args",
"[",
"1",
"]",
"=",
"string",
"format",
"(",
"\"",
"%",
"s",
",",
",",
"%",
"s",
"\"",
",",
"tmp",
"file",
"one",
"to",
"u",
"r",
"i",
"(",
")",
"to",
"string",
"(",
")",
",",
"tmp",
"file",
"two",
"to",
"u",
"r",
"i",
"(",
")",
"to",
"string",
"(",
")",
")",
";",
"try",
"{",
"new",
"generic",
"options",
"parser",
"(",
"conf",
",",
"args",
")",
";",
"fail",
"(",
"\"",
"expected",
"exception",
"for",
"filename",
"with",
"space",
"character",
"\"",
")",
";",
"}",
"catch",
"(",
"illegal",
"argument",
"exception",
"e",
")",
"{",
"/",
"/",
"expect",
"to",
"receive",
"an",
"illegal",
"argument",
"exception",
"generic",
"test",
"utils",
"assert",
"exception",
"contains",
"(",
"\"",
"u",
"r",
"i",
"syntax",
"exception",
"\"",
",",
"e",
")",
";",
"}",
"}",
"}"
]
|
[
"convert",
"the",
"given",
"object",
"to",
"string",
"with",
"each",
"line",
"indented",
"by",
"4",
"spaces",
"(",
"except",
"the",
"first",
"line",
")"
]
| [
"private",
"string",
"to",
"indented",
"string",
"(",
"object",
"o",
")",
"{",
"if",
"(",
"o",
"=",
"=",
"null",
")",
"{",
"return",
"\"",
"null",
"\"",
";",
"}",
"return",
"o",
"to",
"string",
"(",
")",
"replace",
"(",
"\"",
"\\",
"n",
"\"",
",",
"\"",
"\\",
"n",
"\"",
")",
";",
"}"
]
|
[
"returns",
"the",
"number",
"of",
"sub",
"-",
"filters",
"in",
"this",
"combined",
"filter"
]
| [
"public",
"int",
"get",
"filter",
"count",
"(",
")",
"{",
"return",
"filters",
"size",
"(",
")",
";",
"}"
]
|
[
"remove",
"specific",
"role"
]
| [
"public",
"abstract",
"boolean",
"rem",
"role",
"(",
"role",
"role",
")",
";"
]
|
[
"{",
"@",
"code",
"true",
"}",
"if",
"pong",
"frames",
"should",
"not",
"be",
"forwarded"
]
| [
"public",
"builder",
"drop",
"pong",
"frames",
"(",
"boolean",
"drop",
"pong",
"frames",
")",
"{",
"this",
"drop",
"pong",
"frames",
"=",
"drop",
"pong",
"frames",
";",
"return",
"this",
";",
"}"
]
|
[
"test",
"the",
"property",
"'",
"name",
"'"
]
| [
"public",
"void",
"name",
"test",
"(",
")",
"{",
"/",
"/",
"todo",
":",
"test",
"name",
"}"
]
|
[
"gets",
"the",
"preferred",
"resource",
"of",
"this",
"stream",
"transformation"
]
| [
"public",
"resource",
"spec",
"get",
"preferred",
"resources",
"(",
")",
"{",
"return",
"preferred",
"resources",
";",
"}"
]
|
[
"sets",
"a",
"custom",
"row",
"filter",
"transformer",
"the",
"default",
"row",
"transformer",
"will",
"gather",
"strings",
"for",
"each",
"column",
"in",
"the",
"table",
"and",
"use",
"those",
"strings",
"for",
"filtering",
"this",
"method",
"allows",
"the",
"user",
"to",
"have",
"complete",
"control",
"on",
"generating",
"the",
"strings",
"used",
"to",
"filter",
"a",
"table",
"row",
";",
"for",
"example",
",",
"to",
"only",
"filter",
"on",
"some",
"columns",
"but",
"not",
"others"
]
| [
"public",
"void",
"set",
"filter",
"row",
"transformer",
"(",
"row",
"filter",
"transformer",
"<",
"row",
"object",
">",
"transformer",
")",
"{",
"this",
"transformer",
"=",
"transformer",
";",
"update",
"table",
"contents",
"(",
")",
";",
"}"
]
|
[
"decrypt",
"the",
"target",
"encrpted",
"private",
"key",
"file"
]
| [
"input",
"stream",
"decrypt",
"private",
"key",
"(",
"string",
"private",
"key",
"encrypt",
"path",
",",
"boolean",
"for",
"client",
")",
"throws",
"i",
"o",
"exception",
";"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
[
"specifies",
"that",
"each",
"value",
"(",
"not",
"key",
")",
"stored",
"in",
"the",
"cache",
"should",
"be",
"wrapped",
"in",
"a",
"{",
"@",
"link",
"weak",
"reference",
"}",
"(",
"by",
"default",
",",
"strong",
"references",
"are",
"used",
")",
"weak",
"values",
"will",
"be",
"garbage",
"collected",
"once",
"they",
"are",
"weakly",
"reachable",
"this",
"makes",
"them",
"a",
"poor",
"candidate",
"for",
"caching",
";",
"consider",
"{",
"@",
"link",
"#",
"soft",
"values",
"}",
"instead",
"<",
"b",
">",
"note",
":",
"<",
"b",
">",
"when",
"this",
"method",
"is",
"used",
",",
"the",
"resulting",
"cache",
"will",
"use",
"identity",
"(",
"{",
"@",
"code",
"=",
"=",
"}",
")",
"comparison",
"to",
"determine",
"equality",
"of",
"values",
"entries",
"with",
"values",
"that",
"have",
"been",
"garbage",
"collected",
"may",
"be",
"counted",
"in",
"{",
"@",
"link",
"cache",
"#",
"size",
"}",
",",
"but",
"will",
"never",
"be",
"visible",
"to",
"read",
"or",
"write",
"operations",
";",
"such",
"entries",
"are",
"cleaned",
"up",
"as",
"part",
"of",
"the",
"routine",
"maintenance",
"described",
"in",
"the",
"class",
"javadoc"
]
| [
"public",
"cache",
"builder",
"<",
"k",
",",
"v",
">",
"weak",
"values",
"(",
")",
"{",
"return",
"set",
"value",
"strength",
"(",
"strength",
"weak",
")",
";",
"}"
]
|
[
"process",
"client",
"beat"
]
| [
"public",
"void",
"process",
"client",
"beat",
"(",
"final",
"rs",
"info",
"rs",
"info",
")",
"{",
"client",
"beat",
"processor",
"client",
"beat",
"processor",
"=",
"new",
"client",
"beat",
"processor",
"(",
")",
";",
"client",
"beat",
"processor",
"set",
"service",
"(",
"this",
")",
";",
"client",
"beat",
"processor",
"set",
"rs",
"info",
"(",
"rs",
"info",
")",
";",
"health",
"check",
"reactor",
"schedule",
"now",
"(",
"client",
"beat",
"processor",
")",
";",
"}"
]
|
[
"get",
"any",
"child",
"path",
"elements",
"under",
"any",
"{",
"@",
"code",
"base",
"}",
"path",
",",
"or",
"an",
"empty",
"list",
"if",
"there",
"is",
"either",
":",
"no",
"{",
"@",
"code",
"base",
"}",
"path",
"element",
",",
"or",
"no",
"child",
"entries",
"under",
"it",
"the",
"list",
"may",
"be",
"immutable",
"or",
"may",
"be",
"a",
"view",
"of",
"the",
"underlying",
"list",
"both",
"the",
"parameter",
"list",
"and",
"the",
"returned",
"list",
"must",
"not",
"be",
"modified"
]
| [
"public",
"static",
"list",
"<",
"string",
">",
"base",
"path",
"children",
"(",
"list",
"<",
"string",
">",
"elements",
")",
"{",
"int",
"index",
"=",
"elements",
"index",
"of",
"(",
"base",
")",
";",
"if",
"(",
"index",
"<",
"0",
")",
"{",
"return",
"collections",
"empty",
"list",
"(",
")",
";",
"}",
"int",
"len",
"=",
"elements",
"size",
"(",
")",
";",
"if",
"(",
"index",
"=",
"=",
"len",
"-",
"1",
")",
"{",
"/",
"/",
"empty",
"index",
"return",
"collections",
"empty",
"list",
"(",
")",
";",
"}",
"else",
"{",
"return",
"elements",
"sub",
"list",
"(",
"index",
"+",
"1",
",",
"len",
")",
";",
"}",
"}"
]
|
[
"if",
"set",
"to",
"true",
",",
"the",
"load",
"balancer",
"will",
"send",
"a",
"301",
"redirect",
"for",
"all",
"http",
"connections",
",",
"asking",
"the",
"clients",
"to",
"use",
"https",
"<",
"code",
">",
"bool",
"https",
"redirect",
"=",
"1",
";",
"<",
"code",
">"
]
| [
"public",
"boolean",
"get",
"https",
"redirect",
"(",
")",
"{",
"return",
"https",
"redirect",
";",
"}"
]
|
[
"set",
"the",
"file",
"encryption",
"info",
"for",
"an",
"i",
"node"
]
| [
"static",
"void",
"set",
"file",
"encryption",
"info",
"(",
"final",
"f",
"s",
"directory",
"fsd",
",",
"final",
"i",
"nodes",
"in",
"path",
"iip",
",",
"final",
"file",
"encryption",
"info",
"info",
",",
"final",
"x",
"attr",
"set",
"flag",
"flag",
")",
"throws",
"i",
"o",
"exception",
"{",
"/",
"/",
"make",
"the",
"pb",
"for",
"the",
"xattr",
"final",
"hdfs",
"protos",
"per",
"file",
"encryption",
"info",
"proto",
"proto",
"=",
"p",
"b",
"helper",
"client",
"convert",
"per",
"file",
"enc",
"info",
"(",
"info",
")",
";",
"final",
"byte",
"[",
"]",
"proto",
"bytes",
"=",
"proto",
"to",
"byte",
"array",
"(",
")",
";",
"final",
"x",
"attr",
"file",
"encryption",
"attr",
"=",
"x",
"attr",
"helper",
"build",
"x",
"attr",
"(",
"crypto",
"xattr",
"file",
"encryption",
"info",
",",
"proto",
"bytes",
")",
";",
"final",
"list",
"<",
"x",
"attr",
">",
"x",
"attrs",
"=",
"lists",
"new",
"array",
"list",
"with",
"capacity",
"(",
"1",
")",
";",
"x",
"attrs",
"add",
"(",
"file",
"encryption",
"attr",
")",
";",
"fsd",
"write",
"lock",
"(",
")",
";",
"try",
"{",
"f",
"s",
"dir",
"x",
"attr",
"op",
"unprotected",
"set",
"x",
"attrs",
"(",
"fsd",
",",
"iip",
",",
"x",
"attrs",
",",
"enum",
"set",
"of",
"(",
"flag",
")",
")",
";",
"}",
"finally",
"{",
"fsd",
"write",
"unlock",
"(",
")",
";",
"}",
"}"
]
|
[
"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",
"\"",
")",
";",
"}"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.