docstring_tokens
list | code_tokens
list |
---|---|
[
"<",
"!",
"-",
"-",
"begin",
"-",
"user",
"-",
"doc",
"-",
"-",
">",
"<",
"!",
"-",
"-",
"end",
"-",
"user",
"-",
"doc",
"-",
"-",
">"
] | [
"if",
"(",
"base",
"class",
"=",
"=",
"digital",
"actor",
"class",
")",
"{",
"switch",
"(",
"derived",
"feature",
"i",
"d",
")",
"{",
"case",
"model",
"package",
"dual",
"button",
"led",
"digital",
"state",
":",
"return",
"model",
"package",
"digital",
"actor",
"digital",
"state",
";",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
"if",
"(",
"base",
"class",
"=",
"=",
"m",
"t",
"f",
"config",
"consumer",
"class",
")",
"{",
"switch",
"(",
"derived",
"feature",
"i",
"d",
")",
"{",
"case",
"model",
"package",
"dual",
"button",
"led",
"tf",
"config",
":",
"return",
"model",
"package",
"mtf",
"config",
"consumer",
"tf",
"config",
";",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
"return",
"super",
"e",
"base",
"structural",
"feature",
"i",
"d",
"(",
"derived",
"feature",
"i",
"d",
",",
"base",
"class",
")",
";"
] |
[
"<",
"!",
"-",
"-",
"begin",
"-",
"user",
"-",
"doc",
"-",
"-",
">",
"<",
"!",
"-",
"-",
"end",
"-",
"user",
"-",
"doc",
"-",
"-",
">"
] | [
"if",
"(",
"base",
"class",
"=",
"=",
"digital",
"actor",
"class",
")",
"{",
"switch",
"(",
"base",
"feature",
"i",
"d",
")",
"{",
"case",
"model",
"package",
"digital",
"actor",
"digital",
"state",
":",
"return",
"model",
"package",
"dual",
"button",
"led",
"digital",
"state",
";",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
"if",
"(",
"base",
"class",
"=",
"=",
"m",
"t",
"f",
"config",
"consumer",
"class",
")",
"{",
"switch",
"(",
"base",
"feature",
"i",
"d",
")",
"{",
"case",
"model",
"package",
"mtf",
"config",
"consumer",
"tf",
"config",
":",
"return",
"model",
"package",
"dual",
"button",
"led",
"tf",
"config",
";",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
"return",
"super",
"e",
"derived",
"structural",
"feature",
"i",
"d",
"(",
"base",
"feature",
"i",
"d",
",",
"base",
"class",
")",
";"
] |
[
"<",
"!",
"-",
"-",
"begin",
"-",
"user",
"-",
"doc",
"-",
"-",
">",
"<",
"!",
"-",
"-",
"end",
"-",
"user",
"-",
"doc",
"-",
"-",
">"
] | [
"if",
"(",
"base",
"class",
"=",
"=",
"digital",
"actor",
"class",
")",
"{",
"switch",
"(",
"base",
"operation",
"i",
"d",
")",
"{",
"case",
"model",
"package",
"digital",
"actor",
"turn",
"digital",
"highlowvalue",
":",
"return",
"model",
"package",
"dual",
"button",
"led",
"turn",
"digital",
"highlowvalue",
";",
"case",
"model",
"package",
"digital",
"actor",
"fetch",
"digital",
"value",
":",
"return",
"model",
"package",
"dual",
"button",
"led",
"fetch",
"digital",
"value",
";",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
"if",
"(",
"base",
"class",
"=",
"=",
"m",
"t",
"f",
"config",
"consumer",
"class",
")",
"{",
"switch",
"(",
"base",
"operation",
"i",
"d",
")",
"{",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
"return",
"super",
"e",
"derived",
"operation",
"i",
"d",
"(",
"base",
"operation",
"i",
"d",
",",
"base",
"class",
")",
";"
] |
[
"<",
"!",
"-",
"-",
"begin",
"-",
"user",
"-",
"doc",
"-",
"-",
">",
"<",
"!",
"-",
"-",
"end",
"-",
"user",
"-",
"doc",
"-",
"-",
">"
] | [
"switch",
"(",
"operation",
"i",
"d",
")",
"{",
"case",
"model",
"package",
"dual",
"button",
"led",
"turn",
"digital",
"highlowvalue",
":",
"turn",
"digital",
"(",
"(",
"high",
"low",
"value",
")",
"arguments",
"get",
"(",
"0",
")",
")",
";",
"return",
"null",
";",
"case",
"model",
"package",
"dual",
"button",
"led",
"fetch",
"digital",
"value",
":",
"fetch",
"digital",
"value",
"(",
")",
";",
"return",
"null",
";",
"case",
"model",
"package",
"dual",
"button",
"led",
"init",
":",
"init",
"(",
")",
";",
"return",
"null",
";",
"case",
"model",
"package",
"dual",
"button",
"led",
"enable",
":",
"enable",
"(",
")",
";",
"return",
"null",
";",
"case",
"model",
"package",
"dual",
"button",
"led",
"disable",
":",
"disable",
"(",
")",
";",
"return",
"null",
";",
"}",
"return",
"super",
"e",
"invoke",
"(",
"operation",
"i",
"d",
",",
"arguments",
")",
";"
] |
[
"method",
"to",
"replace",
"string",
"join",
"since",
"it",
"was",
"only",
"introduced",
"in",
"java",
"8"
] | [
"string",
"joined",
"=",
"\"",
"\"",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"i",
"+",
"+",
")",
"joined",
"+",
"=",
"array",
"[",
"i",
"]",
";",
"return",
"joined",
";"
] |
[
"returns",
"wether",
"the",
"emoji",
"supports",
"the",
"fitzpatrick",
"modifiers",
"or",
"not"
] | [
"return",
"this",
"supports",
"fitzpatrick",
";"
] |
[
"returns",
"the",
"aliases",
"of",
"the",
"emoji"
] | [
"return",
"this",
"aliases",
";"
] |
[
"returns",
"the",
"unicode",
"representation",
"of",
"the",
"emoji"
] | [
"return",
"this",
"unicode",
";"
] |
[
"returns",
"the",
"html",
"decimal",
"representation",
"of",
"the",
"emoji"
] | [
"return",
"this",
"html",
"dec",
";"
] |
[
"returns",
"the",
"html",
"hexadecimal",
"representation",
"of",
"the",
"emoji"
] | [
"return",
"this",
"html",
"hex",
";"
] |
[
"gets",
"creation",
"time",
"attempts",
"to",
"parse",
"the",
"value",
"as",
"a",
"{",
"@",
"link",
"zoned",
"date",
"time",
"}",
"otherwise",
"assumes",
"a",
"{",
"@",
"link",
"local",
"date",
"time",
"}",
"and",
"converts",
"it",
"based",
"on",
"system",
"s",
"default",
"zone"
] | [
"val",
"dt",
"=",
"date",
"time",
"utils",
"zoned",
"date",
"time",
"of",
"(",
"this",
"creation",
"time",
")",
";",
"if",
"(",
"dt",
"!",
"=",
"null",
")",
"{",
"return",
"dt",
";",
"}",
"val",
"lt",
"=",
"date",
"time",
"utils",
"local",
"date",
"time",
"of",
"(",
"this",
"creation",
"time",
")",
";",
"return",
"date",
"time",
"utils",
"zoned",
"date",
"time",
"of",
"(",
"lt",
"at",
"zone",
"(",
"zone",
"id",
"system",
"default",
"(",
")",
")",
")",
";"
] |
[
"put",
"property"
] | [
"if",
"(",
"string",
"utils",
"is",
"blank",
"(",
"value",
")",
")",
"{",
"this",
"properties",
"remove",
"(",
"key",
")",
";",
"}",
"else",
"{",
"this",
"properties",
"put",
"(",
"key",
",",
"value",
")",
";",
"}"
] |
[
"get",
"property"
] | [
"return",
"this",
"properties",
"get",
"(",
"key",
")",
";"
] |
[
"put",
"geo",
"location"
] | [
"put",
"geo",
"accuracy",
"(",
"location",
"get",
"accuracy",
"(",
")",
")",
";",
"put",
"geo",
"latitude",
"(",
"location",
"get",
"latitude",
"(",
")",
")",
";",
"put",
"geo",
"longitude",
"(",
"location",
"get",
"longitude",
"(",
")",
")",
";",
"put",
"geo",
"timestamp",
"(",
"location",
"get",
"timestamp",
"(",
")",
")",
";"
] |
[
"possible",
"values",
":",
"<",
"ul",
">",
"<",
"li",
">",
"true",
"<",
"/",
"li",
">",
"<",
"li",
">",
"false",
"<",
"/",
"li",
">",
"<",
"li",
">",
"yes",
"<",
"/",
"li",
">",
"<",
"li",
">",
"no",
"<",
"/",
"li",
">",
"<",
"/",
"ul",
">"
] | [
"this",
"dry",
"run",
"=",
"dry",
"run",
";",
"return",
"this",
";"
] |
[
"this",
"is",
"a",
"mandatory",
"parameter",
"example",
"value",
":",
"old"
] | [
"this",
"from",
"=",
"from",
";",
"return",
"this",
";"
] |
[
"example",
"value",
":",
"my",
"old",
"project"
] | [
"this",
"project",
"=",
"project",
";",
"return",
"this",
";"
] |
[
"example",
"value",
":",
"au",
"-",
"tpxb",
"-",
"-",
"i",
"u",
"5",
"ovu",
"d",
"2",
"f",
"ly"
] | [
"this",
"project",
"id",
"=",
"project",
"id",
";",
"return",
"this",
";"
] |
[
"this",
"is",
"a",
"mandatory",
"parameter",
"example",
"value",
":",
"new"
] | [
"this",
"to",
"=",
"to",
";",
"return",
"this",
";"
] |
[
"{"
] | [
"start",
"grids",
"multi",
"threaded",
"(",
"3",
")",
";",
"ignite",
"cache",
"<",
"integer",
",",
"test",
"object",
">",
"cache",
"=",
"grid",
"(",
"0",
")",
"cache",
"(",
"default",
"cache",
"name",
")",
";",
"assert",
"cache",
"!",
"=",
"null",
";",
"test",
"object",
"o",
"=",
"create",
"object",
"with",
"data",
"(",
"1",
")",
";",
"cache",
"put",
"(",
"1",
",",
"o",
")",
";",
"cache",
"put",
"(",
"2",
",",
"new",
"test",
"object",
"(",
"2",
")",
")",
";",
"cache",
"put",
"(",
"3",
",",
"new",
"test",
"object",
"(",
"3",
")",
")",
";"
] |
[
"{"
] | [
"stmt",
"=",
"driver",
"manager",
"get",
"connection",
"(",
"base",
"url",
")",
"create",
"statement",
"(",
")",
";",
"assert",
"stmt",
"!",
"=",
"null",
";",
"assert",
"!",
"stmt",
"is",
"closed",
"(",
")",
";"
] |
[
"stop",
"the",
"client",
"disconnecting",
"any",
"servers"
] | [
"synchronized",
"(",
"this",
"monitor",
")",
"{",
"if",
"(",
"this",
"server",
"thread",
"!",
"=",
"null",
")",
"{",
"this",
"server",
"thread",
"close",
"(",
")",
";",
"try",
"{",
"this",
"server",
"thread",
"join",
"(",
"2000",
")",
";",
"}",
"catch",
"(",
"interrupted",
"exception",
"ex",
")",
"{",
"thread",
"current",
"thread",
"(",
")",
"interrupt",
"(",
")",
";",
"}",
"this",
"server",
"thread",
"=",
"null",
";",
"}",
"}"
] |
[
"<",
"p",
">",
"the",
"state",
"of",
"query",
"execution",
"<",
"code",
">",
"queued",
"<",
"/",
"code",
">",
"state",
"is",
"listed",
"but",
"is",
"not",
"used",
"by",
"athena",
"and",
"is",
"reserved",
"for",
"future",
"use",
"<",
"code",
">",
"running",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"has",
"been",
"submitted",
"to",
"the",
"service",
"and",
"athena",
"will",
"execute",
"the",
"query",
"as",
"soon",
"as",
"resources",
"are",
"available",
"<",
"code",
">",
"succeeded",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"completed",
"without",
"error",
"<",
"code",
">",
"failed",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"experienced",
"an",
"error",
"and",
"did",
"not",
"complete",
"processing",
"<",
"code",
">",
"cancelled",
"<",
"/",
"code",
">",
"indicates",
"that",
"user",
"input",
"interrupted",
"query",
"execution",
"<",
"/",
"p",
">"
] | [
"set",
"state",
"(",
"state",
")",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"the",
"state",
"of",
"query",
"execution",
"<",
"code",
">",
"queued",
"<",
"/",
"code",
">",
"state",
"is",
"listed",
"but",
"is",
"not",
"used",
"by",
"athena",
"and",
"is",
"reserved",
"for",
"future",
"use",
"<",
"code",
">",
"running",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"has",
"been",
"submitted",
"to",
"the",
"service",
"and",
"athena",
"will",
"execute",
"the",
"query",
"as",
"soon",
"as",
"resources",
"are",
"available",
"<",
"code",
">",
"succeeded",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"completed",
"without",
"error",
"<",
"code",
">",
"failed",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"experienced",
"an",
"error",
"and",
"did",
"not",
"complete",
"processing",
"<",
"code",
">",
"cancelled",
"<",
"/",
"code",
">",
"indicates",
"that",
"user",
"input",
"interrupted",
"query",
"execution",
"<",
"/",
"p",
">"
] | [
"with",
"state",
"(",
"state",
")",
";"
] |
[
"<",
"p",
">",
"the",
"state",
"of",
"query",
"execution",
"<",
"code",
">",
"queued",
"<",
"/",
"code",
">",
"state",
"is",
"listed",
"but",
"is",
"not",
"used",
"by",
"athena",
"and",
"is",
"reserved",
"for",
"future",
"use",
"<",
"code",
">",
"running",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"has",
"been",
"submitted",
"to",
"the",
"service",
"and",
"athena",
"will",
"execute",
"the",
"query",
"as",
"soon",
"as",
"resources",
"are",
"available",
"<",
"code",
">",
"succeeded",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"completed",
"without",
"error",
"<",
"code",
">",
"failed",
"<",
"/",
"code",
">",
"indicates",
"that",
"the",
"query",
"experienced",
"an",
"error",
"and",
"did",
"not",
"complete",
"processing",
"<",
"code",
">",
"cancelled",
"<",
"/",
"code",
">",
"indicates",
"that",
"user",
"input",
"interrupted",
"query",
"execution",
"<",
"/",
"p",
">"
] | [
"this",
"state",
"=",
"state",
"to",
"string",
"(",
")",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"further",
"detail",
"about",
"the",
"status",
"of",
"the",
"query",
"<",
"/",
"p",
">"
] | [
"this",
"state",
"change",
"reason",
"=",
"state",
"change",
"reason",
";"
] |
[
"<",
"p",
">",
"further",
"detail",
"about",
"the",
"status",
"of",
"the",
"query",
"<",
"/",
"p",
">"
] | [
"return",
"this",
"state",
"change",
"reason",
";"
] |
[
"<",
"p",
">",
"further",
"detail",
"about",
"the",
"status",
"of",
"the",
"query",
"<",
"/",
"p",
">"
] | [
"set",
"state",
"change",
"reason",
"(",
"state",
"change",
"reason",
")",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"the",
"date",
"and",
"time",
"that",
"the",
"query",
"was",
"submitted",
"<",
"/",
"p",
">"
] | [
"this",
"submission",
"date",
"time",
"=",
"submission",
"date",
"time",
";"
] |
[
"<",
"p",
">",
"the",
"date",
"and",
"time",
"that",
"the",
"query",
"was",
"submitted",
"<",
"/",
"p",
">"
] | [
"return",
"this",
"submission",
"date",
"time",
";"
] |
[
"<",
"p",
">",
"the",
"date",
"and",
"time",
"that",
"the",
"query",
"was",
"submitted",
"<",
"/",
"p",
">"
] | [
"set",
"submission",
"date",
"time",
"(",
"submission",
"date",
"time",
")",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"the",
"date",
"and",
"time",
"that",
"the",
"query",
"completed",
"<",
"/",
"p",
">"
] | [
"this",
"completion",
"date",
"time",
"=",
"completion",
"date",
"time",
";"
] |
[
"<",
"p",
">",
"the",
"date",
"and",
"time",
"that",
"the",
"query",
"completed",
"<",
"/",
"p",
">"
] | [
"return",
"this",
"completion",
"date",
"time",
";"
] |
[
"<",
"p",
">",
"the",
"date",
"and",
"time",
"that",
"the",
"query",
"completed",
"<",
"/",
"p",
">"
] | [
"set",
"completion",
"date",
"time",
"(",
"completion",
"date",
"time",
")",
";",
"return",
"this",
";"
] |
[
"create",
"a",
"resized",
"image",
"to",
"fulfill",
"the",
"max",
"width",
"/",
"max",
"height",
"quality",
"and",
"rotation",
"values"
] | [
"bitmap",
"factory",
"options",
"image",
"options",
"=",
"new",
"bitmap",
"factory",
"options",
"(",
")",
";",
"image",
"options",
"in",
"scaled",
"=",
"false",
";",
"image",
"options",
"in",
"sample",
"size",
"=",
"1",
";",
"if",
"(",
"image",
"config",
"max",
"width",
"!",
"=",
"0",
"|",
"|",
"image",
"config",
"max",
"height",
"!",
"=",
"0",
")",
"{",
"while",
"(",
"(",
"image",
"config",
"max",
"width",
"=",
"=",
"0",
"|",
"|",
"initial",
"width",
">",
"2",
"*",
"image",
"config",
"max",
"width",
")",
"&",
"&",
"(",
"image",
"config",
"max",
"height",
"=",
"=",
"0",
"|",
"|",
"initial",
"height",
">",
"2",
"*",
"image",
"config",
"max",
"height",
")",
")",
"{",
"image",
"options",
"in",
"sample",
"size",
"*",
"=",
"2",
";",
"initial",
"height",
"/",
"=",
"2",
";",
"initial",
"width",
"/",
"=",
"2",
";",
"}",
"}",
"bitmap",
"photo",
"=",
"bitmap",
"factory",
"decode",
"file",
"(",
"image",
"config",
"original",
"get",
"absolute",
"path",
"(",
")",
",",
"image",
"options",
")",
";",
"if",
"(",
"photo",
"=",
"=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"image",
"config",
"result",
"=",
"image",
"config",
";",
"bitmap",
"scaled",
"photo",
"=",
"null",
";",
"if",
"(",
"image",
"config",
"max",
"width",
"=",
"=",
"0",
"|",
"|",
"image",
"config",
"max",
"width",
">",
"initial",
"width",
")",
"{",
"result",
"=",
"result",
"with",
"max",
"width",
"(",
"initial",
"width",
")",
";",
"}",
"if",
"(",
"image",
"config",
"max",
"height",
"=",
"=",
"0",
"|",
"|",
"image",
"config",
"max",
"width",
">",
"initial",
"height",
")",
"{",
"result",
"=",
"result",
"with",
"max",
"height",
"(",
"initial",
"height",
")",
";",
"}",
"double",
"width",
"ratio",
"=",
"(",
"double",
")",
"result",
"max",
"width",
"/",
"initial",
"width",
";",
"double",
"height",
"ratio",
"=",
"(",
"double",
")",
"result",
"max",
"height",
"/",
"initial",
"height",
";",
"double",
"ratio",
"=",
"(",
"width",
"ratio",
"<",
"height",
"ratio",
")",
"?",
"width",
"ratio",
":",
"height",
"ratio",
";",
"matrix",
"matrix",
"=",
"new",
"matrix",
"(",
")",
";",
"matrix",
"post",
"rotate",
"(",
"result",
"rotation",
")",
";",
"matrix",
"post",
"scale",
"(",
"(",
"float",
")",
"ratio",
",",
"(",
"float",
")",
"ratio",
")",
";",
"exif",
"interface",
"exif",
";",
"try",
"{",
"exif",
"=",
"new",
"exif",
"interface",
"(",
"result",
"original",
"get",
"absolute",
"path",
"(",
")",
")",
";",
"int",
"orientation",
"=",
"exif",
"get",
"attribute",
"int",
"(",
"exif",
"interface",
"tag",
"orientation",
",",
"0",
")",
";",
"switch",
"(",
"orientation",
")",
"{",
"case",
"6",
":",
"matrix",
"post",
"rotate",
"(",
"90",
")",
";",
"break",
";",
"case",
"3",
":",
"matrix",
"post",
"rotate",
"(",
"180",
")",
";",
"break",
";",
"case",
"8",
":",
"matrix",
"post",
"rotate",
"(",
"270",
")",
";",
"break",
";",
"}",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"}",
"scaled",
"photo",
"=",
"bitmap",
"create",
"bitmap",
"(",
"photo",
",",
"0",
",",
"0",
",",
"photo",
"get",
"width",
"(",
")",
",",
"photo",
"get",
"height",
"(",
")",
",",
"matrix",
",",
"true",
")",
";",
"byte",
"array",
"output",
"stream",
"bytes",
"=",
"new",
"byte",
"array",
"output",
"stream",
"(",
")",
";",
"scaled",
"photo",
"compress",
"(",
"bitmap",
"compress",
"format",
"jpeg",
",",
"result",
"quality",
",",
"bytes",
")",
";",
"final",
"boolean",
"force",
"local",
"=",
"request",
"code",
"=",
"=",
"request",
"launch",
"image",
"capture",
";",
"final",
"file",
"resized",
"=",
"create",
"new",
"file",
"(",
"context",
",",
"options",
",",
"!",
"force",
"local",
")",
";",
"if",
"(",
"resized",
"=",
"=",
"null",
")",
"{",
"if",
"(",
"photo",
"!",
"=",
"null",
")",
"{",
"photo",
"recycle",
"(",
")",
";",
"photo",
"=",
"null",
";",
"}",
"if",
"(",
"scaled",
"photo",
"!",
"=",
"null",
")",
"{",
"scaled",
"photo",
"recycle",
"(",
")",
";",
"scaled",
"photo",
"=",
"null",
";",
"}",
"return",
"image",
"config",
";",
"}",
"result",
"=",
"result",
"with",
"resized",
"file",
"(",
"resized",
")",
";",
"try",
"(",
"file",
"output",
"stream",
"fos",
"=",
"new",
"file",
"output",
"stream",
"(",
"result",
"resized",
")",
")",
"{",
"bytes",
"write",
"to",
"(",
"fos",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"}",
"if",
"(",
"photo",
"!",
"=",
"null",
")",
"{",
"photo",
"recycle",
"(",
")",
";",
"photo",
"=",
"null",
";",
"}",
"if",
"(",
"scaled",
"photo",
"!",
"=",
"null",
")",
"{",
"scaled",
"photo",
"recycle",
"(",
")",
";",
"scaled",
"photo",
"=",
"null",
";",
"}",
"return",
"result",
";"
] |
[
"move",
"a",
"file",
"from",
"one",
"location",
"to",
"another"
] | [
"file",
"channel",
"old",
"channel",
"=",
"null",
";",
"file",
"channel",
"new",
"channel",
"=",
"null",
";",
"try",
"{",
"old",
"channel",
"=",
"new",
"file",
"input",
"stream",
"(",
"old",
"file",
")",
"get",
"channel",
"(",
")",
";",
"new",
"channel",
"=",
"new",
"file",
"output",
"stream",
"(",
"new",
"file",
")",
"get",
"channel",
"(",
")",
";",
"old",
"channel",
"transfer",
"to",
"(",
"0",
",",
"old",
"channel",
"size",
"(",
")",
",",
"new",
"channel",
")",
";",
"old",
"file",
"delete",
"(",
")",
";",
"}",
"finally",
"{",
"try",
"{",
"if",
"(",
"old",
"channel",
"!",
"=",
"null",
")",
"old",
"channel",
"close",
"(",
")",
";",
"if",
"(",
"new",
"channel",
"!",
"=",
"null",
")",
"new",
"channel",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"i",
"o",
"exception",
"e",
")",
"{",
"e",
"print",
"stack",
"trace",
"(",
")",
";",
"}",
"}"
] |
[
"<",
"p",
">",
"specifies",
"the",
"status",
"code",
"that",
"is",
"used",
"to",
"map",
"the",
"integration",
"response",
"to",
"an",
"existing",
"<",
"a",
">",
"method",
"response",
"<",
"/",
"a",
">",
"<",
"/",
"p",
">"
] | [
"set",
"status",
"code",
"(",
"status",
"code",
")",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"specifies",
"the",
"regular",
"expression",
"(",
"regex",
")",
"pattern",
"used",
"to",
"choose",
"an",
"integration",
"response",
"based",
"on",
"the",
"response",
"from",
"the",
"back",
"end",
"for",
"example",
"if",
"the",
"success",
"response",
"returns",
"nothing",
"and",
"the",
"error",
"response",
"returns",
"some",
"string",
"you",
"could",
"use",
"the",
"<",
"code",
">",
"+",
"<",
"/",
"code",
">",
"regex",
"to",
"match",
"error",
"response",
"however",
"make",
"sure",
"that",
"the",
"error",
"response",
"does",
"not",
"contain",
"any",
"newline",
"(",
"<",
"code",
">",
"\\",
"n",
"<",
"/",
"code",
">",
")",
"character",
"in",
"such",
"cases",
"if",
"the",
"back",
"end",
"is",
"an",
"aws",
"lambda",
"function",
"the",
"aws",
"lambda",
"function",
"error",
"header",
"is",
"matched",
"for",
"all",
"other",
"http",
"and",
"aws",
"back",
"ends",
"the",
"http",
"status",
"code",
"is",
"matched",
"<",
"/",
"p",
">"
] | [
"set",
"selection",
"pattern",
"(",
"selection",
"pattern",
")",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"a",
"key",
"-",
"value",
"map",
"specifying",
"response",
"parameters",
"that",
"are",
"passed",
"to",
"the",
"method",
"response",
"from",
"the",
"back",
"end",
"the",
"key",
"is",
"a",
"method",
"response",
"header",
"parameter",
"name",
"and",
"the",
"mapped",
"value",
"is",
"an",
"integration",
"response",
"header",
"value",
"a",
"static",
"value",
"enclosed",
"within",
"a",
"pair",
"of",
"single",
"quotes",
"or",
"a",
"json",
"expression",
"from",
"the",
"integration",
"response",
"body",
"the",
"mapping",
"key",
"must",
"match",
"the",
"pattern",
"of",
"<",
"code",
">",
"method",
"response",
"header",
"{",
"name",
"}",
"<",
"/",
"code",
">",
"where",
"<",
"code",
">",
"name",
"<",
"/",
"code",
">",
"is",
"a",
"valid",
"and",
"unique",
"header",
"name",
"the",
"mapped",
"non",
"-",
"static",
"value",
"must",
"match",
"the",
"pattern",
"of",
"<",
"code",
">",
"integration",
"response",
"header",
"{",
"name",
"}",
"<",
"/",
"code",
">",
"or",
"<",
"code",
">",
"integration",
"response",
"body",
"{",
"json",
"-",
"expression",
"}",
"<",
"/",
"code",
">",
"where",
"<",
"code",
">",
"name",
"<",
"/",
"code",
">",
"is",
"a",
"valid",
"and",
"unique",
"response",
"header",
"name",
"and",
"<",
"code",
">",
"json",
"-",
"expression",
"<",
"/",
"code",
">",
"is",
"a",
"valid",
"json",
"expression",
"without",
"the",
"<",
"code",
">",
"$",
"<",
"/",
"code",
">",
"prefix",
"<",
"/",
"p",
">"
] | [
"set",
"response",
"parameters",
"(",
"response",
"parameters",
")",
";",
"return",
"this",
";"
] |
[
"removes",
"all",
"the",
"entries",
"added",
"into",
"response",
"parameters"
] | [
"this",
"response",
"parameters",
"=",
"null",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"specifies",
"the",
"templates",
"used",
"to",
"transform",
"the",
"integration",
"response",
"body",
"response",
"templates",
"are",
"represented",
"as",
"a",
"key",
"/",
"value",
"map",
"with",
"a",
"content",
"-",
"type",
"as",
"the",
"key",
"and",
"a",
"template",
"as",
"the",
"value",
"<",
"/",
"p",
">"
] | [
"set",
"response",
"templates",
"(",
"response",
"templates",
")",
";",
"return",
"this",
";"
] |
[
"removes",
"all",
"the",
"entries",
"added",
"into",
"response",
"templates"
] | [
"this",
"response",
"templates",
"=",
"null",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"specifies",
"how",
"to",
"handle",
"response",
"payload",
"content",
"type",
"conversions",
"supported",
"values",
"are",
"<",
"code",
">",
"convert",
"to",
"binary",
"<",
"/",
"code",
">",
"and",
"<",
"code",
">",
"convert",
"to",
"text",
"<",
"/",
"code",
">",
"with",
"the",
"following",
"behaviors",
":",
"<",
"/",
"p",
">",
"<",
"ul",
">",
"<",
"li",
">",
"<",
"p",
">",
"<",
"code",
">",
"convert",
"to",
"binary",
"<",
"/",
"code",
">",
":",
"converts",
"a",
"response",
"payload",
"from",
"a",
"base",
"6",
"4",
"-",
"encoded",
"string",
"to",
"the",
"corresponding",
"binary",
"blob",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"<",
"code",
">",
"convert",
"to",
"text",
"<",
"/",
"code",
">",
":",
"converts",
"a",
"response",
"payload",
"from",
"a",
"binary",
"blob",
"to",
"a",
"base",
"6",
"4",
"-",
"encoded",
"string",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"/",
"ul",
">",
"<",
"p",
">",
"if",
"this",
"property",
"is",
"not",
"defined",
"the",
"response",
"payload",
"will",
"be",
"passed",
"through",
"from",
"the",
"integration",
"response",
"to",
"the",
"method",
"response",
"without",
"modification",
"<",
"/",
"p",
">"
] | [
"set",
"content",
"handling",
"(",
"content",
"handling",
")",
";",
"return",
"this",
";"
] |
[
"<",
"p",
">",
"specifies",
"how",
"to",
"handle",
"response",
"payload",
"content",
"type",
"conversions",
"supported",
"values",
"are",
"<",
"code",
">",
"convert",
"to",
"binary",
"<",
"/",
"code",
">",
"and",
"<",
"code",
">",
"convert",
"to",
"text",
"<",
"/",
"code",
">",
"with",
"the",
"following",
"behaviors",
":",
"<",
"/",
"p",
">",
"<",
"ul",
">",
"<",
"li",
">",
"<",
"p",
">",
"<",
"code",
">",
"convert",
"to",
"binary",
"<",
"/",
"code",
">",
":",
"converts",
"a",
"response",
"payload",
"from",
"a",
"base",
"6",
"4",
"-",
"encoded",
"string",
"to",
"the",
"corresponding",
"binary",
"blob",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"li",
">",
"<",
"p",
">",
"<",
"code",
">",
"convert",
"to",
"text",
"<",
"/",
"code",
">",
":",
"converts",
"a",
"response",
"payload",
"from",
"a",
"binary",
"blob",
"to",
"a",
"base",
"6",
"4",
"-",
"encoded",
"string",
"<",
"/",
"p",
">",
"<",
"/",
"li",
">",
"<",
"/",
"ul",
">",
"<",
"p",
">",
"if",
"this",
"property",
"is",
"not",
"defined",
"the",
"response",
"payload",
"will",
"be",
"passed",
"through",
"from",
"the",
"integration",
"response",
"to",
"the",
"method",
"response",
"without",
"modification",
"<",
"/",
"p",
">"
] | [
"this",
"content",
"handling",
"=",
"content",
"handling",
"to",
"string",
"(",
")",
";",
"return",
"this",
";"
] |
[
"list",
"files",
"in",
"the",
"directory",
"recursively"
] | [
"return",
"list",
"files",
"rec",
"(",
"root",
",",
"null",
")",
";"
] |
[
"list",
"files",
"in",
"the",
"directory"
] | [
"return",
"list",
"files",
"(",
"root",
",",
"null",
")",
";"
] |
[
"list",
"files",
"in",
"the",
"directory",
"when",
"looking",
"for",
"files",
"only",
"ending",
"with",
"suffix"
] | [
"file",
"[",
"]",
"files",
"=",
"root",
"list",
"files",
"(",
"new",
"filename",
"filter",
"(",
")",
"{",
"@",
"override",
"public",
"boolean",
"accept",
"(",
"file",
"dir",
",",
"string",
"name",
")",
"{",
"if",
"(",
"suffix",
"!",
"=",
"null",
"&",
"&",
"!",
"suffix",
"is",
"empty",
"(",
")",
")",
"{",
"return",
"suffix",
"!",
"=",
"null",
"&",
"&",
"!",
"suffix",
"is",
"empty",
"(",
")",
"&",
"&",
"name",
"ends",
"with",
"(",
"suffix",
")",
";",
"}",
"else",
"{",
"return",
"true",
";",
"}",
"}",
"}",
")",
";",
"if",
"(",
"files",
"=",
"=",
"null",
")",
"{",
"return",
"new",
"array",
"list",
"<",
">",
"(",
")",
";",
"}",
"return",
"arrays",
"as",
"list",
"(",
"files",
")",
";"
] |
[
"create",
"bom",
"stripped",
"reader",
"from",
"the",
"stream",
"charset",
"of",
"the",
"reader",
"is",
"set",
"to",
"utf",
"-",
"8",
"utf",
"-",
"16",
"or",
"system",
"s",
"default"
] | [
"return",
"create",
"b",
"o",
"m",
"stripped",
"reader",
"(",
"stream",
",",
"charset",
"default",
"charset",
"(",
")",
"name",
"(",
")",
")",
";"
] |
[
"gets",
"a",
"value",
"indicating",
"a",
"utf",
"encoding",
"if",
"the",
"array",
"starts",
"with",
"a",
"known",
"byte",
"sequence"
] | [
"for",
"(",
"map",
"entry",
"<",
"string",
",",
"byte",
"[",
"]",
">",
"entry",
":",
"boms",
"entry",
"set",
"(",
")",
")",
"{",
"string",
"encoding",
"=",
"entry",
"get",
"key",
"(",
")",
";",
"byte",
"[",
"]",
"bom",
"=",
"entry",
"get",
"value",
"(",
")",
";",
"if",
"(",
"sig",
"length",
">",
"bom",
"length",
")",
"{",
"int",
"i",
"=",
"0",
";",
"while",
"(",
"i",
"<",
"bom",
"length",
"&",
"&",
"sig",
"[",
"i",
"]",
"=",
"=",
"bom",
"[",
"i",
"]",
")",
"{",
"i",
"+",
"+",
";",
"}",
"if",
"(",
"i",
"=",
"=",
"bom",
"length",
")",
"{",
"return",
"encoding",
";",
"}",
"}",
"}",
"return",
"null",
";"
] |
[
"gets",
"a",
"value",
"indicating",
"the",
"number",
"of",
"utf",
"bom",
"bytes",
"at",
"the",
"start",
"of",
"an",
"array"
] | [
"string",
"encoding",
"=",
"find",
"b",
"o",
"m",
"encoding",
"(",
"sig",
")",
";",
"if",
"(",
"encoding",
"!",
"=",
"null",
")",
"{",
"byte",
"[",
"]",
"bom",
"=",
"boms",
"get",
"(",
"encoding",
")",
";",
"return",
"bom",
"length",
";",
"}",
"return",
"0",
";"
] |
[
"checks",
"if",
"the",
"meta",
"region",
"location",
"is",
"available"
] | [
"return",
"get",
"meta",
"region",
"location",
"(",
"zkw",
")",
"!",
"=",
"null",
";"
] |
[
"gets",
"the",
"meta",
"regions",
"and",
"their",
"locations",
"for",
"the",
"given",
"path",
"and",
"replica",
"id"
] | [
"server",
"name",
"server",
"name",
"=",
"get",
"meta",
"region",
"location",
"(",
"zkw",
",",
"replica",
"id",
")",
";",
"list",
"<",
"pair",
"<",
"region",
"info",
",",
"server",
"name",
">",
">",
"list",
"=",
"new",
"array",
"list",
"<",
">",
"(",
"1",
")",
";",
"list",
"add",
"(",
"new",
"pair",
"<",
">",
"(",
"region",
"replica",
"util",
"get",
"region",
"info",
"for",
"replica",
"(",
"region",
"info",
"builder",
"first",
"meta",
"regioninfo",
",",
"replica",
"id",
")",
",",
"server",
"name",
")",
")",
";",
"return",
"list",
";"
] |
[
"gets",
"the",
"meta",
"regions",
"for",
"the",
"given",
"path",
"with",
"the",
"default",
"replica",
"id"
] | [
"return",
"get",
"meta",
"regions",
"(",
"zkw",
",",
"region",
"info",
"default",
"replica",
"id",
")",
";"
] |
[
"gets",
"the",
"meta",
"regions",
"for",
"the",
"given",
"path",
"and",
"replica",
"id"
] | [
"list",
"<",
"pair",
"<",
"region",
"info",
",",
"server",
"name",
">",
">",
"result",
";",
"result",
"=",
"get",
"meta",
"regions",
"and",
"locations",
"(",
"zkw",
",",
"replica",
"id",
")",
";",
"return",
"get",
"list",
"of",
"region",
"infos",
"(",
"result",
")",
";"
] |
[
"gets",
"the",
"meta",
"region",
"location",
"if",
"available",
"does",
"not",
"block"
] | [
"try",
"{",
"region",
"state",
"state",
"=",
"get",
"meta",
"region",
"state",
"(",
"zkw",
")",
";",
"return",
"state",
"is",
"opened",
"(",
")",
"?",
"state",
"get",
"server",
"name",
"(",
")",
":",
"null",
";",
"}",
"catch",
"(",
"keeper",
"exception",
"ke",
")",
"{",
"return",
"null",
";",
"}"
] |
[
"gets",
"the",
"meta",
"region",
"location",
"if",
"available",
"does",
"not",
"block"
] | [
"try",
"{",
"region",
"state",
"state",
"=",
"get",
"meta",
"region",
"state",
"(",
"zkw",
",",
"replica",
"id",
")",
";",
"return",
"state",
"is",
"opened",
"(",
")",
"?",
"state",
"get",
"server",
"name",
"(",
")",
":",
"null",
";",
"}",
"catch",
"(",
"keeper",
"exception",
"ke",
")",
"{",
"return",
"null",
";",
"}"
] |
[
"gets",
"the",
"meta",
"region",
"location",
"if",
"available",
"and",
"waits",
"for",
"up",
"to",
"the",
"specified",
"timeout",
"if",
"not",
"immediately",
"available",
"given",
"the",
"zookeeper",
"notification",
"could",
"be",
"delayed",
"we",
"will",
"try",
"to",
"get",
"the",
"latest",
"data"
] | [
"return",
"wait",
"meta",
"region",
"location",
"(",
"zkw",
",",
"region",
"info",
"default",
"replica",
"id",
",",
"timeout",
")",
";"
] |
[
"verify",
"<",
"code",
">",
"hbase",
":",
"meta",
"<",
"/",
"code",
">",
"is",
"deployed",
"and",
"accessible"
] | [
"return",
"verify",
"meta",
"region",
"location",
"(",
"h",
"connection",
",",
"zkw",
",",
"timeout",
",",
"region",
"info",
"default",
"replica",
"id",
")",
";"
] |
[
"gets",
"a",
"connection",
"to",
"the",
"server",
"hosting",
"meta",
"as",
"reported",
"by",
"zoo",
"keeper",
"waiting",
"up",
"to",
"the",
"specified",
"timeout",
"for",
"availability"
] | [
"return",
"get",
"cached",
"connection",
"(",
"connection",
",",
"wait",
"meta",
"region",
"location",
"(",
"zkw",
",",
"replica",
"id",
",",
"timeout",
")",
")",
";"
] |
[
"sets",
"the",
"location",
"of",
"<",
"code",
">",
"hbase",
":",
"meta",
"<",
"/",
"code",
">",
"in",
"zoo",
"keeper",
"to",
"the",
"specified",
"server",
"address"
] | [
"set",
"meta",
"location",
"(",
"zookeeper",
",",
"server",
"name",
",",
"region",
"info",
"default",
"replica",
"id",
",",
"state",
")",
";"
] |
[
"load",
"the",
"meta",
"region",
"state",
"from",
"the",
"meta",
"server",
"z",
"node"
] | [
"return",
"get",
"meta",
"region",
"state",
"(",
"zkw",
",",
"region",
"info",
"default",
"replica",
"id",
")",
";"
] |
[
"deletes",
"the",
"location",
"of",
"<",
"code",
">",
"hbase",
":",
"meta",
"<",
"/",
"code",
">",
"in",
"zoo",
"keeper"
] | [
"delete",
"meta",
"location",
"(",
"zookeeper",
",",
"region",
"info",
"default",
"replica",
"id",
")",
";"
] |
[
"wait",
"until",
"the",
"meta",
"region",
"is",
"available",
"and",
"is",
"not",
"in",
"transition"
] | [
"return",
"block",
"until",
"available",
"(",
"zkw",
",",
"region",
"info",
"default",
"replica",
"id",
",",
"timeout",
")",
";"
] |
[
"wait",
"until",
"the",
"meta",
"region",
"is",
"available",
"and",
"is",
"not",
"in",
"transition"
] | [
"if",
"(",
"timeout",
"<",
"0",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
")",
";",
"}",
"if",
"(",
"zkw",
"=",
"=",
"null",
")",
"{",
"throw",
"new",
"illegal",
"argument",
"exception",
"(",
")",
";",
"}",
"long",
"start",
"time",
"=",
"system",
"current",
"time",
"millis",
"(",
")",
";",
"server",
"name",
"sn",
"=",
"null",
";",
"while",
"(",
"true",
")",
"{",
"sn",
"=",
"get",
"meta",
"region",
"location",
"(",
"zkw",
",",
"replica",
"id",
")",
";",
"if",
"(",
"sn",
"!",
"=",
"null",
"|",
"|",
"(",
"system",
"current",
"time",
"millis",
"(",
")",
"-",
"start",
"time",
")",
">",
"timeout",
"-",
"h",
"constants",
"socket",
"retry",
"wait",
"ms",
")",
"{",
"break",
";",
"}",
"thread",
"sleep",
"(",
"h",
"constants",
"socket",
"retry",
"wait",
"ms",
")",
";",
"}",
"return",
"sn",
";"
] |
[
"{"
] | [
"bind",
"(",
"git",
"hub",
"service",
"client",
"class",
")",
"to",
"(",
"git",
"hub",
"service",
"client",
"impl",
"class",
")",
"in",
"(",
"singleton",
"class",
")",
";",
"gin",
"multibinder",
"new",
"set",
"binder",
"(",
"binder",
"(",
")",
",",
"o",
"auth",
"2",
"authenticator",
"class",
")",
"add",
"binding",
"(",
")",
"to",
"(",
"git",
"hub",
"authenticator",
"impl",
"class",
")",
";",
"gin",
"multibinder",
"new",
"set",
"binder",
"(",
"binder",
"(",
")",
",",
"import",
"wizard",
"registrar",
"class",
")",
"add",
"binding",
"(",
")",
"to",
"(",
"git",
"hub",
"import",
"wizard",
"registrar",
"class",
")",
";"
] |
[
"return",
"uuid",
"value",
"the",
"returned",
"value",
"is",
"never",
"{",
"@",
"code",
"null",
"}"
] | [
"if",
"(",
"uid",
"get",
"(",
")",
"=",
"=",
"null",
")",
"{",
"uid",
"compare",
"and",
"set",
"(",
"null",
",",
"uuid",
"random",
"u",
"u",
"i",
"d",
"(",
")",
"to",
"string",
"(",
")",
")",
";",
"}",
"return",
"uid",
"get",
"(",
")",
";"
] |
[
"method",
"with",
"only",
"{",
"@",
"link",
"manage",
"#",
"role",
"admin",
"}",
"access"
] | [
"role",
"admin",
"}",
")",
"public",
"string",
"admin",
"(",
")",
"{",
"return",
"result",
";"
] |
[
"method",
"with",
"only",
"{",
"@",
"link",
"manage",
"#",
"role",
"manager",
"}",
"access"
] | [
"role",
"manager",
"}",
")",
"public",
"string",
"manage",
"(",
")",
"{",
"return",
"result",
";"
] |
[
"unprotected",
"method"
] | [
"return",
"result",
";"
] |
[
"sets",
"the",
"class",
"of",
"the",
"serializer",
"implementation"
] | [
"string",
"class",
"name",
"=",
"clazz",
"=",
"=",
"null",
"?",
"null",
":",
"clazz",
"get",
"name",
"(",
")",
";",
"return",
"set",
"class",
"name",
"(",
"class",
"name",
")",
";"
] |
[
"sets",
"the",
"class",
"name",
"of",
"the",
"serializer",
"implementation"
] | [
"this",
"class",
"name",
"=",
"class",
"name",
";",
"return",
"this",
";"
] |
[
"sets",
"the",
"serializer",
"implementation",
"instance",
"<",
"br",
"/",
">",
"serializer",
"must",
"be",
"instance",
"of",
"either",
"{",
"@",
"link",
"com",
"hazelcast",
"nio",
"serialization",
"stream",
"serializer",
"}",
"or",
"{",
"@",
"link",
"com",
"hazelcast",
"nio",
"serialization",
"byte",
"array",
"serializer",
"}"
] | [
"this",
"implementation",
"=",
"implementation",
";",
"return",
"this",
";"
] |
[
"gets",
"the",
"type",
"of",
"the",
"class",
"that",
"will",
"be",
"serialized",
"via",
"this",
"implementation"
] | [
"return",
"type",
"class",
";"
] |
[
"sets",
"the",
"type",
"of",
"the",
"class",
"that",
"will",
"be",
"serialized",
"via",
"this",
"implementation"
] | [
"this",
"type",
"class",
"=",
"type",
"class",
";",
"return",
"this",
";"
] |
[
"gets",
"the",
"name",
"of",
"the",
"class",
"that",
"will",
"be",
"serialized",
"via",
"this",
"implementation"
] | [
"return",
"type",
"class",
"name",
";"
] |
[
"this",
"method",
"is",
"called",
"only",
"if",
"type",
"class",
"is",
"not",
"set",
"if",
"type",
"class",
"is",
"not",
"set",
"class",
"will",
"try",
"to",
"be",
"loaded",
"from",
"class",
"loader",
"via",
"given",
"class",
"name",
"using",
"this",
"method"
] | [
"this",
"type",
"class",
"name",
"=",
"type",
"class",
"name",
";",
"return",
"this",
";"
] |
[
"register",
"these",
"with",
"hk2",
"service",
"locator",
"to",
"manage",
"their",
"lifecycle",
"using",
"spring"
] | [
"if",
"(",
"ctx",
"=",
"=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"annotation",
"utils",
"find",
"annotation",
"(",
"component",
",",
"component",
"class",
")",
"!",
"=",
"null",
")",
"{",
"string",
"[",
"]",
"bean",
"names",
"=",
"ctx",
"get",
"bean",
"names",
"for",
"type",
"(",
"component",
")",
";",
"if",
"(",
"bean",
"names",
"=",
"=",
"null",
"|",
"|",
"bean",
"names",
"length",
"!",
"=",
"1",
")",
"{",
"logger",
"severe",
"(",
"localization",
"messages",
"none",
"or",
"multiple",
"beans",
"available",
"(",
"component",
")",
")",
";",
"return",
"false",
";",
"}",
"string",
"bean",
"name",
"=",
"bean",
"names",
"[",
"0",
"]",
";",
"binding",
"binding",
"=",
"bindings",
"supplier",
"(",
"new",
"spring",
"managed",
"bean",
"factory",
"(",
"ctx",
",",
"injection",
"manager",
",",
"bean",
"name",
")",
")",
"to",
"(",
"component",
")",
"to",
"(",
"provider",
"contracts",
")",
";",
"injection",
"manager",
"register",
"(",
"binding",
")",
";",
"logger",
"config",
"(",
"localization",
"messages",
"bean",
"registered",
"(",
"bean",
"names",
"[",
"0",
"]",
")",
")",
";",
"return",
"true",
";",
"}",
"return",
"false",
";"
] |
[
"looking",
"for",
"nums",
"[",
"0",
"]",
"<",
"nums",
"[",
"1",
"]",
">",
"nums",
"[",
"2",
"]",
"<",
"nums",
"[",
"3",
"]",
"and",
"so",
"on"
] | [
"if",
"(",
"arr",
"length",
"=",
"=",
"0",
")",
"{",
"return",
";",
"}",
"int",
"k",
"=",
"arr",
"length",
"/",
"2",
";",
"kth",
"element",
"in",
"array",
"kth",
"element",
"in",
"array",
"=",
"new",
"kth",
"element",
"in",
"array",
"(",
")",
";",
"kth",
"element",
"in",
"array",
"kth",
"element",
"(",
"arr",
",",
"k",
")",
";",
"int",
"mid",
"=",
"arr",
"[",
"k",
"]",
";",
"int",
"n",
"=",
"arr",
"length",
";",
"int",
"i",
"=",
"0",
",",
"j",
"=",
"0",
";",
"k",
"=",
"n",
"-",
"1",
";",
"while",
"(",
"j",
"<",
"=",
"k",
")",
"{",
"if",
"(",
"arr",
"[",
"next",
"(",
"j",
",",
"n",
")",
"]",
">",
"mid",
")",
"{",
"swap",
"(",
"arr",
",",
"next",
"(",
"i",
"+",
"+",
",",
"n",
")",
",",
"next",
"(",
"j",
"+",
"+",
",",
"n",
")",
")",
";",
"}",
"else",
"if",
"(",
"arr",
"[",
"next",
"(",
"j",
",",
"n",
")",
"]",
"<",
"mid",
")",
"{",
"swap",
"(",
"arr",
",",
"next",
"(",
"j",
",",
"n",
")",
",",
"next",
"(",
"k",
"-",
"-",
",",
"n",
")",
")",
";",
"}",
"else",
"{",
"j",
"+",
"+",
";",
"}",
"}"
] |
[
"in",
"this",
"version",
"we",
"are",
"looking",
"for",
"nums",
"[",
"0",
"]",
"<",
"=",
"nums",
"[",
"1",
"]",
">",
"=",
"nums",
"[",
"2",
"]",
"<",
"=",
"nums",
"[",
"3",
"]",
"and",
"so",
"on"
] | [
"boolean",
"flag",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nums",
"length",
"-",
"1",
";",
"i",
"+",
"+",
")",
"{",
"if",
"(",
"flag",
")",
"{",
"if",
"(",
"nums",
"[",
"i",
"]",
">",
"nums",
"[",
"i",
"+",
"1",
"]",
")",
"{",
"swap",
"(",
"nums",
",",
"i",
",",
"i",
"+",
"1",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"nums",
"[",
"i",
"]",
"<",
"nums",
"[",
"i",
"+",
"1",
"]",
")",
"{",
"swap",
"(",
"nums",
",",
"i",
",",
"i",
"+",
"1",
")",
";",
"}",
"}",
"flag",
"=",
"!",
"flag",
";",
"}"
] |
[
"fade",
"out"
] | [
"if",
"(",
"get",
"visibility",
"(",
")",
"=",
"=",
"gone",
")",
"return",
";",
"alpha",
"animation",
"anim",
"=",
"new",
"alpha",
"animation",
"(",
"1",
"0f",
",",
"0",
"0f",
")",
";",
"anim",
"set",
"duration",
"(",
"200",
")",
";",
"start",
"animation",
"(",
"anim",
")",
";",
"set",
"visibility",
"(",
"gone",
")",
";"
] |
[
"unloads",
"this",
"instance",
"by",
"removing",
"the",
"listener",
"previously",
"added",
"to",
"the",
"table",
"model"
] | [
"this",
"table",
"model",
"remove",
"table",
"model",
"listener",
"(",
"table",
"model",
"listener",
"impl",
")",
";"
] |
[
"sets",
"the",
"given",
"{",
"@",
"code",
"user",
"}",
"as",
"selected",
"bypassing",
"any",
"validations",
"done",
"by",
"{",
"@",
"code",
"set",
"selected",
"item",
"(",
"object",
")",
"}",
"(",
"for",
"example",
"if",
"the",
"user",
"exists",
"in",
"the",
"combo",
"box",
"or",
"if",
"it",
"s",
"already",
"selected",
")"
] | [
"selected",
"item",
"=",
"user",
";",
"fire",
"contents",
"changed",
"(",
"this",
",",
"-",
"1",
",",
"-",
"1",
")",
";"
] |
[
"sets",
"the",
"selected",
"item",
"as",
"the",
"actual",
"internal",
"item",
"with",
"the",
"same",
"id",
"as",
"the",
"provided",
"user"
] | [
"user",
"internal",
"user",
"=",
"null",
";",
"int",
"index",
"=",
"get",
"index",
"of",
"(",
"user",
")",
";",
"if",
"(",
"index",
"!",
"=",
"-",
"1",
")",
"{",
"internal",
"user",
"=",
"get",
"element",
"at",
"(",
"index",
")",
";",
"}",
"else",
"if",
"(",
"get",
"size",
"(",
")",
">",
"0",
")",
"{",
"internal",
"user",
"=",
"get",
"element",
"at",
"(",
"0",
")",
";",
"}",
"set",
"selected",
"item",
"impl",
"(",
"internal",
"user",
")",
";"
] |
[
"returns",
"the",
"index",
"of",
"the",
"specified",
"element",
"in",
"the",
"model",
"s",
"item",
"list"
] | [
"int",
"index",
"=",
"table",
"model",
"get",
"users",
"(",
")",
"index",
"of",
"(",
"object",
")",
";",
"if",
"(",
"index",
"<",
"0",
"&",
"&",
"custom",
"users",
"!",
"=",
"null",
")",
"return",
"table",
"model",
"get",
"users",
"(",
")",
"size",
"(",
")",
"+",
"array",
"utils",
"index",
"of",
"(",
"custom",
"users",
",",
"object",
")",
";",
"return",
"index",
";"
] |
[
"copy",
"a",
"config",
"in",
"zoo",
"keeper"
] | [
"copy",
"config",
"dir",
"(",
"from",
"config",
",",
"to",
"config",
",",
"null",
")",
";"
] |
[
"wraps",
"the",
"given",
"listener",
"with",
"{"
] | [
"return",
"listener",
"get",
"class",
"(",
")",
"is",
"annotation",
"present",
"(",
"run",
"listener",
"thread",
"safe",
"class",
")",
"?",
"listener",
":",
"new",
"synchronized",
"run",
"listener",
"(",
"listener",
",",
"this",
")",
";"
] |
[
"do",
"not",
"invoke"
] | [
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"run",
"started",
"(",
"description",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"do",
"not",
"invoke"
] | [
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"run",
"finished",
"(",
"result",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"invoke",
"to",
"tell",
"listeners",
"that",
"a",
"test",
"suite",
"is",
"about",
"to",
"start",
"runners",
"are",
"strongly",
"encouraged",
"-",
"-",
"but",
"not",
"required",
"-",
"-",
"to",
"call",
"this",
"method",
"if",
"this",
"method",
"is",
"called",
"for",
"a",
"given",
"{",
"@",
"link",
"description",
"}",
"then",
"{",
"@",
"link",
"#",
"fire",
"test",
"suite",
"finished",
"(",
"description",
")",
"}",
"must",
"be",
"called",
"for",
"the",
"same",
"{",
"@",
"code",
"description",
"}"
] | [
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"suite",
"started",
"(",
"description",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"invoke",
"to",
"tell",
"listeners",
"that",
"a",
"test",
"suite",
"is",
"about",
"to",
"finish",
"always",
"invoke",
"this",
"method",
"if",
"you",
"invoke",
"{",
"@",
"link",
"#",
"fire",
"test",
"suite",
"started",
"(",
"description",
")",
"}",
"as",
"listeners",
"are",
"likely",
"to",
"expect",
"them",
"to",
"come",
"in",
"pairs"
] | [
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"suite",
"finished",
"(",
"description",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"invoke",
"to",
"tell",
"listeners",
"that",
"an",
"atomic",
"test",
"is",
"about",
"to",
"start"
] | [
"if",
"(",
"please",
"stop",
")",
"{",
"throw",
"new",
"stopped",
"by",
"user",
"exception",
"(",
")",
";",
"}",
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"started",
"(",
"description",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"invoke",
"to",
"tell",
"listeners",
"that",
"an",
"atomic",
"test",
"failed"
] | [
"fire",
"test",
"failures",
"(",
"listeners",
",",
"as",
"list",
"(",
"failure",
")",
")",
";"
] |
[
"invoke",
"to",
"tell",
"listeners",
"that",
"an",
"atomic",
"test",
"flagged",
"that",
"it",
"assumed",
"something",
"false"
] | [
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"assumption",
"failure",
"(",
"failure",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"invoke",
"to",
"tell",
"listeners",
"that",
"an",
"atomic",
"test",
"was",
"ignored"
] | [
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"ignored",
"(",
"description",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"invoke",
"to",
"tell",
"listeners",
"that",
"an",
"atomic",
"test",
"finished",
"always",
"invoke",
"this",
"method",
"if",
"you",
"invoke",
"{",
"@",
"link",
"#",
"fire",
"test",
"started",
"(",
"description",
")",
"}",
"as",
"listeners",
"are",
"likely",
"to",
"expect",
"them",
"to",
"come",
"in",
"pairs"
] | [
"new",
"safe",
"notifier",
"(",
")",
"{",
"@",
"override",
"protected",
"void",
"notify",
"listener",
"(",
"run",
"listener",
"each",
")",
"throws",
"exception",
"{",
"each",
"test",
"finished",
"(",
"description",
")",
";",
"}",
"}",
"run",
"(",
")",
";"
] |
[
"ask",
"that",
"the",
"tests",
"run",
"stop",
"before",
"starting",
"the",
"next",
"test",
"phrased",
"politely",
"because",
"the",
"test",
"currently",
"running",
"will",
"not",
"be",
"interrupted",
"it",
"seems",
"a",
"little",
"odd",
"to",
"put",
"this",
"functionality",
"here",
"but",
"the",
"<",
"code",
">",
"run",
"notifier",
"<",
"/",
"code",
">",
"is",
"the",
"only",
"object",
"guaranteed",
"to",
"be",
"shared",
"amongst",
"the",
"many",
"runners",
"involved"
] | [
"please",
"stop",
"=",
"true",
";"
] |
[
"checks",
"if",
"given",
"argument",
"value",
"is",
"not",
"{",
"@",
"code",
"null",
"}",
"otherwise",
"-",
"throws",
"{",
"@",
"link",
"null",
"pointer",
"exception",
"}"
] | [
"if",
"(",
"val",
"=",
"=",
"null",
")",
"throw",
"new",
"null",
"pointer",
"exception",
"(",
"null",
"msg",
"prefix",
"+",
"name",
")",
";"
] |
[
"checks",
"that",
"none",
"of",
"the",
"given",
"values",
"are",
"{",
"@",
"code",
"null",
"}",
"otherwise",
"-",
"throws",
"{",
"@",
"link",
"null",
"pointer",
"exception",
"}"
] | [
"not",
"null",
"(",
"val",
"1",
",",
"name",
"1",
")",
";",
"not",
"null",
"(",
"val",
"2",
",",
"name",
"2",
")",
";"
] |
[
"checks",
"that",
"none",
"of",
"the",
"given",
"values",
"are",
"{",
"@",
"code",
"null",
"}",
"otherwise",
"-",
"throws",
"{",
"@",
"link",
"null",
"pointer",
"exception",
"}"
] | [
"not",
"null",
"(",
"val",
"1",
",",
"name",
"1",
")",
";",
"not",
"null",
"(",
"val",
"2",
",",
"name",
"2",
")",
";",
"not",
"null",
"(",
"val",
"3",
",",
"name",
"3",
")",
";"
] |
[
"checks",
"that",
"none",
"of",
"the",
"given",
"values",
"are",
"{",
"@",
"code",
"null",
"}",
"otherwise",
"-",
"throws",
"{",
"@",
"link",
"null",
"pointer",
"exception",
"}"
] | [
"not",
"null",
"(",
"val",
"1",
",",
"name",
"1",
")",
";",
"not",
"null",
"(",
"val",
"2",
",",
"name",
"2",
")",
";",
"not",
"null",
"(",
"val",
"3",
",",
"name",
"3",
")",
";",
"not",
"null",
"(",
"val",
"4",
",",
"name",
"4",
")",
";"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.